From b6bc27020cf028c4390d7262c4d2f08eaa51b2f0 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 27 六月 2023 21:35:06 +0800 Subject: [PATCH] 代码整合 --- Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 158 insertions(+), 5 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue index e0a2f86..d0270c8 100644 --- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue +++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue @@ -1,15 +1,73 @@ <template> - <avue-form v-model="TreeNewForm" :option="option" @submit="submit"> - </avue-form> - + <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> + <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> + <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> + </div> + </el-dialog> + </div> + </div> </template> <script> +import {defaultReferDataGrid} from '@/api/MasterData/master' export default { name: "classifyTreeform.vue", - props: ["TreeNewForm"], + props: ['loneTreeNewForm','flag'], data() { return { + masterInput:'', + MasterSearchSelects:"", + masterData:[ + { + id:'001', + name:'001', + description:'001' + }, + { + id:'002', + name:'002', + description:'002' + } + ], + masterOption:{ + addBtn:false, + index:true, + border:true, + selection:true, + height:380, + column:[ + { + label:'鑻辨枃鍚嶇О', + prop:'id' + }, + { + label:'涓枃鍚嶇О', + prop:'name' + }, + { + label:'鎻忚堪', + prop:'description' + } + ] + }, + dialogVisible:false, form: { name: "鍝堝搱", sex: "鐢�" @@ -45,6 +103,7 @@ label:"鎻忚堪", prop:"description", labelWidth:128, + readonly: true, }, { label: '瀛樺偍鐨勪笟鍔$被鍨�', @@ -61,6 +120,66 @@ label:"缂栫爜瑙勫垯", prop:"coderuleoidName", labelWidth:128, + readonly: true, + }, + { + label:"鍏抽敭灞炴�ф煡璇㈣鍒�", + prop:"codekeyattrrepeatoidName", + labelWidth:128, + readonly: true, + }, + { + label:"鐩镐技鏌ヨ瑙勫垯", + prop:"codeResembleRuleOidName", + labelWidth:128, + readonly: true, + }, + ] + }, + options: { + submitBtn:false, + emptyBtn:false, + column: [ + { + label: '涓婚搴�/鍒嗙被缂栧彿', + prop: 'btmtypeid', + labelWidth:128, + rules: [{ + required: true, + message: "涓婚搴�/鍒嗙被缂栧彿", + trigger: "blur" + }] + }, + { + label: '涓婚搴�/鍒嗙被鍚嶇О', + prop: 'name', + labelWidth:128, + rules: [{ + required: true, + message: "涓婚搴�/鍒嗙被鍚嶇О", + trigger: "blur" + }] + }, + { + label:"鎻忚堪", + prop:"description", + labelWidth:128, + }, + { + label: '瀛樺偍鐨勪笟鍔$被鍨�', + prop: 'btmtypename', + labelWidth:128, + rules: [{ + required: true, + message: "瀛樺偍鐨勪笟鍔$被鍨�", + trigger: "blur" + }] + }, + { + label:"缂栫爜瑙勫垯", + prop:"coderuleoidName", + labelWidth:128, + focus:this.CodeFoucus }, { label:"鍏抽敭灞炴�ф煡璇㈣鍒�", @@ -72,10 +191,15 @@ prop:"codeResembleRuleOidName", labelWidth:128, }, + ] }, - FormList: {} + FormList: {}, + masterSelectList:[] } + }, + created() { + }, methods: { submit(form, done) { @@ -85,6 +209,32 @@ error(err) { this.$message.success('璇锋煡鐪嬫帶鍒跺彴'); console.log(err) + }, + CodeFoucus(){ + this.dialogVisible=true; + console.log(this.dialogVisible) + }, + MasterHandlerClick(){ + defaultReferDataGrid({ + referType:'coderule', + isMuti:'false', + 'conditionMap["lcstatus"]':'Released' + }).then(res=>{ + console.log('---',res) + }) + // 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; } } } @@ -93,3 +243,6 @@ <style scoped> </style> + +<!--uiDataController/defaultReferDataGrid?referBo=coderule&isMuti=false&conditionMap%5B%22lcstatus%22%5D=Released--> +<!--uiDataController/defaultReferDataGrid?conditionMap%5B%22lcstatus%22%5D=Released&referBo=coderule&isMuti=false&_=1687831291212--> -- Gitblit v1.9.3