| | |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | <!-- <template #menu-left> |
| | | <el-button :size="size" type="primary" @click="showAdd()">新增根节点</el-button> |
| | | </template> --> |
| | | |
| | | <template #name="{ row }"> |
| | | <span>{{ row.name }}</span> |
| | | <!-- <el-button :size="size" text v-if="row.nodeType != 70" icon="el-icon-setting" type="primary" placeholder="修改" @click="showEdit(row)" title="修改"></el-button> |
| | | <el-button :size="size" text v-if="row.nodeType != 10" icon="el-icon-delete" type="primary" @click="showDel(row)" placeholder="删除" title="删除"></el-button> |
| | | <el-button :size="size" text v-if="row.nodeType != 60 && row.nodeType != 70" icon="el-icon-document-add" type="primary" @click="showAdd(row)" placeholder="新增子级" title="新增子级"></el-button> |
| | | <el-button :size="size" text v-if="row.nodeType == 60 || row.nodeType == 50" icon="el-icon-upload" type="primary" @click="showUpload(row)" placeholder="文件上传" title="文件上传"></el-button> --> |
| | | <!-- 涉密网才有 --> |
| | | <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-pie-chart" type="primary" @click="upgrade(row)" placeholder="升版" title="升版"></el-button> --> |
| | | <!-- 工控网才有 --> |
| | | <!-- <el-button :size="size" text v-if="row.nodeType == 70" icon="el-icon-position" type="primary" @click="downsend(row)" placeholder="下发" title="下发"></el-button> --> |
| | | |
| | | |
| | | <!-- 替换 v-if="permission.auto_dispatch"--> |
| | | <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> |
| | |
| | | disabled:true, |
| | | labelWidth: "120", |
| | | }, |
| | | |
| | | { |
| | | label: '锁定原因', |
| | | prop: 'remark', |
| | | type: "textarea", |
| | | disabled:true, |
| | | labelWidth: "120", |
| | | span: 24, |
| | | }, |
| | | { |
| | | label: '解锁原因', |
| | | prop: 'unlockReason', |
| | | type: "textarea", |
| | | labelWidth: "120", |
| | | span: 24, |
| | | } |
| | |
| | | this.unlockForm.id = row.id; |
| | | this.unlockForm.name = row.name |
| | | this.unlockForm.remark = row.remark; |
| | | this.unlockForm.unlockReason=''; |
| | | this.unlockForm.parentId = row.parentId; |
| | | this.unlockBox = true; |
| | | }, |
| | |
| | | if (res.data.code == 200) { |
| | | this.$message({ type: 'success', message: '操作成功!' }); |
| | | this.addLocalTreeNode(this.lockForm.parentId); |
| | | |
| | | this.unlockBox = false; |
| | | } else { |
| | | this.$message({ type: 'error', message: res.data.msg }); |
| | | } |
| | |
| | | axios({ |
| | | url: '/blade-mdm/flow/lock/start-unlock', |
| | | method: 'post', |
| | | params: {nodeId: row.id } |
| | | params: {nodeId: row.id,unlockReason:row.unlockReason } |
| | | }).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 }); |
| | | this.$message({ type: 'error', message: res.data.msg }); |
| | | } |
| | | }); |
| | | done(); |
| | |
| | | window.console.log('haha', error); |
| | | done(); |
| | | }); |
| | | // if(this.row.taskDefinitionKey === 'programmingTask') { |
| | | // // if(this.applist.length !== 1) { |
| | | // // done(); |
| | | // // return this.$message.success('请选择1个程序'); |
| | | // // } |
| | | // } |
| | | // approve({ |
| | | // ...this.formApprove, |
| | | // taskId: this.row.taskId, |
| | | // processInstanceId: this.row.processInstanceId, |
| | | // // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '', |
| | | // }).then(res => { |
| | | // if(res.data.code !== 200) { |
| | | // this.$message.error(res.data.msg); |
| | | // done(); |
| | | // return; |
| | | // } |
| | | // this.$message.success('审批成功'); |
| | | // this.approveBox = false; |
| | | // this.onLoad(this.page, this.query); |
| | | // done(); |
| | | // }).catch(err => { |
| | | // done(); |
| | | // console.error(err); |
| | | // }); |
| | | |
| | | }, |
| | | todoSelectionChange(applist) { |
| | | this.applist = applist; |
| | |
| | | this.modalBox = true; |
| | | this.modalForm = row; |
| | | }, |
| | | showDel(row) { |
| | | this.$confirm('将会删除该节点及其子节点,是否确认删除?', { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '否', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | //调用接口 |
| | | this.loading = true; |
| | | axios({ |
| | | url: '/blade-mdm/program/node/remove', |
| | | method: 'post', |
| | | params: { id: row.id }, |
| | | }).then( |
| | | res => { |
| | | this.loading = false; |
| | | this.addLocalTreeNode(row.parentId); |
| | | } |
| | | ); |
| | | }) |
| | | }, |
| | | showAdd(row) { //新增子节点 |
| | | if (!row) { |
| | | this.modalTitle = "新增根节点"; |
| | | this.modalForm.nodeType = this.nodeTypeList[0].dictKey; |
| | | this.modalForm.parentId = 0; |
| | | } else { |
| | | if (row.nodeType == 60) { //程序包 |
| | | return; |
| | | } |
| | | var defalutNodeType = ""; //下一级节点类型 |
| | | for (var i = 0; i < this.nodeTypeList.length; i++) { |
| | | if (row.nodeType == this.nodeTypeList[i].dictKey) { |
| | | defalutNodeType = this.nodeTypeList[i + 1].dictKey; |
| | | } |
| | | } |
| | | this.modalTitle = "新增子节点"; |
| | | this.selectedColumn.nodeType = defalutNodeType; |
| | | this.selectedColumn.parentId = row.id; |
| | | this.selectedColumn.name = ""; |
| | | this.selectedColumn.id = ""; |
| | | this.modalForm = this.selectedColumn; |
| | | } |
| | | this.modalBox = true; |
| | | }, |
| | | |
| | | modalSubmit(row, done) { //新增子节点保存/修改 |
| | | if (this.modalTitle == "修改") { |
| | | var url = "/blade-mdm/program/node/update"; |