From d762a77d9238eef17c66c35b06955fca20160043 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 02 九月 2025 19:53:25 +0800
Subject: [PATCH] 表单未清空修复

---
 src/views/flow/donelist.vue |   66 +++++++++++++++++++++++++++-----
 1 files changed, 55 insertions(+), 11 deletions(-)

diff --git a/src/views/flow/donelist.vue b/src/views/flow/donelist.vue
index 5453e24..7eb8aa7 100644
--- a/src/views/flow/donelist.vue
+++ b/src/views/flow/donelist.vue
@@ -11,7 +11,9 @@
             @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" >
             <template #menu="scope">
                 <el-button type="primary" text size="default" @click.stop="handleView(scope.row, scope.index)">鏌ョ湅</el-button>
+                <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || scope.row.flag.toLowerCase().indexOf('program')>-1" v-if="permission.withdraw_button" text size="default" @click.stop="handleWithdraw(scope.row, scope.index)">鎾ゅ洖</el-button>
             </template>
+            
         </avue-crud>
         <el-dialog title="鏌ョ湅璇︽儏" v-model="dialogVisible" width="60%">
             <avue-form v-model="viewRow" :option="viewFormOption" readonly class="viewRowForm"></avue-form>
@@ -26,7 +28,7 @@
     </basic-container>
 </template>
 <script>
-import { getDoneList} from '@/api/flow/todolist';
+import { getDoneList,todoChangeNotify} from '@/api/flow/todolist';
 import { mapGetters } from 'vuex';
 export default {
     data() {
@@ -36,6 +38,7 @@
                 emptyBtn: false,
                 submitBtn: false,
                 menuBtn: false,
+                
                 labelWidth: 100,
                 span: 8,
                 column: [
@@ -68,7 +71,7 @@
                         }
                     },
                     {
-                        label: '宸ヨ壓鐗堟',
+                        label: '鎵规鍙�',
                         prop: 'variables.craftEdition',
                         render: ({ row }) => {
                             return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
@@ -185,6 +188,7 @@
                 columnBtn: false,
                 tip: false,
                 searchShow: true,
+                searchEnter:true,
                 searchMenuSpan: 6,
                 dialogWidth: '60%',
                 border: true,
@@ -192,7 +196,7 @@
                 selection: false,
                 // viewBtn: true,
                 menu: true,
-                menuWidth: 100,
+                menuWidth: 120,
                 column: [
                     {
                         label: '鍏抽敭瀛�',
@@ -215,7 +219,7 @@
 					{
                         label: '鏍囬',
                         prop: '',
-                        width: 100,
+                        width: 200,
 						render: ({ row }) => {
                             return h('p',
                                 {
@@ -259,7 +263,7 @@
                     },
                     {
                         label: '鍒涘缓鏃堕棿',
-                        width: 200,
+                        width: 100,
                         prop: 'processCreateTime',
                         type: 'datetime',
                         format: 'YYYY-MM-DD HH:mm:ss',
@@ -271,7 +275,7 @@
                     },
                     {
                         label: '寮�濮嬫椂闂�',
-                        width: 200,
+                        width: 100,
                         prop: 'createTime',
                         type: 'datetime',
                         format: 'YYYY-MM-DD HH:mm:ss',
@@ -283,11 +287,12 @@
                     },
                     {
                         label: '缁撴潫鏃堕棿',
-                        width: 200,
+                        width: 100,
                         prop: 'endTime',
                         type: 'datetime',
                         format: 'YYYY-MM-DD HH:mm:ss',
                         valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                        sortable:true,
                         search: false,
                         searchRange: true,
                         searchSpan: 8,
@@ -295,7 +300,7 @@
                     },
                     {
                         label: '浠诲姟鍚嶇О',
-                        width: 200,
+                        width: 100,
                         prop: 'taskName',
                     },
                     {
@@ -328,6 +333,38 @@
             });
             this.dialogVisible = true;
         },
+        handleWithdraw(row) {
+            //console.log(row,row.processInstanceId)
+            this.$confirm('纭瑕佹挙鍥炲悧锛�', '', {
+                    confirmButtonText: this.$t('submitText'),
+                    cancelButtonText: this.$t('cancelText'),
+                    type: 'warning',
+                }).then(() => {
+                    axios({
+                        url: '/blade-mdm/flow/mgr/withdraw',
+                        method: 'get',
+                        params: {processInstanceId: row.processInstanceId}
+                    }).then(res => {
+                        if(res.data.code !== 200) {
+                            this.$message.error(res.data.msg);
+                            return;
+                        }
+                        this.$message.success('鎿嶄綔鎴愬姛');
+                        
+                        todoChangeNotify();
+                        
+                        this.refreshChange();
+                    }).catch(err => {
+                        console.error(err);
+                        //done()
+                    });
+                    
+                }).catch(() => {
+                    console.log('>>>>>>')
+                    // this.$message.info('宸插彇娑堟搷浣�');
+                    //done();
+                });
+        },
         currentChange(currentPage) {
             this.page.currentPage = currentPage;
         },
@@ -338,7 +375,7 @@
             console.log('searchChange', params);
             params.createTimeBegin = params?.processCreateTime?.[0] || '';
             params.createTimeEnd = params?.processCreateTime?.[1] || '';
-            console.log(params);
+            //console.log(params);
             // data = {
             //     createTimeBegin: dayjs(params.createTimeBegin).isValid() ? dayjs(params.createTimeBegin).format('YYYY-MM-DD') : '',
             //     createTimeEnd: dayjs(params.createTimeEnd).isValid() ? dayjs(params.createTimeEnd).format('YYYY-MM-DD') : '',
@@ -351,7 +388,7 @@
             }
             this.query = data
             this.onLoad(this.page, data);
-            done();
+            //done();
         },
         searchReset () {
             this.loading = true;
@@ -360,7 +397,7 @@
         },
         sizeChange() {
             this.loading = true;
-        this.getList(); 
+            this.getList(); 
         },
         refreshChange() {
             this.onLoad(this.page, this.query);
@@ -384,7 +421,14 @@
                 this.loading = false;
             });
         },
+        at1(){
+            console.log('computed')
+        }
         
+    },
+    computed: {
+       
+        ...mapGetters(['userInfo', 'permission']),
     }
 }
 </script>

--
Gitblit v1.9.3