| | |
| | | }) |
| | | } |
| | | |
| | | // 容缺补交 |
| | | export function waitCompleteSubmitFormTask(taskId, data) { |
| | | return request({ |
| | | url: '/flowable/task/wait/complete/form/' + taskId, |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 取消申请 |
| | | export function stopProcess(data) { |
| | | return request({ |
| | |
| | | }) |
| | | } |
| | | // 流程节点查看详情表单 |
| | | export function flowTaskFormDetail(taskId) { |
| | | export function flowTaskFormDetail(processInsId, taskId) { |
| | | return request({ |
| | | url: '/flowable/task/detail/' + taskId, |
| | | url: '/flowable/task/detail/' + processInsId + '/' + taskId, |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 容缺 |
| | | export function taskWait(data) { |
| | | return request({ |
| | | url: '/project-process/detail/task/wait', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // 督办 |
| | | export function taskSupervise(data) { |
| | | return request({ |
| | |
| | | this.projectName = this.$route.query && this.$route.query.projectName; |
| | | this.flowName = this.$route.query && this.$route.query.flowName; |
| | | // 流程任务重获取变量表单 |
| | | this.processVariables( this.taskForm.taskId) |
| | | this.processVariables( this.taskForm.taskId, this.taskForm.procInsId) |
| | | this.getFlowRecordList(this.taskForm.procInsId); |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | }, |
| | | /** 获取流程变量内容 */ |
| | | processVariables(taskId) { |
| | | processVariables(taskId, processInsId) { |
| | | if (taskId) { |
| | | this.formLoading = true |
| | | // 提交流程申请时填写的表单存入了流程变量中后续任务处理时需要展示 |
| | | flowTaskFormDetail(taskId).then(res => { |
| | | flowTaskFormDetail(processInsId, taskId).then(res => { |
| | | this.formDataList = res.data |
| | | if (this.formDataList && this.formDataList.length > 0) { |
| | | this.$nextTick(() => { |
| | |
| | | <div class="op-list"> |
| | | <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '挂起' || submitLoading" v-loading="submitLoading" @click="submitForm">确认并提交</el-button> |
| | | <!-- <el-button size="small" type="primary" disabled @click="submitForm">协同办理(功能开发中)</el-button>--> |
| | | <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '挂起'" @click="openDelegation(formDataList[0].beforeNodeName)">转办</el-button> |
| | | <el-button v-if="formDataObj.canJump" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="jumpTask()">跳过</el-button> |
| | | <el-button v-if="formDataObj.canWait" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" >容缺</el-button> |
| | | <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '挂起'" size="small" type="primary" @click="hangup">挂起</el-button> |
| | | <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="cancelHangup">结束挂起</el-button> |
| | | <el-button size="small" type="primary" v-if="!isWait" :disabled="formDataObj.taskStatus === '挂起'" @click="openDelegation(formDataList[0].beforeNodeName)">转办</el-button> |
| | | <el-button v-if="formDataObj.canJump && !isWait" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="jumpTask()">跳过</el-button> |
| | | <el-button v-if="formDataObj.canWait && !isWait" :disabled="formDataObj.taskStatus === '挂起'" size="small" type="primary" @click="waitTask()">容缺</el-button> |
| | | <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '挂起' && !isWait" size="small" type="primary" @click="hangup">挂起</el-button> |
| | | <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '挂起' && !isWait" size="small" type="primary" @click="cancelHangup">结束挂起</el-button> |
| | | </div> |
| | | <div class="current">当前阶段:<span>{{formDataObj.beforeNodeName}}</span><span v-if="formDataObj.taskStatus === 'HANGUP'">(挂起中)</span></div> |
| | | </div> |
| | |
| | | import SingleUser from '@/components/flow/User/SingleUser' |
| | | import MultUser from '@/components/flow/User/MultUser' |
| | | import MyRole from '@/components/flow/Role/MyRole' |
| | | import {completeSubmitFormTask} from "@/api/flowable/process"; |
| | | import {completeSubmitFormTask, waitCompleteSubmitFormTask} from "@/api/flowable/process"; |
| | | import { flowTaskForm } from "@/api/flowable/todo"; |
| | | import {getNextFlowNodeByStart} from "@/api/flowable/todo"; |
| | | import LogView from "@/views/projectProcess/components/LogView"; |
| | | import {rejectTask} from "@/api/flowable/process"; |
| | | import {cancelTaskHangup, taskDelegation, taskHangup, taskJump} from "@/api/projectProcess/projectProcess"; |
| | | import {cancelTaskHangup, taskDelegation, taskHangup, taskJump, taskWait} from "@/api/projectProcess/projectProcess"; |
| | | |
| | | export default { |
| | | name: "Record", |
| | |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | isWait: false, |
| | | jumpDesc: '', // 跳过说明 |
| | | rejectLoading: false, // 驳回按钮加载 |
| | | submitLoading: false, // 提交按钮加载 |
| | |
| | | this.procDefId = this.$route.query && this.$route.query.procDefId; |
| | | this.procInsId = this.$route.query && this.$route.query.procInsId; |
| | | this.goBackParams = this.$route.query && this.$route.query.goBackParams; |
| | | this.isWait = this.$route.query && this.$route.query.isWait === 'true' ? true : false; |
| | | // this.getNextFlowNodeByStart(this.deployId); |
| | | this.getFlowFormData(this.taskId); |
| | | }, |
| | |
| | | this.goBack() |
| | | }) |
| | | }) |
| | | }, |
| | | // 容缺任务 |
| | | waitTask() { |
| | | this.$prompt('备注说明', '确定要容缺此任务吗', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputType: 'textarea' |
| | | }).then(({ value }) => { |
| | | let waitForm = { |
| | | taskId: this.taskId, |
| | | projectId: this.projectId, |
| | | processInsId: this.procInsId, |
| | | desc: value |
| | | } |
| | | taskWait(waitForm).then(res => { |
| | | this.$message.success("操作成功") |
| | | this.goBack() |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消容缺操作' |
| | | }); |
| | | }); |
| | | }, |
| | | // 跳过任务 |
| | | jumpTask() { |
| | |
| | | // 复制对象的属性值给新的对象 |
| | | Object.assign(param, formData); |
| | | // 完成任务 |
| | | completeSubmitFormTask(this.taskId, param).then(res => { |
| | | if (this.isWait) { |
| | | waitCompleteSubmitFormTask(this.taskId, param).then(res => { |
| | | this.$modal.msgSuccess(res.msg); |
| | | this.submitLoading = false |
| | | this.goBack(); |
| | | }) |
| | | } else { |
| | | completeSubmitFormTask(this.taskId, param).then(res => { |
| | | this.$modal.msgSuccess(res.msg); |
| | | this.submitLoading = false |
| | | this.goBack(); |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | // 没关联表单直接传空 |
| | | if (this.isWait) { |
| | | waitCompleteSubmitFormTask(this.taskId, {}).then(res => { |
| | | this.$modal.msgSuccess(res.msg); |
| | | this.submitLoading = false |
| | | this.goBack(); |
| | | }) |
| | | }) |
| | | } else { |
| | | // 没关联表单直接传空 |
| | | completeSubmitFormTask(this.taskId, {}).then(res => { |
| | | this.$modal.msgSuccess(res.msg); |
| | | this.submitLoading = false |
| | | this.goBack(); |
| | | }) |
| | | } else { |
| | | completeSubmitFormTask(this.taskId, {}).then(res => { |
| | | this.$modal.msgSuccess(res.msg); |
| | | this.submitLoading = false |
| | | this.goBack(); |
| | | }) |
| | | } |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | |
| | | <span class="tag">{{log.eventDataObj.desc}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="log" v-else-if="log.eventType === 'WAIT'"> |
| | | <div> |
| | | <span class="tag name">{{log.nickName}}</span> |
| | | 于 |
| | | <span class="tag time">{{log.gmtCreate}}</span> |
| | | <span class="tag jump">容缺</span> |
| | | 了任务 |
| | | <span class="tag taskName">{{log.taskName}}</span> |
| | | , |
| | | <span class="tag jump">容缺说明</span> |
| | | : |
| | | <span class="tag">{{log.eventDataObj.desc}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="log" v-else-if="log.eventType === 'SUPERVISE'"> |
| | | <div> |
| | | <span class="tag name">{{log.nickName}}</span> |
| | |
| | | <div class="search-warp"> |
| | | <div @click="changeTab(1, 'all')" :class="{'item-warm': true, 'all-color': true, 'active': 1 === selectTabId}">全部事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.totalTaskNum}})</span></div> |
| | | <div @click="changeTab(2, 'todo')" :class="{'item-warm': true, 'all-color': true, 'active': 2 === selectTabId}">待办事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.todoTaskNum}})</span></div> |
| | | <div @click="changeTab(3, 'todo')" :class="{'item-warm': true, 'current-color': true, 'active': 3 === selectTabId}">当前环节</div> |
| | | <div @click="changeTab(3, 'wait')" :class="{'item-warm': true, 'current-color': true, 'active': 3 === selectTabId}">容缺事项</div> |
| | | <div @click="changeTab(4, 'remaining')" :class="{'item-warm': true, 'remaining-color': true, 'active': 4 === selectTabId}">剩余事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.remainingTaskNum}})</span></div> |
| | | <div @click="changeTab(5, 'timely')" :class="{'item-warm': true, 'timely-color': true, 'active': 5 === selectTabId}">按时完成<span v-if="detailData && detailData.statistics">({{detailData.statistics.timelyFinishedTaskNum}})</span></div> |
| | | <div @click="changeTab(6, 'overtime')" :class="{'item-warm': true, 'overtime-color': true, 'active': 6 === selectTabId}">超时事项(0)</div> |
| | |
| | | :formatter="candidateFormatter" |
| | | > |
| | | </el-table-column> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="promoterUnitName"--> |
| | | <!-- label="发起单位"--> |
| | | <!-- >--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="promoterName"--> |
| | | <!-- label="发起人"--> |
| | | <!-- >--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- align="center"--> |
| | | <!-- prop="handlerType"--> |
| | | <!-- label="处理方类型"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="scope">--> |
| | | <!-- <el-tag v-if="scope.row.handlerType === 'USER'">人员账号</el-tag>--> |
| | | <!-- <el-tag type="success" v-else-if="scope.row.handlerType === 'DEPT'">单位</el-tag>--> |
| | | <!-- <el-tag type="info" v-else-if="scope.row.handlerType === 'ROLE'">角色</el-tag>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="handlerUnitName"--> |
| | | <!-- label="处理单位"--> |
| | | <!-- :formatter="unitFormatter"--> |
| | | <!-- >--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="handlerName"--> |
| | | <!-- label="候选处理人"--> |
| | | <!-- :formatter="candidateFormatter"--> |
| | | <!-- >--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="handlerName"--> |
| | | <!-- label="实际处理人"--> |
| | | <!-- :formatter="finalFinishedFormatter"--> |
| | | <!-- >--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column |
| | | align="center" |
| | | prop="taskStatus" |
| | |
| | | } |
| | | }, |
| | | showHandle(row) { |
| | | if (row.taskStatus === '待办' || row.taskStatus === '挂起') { |
| | | if (row.taskStatus === '待办' || row.taskStatus === '挂起' || row.taskStatus === '容缺') { |
| | | if (row.handlerType === "USER") { |
| | | return row.handlerId.indexOf(this.$store.state.user.id) !== -1 |
| | | } else if (row.handlerType === "DEPT") { |
| | |
| | | } |
| | | }, |
| | | goToDo(row) { |
| | | // 查询该任务是否配置了需要审批 |
| | | let params = { |
| | | processDefId: row.processDefId, |
| | | taskId: row.taskId |
| | | } |
| | | getTaskIsAuditing(params).then(res => { |
| | | console.log("row",row) |
| | | if (row.taskStatus === '容缺') { |
| | | this.$router.push({ |
| | | path: '/flowable/task/myProcess/send/index', |
| | | query: { |
| | |
| | | flowName: this.queryParams.processName, |
| | | projectName: this.detailData.projectName, |
| | | taskId: row.taskId, |
| | | showAuditing: res.data, |
| | | showAuditing: false, |
| | | projectId: this.queryParams.projectId, |
| | | isWait: true, |
| | | goBackParams: this.queryParams |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | // 查询该任务是否配置了需要审批 |
| | | let params = { |
| | | processDefId: row.processDefId, |
| | | taskId: row.taskId |
| | | } |
| | | getTaskIsAuditing(params).then(res => { |
| | | console.log("row",row) |
| | | this.$router.push({ |
| | | path: '/flowable/task/myProcess/send/index', |
| | | query: { |
| | | deployId: row.deployId, |
| | | procDefId: row.processDefId, |
| | | procInsId: row.processInsId, |
| | | processName: row.taskName, |
| | | flowName: this.queryParams.processName, |
| | | projectName: this.detailData.projectName, |
| | | taskId: row.taskId, |
| | | showAuditing: res.data, |
| | | projectId: this.queryParams.projectId, |
| | | isWait: false, |
| | | goBackParams: this.queryParams |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | goToProcessDetail(row) { |
| | | this.$router.push({ path: '/flowable/task/myProcess/detail/index', |