From 5c929cfb5286a31a4e067cbc61e8774f4e7d42ae Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 06 五月 2025 11:25:41 +0800
Subject: [PATCH] 任务查看:任务名称undefined解决

---
 src/views/components/noticeTable.vue |   87 +++++++++++++++++++++++++++++++++++--------
 1 files changed, 71 insertions(+), 16 deletions(-)

diff --git a/src/views/components/noticeTable.vue b/src/views/components/noticeTable.vue
index 76ca576..9e173d3 100644
--- a/src/views/components/noticeTable.vue
+++ b/src/views/components/noticeTable.vue
@@ -11,6 +11,13 @@
                     娴佺▼寰呭姙
                 </div>
                 <div
+                  :class="{ active: currentTab === 'wait' }"
+                  class="tab"
+                  @click="switchTab('wait')"
+                >
+                  瀹圭己寰呭姙
+                </div>
+                <div
                     :class="{ active: currentTab === 'schedule' }"
                     class="tab"
                     @click="switchTab('schedule')"
@@ -82,7 +89,11 @@
     </div>
 </template>
 <script>
-import { getProjectProcessTodo, getDetailByProcessInsId } from "@/api/projectProcess/projectProcess.js";
+import {
+  getProjectProcessTodo,
+  getDetailByProcessInsId,
+  getProjectProcessWait
+} from "@/api/projectProcess/projectProcess.js";
 import { getProjectPlanToDoList } from "@/api/projectPlan";
 export default {
     data() {
@@ -127,6 +138,37 @@
                     align: "left",
                 },
             ],
+          waitTableHeaders: [
+            { label: "娴佺▼鐜妭", prop: "taskName", minWidth: 150, align: "left" },
+            {
+              label: "鐢宠椤圭洰",
+              prop: "projectName",
+              minWidth: 150,
+              align: "left",
+            },
+            {
+              label: "澶勭悊浜�",
+              prop: "promoterName",
+              minWidth: 100,
+              align: "left",
+              formatter: (row) => {
+                if (row.handlerType === 'USER') {
+                  return row.promoterName.join('銆�')
+                } else if (row.handlerType === 'DEPT') {
+                  return row.promoterUnitName.join('銆�')
+                } else if (row.handlerType === 'ROLE') {
+                  return row.promoterUnitName.join('銆�')
+                }
+              }
+            },
+            // { label: "瀹屾垚鎯呭喌", prop: "taskStatus", minWidth: 143, align: "left" },
+            // {
+            //   label: "鍓╀綑鏃堕棿",
+            //   prop: "remainingTime",
+            //   minWidth: 143,
+            //   align: "left",
+            // },
+          ],
             scheduleTableHeaders: [
                 {
                     label: "寰呭姙浜嬮」",
@@ -180,6 +222,13 @@
                     this.tableData = resp.taskList;
                     this.tableLoading = false
                 }
+            } else if (this.currentTab == "wait") {
+              resp = await getProjectProcessWait(this.queryParams);
+              if (resp.code === 200) {
+                this.total = resp.total;
+                this.tableData = resp.data;
+                this.tableLoading = false
+              }
             } else {
                 resp = await getProjectPlanToDoList(this.queryParams);
                 if (resp.code === 200) {
@@ -190,7 +239,7 @@
             }
         },
         async handleDetail(row) {
-            if (this.currentTab == "process") {
+            if (this.currentTab == "process" || this.currentTab == "wait") {
                 const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId });
                 if (resp.code === 200 && resp.data.length > 0) {
                     const projectProcess = resp.data[0]
@@ -198,9 +247,12 @@
                     this.$router.push({
                         path: '/projectFlow/detail',
                         query: {
-                            projectId: projectProcess.projectId,
-                            processDefId: row.processDefId,
-                            processName: row.processName
+                          projectId: projectProcess.projectId,
+                          processDefId: row.processDefId,
+                          processInsId: row.processInsId,
+                          deployId: row.deployId,
+                          processName: row.processName,
+                          selectTabId: this.currentTab == "process" ? 2 : 3
                         }
                     })
                 }
@@ -215,19 +267,22 @@
             }
         },
         async handleUpdate(row) {
-            if (this.currentTab == "process") {
+            if (this.currentTab == "process" || this.currentTab == "wait") {
                 const resp = await getDetailByProcessInsId({ processDefId: row.processDefId, processInsId: row.processInsId });
                 if (resp.code === 200 && resp.data.length > 0) {
-                    const projectProcess = resp.data[0]
+                  const projectProcess = resp.data[0]
                   sessionStorage.removeItem("projectProDetail")
-                    this.$router.push({
-                        path: '/projectFlow/detail',
-                        query: {
-                            projectId: projectProcess.projectId,
-                            processDefId: row.processDefId,
-                          processName: row.processName
-                        }
-                    })
+                  this.$router.push({
+                      path: '/projectFlow/detail',
+                      query: {
+                        projectId: projectProcess.projectId,
+                        processDefId: row.processDefId,
+                        processInsId: row.processInsId,
+                        deployId: row.deployId,
+                        processName: row.processName,
+                        selectTabId: this.currentTab == "process" ? 2 : 3
+                      }
+                  })
                 }
             } else {
                 row.id = row.planId;
@@ -242,7 +297,7 @@
         switchTab(tab) {
             this.currentTab = tab;
             this.currentTableHeaders =
-                tab == "process" ? this.processTableHeaders : this.scheduleTableHeaders;
+                tab == "process" ? this.processTableHeaders : tab == "wait" ? this.waitTableHeaders : this.scheduleTableHeaders;
             this.getList();
         },
     },

--
Gitblit v1.8.0