| | |
| | | 流程待办 |
| | | </div> |
| | | <div |
| | | :class="{ active: currentTab === 'wait' }" |
| | | class="tab" |
| | | @click="switchTab('wait')" |
| | | > |
| | | 容缺待办 |
| | | </div> |
| | | <div |
| | | :class="{ active: currentTab === 'schedule' }" |
| | | class="tab" |
| | | @click="switchTab('schedule')" |
| | |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | v-loading="tableLoading" |
| | | :data="tableData" |
| | | :header-cell-style="{ |
| | | background: '#F5F7FC', |
| | |
| | | <div style="width: 100%;display: flex;flex-direction: row-reverse;align-items: center"> |
| | | <pagination |
| | | style="width: 100%" |
| | | v-show="total >= 0" |
| | | v-show="total > 0" |
| | | :page-sizes="[4]" |
| | | :limit="queryParams.pageSize" |
| | | :page="queryParams.pageNum" |
| | | :page="queryParams.currentPage" |
| | | :total="total" |
| | | @pagination="getList" |
| | | @pagination="pageChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </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() { |
| | | return { |
| | | tableLoading: false, |
| | | currentTab: "process", |
| | | total: 0, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | currentPage: 1, |
| | | pageSize: 4, |
| | | }, |
| | | tableData: [], |
| | |
| | | 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: "待办事项", |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | pageChange(data) { |
| | | this.queryParams.currentPage = data.page |
| | | this.getList() |
| | | }, |
| | | async getList() { |
| | | var resp; |
| | | this.total = 0; |
| | | this.tableData = []; |
| | | this.tableLoading = true |
| | | if (this.currentTab == "process") { |
| | | resp = await getProjectProcessTodo(this.queryParams); |
| | | if (resp.code === 200) { |
| | | this.total = resp.total; |
| | | 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) { |
| | | this.total = resp.total; |
| | | this.tableData = resp.data; |
| | | this.tableLoading = false |
| | | } |
| | | } |
| | | }, |
| | | 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] |
| | | sessionStorage.removeItem("projectProDetail") |
| | | this.$router.push({ |
| | | path: '/projectFlow/detail', |
| | | query: { |
| | | projectId: projectProcess.projectId, |
| | | processDefId: row.processDefId |
| | | projectId: projectProcess.projectId, |
| | | processDefId: row.processDefId, |
| | | processInsId: row.processInsId, |
| | | deployId: row.deployId, |
| | | processName: row.processName, |
| | | selectTabId: this.currentTab == "process" ? 2 : 3 |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | }, |
| | | 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] |
| | | this.$router.push({ |
| | | path: '/projectFlow/detail', |
| | | query: { |
| | | projectId: projectProcess.projectId, |
| | | processDefId: row.processDefId |
| | | } |
| | | }) |
| | | const projectProcess = resp.data[0] |
| | | sessionStorage.removeItem("projectProDetail") |
| | | 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; |
| | |
| | | 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(); |
| | | }, |
| | | }, |