From 07774a2c6e5a89bfab5cc4a82e91cf451dd380f3 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期二, 01 八月 2023 14:50:07 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue index 07bd00b..b9c9da3 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> <!-- 鍒犻櫎--> @@ -170,7 +170,7 @@ 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" @@ -1677,15 +1677,15 @@ 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){ @@ -1706,14 +1706,16 @@ // this.$refs.referConfigFormDialog.onloadAttrData(); }else if(column.property == 'classifyInvokeText'){ this.injectVisible=true; - this.injectOption.classifyInvokeAttr=this.CurrentCell.classifyInvokeAttr; - this.injectOption.classifyInvokeAttrName=this.CurrentCell.classifyInvokeAttrName; - this.injectOption.classifyInvokeEditFlag=this.CurrentCell.classifyInvokeEditFlag; - if(this.CurrentCell.classifyInvokeLevel == 'min'){ - this.injectOption.classifyInvokeLevel='min' - }else { - this.injectOption.classifyInvokeLevel='max' - this.injectOption.classifyNumber=this.CurrentCell.classifyInvokeLevel; + 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){ @@ -1907,7 +1909,8 @@ }, // 鍒嗙被娉ㄥ叆鍙栨秷 injectRemove() { - this.injectVisible = false + this.injectVisible = false; + this.injectHandleReset() }, //灞炴�фā鏉胯〃鏍煎崟鍏冩牸鐐瑰嚮浜嬩欢 //琛ㄦ牸鎿嶄綔鏍忓垹闄� @@ -1994,6 +1997,10 @@ editOpen(){ this.editOpenFlag=true; }, + //瀹氫箟涓�涓叧闂紪杈戠殑鏂规硶渚涘瓙缁勪欢浣跨敤 + editClose(){ + this.editOpenFlag=false; + }, //鎵归噺璁剧疆switch batchSetFlag(value){ this.attrSelectList.forEach(item=>{ -- Gitblit v1.9.3