Forráskód Böngészése

修复终止流程状态变更异常

linweizeng 2 éve
szülő
commit
91dd63fc98
1 módosított fájl, 18 hozzáadás és 16 törlés
  1. 18 16
      src/business/platform/bpmn/form/action.js

+ 18 - 16
src/business/platform/bpmn/form/action.js

@@ -37,11 +37,7 @@ export default {
                     } else {
                         this.setData()
                     }
-                    // if (this.isHide()) {
                     this.handleDirectActionEvent(actionName)
-                    // } else {
-                    //     this.agreeDialogVisible = true
-                    // }
                     break
                 case 'oppose':// 反对
                     this_.$confirm(
@@ -53,12 +49,8 @@ export default {
                             type: "warning"
                         }
                     ).then(() => {
-                        // if (this.isHide()) {
                         this.setData("未同意")
                         this.handleDirectActionEvent(actionName)
-                        // } else {
-                        //     this.agreeDialogVisible = true
-                        // }
                     }).catch(() => { })
                     break
                 case 'abandon':// 弃权
@@ -107,11 +99,6 @@ export default {
                 case 'rejectToStart':// 驳回发起人
                 case 'reject':// 驳回
                     this.setData("已退回")
-                    // if (this.isBpmOpinionHide && actionName === 'rejectToPrevious') {
-                    //     this.handleDirectActionEvent(actionName)
-                    // } else {
-                    //     this.rejectDialogVisible = true
-                    // }
                     this.rejectDialogVisible = true
                     break
                 case 'delegate':// 转办
@@ -127,7 +114,7 @@ export default {
                     this.addSignTaskDialogVisible = true
                     break
                 case 'endProcess':// 终止流程
-                    this.setData("2")
+                    this.setData("已终止")
                     this.handleEndProcess()
                     break
                 case 'print':// 打印
@@ -388,8 +375,23 @@ export default {
                     type: 'warning'
                 }).then(() => {
                     const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
-                    this.handleDoEndProcess({
-                        opinion: opinion
+                    const formData = this.getFormData()
+                    const loading = this.$loading({
+                        lock: true,
+                        text: this.$t('common.saving')
+                    })
+                    if (!formData) return
+                    bpmTaskSave({
+                        taskId: this.taskId,
+                        data: JSON.stringify(formData)
+                    }).then(response => {
+                        this.handleDoEndProcess({
+                            opinion: opinion
+                        }).then(() => {
+                            loading.close()
+                        })
+                    }).catch(error => {
+                        loading.close()
                     })
                 }).catch(() => { })
             } else {