Ver Fonte

:bug: Fixing a bug. 批注提交没有校验

冷冷 há 5 anos atrás
pai
commit
0378c3b9a5
1 ficheiros alterados com 12 adições e 8 exclusões
  1. 12 8
      src/views/activiti/task.vue

+ 12 - 8
src/views/activiti/task.vue

@@ -141,14 +141,18 @@
       },
       handleTask: function (row, result) {
         this.obj.taskFlag = result
-        doTask(this.obj).then(() => {
-          this.$message({
-            showClose: true,
-            message: '提交成功',
-            type: 'success'
-          })
-          this.showTask = false
-          this.getList(this.page)
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            doTask(this.obj).then(() => {
+              this.$message({
+                showClose: true,
+                message: '提交成功',
+                type: 'success'
+              })
+              this.showTask = false
+              this.getList(this.page)
+            })
+          }
         })
       },
       viewPic: function (row) {