| | |
| | | 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"; |
| | |
| | | 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; |
| | | this.isWait = this.$route.query && this.$route.query.isWait === 'true' ? true : false; |
| | | // this.getNextFlowNodeByStart(this.deployId); |
| | | this.getFlowFormData(this.taskId); |
| | | }, |
| | |
| | | this.$prompt('备注说明', '确定要容缺此任务吗', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputType: 'textarea' |
| | | inputType: 'textarea', |
| | | inputValidator: (value) => { |
| | | if (!value || value.trim() === '') { |
| | | return "请填写备注说明" |
| | | } |
| | | return true |
| | | }, |
| | | inputErrorMessage: '请填写备注说明' |
| | | }).then(({ value }) => { |
| | | let waitForm = { |
| | | taskId: this.taskId, |
| | |
| | | this.$prompt('备注说明', '确定要跳过此任务吗', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputType: 'textarea' |
| | | // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/, |
| | | // inputErrorMessage: '邮箱格式不正确' |
| | | inputType: 'textarea', |
| | | inputValidator: (value) => { |
| | | if (!value || value.trim() === '') { |
| | | return "请填写备注说明" |
| | | } |
| | | return true |
| | | }, |
| | | inputErrorMessage: '请填写备注说明' |
| | | }).then(({ value }) => { |
| | | let jumpForm = { |
| | | taskId: this.taskId, |
| | |
| | | // 复制对象的属性值给新的对象 |
| | | 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) |