From 19d2e5d34ae80d454c3d0854ffc7a712d63caabc Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 01 八月 2023 18:14:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 74 +++++++++++++++++-------------------- 1 files changed, 34 insertions(+), 40 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue index 3f35190..7a950f4 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue @@ -14,7 +14,7 @@ </el-button-group> <el-button-group> <!-- 淇濆瓨--> - <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click="addsHandler" icon="el-icon-check">淇濆瓨</el-button> + <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click.prevent="addsHandler" icon="el-icon-check">淇濆瓨</el-button> <!-- 棰勮鎺掑簭--> <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button> <!-- 鍒犻櫎--> @@ -166,11 +166,11 @@ </div> </el-dialog> <!-- 灞炴�у垎缁�--> - <el-dialog :visible.sync="attrVisible" append-to-body style="width: 800px; left:30vw;top: 10vh ;" + <el-dialog :visible.sync="attrVisible" append-to-body :before-close="attrClose" style="width: 800px; left:30vw;top: 10vh ;" title="杈撳叆鍒嗙粍鐨勫悕绉�"> <el-form ref="form" label-width="70px"> <el-form-item label="灞炴�у垎缁�"> - <el-input v-model="attrModel"></el-input> + <el-input v-model="attrModel" autofocus></el-input> </el-form-item> <div style="display: flex;justify-content: flex-end"> <el-button size="small" type="primary" @click="attrHandle">鎻愪氦</el-button> @@ -218,7 +218,7 @@ </el-dialog> <!-- 鍏ㄥ睆缂栬緫--> <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true" :before-close="escEdit" > - <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud> + <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" @editCloseChildren="editClose" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud> </el-dialog> <!-- 缁勫悎瑙勫垯--> <formula-editor :systemVariableTableData="systemVariableTableData" @@ -414,7 +414,6 @@ } }, 'injectOption.classifyInvokeAttr': function(newVal) { - console.log('newVal',newVal) if (newVal === "name") { this.injectOption.classifyInvokeAttrName='鍒嗙被鍚嶇О' } else if (newVal === "id") { @@ -1485,9 +1484,6 @@ }) }, methods: { - formAttr(row, column) { - console.log(row,column) - }, //鏂板鎼滅储 AddFindHandler(){ if(this.SelectValue == 'id'){ @@ -1508,7 +1504,6 @@ }, //鍙傜収閰嶇疆瀛愮粍浠� echoReferConfig(val){ - console.log('val--',val) this.referObject=val this.$set(this.CurrentCell,'referConfig',JSON.stringify(val)) @@ -1529,12 +1524,10 @@ this.$message.warning('璇烽�夋嫨妯℃澘灞炴��') } else { this.attrVisible = true; - console.log(this.attrSelectList) } }, //灞炴�у垎缁勬彁浜� attrHandle() { - console.log(this.attrSelectList) this.attrSelectList.forEach(item=>{ item.attributeGroup=this.attrModel }) @@ -1543,12 +1536,15 @@ }else { this.$set(this.attrSelectList[0], 'attributeGroup', this.attrModel) } - this.attrModel = ""; - this.attrVisible = false; + this.attrClose() }, //灞炴�у垎缁勬竻绌� attrRemove() { this.attrModel = "" + }, + attrClose(){ + this.attrModel = ""; + this.attrVisible=false }, //琛ㄦ牸鏁版嵁 CrudRend() { @@ -1611,7 +1607,6 @@ //涓氬姟绫诲瀷閫夋嫨 businessSelect(selection, row) { this.busineSelectList = selection; - console.log(selection) }, // 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁寮圭獥 busineHandle() { @@ -1670,7 +1665,6 @@ selectHandle(selection, row) { this.attrOid = row.oid; this.attrRow = row; - console.log(row) }, //琛ㄦ牸閫夋嫨 selectionChange(list) { @@ -1686,15 +1680,16 @@ this.attrRow = row; }, //淇濆瓨 - addsHandler() { + addsHandler(event) { batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => { this.$message.success('淇濆瓨鎴愬姛') - this.editOpenFlag=false + this.editOpenFlag=false; + // 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬� + this.$emit('editCloseChildren') }).catch(()=>{ this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒') }) }, - //琛ㄦ牸琛岀紪杈� handleCellClicks(row, column) { if(this.editOpenFlag){ @@ -1712,10 +1707,20 @@ referConfig:'', } } - console.log('--',this.referConfigOption) // this.$refs.referConfigFormDialog.onloadAttrData(); }else if(column.property == 'classifyInvokeText'){ this.injectVisible=true; + if (this.CurrentCell.classifyInvokeAttr != '') { + this.injectOption = { + classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr, + classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName, + classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag, + classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max', + classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel + }; + } else { + this.injectHandleReset(); + } }else if(column.property == 'componentRule'){ if(this.CurrentCell){ this.CurrentCell.componentRule=this.componentRuleText; @@ -1733,7 +1738,6 @@ 'conditionMap[oid_notequal]': this.CurrentCell.oid, limit:-1 }).then(res => { - console.log(res) this.CascadeData = res.data.data; }) this.CascadeVisible=true; @@ -1742,6 +1746,9 @@ this.rulesVisible=true; }else if(column.property == 'attributeGroup'){ this.attrVisible = true; + if(this.CurrentCell.attributeGroup !== ''){ + this.attrModel=this.CurrentCell.attributeGroup + } } } }, @@ -1854,7 +1861,6 @@ }, //楠岃瘉瑙勫垯妫�鏌� rulesExamine() { - console.log(this.RulesForm.expressionText) const regex = new RegExp(this.rulesData.ruleRowBds); if(regex.test(this.RulesForm.TestContent)){ this.$message.success('鏍¢獙鎴愬姛') @@ -1879,23 +1885,6 @@ "灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel=='max'?this.injectOption.classifyNumber :'min', "鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag } - //鍗曞厓鏍肩紪杈戣祴鍊间竴閬� - // noinspection JSCheckFunctionSignatures - if(this.CurrentCell){ - //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧 - if(this.injectOption.classifyInvokeLevel!== 'min'){ - this.CurrentCell.classifyInvokeLevel=this.injectOption.classifyNumber - }else { - this.CurrentCell.classifyInvokeLevel='min' - } - //鍏朵綑姝e父璧嬪�� - this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr, - this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName, - this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag, - // this.$set(this.CurrentCell, 'classifyInvokeText', data) - this.CurrentCell.classifyInvokeText = data; - this.injectHandleReset() - }else { //鍕鹃�夋搷浣� for (const key in this.injectOption) { this.attrSelectList[0][key] = this.injectOption[key]; @@ -1908,7 +1897,7 @@ this.$set(this.attrSelectList[0],'classifyInvokeText',data) } this.injectHandleReset() - } + if(this.injectOption.classifyInvokeLevel !== 'min'){ this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber; }else { @@ -1927,7 +1916,8 @@ }, // 鍒嗙被娉ㄥ叆鍙栨秷 injectRemove() { - this.injectVisible = false + this.injectVisible = false; + this.injectHandleReset() }, //灞炴�фā鏉胯〃鏍煎崟鍏冩牸鐐瑰嚮浜嬩欢 //琛ㄦ牸鎿嶄綔鏍忓垹闄� @@ -2014,6 +2004,10 @@ editOpen(){ this.editOpenFlag=true; }, + //瀹氫箟涓�涓叧闂紪杈戠殑鏂规硶渚涘瓙缁勪欢浣跨敤 + editClose(){ + this.editOpenFlag=false; + }, //鎵归噺璁剧疆switch batchSetFlag(value){ this.attrSelectList.forEach(item=>{ -- Gitblit v1.9.3