From 1b9b94bd65d49581f72a771f1936fb36db98ca5a Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 24 三月 2025 11:40:43 +0800
Subject: [PATCH] 首页展示容缺待办

---
 src/views/components/noticeTable.vue      |   63 ++++++++++++++++++++++++++++---
 src/api/projectProcess/projectProcess.js  |   12 +++++
 src/views/projectProcess/detail/index.vue |   28 +++++++++++---
 src/views/components/tidingsTable.vue     |    3 +
 4 files changed, 92 insertions(+), 14 deletions(-)

diff --git a/src/api/projectProcess/projectProcess.js b/src/api/projectProcess/projectProcess.js
index 2a416e4..5c0b743 100644
--- a/src/api/projectProcess/projectProcess.js
+++ b/src/api/projectProcess/projectProcess.js
@@ -46,7 +46,7 @@
   })
 }
 
-// 杩涘害寰呭姙鍒楄〃
+// 娴佺▼寰呭姙鍒楄〃
 export function getProjectProcessTodo(query) {
   return request({
     url: '/project-process/to_do_task',
@@ -54,6 +54,16 @@
     params: query
   })
 }
+
+// 娴佺▼寰呭姙鍒楄〃
+export function getProjectProcessWait(query) {
+  return request({
+    url: '/project-process/wait_task',
+    method: 'get',
+    params: query
+  })
+}
+
 export function getDetailByProcessInsId(query) {
   return request({
     url: '/project-process/detail-by-process_ins_id',
diff --git a/src/views/components/noticeTable.vue b/src/views/components/noticeTable.vue
index b1367c0..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]
@@ -202,7 +251,8 @@
                           processDefId: row.processDefId,
                           processInsId: row.processInsId,
                           deployId: row.deployId,
-                          processName: row.processName
+                          processName: row.processName,
+                          selectTabId: this.currentTab == "process" ? 2 : 3
                         }
                     })
                 }
@@ -217,7 +267,7 @@
             }
         },
         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]
@@ -229,7 +279,8 @@
                         processDefId: row.processDefId,
                         processInsId: row.processInsId,
                         deployId: row.deployId,
-                        processName: row.processName
+                        processName: row.processName,
+                        selectTabId: this.currentTab == "process" ? 2 : 3
                       }
                   })
                 }
@@ -246,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();
         },
     },
diff --git a/src/views/components/tidingsTable.vue b/src/views/components/tidingsTable.vue
index 2d76661..067a28b 100644
--- a/src/views/components/tidingsTable.vue
+++ b/src/views/components/tidingsTable.vue
@@ -35,6 +35,7 @@
                 :label="column.label"
                 :min-width="column.minWidth"
                 :prop="column.prop"
+                :show-overflow-tooltip="column.showOverflowTooltip"
             >
                 <template v-if="column.slot === 'sort'" #default="scope">
                     <div
@@ -115,7 +116,7 @@
             //閰嶇疆琛ㄦ牸琛ㄥご鏁版嵁
             currentTableHeaders: [
                 { label: '#', prop: 'index', minWidth: 50, align: 'center', slot: 'sort' },
-                { label: '娑堟伅鍐呭', prop: 'content', minWidth: 300, align: 'left' },
+                { label: '娑堟伅鍐呭', prop: 'content', minWidth: 300, align: 'left', showOverflowTooltip: true },
                 { label: '鏃堕棿', prop: 'gmtCreate', minWidth: 143, align: 'left' }
             ]
         }
diff --git a/src/views/projectProcess/detail/index.vue b/src/views/projectProcess/detail/index.vue
index 388a05a..43b4034 100644
--- a/src/views/projectProcess/detail/index.vue
+++ b/src/views/projectProcess/detail/index.vue
@@ -268,14 +268,35 @@
       this.queryParams.processInsId = this.$route.query.processInsId
       this.queryParams.deployId = this.$route.query.deployId
       this.queryParams.processName = this.$route.query.processName
+      if (this.$route.query.selectTabId) {
+        this.selectTabId = parseInt(this.$route.query.selectTabId)
+      }
       sessionStorage.setItem("projectProDetail", JSON.stringify(this.queryParams))
     } else {
       this.queryParams = params
     }
     this.loading = true
+    this.changeTab(this.selectTabId, this.transEventType(this.selectTabId))
     this.getProjectProcessInfo()
   },
   methods: {
+    transEventType(selectTabId) {
+      if (selectTabId == 1) {
+        return "all"
+      } else if (selectTabId == 2) {
+        return "todo"
+      } else if (selectTabId == 3) {
+        return "wait"
+      } else if (selectTabId == 4) {
+        return "remaining"
+      } else if (selectTabId == 5) {
+        return "timely"
+      } else if (selectTabId == 6) {
+        return "overtime"
+      } else if (selectTabId == 8) {
+        return "urge"
+      }
+    },
     submitSupervise() {
       this.$refs["superviseForm"].validate(valid => {
         if (valid) {
@@ -483,19 +504,14 @@
       }
       getProjectProcessDetail(param).then(res => {
         this.detailData = res.data
-        this.taskList = res.taskList
-        this.total = res.total
         this.loading = false
       })
     },
     changeTab(id, event) {
-      let beforeId = this.selectTabId
       this.selectTabId = id
       this.queryParams.taskType = event
       this.queryParams.currentPage = 1;
-      if (beforeId !== id) {
-        this.getList()
-      }
+      this.getList()
     }
   }
 }

--
Gitblit v1.8.0