| | |
| | | |
| | | <template #name="{ row }"> |
| | | <span>{{ row.name }}</span> |
| | | <el-tag v-if="row.nodeType == 60" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag> |
| | | |
| | | <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1" |
| | | icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button> |
| | |
| | | </template> --> |
| | | <template #name="{ row }"> |
| | | <span>{{ row.name }}</span> |
| | | |
| | | <el-tag v-if="row.nodeType == 60" size="mini" effect="plain">v{{ row.versionNumber }}</el-tag> |
| | | <!-- 替换 v-if="permission.auto_dispatch"--> |
| | | <el-button class="treebtn" :size="size" text v-if="permission.replace_button && row.nodeType == 60 && row.parentIds.indexOf('0,1,') > -1" |
| | | icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button> |
| | |
| | | </div> |
| | | </el-drawer> |
| | | <!-- 替换 --> |
| | | <el-drawer title="替换" append-to-body v-model="todolistModel" size="100%" class="code-box"> |
| | | <el-drawer title="替换" append-to-body v-model="replaceModel" size="100%" class="code-box"> |
| | | <div class="approve-box"> |
| | | <div class="left"> |
| | | <TodolistLeft :row="row" :replaceDataId="replaceDataId" :drawingNo="drawingNo" :processNo="processNo" |
| | | <ReplaceLeft ref="replaceLeft" v-if="replaceModel" :row="row" :replaceDataId="replaceDataId" :drawingNo="drawingNo" :processNo="processNo" |
| | | :processEdition="processEdition" @selection-change="todoSelectionChange" /> |
| | | </div> |
| | | <div class="right"> |
| | | <TodolistRightTop :row="row" :name="name" /> |
| | | <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleSubmit" /> |
| | | <ReplaceRightTop :row="row" :name="name" /> |
| | | <avue-form ref="form" :option="optionApprove" v-model="formApprove" @submit="handleReplace" /> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | import debounce from 'lodash/debounce'; |
| | | |
| | | import { ElMessage } from 'element-plus'; |
| | | import TodolistLeft from './components/TodolistLeft.vue'; |
| | | import TodolistRightTop from './components/TodolistRightTop.vue'; |
| | | import ReplaceLeft from './components/ReplaceLeft.vue'; |
| | | import ReplaceRightTop from './components/ReplaceRightTop.vue'; |
| | | import qs from 'qs'; |
| | | export default { |
| | | components: { |
| | | TodolistLeft, |
| | | TodolistRightTop |
| | | ReplaceLeft, |
| | | ReplaceRightTop |
| | | }, |
| | | data() { |
| | | let rejectText = '驳回';//+this.row.categoryName; |
| | | |
| | | return { |
| | | size:'large',//树里按钮的尺寸 |
| | | isSearch: null, |
| | |
| | | }, |
| | | applist: [], |
| | | row: {}, |
| | | todolistModel: false, |
| | | replaceModel: false, |
| | | diffBox: false, |
| | | content1: "", |
| | | content2: "", |
| | |
| | | unlockCancel() { |
| | | this.unlockBox = false; |
| | | }, |
| | | handleSubmit(form, done) { |
| | | replacement(row) { //替换 |
| | | this.id = row.id; |
| | | this.formApprove = { |
| | | comment: '', |
| | | approve: 'Y', // 默认同 |
| | | } |
| | | //准备程序替换流程 |
| | | axios({ |
| | | url: '/blade-mdm/flow/replace/pre', |
| | | method: 'post', |
| | | params: { nodeId: row.id } |
| | | }).then(resp => { |
| | | this.row = row; |
| | | |
| | | this.drawingNo = resp.data.data.drawingNo; |
| | | this.replaceDataId = resp.data.data.processInstanceId; |
| | | //console.log('replaceDataId',this.replaceDataId) |
| | | this.processNo = resp.data.data.processNo; |
| | | this.processEdition = resp.data.data.processEdition; |
| | | |
| | | this.formApprove.title = resp.data.data.name + "替换"; |
| | | |
| | | this.getHandler(); //获取处理人 |
| | | this.$nextTick(() => { |
| | | //等待dom更新再显示界面 |
| | | this.replaceModel = true; |
| | | }) |
| | | |
| | | }); |
| | | }, |
| | | getHandler() { //获取处理人 |
| | | axios({ |
| | | url: '/blade-mdm/flow/replace/default-assignees', |
| | | method: 'get', |
| | | params: { drawingNo: this.drawingNo } |
| | | }).then( |
| | | resp => { |
| | | if (resp.data.code == 200) { |
| | | this.formApprove.assignee = resp.data.data.checkerId; |
| | | } else { |
| | | this.$message.success(resp.msg); |
| | | } |
| | | }); |
| | | }, |
| | | handleReplace(form, done) { |
| | | //发起程序替换流程 |
| | | var obj = { |
| | | title: this.formApprove.title, |
| | |
| | | message: '操作成功!', |
| | | }); |
| | | done(); |
| | | this.todolistModel = false; |
| | | this.replaceModel = false; |
| | | }).catch(error => { |
| | | done(); |
| | | }); |
| | |
| | | }, |
| | | todoSelectionChange(applist) { |
| | | this.applist = applist; |
| | | }, |
| | | showReplaceDlg(row) { //替换对话框 |
| | | |
| | | if (row.nodeType == 60) { //程序包 |
| | | return; |
| | | } |
| | | //111 |
| | | this.modalTitle = "新增子节点"; |
| | | this.selectedColumn.parentId = row.id; |
| | | this.modalForm = this.selectedColumn; |
| | | |
| | | this.modalBox = true; |
| | | }, |
| | | replacement(row) { //替换 |
| | | this.id = row.id; |
| | | this.formApprove = { |
| | | comment: '', |
| | | approve: 'Y', // 默认同 |
| | | } |
| | | //准备程序替换流程 |
| | | axios({ |
| | | url: '/blade-mdm/flow/replace/pre', |
| | | method: 'post', |
| | | params: { nodeId: row.id } |
| | | }).then(resp => { |
| | | this.row = row; |
| | | this.replaceDataId = resp.data.data.processInstanceId; |
| | | this.processNo = resp.data.data.processNo; |
| | | this.processEdition = resp.data.data.processEdition; |
| | | this.drawingNo = resp.data.data.drawingNo; |
| | | this.formApprove.title = resp.data.data.name + "替换"; |
| | | this.getHandler(); //获取处理人 |
| | | this.todolistModel = true; |
| | | }); |
| | | }, |
| | | getHandler() { //获取处理人 |
| | | axios({ |
| | | url: '/blade-mdm/flow/replace/default-assignees', |
| | | method: 'get', |
| | | params: { drawingNo: this.drawingNo } |
| | | }).then( |
| | | resp => { |
| | | if (resp.data.code == 200) { |
| | | this.formApprove.assignee = resp.data.data.checkerId; |
| | | } else { |
| | | this.$message.success(resp.msg); |
| | | } |
| | | }); |
| | | }, |
| | | convertToHtml(text) { |
| | | return text.replace(/\n/g, '<br>'); |