From d72f14301480b146be606cb91455f8fe943309c7 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 02 Jan 2023 10:17:11 +0800
Subject: [PATCH] 添加申请撤销功能,删除申请撤销包

---
 src/views/work/send.vue |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/views/work/send.vue b/src/views/work/send.vue
index 4d6ed2b..57c78cf 100644
--- a/src/views/work/send.vue
+++ b/src/views/work/send.vue
@@ -23,6 +23,7 @@
         <el-button type="text"
                    size="small"
                    icon="el-icon-delete"
+                   :disabled="scope.row.processIsFinished === 'finished' || scope.row.processIsFinished ==='withdraw'  "
                    @click.stop="handleCancel(scope.row)">撤 销
         </el-button>
         <el-button type="text"
@@ -38,7 +39,7 @@
       </template>
       <template slot-scope="{row}"
                 slot="processIsFinished">
-        <el-tag>{{row.processIsFinished==='finished' ? '已完成' : '未完成'}}</el-tag>
+        <el-tag>{{row.processIsFinished==='finished' ? '已完成' : row.processIsFinished ==='withdraw'?'自行撤销':'未完成'}}</el-tag>
       </template>
     </avue-crud>
     <flow-design is-dialog :is-display.sync="flowBox" :process-instance-id="processInstanceId"></flow-design>
@@ -189,9 +190,14 @@
         });
       },
       handleCancel(row){
-        console.log(row)
-        withdrawTask(this.userInfo.user_id).then(res=>{
-          this.$message(res.data.msg)
+        withdrawTask(row).then(res=>{
+          if (res.data.code == 200){
+            this.$message.success(res.data.msg)
+          }else {
+            this.$message.error(res.data.msg)
+          }
+
+          this.onLoad(this.page,this.query)
         })
       }
     }

--
Gitblit v1.9.3