| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-card class="box-card" > |
| | | <el-result v-if="isSuccess" icon="success" title="操作成功" subTitle="您的任务已处理完成"> |
| | | <template slot="extra"> |
| | | </template> |
| | | </el-result> |
| | | |
| | | <el-card v-else class="box-card" > |
| | | <div slot="header" class="clearfix header-container"> |
| | | <div class="header-title el-icon-document">{{`任务办理:` + processName}}</div> |
| | | <div class="header-subtitle">{{projectName + '——' + flowName}}</div> |
| | |
| | | data() { |
| | | return { |
| | | isWait: false, |
| | | isSuccess: false, |
| | | rejectLoading: false, |
| | | submitLoading: false, |
| | | delegationButLoading: false, |
| | |
| | | Object.assign(param, formData); |
| | | const api = this.isWait ? waitCompleteSubmitFormTask : completeSubmitFormTask; |
| | | api(this.taskId, param).then(res => { |
| | | this.$message.success(res.msg); |
| | | this.isSuccess = true; |
| | | this.submitLoading = false; |
| | | this.goBack(); |
| | | }).catch(() => { this.submitLoading = false; }); |
| | | }); |
| | | } else { |
| | | const api = this.isWait ? waitCompleteSubmitFormTask : completeSubmitFormTask; |
| | | api(this.taskId, {}).then(res => { |
| | | this.$message.success(res.msg); |
| | | this.goBack(); |
| | | this.isSuccess = true; |
| | | }); |
| | | } |
| | | }); |
| | |
| | | this.rejectLoading = true; |
| | | rejectTask(this.rejectForm).then(res => { |
| | | this.rejectShow = false; |
| | | this.$message.success("驳回成功"); |
| | | this.goBack(); |
| | | this.isSuccess = true; |
| | | }).finally(() => { this.rejectLoading = false; }); |
| | | }); |
| | | }, |
| | |
| | | this.delegationForm.processInsId = this.procInsId; |
| | | this.delegationButLoading = true; |
| | | taskDelegation(this.delegationForm).then(res => { |
| | | this.$message.success("已发起转办申请"); |
| | | this.isSuccess = true; |
| | | this.delegationShow = false; |
| | | this.goBack(); |
| | | }).finally(() => { this.delegationButLoading = false; }); |
| | | } |
| | | }); |
| | |
| | | closeRole() { this.roleShow = false; }, |
| | | closeMultUser() { this.multUserShow = false; }, |
| | | // 挂起/容缺/跳过 |
| | | hangup() { this.$prompt('备注说明', '确定要挂起此任务吗').then(({ value }) => { taskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, reason: value }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); }, |
| | | cancelHangup() { this.$confirm('确定要取消挂起吗?').then(() => { cancelTaskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); }, |
| | | waitTask() { this.$prompt('备注说明', '确定要容缺此任务吗').then(({ value }) => { taskWait({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); }, |
| | | jumpTask() { this.$prompt('备注说明', '确定要跳过此任务吗').then(({ value }) => { taskJump({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.$message.success("操作成功"); this.goBack(); }); }); }, |
| | | hangup() { |
| | | this.$prompt('备注说明', '确定要挂起此任务吗').then(({ value }) => { |
| | | taskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, reason: value }).then(() => { this.isSuccess = true; }); }); |
| | | }, |
| | | cancelHangup() { |
| | | this.$confirm('确定要取消挂起吗?').then(() => { |
| | | cancelTaskHangup({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId }).then(() => { this.isSuccess = true; }); }); |
| | | }, |
| | | waitTask() { |
| | | this.$prompt('备注说明', '确定要容缺此任务吗').then(({ value }) => { |
| | | taskWait({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.isSuccess = true; }); }); |
| | | }, |
| | | jumpTask() { |
| | | this.$prompt('备注说明', '确定要跳过此任务吗').then(({ value }) => { |
| | | taskJump({ taskId: this.taskId, projectId: this.projectId, processInsId: this.procInsId, desc: value }).then(() => { this.isSuccess = true; }); }); |
| | | }, |
| | | |
| | | goBack() { |
| | | // WebView 模式下通常不需要复杂的 goBack 逻辑,或者可以通知父容器 |
| | | console.log('Task completed'); |
| | |
| | | Object.assign(param, this.formData); |
| | | this.$set(param, this.multiInstanceVars || "approval", this.checkValues); |
| | | completeSubmitFormTask(this.taskId, param).then(res => { |
| | | this.$message.success(res.msg); |
| | | this.goBack(); |
| | | this.isSuccess = true; |
| | | }); |
| | | } |
| | | } |