From 8381325223bee254168855b1b697db31fc591b9e Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 19 九月 2023 09:28:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 143 ++++++++++++++++++++++++----------------------- 1 files changed, 73 insertions(+), 70 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue index 7f41850..fcec976 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue @@ -431,7 +431,7 @@ }, crudArrayFlag: { handler(newval, oldval) { - console.log('crudArrayFlag', newval) + // console.log('crudArrayFlag', newval) } }, crudArray: { @@ -485,7 +485,7 @@ }, editOpenFlag: { handler(newval, oldval) { - console.log('editOpenFlag', newval) + // console.log('editOpenFlag', newval) }, deep: true, immediate: true @@ -1824,59 +1824,65 @@ input.focus(); } }); - if (column.property == 'referConfig') { - this.referConfigVisble = true; - this.referConfigOption = { - referConfig: this.CurrentCell.referConfig || '', - } - if (this.CurrentCell.referConfig == '') { + const columnActions = { + referConfig: () => { + this.referConfigVisble = true; this.referConfigOption = { - referConfig: '', + referConfig: this.CurrentCell.referConfig || '', + } + if (this.CurrentCell.referConfig == '') { + this.referConfigOption = { + referConfig: '', + } + } + }, + classifyInvokeText: () => { + this.injectVisible = true; + if (this.CurrentCell.classifyInvokeAttr != '') { + this.injectOption = { + classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr, + classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName, + classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag, + classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max', + classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel + }; + } + }, + componentRule: () => { + this.isShowformulaEdit = true; + }, + enumString: () => { + this.enumVisible = true; + this.tableData = []; + if (this.CurrentCell.enumString != "") { + this.tableData = JSON.parse(this.CurrentCell.enumString) + return; + } + }, + parentCode: () => { + gridCodeClassifyTemplateAttr({ + 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid, + 'conditionMap[oid_notequal]': this.CurrentCell.oid, + limit: -1 + }).then(res => { + this.CascadeData = res.data.data; + }) + this.CascadeVisible = true; + }, + verifyRule: () => { + this.RulesForm.expressionTextt = this.CurrentCell.verifyRule; + this.rulesVisible = true; + }, + attributeGroup: () => { + this.attrVisible = true; + if (this.CurrentCell.attributeGroup !== '') { + this.attrModel = this.CurrentCell.attributeGroup } } - // this.$refs.referConfigFormDialog.onloadAttrData(); - } else if (column.property == 'classifyInvokeText') { - this.injectVisible = true; - if (this.CurrentCell.classifyInvokeAttr != '') { - this.injectOption = { - classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr, - classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName, - classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag, - classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max', - classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel - }; - } else { - // this.injectHandleReset(); - } - } else if (column.property == 'componentRule') { - if (this.CurrentCell) { - // this.CurrentCell.componentRule = this.componentRuleText; - } - this.isShowformulaEdit = true; - } else if (column.property == 'enumString') { - this.enumVisible = true; - this.tableData=[]; - if (this.CurrentCell.enumString != "") { - this.tableData = JSON.parse(this.CurrentCell.enumString) - return - } - } else if (column.property == 'parentCode') { - gridCodeClassifyTemplateAttr({ - 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid, - 'conditionMap[oid_notequal]': this.CurrentCell.oid, - limit: -1 - }).then(res => { - this.CascadeData = res.data.data; - }) - this.CascadeVisible = true; - } else if (column.property == 'verifyRule') { - this.RulesForm.expressionTextt = this.CurrentCell.verifyRule; - this.rulesVisible = true; - } else if (column.property == 'attributeGroup') { - this.attrVisible = true; - if (this.CurrentCell.attributeGroup !== '') { - this.attrModel = this.CurrentCell.attributeGroup - } + }; + + if (column.property in columnActions) { + columnActions[column.property](); } } }, @@ -2018,32 +2024,29 @@ }, //鍒嗙被娉ㄥ叆淇濆瓨 injectAddHandle() { - // 瀹氫箟灞曠ず绫诲瀷 - let data = { - "娉ㄥ叆绫诲瀷": this.injectOption.classifyInvokeAttr, - "娉ㄥ叆绫诲瀷鍚嶇О": this.injectOption.classifyInvokeAttrName, - "灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel == 'max' ? this.injectOption.classifyNumber : 'min', - "鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag - } - //鍕鹃�夋搷浣� + const { classifyInvokeAttr, classifyInvokeAttrName, classifyInvokeLevel, classifyInvokeEditFlag, classifyNumber } = this.injectOption; + + const data = { + "娉ㄥ叆绫诲瀷": classifyInvokeAttr, + "娉ㄥ叆绫诲瀷鍚嶇О": classifyInvokeAttrName, + "灞傜骇璁剧疆": classifyInvokeLevel === 'max' ? classifyNumber : 'min', + "鏄惁鍙慨鏀�": classifyInvokeEditFlag + }; for (const key in this.injectOption) { this.attrSelectList[0][key] = this.injectOption[key]; - //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧 - if (this.injectOption.classifyInvokeLevel !== 'min') { - this.attrSelectList[0].classifyInvokeLevel = this.injectOption.classifyNumber + if (classifyInvokeLevel !== 'min') { + this.attrSelectList[0].classifyInvokeLevel = classifyNumber; } else { - this.attrSelectList[0].classifyInvokeLevel = 'min' + this.attrSelectList[0].classifyInvokeLevel = 'min'; } - this.$set(this.attrSelectList[0], 'classifyInvokeText', data) + this.$set(this.attrSelectList[0], 'classifyInvokeText', data); } - // this.injectHandleReset() - if (this.injectOption.classifyInvokeLevel !== 'min') { - this.injectOption.classifyInvokeLevel = this.injectOption.classifyNumber; + if (classifyInvokeLevel !== 'min') { + this.injectOption.classifyInvokeLevel = classifyNumber; } else { this.injectOption.classifyNumber = 0; } this.injectVisible = false; - }, //鍒嗙被娉ㄥ叆娓呯┖ injectHandleReset() { @@ -2140,7 +2143,7 @@ }, // 鎺掑簭 this.AddCellFlag=false; sortChange(val) { - console.log(val) + // console.log(val) }, //寮�鍚紪杈� editOpen() { -- Gitblit v1.9.3