From c8cdec5a84e86c35fbe7d18ca8eefbe5cbf11ba7 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期二, 08 八月 2023 18:11:57 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue | 220 ++++++++++++++++++++++++++++++++---------------------- 1 files changed, 129 insertions(+), 91 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue index 3f70218..dab81ed 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue @@ -6,7 +6,7 @@ </avue-form> <div> <!-- 缂栫爜瑙勫垯--> - <el-dialog :visible.sync="MasterdialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body> + <el-dialog :visible.sync="MasterdialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body :before-close="masterEscHandler"> <template> <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px"> <el-option @@ -20,17 +20,22 @@ <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input> <el-button size="small" type="primary" plain @click="SelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button> </template> - <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud> + <avue-crud :data="masterData" :option="Option" @row-click="masterSelect"> + <template slot="radio" slot-scope="{row}"> + <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }} + </el-radio> + </template> + </avue-crud> <div style="height: 30px"> <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.coderuleoidName}}]</div> <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > <el-button type="primary" size="small" @click="MasterHandlerClick">纭畾</el-button> - <el-button size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button> + <el-button size="small" @click="masterEscHandler">鍙栨秷</el-button> </div> </div> </el-dialog> <!-- 鍏抽敭灞炴�ф煡璇㈣鍒�--> - <el-dialog :visible.sync="KeydialogVisible" title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body> + <el-dialog :visible.sync="KeydialogVisible" title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body :before-close="KeyEscHandler"> <template> <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px"> <el-option @@ -44,17 +49,22 @@ <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input> <el-button size="small" type="primary" plain @click="KeySelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button> </template> - <avue-crud :data="KeyData" :option="masterOption" @select="KeySelect"></avue-crud> + <avue-crud :data="KeyData" :option="Option" @row-click="KeySelect"> + <template slot="radio" slot-scope="{row}"> + <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }} + </el-radio> + </template> + </avue-crud> <div style="height: 30px"> <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.codekeyattrrepeatoidName}}]</div> <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > <el-button type="primary" size="small" @click="KeyHandlerClick">纭畾</el-button> - <el-button size="small" @click="KeydialogVisible=false">鍙栨秷</el-button> + <el-button size="small" @click="KeyEscHandler">鍙栨秷</el-button> </div> </div> </el-dialog> <!-- 鐩镐技椤规煡璇㈣鍒�--> - <el-dialog :visible.sync="SimidialogVisible" title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body> + <el-dialog :visible.sync="SimidialogVisible" title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body :before-close="simEscHandler"> <template> <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px"> <el-option @@ -68,21 +78,26 @@ <el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input> <el-button size="small" type="primary" plain @click="SimSelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button> </template> - <avue-crud :data="simData" :option="masterOption" @select="simSelect"></avue-crud> + <avue-crud :data="simData" :option="Option"@row-click="simSelect"> + <template slot="radio" slot-scope="{row}"> + <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }} + </el-radio> + </template> + </avue-crud> <div style="height: 30px"> <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.codeResembleRuleOidName}}]</div> <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > <el-button type="primary" size="small" @click="simHandlerClick">纭畾</el-button> - <el-button size="small" @click="SimidialogVisible=false">鍙栨秷</el-button> + <el-button size="small" @click="simEscHandler">鍙栨秷</el-button> </div> </div> </el-dialog> <!-- 瀛樺偍鐨勪笟鍔$被鍨�--> - <el-dialog :visible.sync="BtmdialogVisible" title="涓恒�愪笟鍔$被鍨嬨�戦�夊彇鍊�" append-to-body> + <el-dialog :visible.sync="BtmdialogVisible" title="涓恒�愪笟鍔$被鍨嬨�戦�夊彇鍊�" append-to-body :before-close="BtmEscHandler"> <template> <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px !important;"> <el-option - v-for="item in SelectOption" + v-for="item in masterSelectOption" :key="item.value" :label="item.label" :value="item.value" @@ -94,14 +109,15 @@ </template> <avue-crud :data="BtmData" :option="masterOption" @row-click="btmSelect"> <template slot="radio" slot-scope="{row}"> - <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{''}}</el-radio> + <el-radio v-model="masterRow" :label="row.$index" style="padding-left: 10px !important;">{{ '' }} + </el-radio> </template> </avue-crud> <div style="height: 30px"> <div style="display: inline-block;float: left;border: 1px solid #eee;padding: 5px;margin-top: 5px;font-size: 14px " >宸茶缃殑鍊间负:[{{this.loneTreeNewForm.btmTypeName}}]</div> <div style="padding-top: 10px;display: flex; justify-content: flex-end;float: right;overflow: hidden" > <el-button type="primary" size="small" @click="btmHandlerClick">纭畾</el-button> - <el-button size="small" @click="BtmdialogVisible=false">鍙栨秷</el-button> + <el-button size="small" @click="BtmEscHandler">鍙栨秷</el-button> </div> </div> </el-dialog> @@ -117,7 +133,7 @@ props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'], data() { return { - masterRow:0, + masterRow:null, SelectFInd:"", masterName:"", masterOid:"", @@ -144,7 +160,17 @@ label: '鑻辨枃鍚嶇О' } ], - SelectValue:"", + masterSelectOption:[ + { + value: 'id', + label: '涓氬姟绫诲瀷缂栧彿' + }, + { + value: 'name', + label: '涓氬姟绫诲瀷鍚嶇О' + }, + ], + SelectValue:'id', btmOption:{ addBtn:false, index:true, @@ -167,6 +193,33 @@ } ] }, + Option:{ + addBtn:false, + index:true, + border:true, + menu:false, + height:380, + column:[ + { + label: '', + prop: 'radio', + width: 60, + display: false + }, + { + label:'鑻辨枃缂栧彿', + prop:'id' + }, + { + label:'涓枃鍚嶇О', + prop:'name' + }, + { + label:'鎻忚堪', + prop:'description' + } + ] + }, masterOption:{ addBtn:false, index:true, @@ -181,11 +234,11 @@ display: false }, { - label:'鑻辨枃鍚嶇О', + label:'涓氬姟绫诲瀷缂栧彿', prop:'id' }, { - label:'涓枃鍚嶇О', + label:'涓氬姟绫诲瀷鍚嶇О', prop:'name' }, { @@ -377,23 +430,39 @@ error(err) { this.$message.success(err); }, + //缂栫爜瑙勫垯鍏抽棴 + masterEscHandler(){ + this.SelectFInd=''; + this.SelectValue='id'; + this.masterRow=null; + this.MasterdialogVisible=false; + }, + //鍏抽敭灞炴�у叧闂� + KeyEscHandler(){ + this.SelectFInd=''; + this.SelectValue='id'; + this.masterRow=null; + this.KeydialogVisible=false; + }, + //鐩镐技椤瑰叧闂� + simEscHandler(){ + this.SelectFInd=''; + this.SelectValue='id'; + this.masterRow=null; + this.SimidialogVisible=false; + }, + //瀛樺偍涓氬姟绫诲瀷鍏抽棴 + BtmEscHandler(){ + this.SelectFInd=''; + this.SelectValue='id'; + this.masterRow=null; + this.BtmdialogVisible=false; + }, //缂栫爜瑙勫垯鏌ヨ SelectFindeHandler(){ - if(this.SelectValue == 'id'){ - const masterParameter={ - 'conditionMap[id]':this.SelectFInd - } - this.MasterdefaultRend(masterParameter); - this.SelectValue="" - this.SelectFInd="" - }else if(this.SelectValue == 'name'){ - const masterParameter={ - 'conditionMap[name]':this.SelectFInd - } - this.MasterdefaultRend(masterParameter) - this.SelectValue="" - this.SelectFInd="" - } + const masterParameter = {}; + masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + this.MasterdefaultRend(masterParameter) }, //缂栫爜瑙勫垯澶辩劍 CodeFoucus(){ @@ -416,9 +485,10 @@ }, //缂栫爜澶氶�� masterSelect(row){ - this.masterSelectList=row; - this.masterName=row[0].name; - this.masterOid=row[0].oid; + this.masterRow = row.$index; + this.masterSelectList = row; + this.masterName = row.name; + this.masterOid = row.oid; }, //缂栫爜鎺ュ彛 MasterdefaultRend(masterParameter){ @@ -452,37 +522,27 @@ }, //鍏抽敭灞炴�ф煡璇� KeySelectFindeHandler(){ - if(this.SelectValue == 'id'){ - const masterParameter={ - 'conditionMap[id]':this.SelectFInd - } - this.KeydefaultRend(masterParameter); - this.SelectValue="" - this.SelectFInd="" - }else if(this.SelectValue == 'name'){ - const masterParameter={ - 'conditionMap[name]':this.SelectFInd - } - this.KeydefaultRend(masterParameter) - this.SelectValue=""; - this.SelectFInd=""; - } + const masterParameter = {}; + masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + this.KeydefaultRend(masterParameter) }, //鍏抽敭灞炴�ф帴鍙� - KeydefaultRend(){ + KeydefaultRend(masterParameter){ defaultReferDataGrid({ referType:'codekeyattrrepeat', isMuti:'false', - 'conditionMap["lcstatus"]':'Enabled' + 'conditionMap["lcstatus"]':'Enabled', + ...masterParameter }).then(res=>{ this.KeyData=res.data.records; }) }, //鍏抽敭澶氶�� KeySelect(row){ - this.KeySelectLIst=row; - this.KeyName=row[0].name; - this.KeyOid=row[0].oid; + this.masterRow = row.$index; + this.KeySelectLIst = row; + this.KeyName = row.name; + this.KeyOid = row.oid; }, //鐩镐技椤瑰け鐒� simFouce(){ @@ -505,34 +565,24 @@ }, //鐩镐技椤规煡璇� SimSelectFindeHandler(){ - if(this.SelectValue == 'id'){ - const masterParameter={ - 'conditionMap[id]':this.SelectFInd - } - this.simdefaultRend(masterParameter); - this.SelectValue="" - this.SelectFInd="" - }else if(this.SelectValue == 'name'){ - const masterParameter={ - 'conditionMap[name]':this.SelectFInd - } - this.simdefaultRend(masterParameter) - this.SelectValue="" - this.SelectFInd="" - } + const masterParameter = {}; + masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + this.simdefaultRend(masterParameter) }, //鐩镐技椤瑰閫� simSelect(row){ - this.simSelectList=row; - this.simName=row[0].name; - this.simOid=row[0].oid; + this.masterRow = row.$index; + this.simSelectList = row; + this.simName = row.name; + this.simOid = row.oid; }, //鐩镐技椤归」鎺ュ彛 - simdefaultRend(){ + simdefaultRend(masterParameter){ defaultReferDataGrid({ referType:'coderesemblerule', isMuti:'false', - 'conditionMap["lcstatus"]':'Enabled' + 'conditionMap["lcstatus"]':'Enabled', + ...masterParameter }).then(res=>{ this.simData=res.data.records; }) @@ -551,28 +601,16 @@ }else { this.BtmdialogVisible=false; this.btmSelectList=[] - this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid) + this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmId) this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId) this.$emit('MasterHandler',this.loneTreeNewForm) } }, //涓氬姟绫诲瀷鏌ヨ BtmSelectFindeHandler(){ - if(this.SelectValue == 'id'){ - const masterParameter={ - 'conditionMap[id]':this.SelectFInd - } - this.btmdefaultRend(masterParameter); - this.SelectValue="" - this.SelectFInd="" - }else if(this.SelectValue == 'name'){ - const masterParameter={ - 'conditionMap[name]':this.SelectFInd - } - this.btmdefaultRend(masterParameter) - this.SelectValue="" - this.SelectFInd="" - } + const masterParameter = {}; + masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + this.btmdefaultRend(masterParameter); }, //涓氬姟绫诲瀷澶氶�� btmSelect(row){ -- Gitblit v1.9.3