From bbba8ba895b5e0f5bad0db31fd80f75be184206e Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 16 八月 2025 14:02:12 +0800
Subject: [PATCH] 调整审批界面

---
 src/views/flow/components/TodolistRightTop.vue |    6 ++++--
 src/views/flow/todolist.vue                    |   47 ++++++++++++++++++++++-------------------------
 2 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/src/views/flow/components/TodolistRightTop.vue b/src/views/flow/components/TodolistRightTop.vue
index 16a80f3..f65ed89 100644
--- a/src/views/flow/components/TodolistRightTop.vue
+++ b/src/views/flow/components/TodolistRightTop.vue
@@ -10,8 +10,8 @@
         <el-form-item label="鏍囬">
             <el-input v-model="formInline.title" placeholder="" style="width: 200px"></el-input>
         </el-form-item>
-        <el-form-item label="浠诲姟鍚嶇О">
-            <el-input v-model="formInline.processDefinitionName" placeholder="" style="width: 200px"></el-input>
+        <el-form-item label="娴佺▼鍚嶇О">
+            <el-input v-model="formInline.myProcessName" placeholder="" style="width: 200px"></el-input>
         </el-form-item>
         <el-form-item label="鍒涘缓浜�">
             <el-input v-model="formInline.startUserName" placeholder="" style="width: 200px"></el-input>
@@ -85,10 +85,12 @@
             ...this.row,
             title: this.row.variables.title || '',
             processDefinitionName: this.row.processDefinitionName || '',
+            
             taskName: this.row.taskName || '',
             createTime: this.row.createTime || '',
             startUserName: this.row.startUserName || '',
             drawingNoEdition: this.row.variables.drawingNoEdition || '',
+            myProcessName: this.row.variables.myProcessName || '',
             craftEdition: this.row.variables.craftEdition || '',
             machineCode: this.row.variables.machineCode || '',
             processName: this.row.variables.processName || '',
diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 1818285..9aded8a 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -428,37 +428,34 @@
                 }
             } else if(approve === 'N'){
                 //涓嶉�氳繃鐨勬儏鍐�
-                //鏍规嵁鍦ㄧ嚎鏂囨。34琛岋紝椹冲洖'鍙戦�佺粰'鏄鐢紝浣嗘湁榛樿閫夐」
+                //鏍规嵁鍦ㄧ嚎鏂囨。34琛岋紝'鍙戦�佺粰'鏄鐢紝浣嗘湁榛樿閫夐」
                 this.optionApprove.column[1].disabled = true;
 
-                //this.formApprove.assignee = ''
-                //if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) {
-                    //鏁版帶绋嬪簭瀹℃牳(楂樺笀)锛屾槸鏈�鍚庝竴涓妭鐐癸紝涓嶉�氳繃 閮芥槸绂佺敤'鍙戦�佺粰'锛岀洿鎺ョ粰 鏍″浜哄憳
-                    //this.optionApprove.column[1].disabled = true;
-                //}
-                if(["cureProgramTask"].includes(row.taskDefinitionKey)) {
+                if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) {
+                    //瀹℃壒鑺傜偣锛屼笂涓�姝ユ槸鏍″
+                    this.formApprove.assignee = row.variables.checker;
+                }else if(["check", 'cureCheckTask','repalceCheckTask'].includes(row.taskDefinitionKey)){
+                    //鏍″鑺傜偣,涓婁竴姝ユ槸缂栫▼
+                    this.formApprove.assignee = row.variables.programmer;
+                }else if (["programmingTask"].includes(row.taskDefinitionKey)) {
+                    // 缂栧埗鑺傜偣,涓婁竴姝ユ槸缁勯暱
+                    this.formApprove.assignee = row.variables.teamLeader;
+                }else if(["cureProgramTask"].includes(row.taskDefinitionKey)) {
                     //鍥哄寲缂栧埗鑺傜偣锛屼笉閫氳繃灏辩粨鏉熶簡锛宎ssignee璁剧疆=''
                     this.formApprove.assignee = '';
+                }else if(["confirmIsUseableTask"].includes(row.taskDefinitionKey)) {
+                    //鍒ゆ柇鏄惁鍙敤鑺傜偣锛屼笉鍙敤锛岀粰缂栧埗
+                    this.formApprove.assignee = row.variables.programmer;
+                }if(['teamLeaderTask'].includes(row.taskDefinitionKey)){
+                    this.formApprove.assignee = '';
                 }
-                if(["teamLeaderTask" ,'repalceProgrammingTask'].includes(row.taskDefinitionKey)) {
-                    //缁勯暱锛屾浛鎹㈡祦绋嬬殑绋嬪簭缂栧埗锛岀鐢�'鍙戦�佺粰'
-                    //this.optionApprove.column[1].disabled = true;
-                }else {
-                    //闄や簡缁勯暱锛屾浛鎹㈡祦绋嬬殑缂栧埗锛屽叾浠栬妭鐐圭殑涓嶉�氳繃锛岄兘鏄粰涓婁竴涓楠ょ殑澶勭悊浜�
-                    if(!["cureProgramTask"].includes(row.taskDefinitionKey)) {
-                        //闈炲浐鍖栫紪鍒惰妭鐐癸紝闇�瑕佸垵濮嬪寲榛樿澶勭悊浜�
-                        getPrevius({processInstanceId: row.processInstanceId}).then(res => {
-                            console.log(res)
-                            if(res.data.code === 200) {
-                                this.formApprove.assignee = res.data.data // 濡傛灉鏄�氳繃锛屽垯榛樿鎸囨淳缁欒嚜宸�
-                            }
-                        });
-                    }
-                    
+                
+            }else if(approve === 'R'){
+                //椹冲洖锛岀洰鍓嶅彧鏈夋鏌ョ▼搴忔槸鍚﹀彲鐢ㄨ妭鐐�
+                if(["confirmIsUseableTask"].includes(row.taskDefinitionKey)) {
+                    //鍒ゆ柇绋嬪簭鏄惁鍙敤鑺傜偣锛岄┏鍥烇紝缁欑粍闀�
+                    this.formApprove.assignee = row.variables.teamLeader;
                 }
-
-                
-                
             }
             
         },

--
Gitblit v1.9.3