From 41f11d5fd764a2bc7e8463a70bb340467d99a3ca Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 14 七月 2023 09:42:36 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/views/code/code.vue | 228 +++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 143 insertions(+), 85 deletions(-) diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue index 7e47330..275d740 100644 --- a/Source/UBCS-WEB/src/views/code/code.vue +++ b/Source/UBCS-WEB/src/views/code/code.vue @@ -92,12 +92,19 @@ @click="handleRange"> 浣跨敤鑼冨洿 </el-button> - <el-button + <el-button size="small" icon="icon-qingkong" plain @click="clearAllCodeSec"> 娓呯┖鐮佸�� + </el-button> + <el-button + size="small" + icon="el-icon-guide" + plain + @click="escapeOwner"> + 杞Щ鎵�鏈夎�� </el-button> </template> </avue-crud> @@ -118,7 +125,7 @@ width="800px" style="height: 116vh; margin-top: -10vh;"> <avue-crud - :option="dialogeOption" + :option="dialogeOption" :table-loading="dialogLoading" :data="useRangeData" @refresh-change="refreshUseRangeChange"> @@ -326,8 +333,8 @@ <basic-container> <div class="abox" style="height:54vh"> <avue-tree - :data="classifyValueTreeData" - :option="classisyValueTreeOption" + :data="classifyValueTreeData" + :option="classisyValueTreeOption" @node-click="classisyValueTreeOnodeClick" style="overflow-y: auto; height: 54vh"/> </div> @@ -433,7 +440,7 @@ <el-form-item label="鐮佹鍚嶇О:" :label-width="leftFormLabelWidth" required> <el-input ref="name" v-model="form.name" :readonly="basicSecOnlyRead"></el-input> </el-form-item> - + <el-form-item label="鐮佹绫诲瀷" :label-width="leftFormLabelWidth" required> <el-select v-model="form.secType" placeholder="璇烽�夋嫨" @change="changeSectypeFormItems(null)" :disabled="basicSecOnlyRead"> <el-option @@ -491,7 +498,7 @@ </el-input> </el-form-item> <el-form-item label="灞炴�ф墍鍦ㄥ垎绫�:" :label-width="rightFormLabelWidth"> - <el-input + <el-input v-model="form.referCodeClassifyOidName" disabled> </el-input> @@ -529,7 +536,7 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth"> + <el-form-item v-if="form.codeFillType!='code_fill_none'" label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth"> <el-select v-model="form.codeFillSeparator" @blur="inputSelectBlur" filterable placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> <el-option v-for="item in enumParam.codeFillSeparator" @@ -568,7 +575,7 @@ <el-input v-model.number="form.codeLevelValue" ref="codeLevelValue" :readonly="basicSecOnlyRead"></el-input> </el-form-item> <el-form-item label="瀛楃鎴彇绫诲瀷:" :label-width="rightFormLabelWidth" required> - <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> + <el-select v-model="form.valueCutType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead" @change="changeCutType($event)"> <el-option v-for="item in enumParam.codeCutType" :key="item.itemValue" @@ -576,6 +583,9 @@ :value="item.itemValue"> </el-option> </el-select> + </el-form-item> + <el-form-item id="ShowOrHide" v-if="form.valueCutType!='code_cut_none'" label="鍊兼埅鍙栭暱搴�:" :label-width="rightFormLabelWidth"> + <el-input v-model.number="form.valueCutLength" ref="valueCutLength" :readonly="basicSecOnlyRead"></el-input> </el-form-item> <el-form-item label="鍙栧�肩被鍨�:" :label-width="rightFormLabelWidth"> <el-select v-model="form.codeGetValueType" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> @@ -592,7 +602,7 @@ <div v-show="form.secType==='coderefersec' ? true:false"> <el-form-item label="鍙傜収寮曠敤鐨勪笟鍔$被鍨�:" label-width="152px" required> <el-input - ref="referBtmId" + ref="referBtmId" placeholder="璇烽�夋嫨" prefix-icon="el-icon-search" readonly="true" @@ -604,7 +614,7 @@ </el-form-item> <el-form-item label="鍙傜収閰嶇疆:" label-width="152px" required> <el-input - ref="referConfig" + ref="referConfig" placeholder="璇烽�夋嫨" prefix-icon="el-icon-search" readonly="true" @@ -666,7 +676,7 @@ </el-option> </el-select> </el-form-item> - <el-form-item label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth"> + <el-form-item v-if="form.codeFillType!='code_fill_none'" label="琛ヤ綅鏃剁殑瀛楃:" :label-width="rightFormLabelWidth"> <el-select v-model="form.codeFillSeparator" filterable @blur="inputSelectBlur" placeholder="璇烽�夋嫨" :disabled="basicSecOnlyRead"> <el-option v-for="item in enumParam.codeFillSeparator" @@ -733,9 +743,9 @@ </el-dialog> <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗璇濇缁勪欢 --> - <formula-editor - ref="formulaEditor" - @updateFormulaContent="updateFormulaContent" + <formula-editor + ref="formulaEditor" + @updateFormulaContent="updateFormulaContent" :thisSceneTableData="formulaEditorParams.thisSceneTableData" :visible.sync="formulaEditorParams.formulaEditorSettingBox" :systemVariableTableData="formulaEditorParams.systemVariableTableData"> @@ -751,7 +761,7 @@ <avue-crud :page.sync="parentClsfyParams.parentClassifyDataPage" :ref="parentClsfyParams.ref" - :option="parentClsfyParams.parentClassifyParentOption" + :option="parentClsfyParams.parentClassifyParentOption" :table-loading="parentClsfyParams.classifyDialogLoading" :data="parentClsfyParams.parentClassifyData" @refresh-change="refreshParentClassifyDataChange" @@ -781,7 +791,7 @@ ref="referConfigFormDialog" @echoReferConfig="echoReferConfig"> </refer-config-form-dialog> - + <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 --> <refer-config-crud-dialog ref="referConfigCrudDialog" @@ -796,12 +806,12 @@ <script> import { gridCodeRule, getDetail, add, update, remove, listUseRange, updateStatus,clone,clearAllCode } from "@/api/code/mdmrule"; - import { - gridCodeBasicSec, - downOrderNum, - upOrderNum, - deleteData, - editSave, + import { + gridCodeBasicSec, + downOrderNum, + upOrderNum, + deleteData, + editSave, cloneCodeBasic, addSave, refDataGridClassifySec, @@ -912,7 +922,7 @@ codeFixedSecOid: "", description: "", id: "", - }, + }, isShowFixedForm: true, //true鏄剧ず鍥哄畾鐮佹鐮佸�肩鐞嗙晫闈紝false鏄剧ず鍒嗙被鐮佹鐮佸�肩鐞嗙晫闈� fixedValueData: [], //鍥哄畾鐮佹鐮佸�艰〃鏍兼暟鎹� fixedValueOption: fixedValueOption, //琛ㄦ牸閰嶇疆 @@ -937,7 +947,7 @@ treeOption: treeOption, currentSelectTreeData: '', //褰撳墠閫変腑鐨勬爲鑺傜偣 /* 涓哄睘鎬ч�夊�煎彸渚ц〃鏍肩浉鍏虫暟鎹� */ - + selectAttrParams: { ref: "selectionAttrCrud", attrOption: attrOption, @@ -1015,7 +1025,7 @@ ], formulaEditorSettingBox: false, }, - + /* 鐖跺垎绫荤爜娈靛璇濇 */ parentClsfyParams: { ref: 'crudParentClassify', @@ -1032,7 +1042,7 @@ parentClassifyQuery: {}, //鏌ヨ鏉′欢 parentClassifySelectionList: [], //褰撳墠閫変腑琛� }, - + /** 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬪璇濇鐩稿叧鏁版嵁 */ referBtmDialogParams: { ref: 'crudReferBtm', @@ -1052,7 +1062,7 @@ componentCodeFlag: false, //鏄惁鍙備笌缂栫爜 pkCodeRule: '', //鎵�灞炵紪鐮佽鍒� }, - + //鏋氫妇鍜屽彲杈撳彲閫夋煡璇� enumParam: { secTypeList:[], //鐮佹绫诲瀷 @@ -1093,6 +1103,9 @@ watch:{ }, + mounted(){ + this.loadTotalEnum(); + }, methods: { /** 楂樼骇鏌ヨ瀵硅瘽妗嗙粍浠�,缁勪欢杩斿洖鐨勫�兼槸condtionMap[field]褰㈠紡鐨勬煡璇㈡潯浠讹紝淇濈暀浜嗗拰涔嬪墠涓�鏍风殑鏂瑰紡 */ @@ -1128,8 +1141,8 @@ this.form.referBtmId = content.id || ''; this.form.referBtmName = content.name || content.id; }, - - /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ + + /** 鐖跺垎绫婚�夋嫨瀵硅瘽妗嗭紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ // 淇濆瓨褰撳墠鐖跺垎绫荤爜娈电殑閫変腑琛岋紝骞惰繘琛屽洖鏄� saveSelectedParentClassify(){ //console.log(this.parentClsfyParams.parentClassifySelectionList.length); @@ -1184,8 +1197,8 @@ let conditionMaps = {}; conditionMaps['conditionMap[pkCodeRule]'] = oid; refDataGridClassifySec( - page.currentPage, - page.pageSize, + page.currentPage, + page.pageSize, conditionMaps ).then(res => { //console.log(res.data); @@ -1196,9 +1209,9 @@ this.parentClassifySelectionClear(); }); }, - - /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ + + /** 鎵撳紑灞炴�ч�夊彇鍊硷紝绗簩灞傚祵濂楀璇濇锛屽強鍏剁浉鍏虫柟娉� */ // 鑾峰彇褰撳墠琚�変腑鏍戣妭鐐圭殑oid nodeClick(data) { this.currentSelectTreeData = data; @@ -1268,7 +1281,7 @@ }) this.isShowSelectAttrOption = false; }, - + /** 鍩虹鐮佹琛ㄤ腑鐨勭爜鍊肩鐞嗙殑鐩稿叧鏂规硶 */ // 鐮佸�肩鐞嗗脊绐楁帶鍒� @@ -1388,6 +1401,11 @@ }); }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({ @@ -1398,10 +1416,10 @@ window.console.log(error); }); } - + }, //鍒犻櫎鐮佸�� - delCodeSecValue(condition){ + delCodeSecValue(condition){ //鍥哄畾鐮佹鐮佸�煎垹闄� if(condition == 'codefixedsec'){ //console.log(this.selectedFixedOrCodeclassifyValue.oid); @@ -1424,6 +1442,9 @@ }); }); }else{ + if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){ + return; + } //鍒嗙被鐮佹鐮佸�煎垹闄� this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", { confirmButtonText: "纭畾", @@ -1443,8 +1464,7 @@ message: "鎿嶄綔鎴愬姛!" }); }); - } - + } }, //瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣� codeFixedValueOpetion(condition,row){ @@ -1484,10 +1504,13 @@ }, //瀵瑰垎绫荤爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣� 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){ // 璋冩暣椤哄簭 @@ -1505,10 +1528,8 @@ saveData[0].orderNum = parseInt(saveData[0].orderNum)+1; saveData[1].orderNum = parseInt(saveData[1].orderNum)-1; this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData); - } + } } - console.log(saveData); - console.log(this.classifyValueTreeData); }, //閫変腑琚皟鏁撮『搴忕殑涓や釜鏍戠殑鑺傜偣 getCodeClassifyValueTreeData(){ @@ -1518,10 +1539,10 @@ */ //璇存槑鏄牴鑺傜偣锛岀洿鎺ユ壘鍐嶅垽鏂槸鍚︽槸杈圭晫鍊� if(currentNodeTreeData.parentId.trim() == ''){ - return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true); + return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.oid,true); }else{ //璇存槑涓嶆槸鏍硅妭鐐�,鍏堟壘鍒扮埗鑺傜偣鍐嶆壘鍒板瓙鑺傜偣,鍒ゆ柇鏄惁鏄竟鐣屽�� - return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false); + return this.findTreeIndex(this.classifyValueTreeData,currentNodeTreeData.parentId,false); } }, /** @@ -1547,7 +1568,7 @@ } }, //涓婄Щ涓嬬Щ绛夋搷浣滅殑淇濆瓨 - saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){ + async saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){ //淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣� if(condition == "fixedValue"){ let data = { @@ -1566,7 +1587,7 @@ }); }else { //淇濆瓨瀵瑰垎绫荤爜鍊肩爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣� - saveCodeClassifyValueOrder({ + await saveCodeClassifyValueOrder({ "codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid, "dtoList": JSON.stringify(editOrderNumdata), }).then(() => { @@ -1579,7 +1600,7 @@ }); this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid}); } - + }, //鍒嗙被鐮佸�兼爲data鍔犺浇 loadClassifyValueData(row){ @@ -1605,7 +1626,21 @@ 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 褰撳墠閫変腑琛宱id + * @updateClassOid 瑕佷慨鏀圭殑鍒嗙被鐮佸�紀id + */ + checkClassUpdate(currentRowClassOid,updateClassOid){ + if(currentRowClassOid!=updateClassOid){ + this.$message({ + type: "error", + message: "鎿嶄綔澶辫触銆愬瓙鍒嗙被涓庣埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰淇敼鐮佸�笺��!" + }); + } + return currentRowClassOid!=updateClassOid; }, @@ -1657,7 +1692,7 @@ if(this.selectionList[0].oid == null || this.selectionList[0].oid == ''){ this.$message.warning('缂哄け蹇呰鍙傛暟锛岃閲嶆柊閫夋嫨缂栫爜瑙勫垯鍚庡啀璇�!'); return; - } + } this.form.pkCodeRule = this.selectionList[0].oid; if(this.form.oid == '' || this.form.oid == null){ if(this.checkForm()){ @@ -1676,20 +1711,15 @@ this.loadBasic(this.selectionList[0]); }else{ // 鍙兘鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩細鍙戠敓鏀瑰彉鎵�浠ヨ繖鍎跨洿鎺ュreferConfig鐨刯son杩涜鏀瑰彉 - if(this.form.referConfig === "coderefersec"){ + if(this.form.referConfig === "coderefersec" || this.form.referConfig != undefined){ let referConfig = JSON.parse(this.form.referConfig); referConfig.referType = this.form.referBtmId; referConfig.referTypeName = this.form.referBtmName; this.form.referConfig = JSON.stringify(referConfig); - let referValueInfo = JSON.parse(this.form.referValueInfo); referValueInfo.referType = this.form.referBtmId; - this.form.referValueInfo = JSON.stringify(referValueInfo); } - editSave(this.form).then(() => { - // 鍏抽棴瀵硅瘽妗� - this.addBasicCodeSettingBox = false this.$message({ type: "success", message: "鎿嶄綔鎴愬姛!" @@ -1698,6 +1728,8 @@ window.console.log(error); }); this.loadBasic(this.selectionList[0]); + // 鍏抽棴瀵硅瘽妗� + this.addBasicCodeSettingBox = false } }, // 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮� @@ -1705,6 +1737,7 @@ let form = this.form; //console.log(form); const regNumber = /^[0-9]+\.{0,1}[0-9]*$/; //鏁板瓧鎴栧皬鏁版鍒欐牎楠� + const regPos = /^[0-9]*[1-9][0-9]*$/; //闈炶礋鏁存暟姝e垯鏍¢獙 const tipsMsg = "蹇呭~椤逛笉鑳戒负绌�"; if(form.id == ''){ this.$message.warning("(鐮佹缂栧彿)"+tipsMsg); @@ -1725,7 +1758,7 @@ //鍥哄畾鐮佹 if(form.codeSecLengthType == ''){ this.$message.warning("(鐮佹闀垮害绫诲瀷)"+tipsMsg); - this.$refs.codeSecLengthType.$el.querySelector('select').focus(); + // this.$refs.codeSecLengthType.$el.querySelector('select').focus(); return false; } if(form.codeSecLength == ''){ @@ -1806,14 +1839,19 @@ this.$message.warning('(灞傜骇绫诲瀷)'+tipsMsg); return false; } - if(!regNumber.test(form.codeLevelValue)){ - this.$message.warning('灞傜骇鐨勫��)鍙兘濉啓鏁板瓧'); + if(form.codeLevelType != 'code_level_min'&& !regNumber.test(form.codeLevelValue)){ + this.$message.warning('(灞傜骇鐨勫��)鍙兘濉啓鏁板瓧'); this.$refs.codeLevelValue.$el.querySelector('input').focus(); return false; } if(form.valueCutType == ''){ this.$message.warning('(瀛楃鎴彇绫诲瀷)'+tipsMsg); - this.$refs.valueCutType.$el.querySelector('select').focus(); + // this.$refs.valueCutType.$el.querySelector('select').focus(); + return false; + } + if(form.valueCutType != 'code_cut_none' && !regPos.test(form.valueCutLength)){ + this.$message.warning('(鍊兼埅鍙栭暱搴�)鍙兘濉啓姝f暣鏁�'); + this.$refs.valueCutLength.$el.querySelector('input').focus(); return false; } }else if(this.form.secType==='coderefersec'){ @@ -1935,7 +1973,7 @@ }); } if(isAdancedQuery){ - condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' + condition['conditionMap[pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' ? this.selectionList[0].oid:this.currentCodeRuleOid; } gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => { @@ -1973,19 +2011,19 @@ this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false); }, // 涓婄Щ涓嬬Щ鍩虹鐮佹 - upOrderNum(row){ + async upOrderNum(row){ if(!this.tipsMessage(this.selectionList)){ return; } if (this.selectionList[0].lcStatus != 'Editing') { this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!"); - return; + return; } if(row.oid==null || row.oid==''){ this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!"); - return; + return; } - upOrderNum(row.oid).then(() => { + await upOrderNum(row.oid).then(() => { this.loadBasic(this.selectionList[0]); this.$message({ type: "success", @@ -2002,11 +2040,11 @@ //console.log(this.selectionList); if (this.selectionList[0].lcStatus != 'Editing') { this.$message.warning("鍙湁缂栫爜瑙勫垯鐨勭姸鎬佹槸 [缂栬緫涓璢 鐨勬椂鍊欙紝鎵嶈兘璋冩暣鐮佹椤哄簭!"); - return; + return; } if(row.oid==null || row.oid==''){ this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!"); - return; + return; } downOrderNum(row.oid).then(() => { this.loadBasic({"oid":codeRuleOid}); @@ -2112,7 +2150,7 @@ this.getRangeCodeList() }, // 鍔犺浇浣跨敤鑼冨洿鍒楄〃 - getRangeCodeList(){ + getRangeCodeList(){ this.dialogLoading = true; if(this.selectionList[0].oid==null){ this.$message.error("鏈幏鍙栧埌鍙傛暟!"); @@ -2180,7 +2218,7 @@ }, error => { window.console.log(error); }); - //console.log(data); + //console.log(data); }, // 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗� openOtherCodeRuleDialog(){ @@ -2189,7 +2227,7 @@ } if(this.selectionList[0].lcStatus != 'Editing'){ this.$message.warning("缂栫爜瑙勫垯宸茶寮曠敤锛屼笉鍏佽缂栬緫鎴栧垹闄�!"); - return; + return; } this.cloneOtherCodeRuleSettingBox = true; }, @@ -2290,6 +2328,7 @@ }, // 娣诲姞 rowSave(row, done, loading) { + console.log(row); add(row).then(() => { this.onLoad(this.page); this.$message({ @@ -2370,7 +2409,7 @@ this.query = requestData; this.onLoad(this.page); done(); - }, + }, // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙� selectionChange(list) { this.selectionList = list; @@ -2385,12 +2424,21 @@ this.loadBasic(this.selectionList[list.length-1]); } }, + changeCutType(value){ + if (value != 'code_cut_none'){ + if(this.form.valueCutLength == ''){ + this.form.valueCutLength = 1; + } + }else{ + this.form.valueCutLength = ''; + } + }, // 鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨 codeRuleRowClick (row) { // console.log(this.currentRuleLcStatus); this.$refs.crud.toggleSelection(); this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛� - + }, selectionClear() { this.selectionList = []; @@ -2408,8 +2456,8 @@ onLoad(page,params={}) { this.loading = true; gridCodeRule( - page.currentPage, - page.pageSize, + page.currentPage, + page.pageSize, this.query ).then(res => { //console.log(res.data); @@ -2514,13 +2562,13 @@ }, // 琛ヤ綅鏃剁殑瀛楃锛屽疄鐜板彲杈撳彲閫� inputSelectBlur(e){ - if (e.target.value) { + if (e.target.value) { this.form.codeFillSeparator = e.target.value; } }, // 鐮佹绫诲瀷鏀瑰彉鏃讹紝澧炲姞瀵瑰簲鐨刦orm琛ㄥ崟涓殑灞炴�� - changeSectypeFormItems(row){ - //console.log(row); + changeSectypeFormItems(row){ + //console.log(row); if(this.enumParam.secTypeList.length==0){ this.loadCodeSecType(); } @@ -2635,15 +2683,25 @@ // console.log(this.form); }, // 绗竴娆¤姹傜殑鏋氫妇鏁版嵁鏀剧紦瀛� - getLocalStorageEnum(key){ - let enumCach = JSON.parse(localStorage.getItem(key)); + getLocalStorageEnum(enumKey){ + let enumCach = JSON.parse(localStorage.getItem(enumKey)); if(enumCach == null) { - getDictionary({code: key}).then(res=>{ + getDictionary({code: enumKey}).then(res=>{ enumCach = res.data.data; - localStorage.setItem(key,JSON.stringify(res.data.data)); + localStorage.setItem(enumKey,JSON.stringify(res.data.data)); }) } return enumCach; + }, + // 缁熶竴鍔犺浇鎵�鏈夋灇涓炬煡璇紝涓昏鏄负閬垮厤鍒囨崲鐮佹绫诲瀷鏃惰繕鏈姞杞藉畬鎴愮殑鎯呭喌 + loadTotalEnum(){ + this.loadCodeSecType(); + this.loadCodeSecLength(); + this.loadCodeFillType(); + this.loadCodeFillSeparator(); + this.loadCodeLevelType(); + this.loadCodeCutType(); + this.loadCodeGetValueType(); }, //鏋氫妇鍜屽彲杈撳彲閫夊唴瀹规煡璇� loadCodeSecType(){ @@ -2689,7 +2747,7 @@ .code-rule-crud > .avue-crud__pagination { padding: 14px 0 2px 20px; } - + .clone-input-textarea > .el-form-item__content { width: 495px; } @@ -2709,7 +2767,7 @@ .other-clone-coderule-crud > .el-card> .el-card__body > .avue-crud__menu { display: none!important; } - + .el-table--small .el-table__cell { padding: 3px 0; } @@ -2751,8 +2809,8 @@ .left > .el-form-item > .el-form-item__content > .el-input-number > .el-input > .el-input__inner { width:120px; - } - + } + .el-col>.el-card > .el-card__header { background: rgb(213 231 239); border-radius: inherit; @@ -2807,4 +2865,4 @@ padding: 5px 10px 10px; } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3