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/todolist.vue |   60 +++++++++++++++++++++++++++++-------------------------------
 1 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 086e72e..c995284 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -6,12 +6,12 @@
             @selection-change="selectionTransferTask">
             <template #menu-left>
                 
-                <el-button type="primary" v-if="permission.auto_dispatch" plain @click="reassign(2)">鑷姩娲惧伐
+                <el-button type="primary" :disabled="this.transferTaskSelection.length==0" v-if="permission.auto_dispatch" plain @click="reassign(2)">鑷姩娲惧伐
                 </el-button>
-                <el-button type="primary" v-if="permission.manual_dispatch" plain @click="reassign(1)">鎵嬪姩娲惧伐
+                <el-button type="primary" :disabled="this.transferTaskSelection.length==0" v-if="permission.manual_dispatch" plain @click="reassign(1)">鎵嬪姩娲惧伐
                 </el-button>
-                <el-button type="primary" plain @click="reassign(0)">閲嶆柊鎸囨淳</el-button>
-                <el-button type="primary" v-if="permission.batch_approve" plain @click="reassign(3)">鎵归噺瀹℃壒
+                <el-button type="primary" :disabled="this.transferTaskSelection.length==0" plain @click="reassign(0)">閲嶆柊鎸囨淳</el-button>
+                <el-button type="primary" :disabled="this.transferTaskSelection.length==0" v-if="permission.batch_approve" plain @click="reassign(3)">鎵归噺瀹℃壒
                 </el-button>
             </template>
             <template #menu="scope">
@@ -47,15 +47,18 @@
             </div>
         </el-drawer>
     </basic-container>
+    <div>
+        <!--<top-todo ref="topTodoComponent" />-->
+    </div>
 </template>
-
 <script>
-import { getList, approve, getAssignee,reassgin,manualDispatch,autoDispatch,getPrevius,batchApprove } from '@/api/flow/todolist';
+import { getList, approve, getAssignee,reassgin,manualDispatch,autoDispatch,todoChangeNotify,batchApprove } from '@/api/flow/todolist';
 import { mapGetters } from 'vuex';
 import dayjs from 'dayjs';
 import TodolistLeft from './components/TodolistLeft.vue';
 import TodolistRightTop from './components/TodolistRightTop.vue';
 import processTrace from './components/process-trace.vue';
+
 export default {
     components: {
         TodolistLeft,
@@ -321,24 +324,9 @@
         };
     },
     watch: {
-        // 'form.category'() {
-        //     const category = func.toInt(this.form.category);
-        //     this.$refs.crud.option.column.filter(item => {
-        //         if (item.prop === 'path') {
-        //             item.rules[0].required = category === 1;
-        //         }
-        //         if (item.prop === 'isOpen') {
-        //             item.disabled = category === 2;
-        //         }
-        //     });
-        // },
+        
         'formApprove.approve'(val) {
             this.setAssignee(this.row, val);
-            // if(val === 'Y' && ['confirmIsUseableTask'].includes(this.row.taskDefinitionKey) && this.row.variables.isProcessEditionSame=='N') {
-            //     // this.optionApprove.column[2].display = true; // 鏄剧ず宸ュ簭鐗堟
-            // } else {
-            //     this.optionApprove.column[2].display = false; // 闅愯棌宸ュ簭鐗堟
-            // }
             
         },
         'reassignForm.approve'(val) {
@@ -368,10 +356,17 @@
     },
     mounted() {
         //this.setApproveBtn(row)
+        getAssignee({
+                taskId: 0,
+             }).then(res => {
+                //if(row.taskDefinitionKey === '')
+                this.assigneeData = res.data.data;
+                this.reassignOption.column[1].dicData = this.assigneeData;
+             });
     },
     methods: {
-        // 璁剧疆瀹℃壒缁撴灉鐨勭姸鎬�
-        setApproveBtn (row) {
+        
+        setApproveBtn (row) { // 璁剧疆瀹℃壒缁撴灉鐨勭姸鎬�
             // 1.瀹℃壒鐣岄潰radio鏂囨湰淇敼锛屾櫘閫氳妭鐐圭殑2涓猺adio鏂囨湰 閫氳繃锛坅pprove=Y),涓嶉�氳繃(鐜板湪鐨勯┏鍥�)(approve=N)
             
             this.optionApprove.column[0].dicData = [
@@ -506,6 +501,7 @@
             this.transferTaskSelection = list;
         },
         reassign(val) {// 閲嶆柊鎸囨淳
+            
             this.reassignType = val;
             if (this.transferTaskSelection.length === 0) {
                 this.$message.warning('璇烽�夋嫨闇�瑕佹搷浣滅殑浠诲姟');
@@ -531,7 +527,7 @@
                         }
                         this.$message.success('鎿嶄綔鎴愬姛');
                         this.onLoad(this.page, this.query);
-
+                        todoChangeNotify();
                     }).catch(err => {
                         this.$message.success('鎿嶄綔澶辫触');
                     })
@@ -583,6 +579,8 @@
                         this.reassignBox = false;
                         this.$refs?.reassginform?.resetForm();
                         this.onLoad(this.page, this.query);
+
+                        todoChangeNotify();
                         done()
 
                     }).catch(err => {
@@ -615,6 +613,8 @@
                         this.reassignBox = false;
                         this.$refs?.reassginform?.resetForm();
                         this.onLoad(this.page, this.query);
+
+                        todoChangeNotify();
                         done()
 
                     }).catch(err => {
@@ -647,6 +647,8 @@
                         this.reassignBox = false;
                         this.$refs?.reassginform?.resetForm();
                         this.onLoad(this.page, this.query);
+
+                        todoChangeNotify();
                         done()
 
                     }).catch(err => {
@@ -708,6 +710,8 @@
                 this.$message.success('瀹℃壒鎴愬姛');
                 this.approveBox = false;
                 this.onLoad(this.page, this.query);
+
+                todoChangeNotify();//椤堕儴寰呭姙鏁伴噺鍒锋柊
                 done();
             }).catch(err => {
                 done();
@@ -721,12 +725,6 @@
             console.log('searchChange', params);
             params.createTimeBegin = params?.processCreateTime?.[0] || '';
             params.createTimeEnd = params?.processCreateTime?.[1] || '';
-            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') : '',
-            //     keyword: params.keyword || ''
-            // }
             data = {
                 createTimeBegin: params.createTimeBegin,
                 createTimeEnd: params.createTimeEnd,

--
Gitblit v1.9.3