From 87e51a66bbad8eb287755c9ffa91e78345919f8b Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期三, 05 七月 2023 18:15:40 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue | 148 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 102 insertions(+), 46 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index d0270c8..a5dc3e3 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -2,23 +2,31 @@
<div>
<avue-form v-model="loneTreeNewForm" :option="option" @submit="submit" v-if="flag == 'renonly'">
</avue-form>
- <avue-form v-model="loneTreeNewForm" :option="options" @submit="submit" v-else-if="flag == 'edit'">
+ <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'">
</avue-form>
<div>
- <el-dialog :visible.sync="dialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
- <div>
- <el-input placeholder="璇烽�夋嫨鍐呭" v-model="masterInput" class="input-with-select">
- <el-select v-model="MasterSearchSelects" placeholder="璇烽�夋嫨">
- <el-option label="鑻辨枃鍚嶇О" value="0"></el-option>
- <el-option label="涓枃鍚嶇О" value="1"></el-option>
- </el-select>
- <el-button slot="append" icon="el-icon-search"></el-button>
- </el-input>
- </div>
+<!-- 涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�-->
+ <el-dialog :visible.sync="MasterdialogVisible" title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
<avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></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="dialogVisible=false">鍙栨秷</el-button>
+ <el-button size="small" @click="MasterdialogVisible=false">鍙栨秷</el-button>
+ </div>
+ </el-dialog>
+<!-- 鍏抽敭灞炴�ф煡璇㈣鍒�-->
+ <el-dialog :visible.sync="KeydialogVisible" title="涓恒�愬叧閿睘鎬ф煡璇㈣鍒欍�戦�夊彇鍊�" append-to-body>
+ <avue-crud :data="KeyData" :option="masterOption" @select="masterSelect"></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>
+ </el-dialog>
+ <!-- 鐩镐技椤规煡璇㈣鍒�-->
+ <el-dialog :visible.sync="SimidialogVisible" title="涓恒�愮浉浼奸」鏌ヨ瑙勫垯銆戦�夊彇鍊�" append-to-body>
+ <avue-crud :data="simData" :option="masterOption" @select="masterSelect"></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>
</el-dialog>
</div>
@@ -27,30 +35,25 @@
<script>
import {defaultReferDataGrid} from '@/api/MasterData/master'
+import {TreeEditSave} from '@/api/template/templateAttr'
export default {
name: "classifyTreeform.vue",
props: ['loneTreeNewForm','flag'],
data() {
return {
+ name:"",
+ oid:"",
masterInput:'',
MasterSearchSelects:"",
- masterData:[
- {
- id:'001',
- name:'001',
- description:'001'
- },
- {
- id:'002',
- name:'002',
- description:'002'
- }
- ],
+ masterData:[],
+ KeyData:[],
+ simData:[],
masterOption:{
addBtn:false,
index:true,
border:true,
selection:true,
+ menu:false,
height:380,
column:[
{
@@ -67,7 +70,9 @@
}
]
},
- dialogVisible:false,
+ MasterdialogVisible:false,
+ KeydialogVisible:false,
+ SimidialogVisible:false,
form: {
name: "鍝堝搱",
sex: "鐢�"
@@ -80,7 +85,7 @@
{
label: '涓婚搴�/鍒嗙被缂栧彿',
prop: 'btmtypeid',
- labelWidth:128,
+ labelWidth:135,
readonly: true,
rules: [{
required: true,
@@ -92,7 +97,7 @@
label: '涓婚搴�/鍒嗙被鍚嶇О',
prop: 'name',
readonly: true,
- labelWidth:128,
+ labelWidth:135,
rules: [{
required: true,
message: "涓婚搴�/鍒嗙被鍚嶇О",
@@ -137,8 +142,6 @@
]
},
options: {
- submitBtn:false,
- emptyBtn:false,
column: [
{
label: '涓婚搴�/鍒嗙被缂栧彿',
@@ -185,11 +188,13 @@
label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
prop:"codekeyattrrepeatoidName",
labelWidth:128,
+ focus:this.Keyfouce
},
{
label:"鐩镐技鏌ヨ瑙勫垯",
prop:"codeResembleRuleOidName",
labelWidth:128,
+ focus: this.simFouce
},
]
@@ -199,42 +204,93 @@
}
},
created() {
-
},
methods: {
- submit(form, done) {
- this.$message.success(JSON.stringify(form));
+ submits(form,done){
+ console.log(this.loneTreeNewForm)
+ TreeEditSave(this.loneTreeNewForm).then(res=>{
+ this.$message.success('淇敼鎴愬姛');
+ }).catch(res=>{
+ this.$message.error(res)
+ })
done()
},
error(err) {
this.$message.success('璇锋煡鐪嬫帶鍒跺彴');
console.log(err)
},
+ //缂栫爜瑙勫垯澶辩劍
CodeFoucus(){
- this.dialogVisible=true;
- console.log(this.dialogVisible)
+ this.MasterdialogVisible=true;
+ this.MasterdefaultRend()
},
+ //缂栫爜瑙勫垯纭畾
MasterHandlerClick(){
+ if(this.masterSelectList.length>1){
+ this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
+ }else if(this.masterSelectList.length<=0){
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ }else {
+ this.MasterdialogVisible=false;
+ this.masterSelectList=[]
+ this.loneTreeNewForm.codeRuleOidName=this.name;
+ this.loneTreeNewForm.codeRuleOid=this.oid;
+ console.log(this.masterSelectList)
+ }
+ },
+ //缂栫爜澶氶��
+ masterSelect(row){
+ console.log(row)
+ this.masterSelectList=row;
+ this.name=row[0].name;
+ this.oid=row[0].oid;
+ console.log('oid',this.oid)
+ },
+ //缂栫爜鎺ュ彛
+ MasterdefaultRend(){
defaultReferDataGrid({
referType:'coderule',
isMuti:'false',
'conditionMap["lcstatus"]':'Released'
}).then(res=>{
console.log('---',res)
+ this.masterData=res.data.records;
+ console.log('masterData',this.masterData)
+
})
- // if(this.masterSelectList.length>1){
- // this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- // }else if(this.masterSelectList.length<=0){
- // this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
- // }else {
- // this.dialogVisible=false;
- // console.log(this.masterInput)
- // console.log(this.MasterSearchSelect)
- // }
},
- masterSelect(row){
- console.log(row)
- this.masterSelectList=row;
+ // 鍏抽敭灞炴�уけ鐒�
+ Keyfouce(){
+ this.KeydialogVisible=true;
+ this.KeydefaultRend()
+ },
+ //鍏抽敭灞炴�х‘瀹�
+ KeyHandlerClick(){
+ if(this.masterSelectList.length>1){
+ this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
+ }else if(this.masterSelectList.length<=0){
+ this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
+ }else {
+
+ }
+ },
+ KeydefaultRend(){
+ defaultReferDataGrid({
+ referType:'codekeyattrrepeat',
+ isMuti:'false',
+ 'conditionMap["lcstatus"]':'Enabled'
+ }).then(res=>{
+ this.keyData=res.data.records;
+ console.log('key',this.keyData)
+ })
+ },
+ // 鐩镐技椤瑰け鐒�
+ simFouce(){
+ this.SimidialogVisible=true;
+ },
+ //鐩镐技椤圭‘瀹�
+ simHandlerClick(){
+
}
}
}
--
Gitblit v1.9.3