From 607ebaf27b44e0d27925715e4c2d7e2ffff257f0 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 11 七月 2023 09:49:33 +0800
Subject: [PATCH] 前端代码打包
---
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue | 268 +++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 227 insertions(+), 41 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index 593fc18..5eb3f23 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -5,29 +5,100 @@
<avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
</avue-form>
<div>
-
-<!-- 瀛樺偍涓氬姟绫诲瀷-->
- <el-dialog :visible.sync="BtmdialogVisible" title="涓恒�愬瓨鍌ㄤ笟鍔$被鍨嬨�戦�夊彇鍊�" append-to-body>
- <avue-crud :data="BtmData" :option="btmOption" @select="btmSelect"></avue-crud>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
- <el-button type="primary" size="small" @click="MasterHandlerClick">纭畾</el-button>
- <el-button size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button>
+<!-- 缂栫爜瑙勫垯-->
+ <el-dialog :visible.sync="MasterdialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
+ <template>
+ <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
+ <el-option
+ v-for="item in SelectOption"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ style="width: 150px">
+ </el-option>
+ </el-select>
+ <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>
+ <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>
+ </div>
</div>
</el-dialog>
<!-- 鍏抽敭灞炴�ф煡璇㈣鍒�-->
<el-dialog :visible.sync="KeydialogVisible" title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body>
+ <template>
+ <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
+ <el-option
+ v-for="item in SelectOption"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ style="width: 150px">
+ </el-option>
+ </el-select>
+ <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>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
- <el-button type="primary" size="small" @click="KeyHandlerClick">纭畾</el-button>
- <el-button size="small" @click="KeydialogVisible=false">鍙栨秷</el-button>
+ <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>
+ </div>
</div>
</el-dialog>
<!-- 鐩镐技椤规煡璇㈣鍒�-->
<el-dialog :visible.sync="SimidialogVisible" title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body>
+ <template>
+ <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px">
+ <el-option
+ v-for="item in SelectOption"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ style="width: 150px">
+ </el-option>
+ </el-select>
+ <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>
- <div style="padding-top: 10px;display: flex; justify-content: flex-end" >
- <el-button type="primary" size="small" @click="simHandlerClick">纭畾</el-button>
- <el-button size="small" @click="SimidialogVisible=false">鍙栨秷</el-button>
+ <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>
+ </div>
+ </div>
+ </el-dialog>
+<!-- 瀛樺偍鐨勪笟鍔$被鍨�-->
+ <el-dialog :visible.sync="BtmdialogVisible" title="涓恒�愪笟鍔$被鍨嬨�戦�夊彇鍊�" append-to-body>
+ <template>
+ <el-select v-model="SelectValue" placeholder="璇烽�夋嫨" style="width: 135px !important;">
+ <el-option
+ v-for="item in SelectOption"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ style="width: 130px">
+ </el-option>
+ </el-select>
+ <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>
+ <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>
+ </div>
</div>
</el-dialog>
</div>
@@ -39,9 +110,10 @@
import {TreeEditSave} from '@/api/template/templateAttr'
export default {
name: "classifyTreeform.vue",
- props: ['loneTreeNewForm','flag','Editclose'],
+ props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'],
data() {
return {
+ SelectFInd:"",
masterName:"",
masterOid:"",
KeyName:"",
@@ -56,6 +128,17 @@
KeyData:[],
simData:[],
BtmData:[],
+ SelectOption:[
+ {
+ value: 'name',
+ label: '涓枃鍚嶇О'
+ },
+ {
+ value: 'id',
+ label: '鑻辨枃鍚嶇О'
+ }
+ ],
+ SelectValue:"",
btmOption:{
addBtn:false,
index:true,
@@ -115,9 +198,9 @@
column: [
{
label: '涓婚搴�/鍒嗙被缂栧彿',
- prop: 'btmtypeid',
+ prop: 'id',
labelWidth:135,
- readonly: true,
+ disabled: true,
rules: [{
required: true,
message: "涓婚搴�/鍒嗙被缂栧彿",
@@ -127,7 +210,7 @@
{
label: '涓婚搴�/鍒嗙被鍚嶇О',
prop: 'name',
- readonly: true,
+ disabled: true,
labelWidth:135,
rules: [{
required: true,
@@ -139,13 +222,13 @@
label:"鎻忚堪",
prop:"description",
labelWidth:128,
- readonly: true,
+ disabled: true,
},
{
label: '瀛樺偍鐨勪笟鍔$被鍨�',
prop: 'btmtypename',
labelWidth:128,
- readonly: true,
+ disabled: true,
rules: [{
required: true,
message: "瀛樺偍鐨勪笟鍔$被鍨�",
@@ -156,19 +239,19 @@
label:"缂栫爜瑙勫垯",
prop:"coderuleoidName",
labelWidth:128,
- readonly: true,
+ disabled: true,
},
{
label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
prop:"codekeyattrrepeatoidName",
labelWidth:128,
- readonly: true,
+ disabled: true,
},
{
label:"鐩镐技鏌ヨ瑙勫垯",
prop:"codeResembleRuleOidName",
labelWidth:128,
- readonly: true,
+ disabled: true,
},
]
},
@@ -176,7 +259,7 @@
column: [
{
label: '涓婚搴�/鍒嗙被缂栧彿',
- prop: 'btmtypeid',
+ prop: 'id',
labelWidth:128,
rules: [{
required: true,
@@ -204,6 +287,8 @@
prop: 'btmtypename',
labelWidth:128,
focus:this.btmFoucus,
+ readonly: true,
+ display:false,
rules: [{
required: true,
message: "瀛樺偍鐨勪笟鍔$被鍨�",
@@ -214,19 +299,22 @@
label:"缂栫爜瑙勫垯",
prop:"coderuleoidName",
labelWidth:128,
- focus:this.CodeFoucus
+ focus:this.CodeFoucus,
+ readonly: true,
},
{
label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
prop:"codekeyattrrepeatoidName",
labelWidth:128,
- focus:this.Keyfouce
+ focus:this.Keyfouce,
+ readonly: true,
},
{
label:"鐩镐技鏌ヨ瑙勫垯",
prop:"codeResembleRuleOidName",
labelWidth:128,
- focus: this.simFouce
+ focus: this.simFouce,
+ readonly: true,
},
]
@@ -236,6 +324,15 @@
KeySelectLIst:[],
simSelectList:[],
btmSelectList:[]
+ }
+ },
+ watch:{
+ nodeClickList:{
+ handler(newval,oldval){
+ console.log('newVal',newval,oldval)
+ },
+ deep:true,
+ immediate:true
}
},
created() {
@@ -252,6 +349,24 @@
this.$message.success('璇锋煡鐪嬫帶鍒跺彴');
console.log(err)
},
+ //缂栫爜瑙勫垯鏌ヨ
+ 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=""
+ }
+ },
//缂栫爜瑙勫垯澶辩劍
CodeFoucus(){
this.MasterdialogVisible=true;
@@ -267,9 +382,9 @@
this.MasterdialogVisible=false;
this.masterSelectList=[]
this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName)
- this.$set(this.loneTreeNewForm,'coderuleOid',this.masterOid)
+ this.$set(this.loneTreeNewForm,'coderuleoid',this.masterOid)
this.$emit('MasterHandler',this.loneTreeNewForm)
- console.log(this.loneTreeNewForm)
+ // console.log(this.loneTreeNewForm)
}
},
//缂栫爜澶氶��
@@ -277,19 +392,20 @@
this.masterSelectList=row;
this.masterName=row[0].name;
this.masterOid=row[0].oid;
- console.log('oid',this.oid)
+ // console.log('oid',this.oid)
},
//缂栫爜鎺ュ彛
- MasterdefaultRend(){
+ MasterdefaultRend(masterParameter){
defaultReferDataGrid({
referType:'coderule',
isMuti:'false',
- 'conditionMap["lcstatus"]':'Released'
+ 'conditionMap["lcstatus"]':'Released',
+ ...masterParameter
}).then(res=>{
this.masterData=res.data.records;
})
},
- // 鍏抽敭灞炴�уけ鐒�
+ //鍏抽敭灞炴�уけ鐒�
Keyfouce(){
this.KeydialogVisible=true;
this.KeydefaultRend()
@@ -303,9 +419,28 @@
}else {
this.KeydialogVisible=false;
this.KeySelectLIst=[]
- this.$set(this.loneTreeNewForm,'codeResembleRuleOidName',this.simName)
- this.$set(this.loneTreeNewForm,'codeResembleRuleOid',this.simOid)
+ this.$set(this.loneTreeNewForm,'codekeyattrrepeatoidName',this.KeyName)
+ this.$set(this.loneTreeNewForm,'codekeyattrrepeatoid',this.KeyOid)
this.$emit('MasterHandler',this.loneTreeNewForm)
+ console.log(this.loneTreeNewForm)
+ }
+ },
+ //鍏抽敭灞炴�ф煡璇�
+ 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=""
}
},
//鍏抽敭灞炴�ф帴鍙�
@@ -318,13 +453,13 @@
this.KeyData=res.data.records;
})
},
- // 鍏抽敭澶氶��
+ //鍏抽敭澶氶��
KeySelect(row){
this.KeySelectLIst=row;
this.KeyName=row[0].name;
this.KeyOid=row[0].oid;
},
- // 鐩镐技椤瑰け鐒�
+ //鐩镐技椤瑰け鐒�
simFouce(){
this.SimidialogVisible=true;
this.simdefaultRend()
@@ -343,7 +478,25 @@
this.$emit('MasterHandler',this.loneTreeNewForm)
}
},
- // 鐩镐技椤瑰閫�
+ //鐩镐技椤规煡璇�
+ 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=""
+ }
+ },
+ //鐩镐技椤瑰閫�
simSelect(row){
this.simSelectList=row;
this.simName=row[0].name;
@@ -365,16 +518,49 @@
this.BtmdialogVisible=true;
this.btmdefaultRend()
},
- // 涓氬姟绫诲瀷澶氶��
+ //涓氬姟绫诲瀷纭畾
+ btmHandlerClick(){
+ if(this.btmSelectList.length>1){
+ this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
+ }else if(this.btmSelectList.length<=0){
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ }else {
+ this.BtmdialogVisible=false;
+ this.btmSelectList=[]
+ this.$set(this.loneTreeNewForm,'btmtypename',this.btmName ||this.btmOid)
+ this.$set(this.loneTreeNewForm,'btmtypeid',this.btmOid)
+ 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=""
+ }
+ },
+ //涓氬姟绫诲瀷澶氶��
btmSelect(row){
this.btmSelectList=row;
this.btmName=row[0].name;
this.btmOid=row[0].oid;
},
//涓氬姟绫诲瀷鎺ュ彛
- btmdefaultRend(){
- referDataGrid({valueField:'id',isMuti:'false'}).then(res=>{
- console.log(res)
+ btmdefaultRend(masterParameter){
+ referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{
+ // console.log(res)
+ this.BtmData=res.data.data.records
})
}
}
--
Gitblit v1.9.3