From 89baf9379ed70db9b77b12c1a9951c1bc6ac98a2 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期二, 17 六月 2025 21:33:14 +0800
Subject: [PATCH] dupate

---
 src/views/flow/todolist.vue |   71 ++++++++++++++++++++++++-----------
 1 files changed, 49 insertions(+), 22 deletions(-)

diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index d8efadd..0ce9190 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -26,17 +26,18 @@
 </template>
 
 <script>
-import { getList, approve } from '@/api/flow/todolist';
+import { getList, approve,getAssignee } from '@/api/flow/todolist';
 import { mapGetters } from 'vuex';
 
 export default {
     data() {
         return {
+            assigneeData: [],
             row: {},
             approveBox: false,
             formApprove: {
                 comment: '',
-                approve: 'Y', // 榛樿鍚屾剰
+                approve: '', // 榛樿鍚屾剰
             },
             optionApprove: {
                 labelWidth: 100,
@@ -57,12 +58,14 @@
                         label: '涓嬩竴瀹℃壒鐢ㄦ埛',
                         prop: 'assignee',
                         type: 'select',
-                        dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
+                        // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
+                        // dicFlag: true,
                         props: {
                             label: 'name',
                             value: 'id',
                         },
                         span: 24,
+                        disabled: false,
                         dicData: [
                             
                         ],
@@ -105,21 +108,10 @@
                 index: true,
                 // selection: true,
                 // viewBtn: true,
-                menuWidth: 320,
+                menuWidth: 100,
                 dialogClickModal: false,
 
                 column: [
-                    {
-                        label: '鍒涘缓鏃堕棿',
-                        prop: 'createTime',
-                        type: 'datetime',
-                        format: 'YYYY-MM-DD',
-                        valueFormat: 'YYYY-MM-DD',
-                        search: true,
-                        searchRange: true,
-                        searchSpan: 8,
-                        hide: true,
-                    },
                     {
                         label: '鍏抽敭瀛�',
                         prop: 'keyword',
@@ -160,17 +152,24 @@
                     {
                         label: '鍒涘缓浜�',
                         width: 100,
-                        prop: '',
+                        prop: 'startUserName',
                     },
                     {
                         label: '鍒涘缓鏃堕棿',
                         width: 200,
-                        prop: 'createTime',
+                        prop: 'processCreateTime',
+                        type: 'datetime',
+                        format: 'YYYY-MM-DD',
+                        valueFormat: 'YYYY-MM-DD',
+                        search: true,
+                        searchRange: true,
+                        searchSpan: 8,
+                        // hide: true,
                     },
                     {
                         label: '鍒拌揪鏃堕棿',
-                        width: 100,
-                        prop: '',
+                        width: 200,
+                        prop: 'createTime',
                     },
                     {
                         label: '鍒拌揪鎻忚堪',
@@ -179,12 +178,11 @@
                     },
                     {
                         label: '鏂囦欢',
-                        width: 100,
+                        width: 200,
                         prop: '',
                     },
                     {
-                        label: '鍒拌揪鏃堕棿',
-                        width: 100,
+                        label: '褰撳墠鑺傜偣',
                         prop: '',
                     },
 
@@ -205,6 +203,14 @@
         //         }
         //     });
         // },
+        'formApprove.approve'(val) {
+            if (val === 'Y' && this.row.taskDefinitionKey === 'approveTask') {
+                this.optionApprove.column[1].disabled = true;
+                this.formApprove.assignee = ''; // 濡傛灉鏄�氳繃锛屽垯榛樿鎸囨淳缁欒嚜宸�
+            } else {
+                this.optionApprove.column[1].disabled = false;
+            }
+        },
     },
     computed: {
         ...mapGetters(['userInfo', 'permission']),
@@ -217,10 +223,31 @@
         //     };
         // },
     },
+    mounted() {
+        getAssignee().then(res=> {
+            this.assigneeData = res.data.data;
+            this.optionApprove.column[1].dicData = this.assigneeData;
+        })
+    },
     methods: {
         handleAction(row, index) {
+            this.formApprove = {
+                comment: '',
+                approve: '', // 榛樿鍚�
+            }
             this.approveBox = true;
             this.row = row
+            if(row.taskDefinitionKey=="check") {
+                this.formApprove.assignee = row.variables.senior;
+            } else if(row.taskDefinitionKey=="programmingTask") {
+                this.formApprove.assignee = row.variables.checker;
+            } else if(row.taskDefinitionKey=="teamLeaderTask") {
+                this.formApprove.assignee = row.variables.programmer
+            } else if(row.taskDefinitionKey=="confirmIsUseableTask") {
+                this.formApprove.assignee = row.variables.checker
+            } else if(row.taskDefinitionKey=="approveTask") {
+
+            }
             console.log('handleAction', row, index);
         },
         handleSubmit(form, done) {

--
Gitblit v1.9.3