xiangpei
2025-03-24 1b9b94bd65d49581f72a771f1936fb36db98ca5a
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();
        },
    },