From a432990d4f39e235e4d551556c578426effea2f6 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 29 十一月 2024 16:50:50 +0800
Subject: [PATCH] 全部事项、待办事项的完善

---
 src/views/projectProcess/detail/index.vue |   66 ++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 25 deletions(-)

diff --git a/src/views/projectProcess/detail/index.vue b/src/views/projectProcess/detail/index.vue
index 1c3a5ac..4103aae 100644
--- a/src/views/projectProcess/detail/index.vue
+++ b/src/views/projectProcess/detail/index.vue
@@ -46,28 +46,33 @@
          >
         </el-table-column>
         <el-table-column
-          prop="procDefName"
+          prop="processName"
           label="娴佺▼鍚嶇О"
          >
         </el-table-column>
         <el-table-column
-          prop="startUserName"
+          prop="promoterName"
           label="鍙戣捣浜�"
         >
         </el-table-column>
         <el-table-column
-          prop="startDeptName"
+          prop="promoterUnitName"
           label="鍙戣捣鍗曚綅"
         >
         </el-table-column>
         <el-table-column
-          prop="assigneeDeptName"
+          prop="handlerUnitName"
           label="澶勭悊鍗曚綅"
         >
         </el-table-column>
         <el-table-column
-          prop="assigneeName"
+          prop="handlerName"
           label="瀹為檯澶勭悊浜�"
+        >
+        </el-table-column>
+        <el-table-column
+          prop="taskStatus"
+          label="浠诲姟鐘舵��"
         >
         </el-table-column>
         <el-table-column
@@ -75,16 +80,16 @@
           label="鎿嶄綔"
           width="100">
           <template slot-scope="scope">
-            <el-button @click="goToProcessDetail(scope.row)" type="text" size="small">鏌ョ湅</el-button>
-            <el-button @click="goToDo(scope.row)" type="text" size="small">鍔炵悊</el-button>
+            <el-button v-if="scope.row.taskStatus !== '鏈紑濮�'" @click="goToProcessDetail(scope.row)" type="text" size="small">鏌ョ湅</el-button>
+            <el-button v-if="scope.row.taskStatus === '寰呭姙'" @click="goToDo(scope.row)" type="text" size="small">鍔炵悊</el-button>
           </template>
         </el-table-column>
       </el-table>
       <div>
         <el-pagination
-          v-if="total > pageSize"
-          :page-size="pageSize"
-          :current-page="pageNum"
+          v-if="total > queryParams.pageSize"
+          :page-size="queryParams.pageSize"
+          :current-page="queryParams.currentPage"
           :total="total"
           layout="total, prev, pager, next"
           @current-change="getList"
@@ -95,28 +100,29 @@
 </template>
 
 <script>
-import {getProjectProcessDetail} from "@/api/projectProcess/projectProcess";
+import {getProjectProcessDetail, getProjectProcessDetailTaskList} from "@/api/projectProcess/projectProcess";
 
 export default {
   name: "index",
   data() {
     return {
-      projectId: null,
-      processId: null,
       detailData: {},
-      selectTabId: 2,
       taskList: [],
       total: 0,
-      pageSize: 5,
-      pageNum: 1,
+      selectTabId: 2,
       queryParams: {
-        taskName: ''
+        taskName: '',
+        taskType: 'todo',
+        pageSize: 5,
+        currentPage: 1,
+        projectId: null,
+        processDefId: null,
       }
     }
   },
   mounted() {
-    this.projectId = this.$route.query.projectId
-    this.processId = this.$route.query.processId
+    this.queryParams.projectId = this.$route.query.projectId
+    this.queryParams.processDefId = this.$route.query.processDefId
     this.getProjectProcessInfo()
   },
   methods: {
@@ -127,11 +133,11 @@
         this.$router.push({
           path: '/flowable/task/todo/detail/index',
           query: {
-            taskName: row.procDefName,
-            startUser: row.startUserName,
+            taskName: row.taskName,
+            startUser: row.promoterName,
             deployId: row.deployId,
             taskId: row.taskId,
-            procInsId: row.procInsId,
+            procInsId: row.processInsId,
             executionId: row.executionId
           }
         })
@@ -140,7 +146,7 @@
           path: '/flowable/task/myProcess/send/index',
           query: {
             deployId: row.deployId,
-            procDefId: row.procDefId,
+            procDefId: row.processDefId,
             processName: row.taskName,
             taskId: row.taskId
           }
@@ -150,23 +156,33 @@
     goToProcessDetail(row) {
       this.$router.push({ path: '/flowable/task/myProcess/detail/index',
         query: {
-          procInsId: row.procInsId,
+          procInsId: row.processInsId,
           deployId: row.deployId,
           taskId: row.taskId
         }})
     },
     getList() {
       // 鑾峰彇浠诲姟鍒楄〃
+      getProjectProcessDetailTaskList(this.queryParams).then(res => {
+        this.taskList = res.data
+        this.total = res.total
+      })
     },
     // 鏌ヨ璇︽儏
     getProjectProcessInfo() {
-      getProjectProcessDetail(this.projectId, this.processId).then(res => {
+      getProjectProcessDetail(this.queryParams.projectId, this.queryParams.processDefId).then(res => {
         this.detailData = res.data
         this.taskList = res.taskList
       })
     },
     changeTab(id, event) {
+      let beforeId = this.selectTabId
       this.selectTabId = id
+      this.queryParams.taskType = event
+      if (beforeId !== id) {
+        this.getList()
+      }
+
     }
   }
 }

--
Gitblit v1.8.0