From 249ef0d4a5b5011927d1b73ad7e05284258ec11a Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 21 九月 2023 11:07:58 +0800
Subject: [PATCH] 代码冲突,整合代码
---
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue | 248 ++++++++++++++++++++++++++++++-------------------
1 files changed, 152 insertions(+), 96 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
index 87bf1ca..7079d17 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue
@@ -2,11 +2,11 @@
<div>
<avue-form v-model="loneTreeNewForm" :option="option" v-if="flag == 'renonly'">
</avue-form>
- <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
+ <avue-form v-model="loneTreeNewForm" :option="this.options" @submit="submits" v-else-if="flag == 'edit'">
</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"
@@ -92,12 +107,17 @@
<el-input style="width: 260px;margin-left: 15px" placeholder="杈撳叆鍊煎悗杩涜妯$硦鏌ヨ" v-model="SelectFInd"></el-input>
<el-button size="small" type="primary" plain @click="BtmSelectFindeHandler" style="margin-left: 20px">鏌ヨ</el-button>
</template>
- <avue-crud :data="BtmData" :option="masterOption" @select="btmSelect"></avue-crud>
+ <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>
+ </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>
@@ -113,6 +133,7 @@
props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
data() {
return {
+ masterRow:null,
SelectFInd:"",
masterName:"",
masterOid:"",
@@ -139,7 +160,17 @@
label: '鑻辨枃鍚嶇О'
}
],
- SelectValue:"",
+ masterSelectOption:[
+ {
+ value: 'id',
+ label: '涓氬姟绫诲瀷缂栧彿'
+ },
+ {
+ value: 'name',
+ label: '涓氬姟绫诲瀷鍚嶇О'
+ },
+ ],
+ SelectValue:'id',
btmOption:{
addBtn:false,
index:true,
@@ -162,20 +193,52 @@
}
]
},
- masterOption:{
+ Option:{
addBtn:false,
index:true,
border:true,
- selection:true,
menu:false,
height:380,
column:[
{
- label:'鑻辨枃鍚嶇О',
+ label: '',
+ prop: 'radio',
+ width: 60,
+ display: false
+ },
+ {
+ label:'鑻辨枃缂栧彿',
prop:'id'
},
{
label:'涓枃鍚嶇О',
+ prop:'name'
+ },
+ {
+ label:'鎻忚堪',
+ prop:'description'
+ }
+ ]
+ },
+ masterOption:{
+ addBtn:false,
+ index:true,
+ border:true,
+ menu:false,
+ height:380,
+ column:[
+ {
+ label: '',
+ prop: 'radio',
+ width: 60,
+ display: false
+ },
+ {
+ label:'涓氬姟绫诲瀷缂栧彿',
+ prop:'id'
+ },
+ {
+ label:'涓氬姟绫诲瀷鍚嶇О',
prop:'name'
},
{
@@ -334,6 +397,11 @@
}
},
watch:{
+ TreeFlag:{
+ handler(newval,oldval){
+ console.log(newval)
+ }
+ }
},
created() {
},
@@ -362,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(){
@@ -401,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){
@@ -411,6 +496,7 @@
referType:'coderule',
isMuti:'false',
'conditionMap["lcstatus"]':'Released',
+ 'limit':'-1',
...masterParameter
}).then(res=>{
this.masterData=res.data.records;
@@ -437,37 +523,28 @@
},
//鍏抽敭灞炴�ф煡璇�
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',
+ 'limit':'-1',
+ ...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(){
@@ -490,34 +567,25 @@
},
//鐩镐技椤规煡璇�
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',
+ 'limit':'-1',
+ ...masterParameter
}).then(res=>{
this.simData=res.data.records;
})
@@ -536,39 +604,27 @@
}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){
this.btmSelectList=row;
- this.btmName=row[0].name;
- this.btmOid=row[0].oid;
- this.btmId=row[0].id;
+ this.btmName=row.name;
+ this.btmOid=row.oid;
+ this.btmId=row.id;
},
//涓氬姟绫诲瀷鎺ュ彛
btmdefaultRend(masterParameter){
- referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
+ referDataGrid({valueField:'id',isMuti:'false','limit':'-1',...masterParameter}).then(res=>{
this.BtmData=res.data.data.records
})
}
--
Gitblit v1.9.3