From 7521100425838f0ce8d4ef8005861ef4941f961b Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期三, 24 一月 2024 15:59:41 +0800 Subject: [PATCH] 整合代码 --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue | 293 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 147 insertions(+), 146 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue index 77219e3..b9801cc 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTreeform.vue @@ -1,23 +1,23 @@ <template> <div> - <avue-form v-model="loneTreeNewForm" :option="renonlyOption" v-if="flag == 'renonly'"> + <avue-form v-if="flag == 'renonly'" v-model="loneTreeNewForm" :option="renonlyOption"> </avue-form> - <avue-form v-model="loneTreeNewForm" :option="this.editOption" @submit="submits" v-else-if="flag == 'edit'"> + <avue-form v-else-if="flag == 'edit'" v-model="loneTreeNewForm" :option="this.editOption" @submit="submits"> </avue-form> <div> -<!-- 缂栫爜瑙勫垯--> + <!-- 缂栫爜瑙勫垯--> <ThemeChildren ref="ThemeMasterChildren" - dialogTitle="缂栫爜瑙勫垯" - codeName="codeRuleOidName" - codeType="coderule" - code-lcstatus="Released" - :visible.sync="MasterdialogVisible" :SelectOption="SelectOption" :TreeAddform="loneTreeNewForm" + :visible.sync="MasterdialogVisible" + code-lcstatus="Released" + codeName="codeRuleOidName" + codeType="coderule" + dialogTitle="缂栫爜瑙勫垯" @defineHandler="handlerDefine" ></ThemeChildren> -<!-- 鍏抽敭灞炴�ф煡璇㈣鍒�--> + <!-- 鍏抽敭灞炴�ф煡璇㈣鍒�--> <ThemeChildren ref="ThemeKeyChildren" :SelectOption="SelectOption" @@ -41,7 +41,7 @@ dialogTitle="鐩镐技椤规煡璇㈣鍒�" @defineHandler="handlerDefine" ></ThemeChildren> -<!-- 瀛樺偍鐨勪笟鍔$被鍨�--> + <!-- 瀛樺偍鐨勪笟鍔$被鍨�--> <ThemeChildren ref="ThemeBtmChildren" :SelectOption="btmSelectOption" @@ -57,19 +57,20 @@ </template> <script> -import {defaultReferDataGrid,referDataGrid} from '@/api/MasterData/master' +import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' import {TreeEditSave} from '@/api/template/templateAttr' import ThemeChildren from '@/components/FormTemplate/ThemeChildren' + export default { components: {ThemeChildren}, name: "classifyTreeform.vue", - props: ['loneTreeNewForm','flag','Editclose','TreeFlag','nodeClickList'], + props: ['loneTreeNewForm', 'flag', 'Editclose', 'TreeFlag', 'nodeClickList'], data() { return { - masterRow:null, - masterInput:'', - MasterSearchSelects:"", - SelectOption:[ + masterRow: null, + masterInput: '', + MasterSearchSelects: "", + SelectOption: [ { value: 'name', label: '涓枃鍚嶇О' @@ -79,7 +80,7 @@ label: '鑻辨枃鍚嶇О' } ], - btmSelectOption:[ + btmSelectOption: [ { value: 'id', label: '涓氬姟绫诲瀷缂栧彿' @@ -89,23 +90,23 @@ label: '涓氬姟绫诲瀷鍚嶇О' }, ], - MasterdialogVisible:false, - KeydialogVisible:false, - SimidialogVisible:false, - BtmdialogVisible:false, + MasterdialogVisible: false, + KeydialogVisible: false, + SimidialogVisible: false, + BtmdialogVisible: false, form: { name: "鍝堝搱", sex: "鐢�" }, renonlyOption: { - submitBtn:false, - emptyBtn:false, - columnBtn:false, + submitBtn: false, + emptyBtn: false, + columnBtn: false, column: [ { label: '涓婚搴�/鍒嗙被缂栧彿', prop: 'id', - labelWidth:135, + labelWidth: 135, disabled: true, rules: [{ required: true, @@ -117,7 +118,7 @@ label: '涓婚搴�/鍒嗙被鍚嶇О', prop: 'name', disabled: true, - labelWidth:135, + labelWidth: 135, rules: [{ required: true, message: "涓婚搴�/鍒嗙被鍚嶇О", @@ -125,15 +126,15 @@ }] }, { - label:"鎻忚堪", - prop:"description", - labelWidth:128, + label: "鎻忚堪", + prop: "description", + labelWidth: 128, disabled: true, }, { label: '瀛樺偍鐨勪笟鍔$被鍨�', prop: 'btmTypeName', - labelWidth:128, + labelWidth: 128, disabled: true, rules: [{ required: true, @@ -142,21 +143,21 @@ }] }, { - label:"缂栫爜瑙勫垯", - prop:"codeRuleOidName", - labelWidth:128, + label: "缂栫爜瑙勫垯", + prop: "codeRuleOidName", + labelWidth: 128, disabled: true, }, { - label:"鍏抽敭灞炴�ф煡璇㈣鍒�", - prop:"codeKeyAttrRepeatOidName", - labelWidth:128, + label: "鍏抽敭灞炴�ф煡璇㈣鍒�", + prop: "codeKeyAttrRepeatOidName", + labelWidth: 128, disabled: true, }, { - label:"鐩镐技鏌ヨ瑙勫垯", - prop:"codeResembleRuleOidName", - labelWidth:128, + label: "鐩镐技鏌ヨ瑙勫垯", + prop: "codeResembleRuleOidName", + labelWidth: 128, disabled: true, }, { @@ -165,7 +166,7 @@ type: 'switch', activeColor: "#13ce66", inactiveColor: "#ff4949", - labelWidth:160, + labelWidth: 160, disabled: true, dicData: [{ label: '鍚�', @@ -180,106 +181,106 @@ }, FormList: {}, - masterSelectList:[], - KeySelectLIst:[], - simSelectList:[], - btmSelectList:[] + masterSelectList: [], + KeySelectLIst: [], + simSelectList: [], + btmSelectList: [] } }, - computed:{ - editOption(){ - return{ - column: [ - { - label: '涓婚搴�/鍒嗙被缂栧彿', - prop: 'id', - 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, - focus:this.btmFoucus, - display:this.TreeFlag, - rules: [{ - required: true, - message: "瀛樺偍鐨勪笟鍔$被鍨�", - trigger: "blur" - }] - }, - { - label:"缂栫爜瑙勫垯", - prop:"codeRuleOidName", - labelWidth:128, - focus:this.CodeFocus, - readonly: true, - }, - { - label:"鍏抽敭灞炴�ф煡璇㈣鍒�", - prop:"codeKeyAttrRepeatOidName", - labelWidth:128, - focus:this.Keyfouce, - change:(data)=>{ - if(data.value === ""){ - this.loneTreeNewForm.codeKeyAttrRepeatOid = "" - } + computed: { + editOption() { + return { + column: [ + { + label: '涓婚搴�/鍒嗙被缂栧彿', + prop: 'id', + 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, + focus: this.btmFoucus, + display: this.TreeFlag, + rules: [{ + required: true, + message: "瀛樺偍鐨勪笟鍔$被鍨�", + trigger: "blur" + }] + }, + { + label: "缂栫爜瑙勫垯", + prop: "codeRuleOidName", + labelWidth: 128, + focus: this.CodeFocus, + readonly: true, + }, + { + label: "鍏抽敭灞炴�ф煡璇㈣鍒�", + prop: "codeKeyAttrRepeatOidName", + labelWidth: 128, + focus: this.Keyfouce, + change: (data) => { + if (data.value === "") { + this.loneTreeNewForm.codeKeyAttrRepeatOid = "" } - }, - { - label:"鐩镐技鏌ヨ瑙勫垯", - prop:"codeResembleRuleOidName", - labelWidth:128, - focus: this.simFouce, - change:(data)=>{ - if(data.value === ""){ - this.loneTreeNewForm.codeResembleRuleOid = "" - } - } - }, - { - label: '鏄惁鍙備笌鍏抽敭灞炴�ф牎楠�', - prop: 'isParticipateCheck', - type: 'switch', - activeColor: "#13ce66", - inactiveColor: "#ff4949", - labelWidth:160, - dicData: [{ - label: '鍚�', - value: 0 - }, { - label: '鏄�', - value: 1 - } - ] } - ] + }, + { + label: "鐩镐技鏌ヨ瑙勫垯", + prop: "codeResembleRuleOidName", + labelWidth: 128, + focus: this.simFouce, + change: (data) => { + if (data.value === "") { + this.loneTreeNewForm.codeResembleRuleOid = "" + } + } + }, + { + label: '鏄惁鍙備笌鍏抽敭灞炴�ф牎楠�', + prop: 'isParticipateCheck', + type: 'switch', + activeColor: "#13ce66", + inactiveColor: "#ff4949", + labelWidth: 160, + dicData: [{ + label: '鍚�', + value: 0 + }, { + label: '鏄�', + value: 1 + } + ] + } + ] } } }, - watch:{ - TreeFlag:{ - handler(newval,oldval){ + watch: { + TreeFlag: { + handler(newval, oldval) { // console.log(newval) } } @@ -315,19 +316,19 @@ this.$emit('MasterHandler', this.loneTreeNewForm); } }, - submits(form,done){ - if(this.TreeFlag){ - TreeEditSave(this.loneTreeNewForm).then(res=>{ + submits(form, done) { + if (this.TreeFlag) { + TreeEditSave(this.loneTreeNewForm).then(res => { this.$message.success('淇敼鎴愬姛'); this.Editclose() this.$emit('referTreeForm'); this.$emit('flushed'); done() }) - }else { - this.loneTreeNewForm.btmTypeName=''; - this.loneTreeNewForm.btmTypeId=''; - TreeEditSave(this.loneTreeNewForm).then(res=>{ + } else { + this.loneTreeNewForm.btmTypeName = ''; + this.loneTreeNewForm.btmTypeId = ''; + TreeEditSave(this.loneTreeNewForm).then(res => { this.$message.success('淇敼鎴愬姛'); this.Editclose() this.$emit('referTreeForm'); @@ -340,23 +341,23 @@ this.$message.success(err); }, //缂栫爜瑙勫垯澶辩劍 - CodeFocus(){ - this.MasterdialogVisible=true; + CodeFocus() { + this.MasterdialogVisible = true; this.$refs.ThemeMasterChildren.defaultSearchRend() }, //鍏抽敭灞炴�уけ鐒� - Keyfouce(){ - this.KeydialogVisible=true; + Keyfouce() { + this.KeydialogVisible = true; this.$refs.ThemeKeyChildren.defaultSearchRend(); }, //鐩镐技椤瑰け鐒� - simFouce(){ - this.SimidialogVisible=true; + simFouce() { + this.SimidialogVisible = true; this.$refs.ThemeSimChildren.defaultSearchRend(); }, //涓氬姟绫诲瀷澶辩劍 - btmFoucus(){ + btmFoucus() { this.BtmdialogVisible = true; this.$refs.ThemeBtmChildren.btmDefaultRend(); }, -- Gitblit v1.9.3