| | |
| | | <div style="display: flex;justify-content: center; align-items: center; margin: 20px 0"> |
| | | <el-button type="primary" @click="submitForm">确认并提交</el-button> |
| | | <el-button type="primary" disabled @click="submitForm">协同办理(功能开发中)</el-button> |
| | | <el-button type="primary" disabled @click="submitForm">转交他人办理(功能开发中)</el-button> |
| | | <el-button type="primary" @click="openDelegation(formDataList[0].beforeNodeName)">转办</el-button> |
| | | <!-- <el-button type="primary" @click="resetForm">重 置</el-button>--> |
| | | </div> |
| | | </el-col> |
| | |
| | | type="textarea" |
| | | :rows="3" |
| | | placeholder="审核建议" |
| | | v-model="rejectForm.auditOpinion"> |
| | | v-model="rejectForm.comment"> |
| | | </el-input> |
| | | </div> |
| | | <div> |
| | | <div class="opBut"> |
| | | <el-button type="danger" size="small" @click="rejectTask">驳回</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | :title="`转办:` + delegationForm.taskName" |
| | | :visible.sync="delegationShow" |
| | | width="950px" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div> |
| | | <el-form :model="delegationForm" :rules="delegationFormRules" ref="delegationForm" label-width="100px" class="demo-ruleForm"> |
| | | <el-alert |
| | | title="请选择要转办的用户对象,用户类型不同处理人不同" |
| | | type="info" |
| | | :closable="false" |
| | | style="margin-bottom: 8px" |
| | | show-icon> |
| | | </el-alert> |
| | | <el-form-item label="用户类型" prop="peopleType"> |
| | | <el-select v-model="delegationForm.peopleType" @change="peopleTypeChange" placeholder="请选择用户类型"> |
| | | <el-option label="指定人员" value="FIX_USER"></el-option> |
| | | <el-option label="候选用户" value="USER"></el-option> |
| | | <el-option label="候选部门" value="DEPT"></el-option> |
| | | <el-option label="候选角色" value="ROLE"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="delegationForm.peopleType === 'DEPT'" label="候选部门" prop="targetId"> |
| | | <Dept ref="dept" :checkeds="delegationDeptSelect" :show="deptShow" @close="closeDept" @submit="getDeptSelect"/> |
| | | <div style="display: flex;align-items: center"> |
| | | <div>{{deptNames}}</div> |
| | | <el-button style="margin-left: 8px" type="text" @click="editDept">编辑</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="opBut"> |
| | | <el-button type="danger" size="small" @click="delegation">转办</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | <script> |
| | | import {definitionStart, flowXmlAndNode} from "@/api/flowable/definition"; |
| | | import BpmnViewer from '@/components/Process/viewer'; |
| | | import Dept from '@/components/flow/Dept' |
| | | import {completeSubmitFormTask} from "@/api/flowable/process"; |
| | | import { flowTaskForm } from "@/api/flowable/todo"; |
| | | import {getNextFlowNodeByStart} from "@/api/flowable/todo"; |
| | | import FlowUser from '@/components/flow/User' |
| | | import FlowRole from '@/components/flow/Role' |
| | | import {rejectTask} from "@/api/projectProcess/projectProcess"; |
| | | import {rejectTask} from "@/api/flowable/process"; |
| | | import {taskDelegation} from "@/api/projectProcess/projectProcess"; |
| | | |
| | | export default { |
| | | name: "Record", |
| | |
| | | BpmnViewer, |
| | | FlowUser, |
| | | FlowRole, |
| | | Dept, |
| | | }, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | rejectShow: false, |
| | | deptShow: false, // 部门显示 |
| | | deptNames: '', // 选中的部门名称 |
| | | delegationDeptSelect: [], // 选中部门 |
| | | delegationFormRules: { |
| | | peopleType: [ |
| | | { required: true, message: '请选择用户类型', trigger: 'change' } |
| | | ], |
| | | targetId: [ |
| | | { required: true, message: '请选择转办对象', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | delegationForm: { // 转办表单 |
| | | taskId: '', |
| | | peopleType: '', |
| | | targetId: '', |
| | | taskName: '' |
| | | }, |
| | | delegationShow: false, // 转办显示 |
| | | rejectShow: false, // 驳回显示 |
| | | goBackParams: {}, |
| | | formDataList: [], // 表单列表 |
| | | taskId: '', |
| | |
| | | multiInstanceVars: '', // 会签节点 |
| | | formJson: {}, // 表单json |
| | | rejectForm: { |
| | | auditOpinion: '', // 审核意见 |
| | | comment: '', // 审核意见 |
| | | taskId: '', |
| | | rejectedTaskDefKey: '' // 被驳回的任务key |
| | | // rejectedTaskDefKey: '' // 被驳回的任务key |
| | | } |
| | | }; |
| | | }, |
| | |
| | | this.getFlowFormData(this.taskId); |
| | | }, |
| | | methods: { |
| | | delegation() { |
| | | this.$confirm(`确定要将此任务交由【${this.deptNames}】处理吗?`, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | taskDelegation(this.delegationForm).then(res => { |
| | | this.$message.success("已发起转办申请") |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消转办操作' |
| | | }); |
| | | }); |
| | | }, |
| | | peopleTypeChange(val) { |
| | | if (val === 'DEPT') { |
| | | this.$nextTick(() => { |
| | | this.$refs.dept.setCheckList(this.delegationDeptSelect) |
| | | }) |
| | | this.deptShow = true |
| | | } |
| | | }, |
| | | editDept() { |
| | | this.$nextTick(() => { |
| | | this.$refs.dept.setCheckList(this.delegationDeptSelect) |
| | | }) |
| | | this.deptShow = true |
| | | }, |
| | | getDeptSelect(list, names) { |
| | | console.log(list, names) |
| | | if (list) { |
| | | this.delegationForm.targetId = list |
| | | this.delegationDeptSelect = list.split(",") |
| | | this.deptNames = names |
| | | } |
| | | this.deptShow = false |
| | | }, |
| | | closeDept() { |
| | | console.log(this.deptNames) |
| | | this.deptShow = false |
| | | }, |
| | | openDelegation(taskName) { |
| | | this.delegationForm.taskName = taskName |
| | | this.delegationForm.taskId = this.taskId |
| | | this.delegationShow = true |
| | | }, |
| | | rejectTask() { |
| | | rejectTask(this.rejectForm).then(res => { |
| | | this.rejectShow = false |
| | |
| | | }) |
| | | }, |
| | | openRejectTask(rejectedTaskDefKey) { |
| | | this.rejectForm.rejectedTaskDefKey = rejectedTaskDefKey; |
| | | // this.rejectForm.rejectedTaskDefKey = rejectedTaskDefKey; |
| | | this.rejectForm.taskId = this.taskId; |
| | | this.rejectShow = true |
| | | }, |
| | |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .opBut { |
| | | display: flex;justify-content: center;align-items: center;width: 100%; margin-top: 8px |
| | | } |
| | | .test-form { |
| | | margin: 15px auto; |
| | | width: 800px; |