| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="search.nodeType" placeholder="请输入节点类型" clearable> |
| | | <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/> |
| | | <el-option v-for="item in nodeTypeList" :key="item.dictValue" :label="item.dictValue" :value="item.dictKey"/>formApprove. |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | |
| | | <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="下发" title="下发"></el-button> --> |
| | | <!-- 替换 --> |
| | | <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,1,')>-1" icon="el-icon-switch" type="primary" @click="replacement(row)" placeholder="替换" title="替换"></el-button> |
| | | <!-- <el-icon><Switch /></el-icon> --> |
| | | <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1 && row.isLocked == 1" icon="el-icon-lock" type="primary" @click="locked(row,true)" placeholder="锁定" title="锁定"></el-button> |
| | | <el-button :size="size" text v-if="row.nodeType == 60 && row.parentIds.indexOf('0,2')>-1 && row.isLocked != 1" icon="el-icon-unlock" type="primary" @click="locked(row,false)" placeholder="解锁" title="解锁"></el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 新增节点 --> |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | locked(row, isLock) { |
| | | row.isLocked == isLock |
| | | this.$confirm(`是否${isLock ? '解锁' : '锁定'}`, { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | axios({ |
| | | url: isLock ? '/blade-mdm/flow/lock/start-unlock' : '/blade-mdm/program/node/lock', |
| | | method: 'post', |
| | | params: {id: row.id,nodeId: row.id} |
| | | }).then(res => { |
| | | if(res.data.code == 200) { |
| | | this.$message({type: 'success',message: '操作成功!'}); |
| | | this.addLocalTreeNode(row.parentId); |
| | | }else { |
| | | this.$message({type: 'success',message: res.data.msg}); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | handleSubmit(form, done) { |
| | | //发起程序替换流程 |
| | | var obj = { |
| | | title: this.formApprove.title, |
| | | nodeId: this.id, |
| | | tempInstanceId: this.replaceDataId, |
| | | comment: this.formApprove.comment, |
| | | comment: this.formApprove.comment, |
| | | assignee: this.formApprove.assignee |
| | | } |
| | | axios({ |
| | |
| | | method: 'post', |
| | | data: obj |
| | | }).then( |
| | | resp => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | resp => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | done(); |
| | | this.todolistModel = false; |
| | | }).catch(error =>{ |
| | | window.console.log('haha',error); |
| | | done(); |
| | | }); |
| | | done(); |
| | | this.todolistModel = false; |
| | | }); |
| | | // if(this.row.taskDefinitionKey === 'programmingTask') { |
| | | // // if(this.applist.length !== 1) { |
| | | // // done(); |
| | |
| | | params: {drawingNo: this.drawingNo} |
| | | }).then( |
| | | resp => { |
| | | //console.log(res,9988) |
| | | if(resp.data.code == 200) { |
| | | this.formApprove.assignee = resp.data.data.checkerId; |
| | | }else { |
| | | this.$message.success(resp.msg); |
| | | } |
| | | }); |
| | | }, |
| | | convertToHtml(text) { |