From b5f9a120401311bb4cdedda17618ed5464d185c9 Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期二, 05 八月 2025 10:35:50 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/mdmweb

---
 src/views/flow/todolist.vue |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index d33d352..e34e26f 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -9,8 +9,7 @@
                 </el-button>
             </template>
             <template #menu="scope">
-                <el-button type="primary" text size="default" v-if="permission.flow_model_update"
-                    @click.stop="handleAction(scope.row, scope.index)">瀹℃壒
+                <el-button type="primary" text size="default" @click.stop="handleAction(scope.row, scope.index)">瀹℃壒
                 </el-button>
             </template>
         </avue-crud>
@@ -44,6 +43,7 @@
     },
     data() {
         return {
+            
             applist: [],
             assigneeData: [],
             row: {},
@@ -89,7 +89,20 @@
                         span: 24,
                         prop: 'comment',
                         type: 'textarea',
-                        rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+                        // rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+                        rules: [
+                            {
+                            validator: (rule, value, callback) => {
+                                console.log('-------',this.formApprove)
+                                if (value === '' && this.formApprove.approve !== 'Y') {
+                                    callback(new Error('璇疯緭鍏ュ娉�'));
+                                } else {
+                                    callback();
+                                }
+                            },
+                            trigger: 'blur'
+                            }
+                        ]
                     },
                 ],
             },
@@ -102,6 +115,7 @@
             query: {},
             loading: true,
             option: {
+                rowKey: "taskId",
                 addBtn: false,
                 editBtn: false,
                 delBtn: false,
@@ -138,15 +152,15 @@
                         ],
                     },
                     {
-                        label: '浠诲姟鍚嶇О',
+                        label: '娴佺▼鍚嶇О',
                         prop: 'processDefinitionName',
                         width: 100,
-                    },
+                    },/*
                     {
                         label: '娴佺▼绫诲瀷',
                         width: 100,
                         prop: 'categoryName',
-                    },
+                    },*/
 
                     {
                         label: '鏈哄簥',
@@ -310,9 +324,11 @@
                     this.reassignBox = false;
                     this.$refs?.reassginform?.resetForm();
                     this.onLoad(this.page, this.query);
+                    done()
 
                 }).catch(err => {
                     console.error(err);
+                    done()
                 })
             });
             done();
@@ -350,11 +366,17 @@
                 processInstanceId: this.row.processInstanceId,
                 // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
             }).then(res => {
+                if(res.data.code !== 200) {
+                    this.$message.error(res.data.msg);
+                    done();
+                    return;
+                }
                 this.$message.success('瀹℃壒鎴愬姛');
                 this.approveBox = false;
                 this.onLoad(this.page, this.query);
                 done();
             }).catch(err => {
+                done();
                 console.error(err);
             });
         },

--
Gitblit v1.9.3