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/api/flow/todolist.js              |   23 ++++-------
 src/views/basesetting/produceplan.vue |    3 +
 src/views/flow/todolist.vue           |   71 ++++++++++++++++++++++++-----------
 3 files changed, 60 insertions(+), 37 deletions(-)

diff --git a/src/api/flow/todolist.js b/src/api/flow/todolist.js
index 4b0d67e..9b8a7d3 100644
--- a/src/api/flow/todolist.js
+++ b/src/api/flow/todolist.js
@@ -1,7 +1,7 @@
 /*
  * @Date: 2025-06-12 22:38:05
  * @LastEditors: gaoshp
- * @LastEditTime: 2025-06-16 22:42:32
+ * @LastEditTime: 2025-06-17 21:22:59
  * @FilePath: /mdmweb/src/api/flow/todolist.js
  */
 import request from '@/axios';
@@ -14,7 +14,7 @@
       current,
       size,
     },
-  });
+  })
 };
 export const approve = (params) => {
   return request({
@@ -23,15 +23,10 @@
     data: params,
   });
 }
-export const add = (parentId, params) => {
-  
-};
-export const remove = (parentId, params) => {
-  
-};
-export const update = (parentId, params) => {
-  
-};
-export const getMenu = (parentId, params) => {
-  
-};
\ No newline at end of file
+export const getAssignee = (params) => {
+  return request({
+    url: `/blade-mdm/flow/flow-user-list?deptId=0`,
+    method: 'get',
+    params,
+  });
+}
\ No newline at end of file
diff --git a/src/views/basesetting/produceplan.vue b/src/views/basesetting/produceplan.vue
index 18cd2a5..bf52432 100644
--- a/src/views/basesetting/produceplan.vue
+++ b/src/views/basesetting/produceplan.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2025-06-17 11:44:52
  * @LastEditors: gaoshp
- * @LastEditTime: 2025-06-17 19:33:51
+ * @LastEditTime: 2025-06-17 20:46:18
  * @FilePath: /mdmweb/src/views/basesetting/produceplan.vue
 -->
 <template>
@@ -207,6 +207,7 @@
         },
         rowUpdate (row, index, done, loading) {
             console.log('rowUpdate', row);
+            
             update(row).then(
                     () => {
                       this.onLoad(this.page);
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