From c9439f6a1e5ac58501fc85aee2d70568a97b59e2 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期四, 21 八月 2025 18:46:02 +0800
Subject: [PATCH] 123

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

diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 08ea98e..015e93a 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -67,6 +67,8 @@
             activeName: 'approve',
             applist: [],
             assigneeData: [],
+            allAssigneeData: [],
+            managerAssigneeData: [],//鏁版帶绠$悊鍛樿鑹茬殑瀹℃壒鐢ㄦ埛
             row: {},
             approveBox: false,
             formApprove: {
@@ -365,11 +367,6 @@
         },
     },
     mounted() {
-        getAssignee(this.row).then(res => {
-            this.assigneeData = res.data.data;
-            this.optionApprove.column[1].dicData = this.assigneeData;
-            this.reassignOption.column[1].dicData = this.assigneeData;
-        })
         //this.setApproveBtn(row)
     },
     methods: {
@@ -425,6 +422,15 @@
             }
         },
         setAssignee (row, approve) {
+            
+            if (["cureProgramTask"].includes(row.taskDefinitionKey)) {
+                if(approve === 'N'){
+                    this.optionApprove.column[1].dicData = this.managerAssigneeData;
+                }else{
+                    //this.assigneeData = this.allAssigneeData;
+                    this.optionApprove.column[1].dicData = this.allAssigneeData;
+                }
+            }
             if (approve === 'Y') {//瀹℃壒閫氳繃鐨勬儏鍐�
 
                 this.optionApprove.column[1].disabled = false;
@@ -462,6 +468,12 @@
                     //鍥哄寲缂栧埗鑺傜偣锛屼笉閫氳繃缁欐暟鎺х鐞嗗憳
                     //TODO 鎸夋壘瑙掕壊瀹氫綅缁欏叾涓竴涓暟鎺х鐞嗗憳
                     this.optionApprove.column[1].disabled = false;
+                    for(var i=0;i<this.assigneeData.length;i++){
+                        if(this.assigneeData[i].manager == true){
+                            this.formApprove.assignee = this.assigneeData[i].id;
+                            break;
+                        }
+                    }
                     //this.formApprove.assignee = '';
                 }else if(["confirmIsUseableTask"].includes(row.taskDefinitionKey)) {
                     //鍒ゆ柇鏄惁鍙敤鑺傜偣锛屼笉鍙敤锛岀粰缂栧埗
@@ -643,12 +655,28 @@
             }
         },
         handleAction(row, index) {
+             getAssignee({
+                taskId: row.taskId,
+             }).then(res => {
+                //if(row.taskDefinitionKey === '')
+                this.assigneeData = res.data.data;
+                this.allAssigneeData = res.data.data;
+                //鍒濆鍖栨暟鎺х鐞嗗憳鐨勬暟缁�
+                for(var i=0;i<this.allAssigneeData.length;i++){
+                    if(this.allAssigneeData[i].manager == true){
+                        this.managerAssigneeData[this.managerAssigneeData.length] = this.allAssigneeData[i];
+                    }
+                }
+                this.optionApprove.column[1].dicData = this.assigneeData;
+                this.reassignOption.column[1].dicData = this.assigneeData;
+            })
             this.formApprove = {
                 comment: '',
                 approve: 'Y', // 榛樿鍚�
             }
             this.approveBox = true;
             this.row = row
+
             this.setAssignee(row, this.formApprove.approve);
             this.setApproveBtn(row);
             console.log('handleAction', row, index);
@@ -752,7 +780,7 @@
     }
 
     .left {
-        width: 400px;
+        width: 40%;
     }
 
     .right {

--
Gitblit v1.9.3