| | |
| | | }); |
| | | }else { |
| | | this.codeClassifyForm.oid = this.selectedFixedOrCodeclassifyValue.attributes.oid; |
| | | // 分类码段,子分类和父分类之间不能相互更改 |
| | | if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ |
| | | return; |
| | | } |
| | | this.$delete(this.codeClassifyForm,"parentClassifyValueOid"); |
| | | editCodeClassifyValue(this.codeClassifyForm).then(() => { |
| | | this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid}) |
| | | this.$message({ |
| | |
| | | }); |
| | | }); |
| | | }else{ |
| | | if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ |
| | | return; |
| | | } |
| | | //分类码段码值删除 |
| | | this.$confirm("是否删除这条数据?如果被引用将不能被删除!", { |
| | | confirmButtonText: "确定", |
| | |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | //对固定码值表进行:上移、下移、移除操作 |
| | | codeFixedValueOpetion(condition,row){ |
| | |
| | | }, |
| | | //对分类码值表进行:上移、下移、移除操作 |
| | | codeClassifyValueOpetion(condition){ |
| | | if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ |
| | | return; |
| | | } |
| | | //此处涉及到深浅拷贝问题,但是执行上下移保存操作之后会重新加载treedata,所以影响不大 |
| | | let currentTreeList = this.getCodeClassifyValueTreeData(); |
| | | let saveData = []; |
| | | console.log(currentTreeList.treeList); |
| | | // console.log(currentTreeList.treeList); |
| | | if(condition == 'up'){ |
| | | if(currentTreeList.index-1>=0){ |
| | | // 调整顺序 |
| | |
| | | this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData); |
| | | } |
| | | } |
| | | console.log(saveData); |
| | | console.log(this.classifyValueTreeData); |
| | | }, |
| | | //选中被调整顺序的两个树的节点 |
| | | getCodeClassifyValueTreeData(){ |
| | |
| | | } |
| | | }, |
| | | //上移下移等操作的保存 |
| | | saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){ |
| | | async saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){ |
| | | //保存对固定码段码值的上移下移移出等操作 |
| | | if(condition == "fixedValue"){ |
| | | let data = { |
| | |
| | | }); |
| | | }else { |
| | | //保存对分类码值码段码值的上移下移移出等操作 |
| | | saveCodeClassifyValueOrder({ |
| | | await saveCodeClassifyValueOrder({ |
| | | "codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid, |
| | | "dtoList": JSON.stringify(editOrderNumdata), |
| | | }).then(() => { |
| | |
| | | this.codeClassifyForm.id = node.attributes.id; |
| | | this.codeClassifyForm.name = node.attributes.name; |
| | | this.codeClassifyForm.parentClassifyValueOid = node.attributes.oid; |
| | | //console.log(this.codeClassifyForm); |
| | | // console.log(this.codeClassifyForm); |
| | | }, |
| | | /** |
| | | * 分类码段码值,修改、删除、上下移之前,检查是否为子分类和父分类之间相互更改 |
| | | * @currentRowClassOid 当前选中行oid |
| | | * @updateClassOid 要修改的分类码值oid |
| | | */ |
| | | checkClassUpdate(currentRowClassOid,updateClassOid){ |
| | | if(currentRowClassOid!=updateClassOid){ |
| | | this.$message({ |
| | | type: "error", |
| | | message: "操作失败【子分类与父分类之间不能相互修改码值】!" |
| | | }); |
| | | } |
| | | return currentRowClassOid!=updateClassOid; |
| | | }, |
| | | |
| | | |
| | |
| | | this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false); |
| | | }, |
| | | // 上移下移基础码段 |
| | | upOrderNum(row){ |
| | | async upOrderNum(row){ |
| | | if(!this.tipsMessage(this.selectionList)){ |
| | | return; |
| | | } |
| | |
| | | this.$message.warning("未获取到必填参数!"); |
| | | return; |
| | | } |
| | | upOrderNum(row.oid).then(() => { |
| | | await upOrderNum(row.oid).then(() => { |
| | | this.loadBasic(this.selectionList[0]); |
| | | this.$message({ |
| | | type: "success", |