12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import list from '@/mixins/list'
- import {dibootApi} from '@/utils/dibootApi'
- export default {
- mixins: [list],
- created() {
- this.activeIndex = -100
- this.getList(true)
- },
-
- methods: {
- handle2ProcessTask(id, instId, category, definitionId, allowDeal) {
- uni.navigateTo({
- url:`/pages/workflowTask/webviewPages/dealTask?id=${id}&definitionId=${definitionId}&instId=${instId}&category=${category}&allowDeal=${allowDeal}`
- })
- },
- // 撤销
- handle2Click(processInstanceId, taskOperate) {
- uni.showModal({
- title: '',
- content: `确认撤销?`,
- showCancel: true,
- confirmText: '确定',
- success: async (res) => {
- if (res.confirm) {
- const res = await dibootApi.put('/workflow/task/taskOperate', {
- processInstanceId,
- taskOperate,
- validTask: false
- })
- if (res.code === 0) {
- uni.showToast({
- title: '撤销成功',
- icon: 'none'
- })
- this.page.pageIndex = 1
- this.getList(true)
- }
- }
- }
- })
- },
- // 重新发起
- handle2RestartWorkflow(item){
- uni.navigateTo({
- url: `/pages/workflowTask/webviewPages/startFlow?id=${item.procDefId}&processInstanceId=${item.id}&defaultTitle=${item.name}&name=${item.processDefinitionName}&restart=true&type=myLaunch`
- })
- }
- },
- watch: {
- searchKeyWord: {
- handler: function (val) {
- this.list = []
- console.log('搜索关键字', this.type)
- if(this.type === 'myLaunch'){
- this.queryParam['procInstId'] = val||undefined
- }else{
- this.queryParam['name'] = val
- }
-
- this.handlePullDownRefresh()
- }
- }
- },
- props: {
- approveListHeight: {
- type: Number
- },
- searchKeyWord: {
- type: String
- },
- type: {
- type: String,
- required: true
- }
- }
- }
|