Sfoglia il codice sorgente

暂存多开页面问题解决

shenqilong 7 mesi fa
parent
commit
c5e297c809
1 ha cambiato i file con 47 aggiunte e 37 eliminazioni
  1. 47 37
      src/business/platform/bpmn/form/action.js

+ 47 - 37
src/business/platform/bpmn/form/action.js

@@ -209,27 +209,31 @@ export default {
         taskId: this.taskId,
         data: JSON.stringify(replaceFormData),
         opinion
-      }).then((response) => {
-        // 后置事件
-        this.afterScript(
-          this.actionName,
-          {
-            data: response.data,
-            variables: response.variables
-          },
-          () => {
-            loading.close()
-            this.$alert(`已保存表单内容!`, {
-              showClose: false
-            })
-              .then(() => {
-                // 回调上个页面
-                // this.callbackPage()
-              })
-              .catch(() => {})
-          }
-        )
       })
+        .then((response) => {
+          // 后置事件
+          this.afterScript(
+            this.actionName,
+            {
+              data: response.data,
+              variables: response.variables
+            },
+            () => {
+              loading.close()
+              this.$alert(`已保存表单内容!`, {
+                showClose: false
+              })
+                .then(() => {
+                  // 回调上个页面
+                  // this.callbackPage()
+                })
+                .catch(() => {})
+            }
+          )
+        })
+        .catch(() => {
+          loading.close()
+        })
     },
     /**
      * 处理启动流程
@@ -337,24 +341,30 @@ export default {
           this.proInstId = proInstId
           this.bizKey = bizKey
           // 后置事件
-          this.afterScript(
-            this.actionName,
-            {
-              data: response.data,
-              variables: response.variables
-            },
-            () => {
-              loading.close()
-              this.$alert(`保存成功!`, {
-                showClose: false
-              })
-                .then(() => {
-                  // 回调上个页面
-                  // this.callbackPage()
+
+          if (response.state === 103) {
+            loading.close()
+            this.$message.error(response.message)
+          } else {
+            this.afterScript(
+              this.actionName,
+              {
+                data: response.data,
+                variables: response.variables
+              },
+              () => {
+                loading.close()
+                this.$alert(`保存成功!`, {
+                  showClose: false
                 })
-                .catch(() => {})
-            }
-          )
+                  .then(() => {
+                    // 回调上个页面
+                    // this.callbackPage()
+                  })
+                  .catch(() => {})
+              }
+            )
+          }
         })
         .catch(() => {
           loading.close()