| | |
| | | }) |
| | | } |
| | | |
| | | // 进度待办列表 |
| | | // 流程待办列表 |
| | | export function getProjectProcessTodo(query) { |
| | | return request({ |
| | | url: '/project-process/to_do_task', |
| | |
| | | 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', |
| | |
| | | 流程待办 |
| | | </div> |
| | | <div |
| | | :class="{ active: currentTab === 'wait' }" |
| | | class="tab" |
| | | @click="switchTab('wait')" |
| | | > |
| | | 容缺待办 |
| | | </div> |
| | | <div |
| | | :class="{ active: currentTab === 'schedule' }" |
| | | class="tab" |
| | | @click="switchTab('schedule')" |
| | |
| | | </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() { |
| | |
| | | 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.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) { |
| | |
| | | } |
| | | }, |
| | | 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] |
| | |
| | | processDefId: row.processDefId, |
| | | processInsId: row.processInsId, |
| | | deployId: row.deployId, |
| | | processName: row.processName |
| | | 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] |
| | |
| | | processDefId: row.processDefId, |
| | | processInsId: row.processInsId, |
| | | deployId: row.deployId, |
| | | processName: row.processName |
| | | processName: row.processName, |
| | | selectTabId: this.currentTab == "process" ? 2 : 3 |
| | | } |
| | | }) |
| | | } |
| | |
| | | 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(); |
| | | }, |
| | | }, |
| | |
| | | :label="column.label" |
| | | :min-width="column.minWidth" |
| | | :prop="column.prop" |
| | | :show-overflow-tooltip="column.showOverflowTooltip" |
| | | > |
| | | <template v-if="column.slot === 'sort'" #default="scope"> |
| | | <div |
| | |
| | | //配置表格表头数据 |
| | | 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' } |
| | | ] |
| | | } |
| | |
| | | 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) { |
| | |
| | | } |
| | | 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() |
| | | } |
| | | } |
| | | } |