From e1beaf409dca5c236dd42bc9f3f3619eeb3e5ae2 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 17 七月 2023 14:23:22 +0800
Subject: [PATCH] 代码整合
---
Source/UBCS-WEB/src/views/code/code.vue | 100 +++++++++++++++----------------------------------
1 files changed, 31 insertions(+), 69 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index b0facfa..c1a1e3a 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -767,8 +767,8 @@
<formula-editor
ref="formulaEditor"
@updateFormulaContent="updateFormulaContent"
- :thisSceneTableData="formulaEditorParams.thisSceneTableData"
:visible.sync="formulaEditorParams.formulaEditorSettingBox"
+ :thisSceneTableData="formulaEditorParams.thisSceneTableData"
:systemVariableTableData="formulaEditorParams.systemVariableTableData">
</formula-editor>
@@ -807,18 +807,12 @@
@echoReferBtmType="echoReferBtmType">
</refer-btm-type-crud-dialog>
- <!-- 绗簩灞傚璇濇,鑷畾涔夊弬鐓ч厤缃瓼orm缁勪欢 -->
- <refer-config-form-dialog
- ref="referConfigFormDialog"
- @echoReferConfig="echoReferConfig">
- </refer-config-form-dialog>
-
- <!-- 绗簩灞傚璇濇,鐩存帴閫夋嫨鍙傜収閰嶇疆crud缁勪欢 -->
- <refer-config-crud-dialog
- ref="referConfigCrudDialog"
- @openReconfigInterFace="openReconfigInterFace"
- @echoReferConfig="echoReferConfig">
- </refer-config-crud-dialog>
+ <!-- 绗簩灞傚璇濇,鍙傜収閰嶇疆缁勪欢 -->
+ <refer-config-dialog
+ :display="referConfigVisble"
+ @setReferConfigValue="setReferConfigValue"
+ :referConfigOption="referConfigOption">
+ </refer-config-dialog>
</el-dialog>
@@ -852,7 +846,6 @@
import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
import fixedValueOption from "@/const/code/fixedValueMgrDialog";
import {mapGetters} from "vuex";
- import func from "@/util/func";
import {getByRoleUserList} from "@/api/system/user";
export default {
@@ -963,7 +956,6 @@
},
classisyValueTreeOption: classisyValueTreeOption, //鍒嗙被鐮佹鏍戠浉鍏抽厤缃」
classifyValueTreeData: [],
- //currentSelectClsValueTreeData: '', //褰撳墠閫変腑鐨勫垎绫荤爜鍊兼爲鑺傜偣
/* 涓哄睘鎬ч�夊彇鍊肩獥鍙f樉绀烘墦寮�鎺у埗鍙橀噺 */
isShowSelectAttrOption: false,
@@ -1112,6 +1104,10 @@
//conditionMapParams: {},
},
+ //寮曠敤鐮佹涓弬鐓ч厤缃粍浠剁浉鍏冲弬鏁�
+ referConfigOption: {},
+ referConfigVisble: false,
+
};
},
computed: {
@@ -1130,6 +1126,13 @@
},
mounted(){
this.loadTotalEnum();
+ },
+ // 瑙e喅琛ㄦ牸閿欒闂
+ activated () {
+ this.$nextTick(() => {
+ this.$refs.crud.doLayout();
+ this.$refs.crudBasic.doLayout();
+ })
},
methods: {
@@ -1182,7 +1185,7 @@
this.form.getValueClass = content;
},
/* 寮曠敤鐮佹鍙傜収閰嶇疆,瀛愮粍浠跺~瀹屽弬鐓ч厤缃箣鍚庡唴瀹瑰洖鏄炬椂璋冪敤 */
- echoReferConfig(content){
+ setReferConfigValue(content){
// console.log(content.referTypeName);
this.form.referBtmId = content.referType || '';
this.form.referBtmName = content.referTypeName || content.referType;
@@ -1327,12 +1330,13 @@
this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�!");
return false;
}
+ const attr = this.selectAttrParams.selectionChangeAttrList[0];
//璋冪敤瀛愮粍浠跺苟浼犻�掑綋鍓嶉�変腑鐨勫弬鏁板�硷紝瀹炵幇鍥炴樉
this.form = Object.assign({}, this.form, {
- referAttributeId:this.selectAttrParams.selectionChangeAttrList[0].id,
- referAttributeName:this.selectAttrParams.selectionChangeAttrList[0].name,
- referCodeClassifyOid: this.currentSelectTreeData.key,
- referCodeClassifyOidName: this.currentSelectTreeData.title,
+ referAttributeId: attr.id || '',
+ referAttributeName: attr.name || attr.id,
+ referCodeClassifyOid: this.currentSelectTreeData.key || '',
+ referCodeClassifyOidName: this.currentSelectTreeData.title || '',
})
this.isShowSelectAttrOption = false;
},
@@ -2516,7 +2520,6 @@
// 鎿嶄綔鍩虹鐮佹涓悳绱㈡竻绌虹瓑鎸夐挳鐨勬樉绀�/闅愯棌
hideBasicTable(hideBoolean){
this.$refs.crudBasic.option.refreshBtn = hideBoolean;
- this.$refs.crudBasic.option.columnBtn = hideBoolean;
this.$refs.crudBasic.option.column[0].search = hideBoolean;
this.$refs.crudBasic.option.column[1].search = hideBoolean;
if(!hideBoolean){
@@ -2539,6 +2542,7 @@
openAttrSelectOrGetValue(condition){
if(condition === 'attr'){
this.isShowSelectAttrOption = true;
+ this.loadlistClassifyLinkAttr();
}else if(condition === 'value'){
//鎵撳紑鍏紡缂栬緫妗嗭紝绗簩灞傚祵濂楀璇濇
//this.$refs.formulaEditor.isShowformulaEdit = true;
@@ -2550,56 +2554,14 @@
// 璋冪敤瀛愮粍浠跺埛鏂拌〃鏍兼暟鎹�
this.$refs[this.referBtmDialogParams.ref].referBtmOnLoad();
}else if(condition === 'referConfig'){
- if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){
- this.openReconfigInterFace(this.form);
- }else{
- this.openTipsChooseOrCust();
+ this.referConfigVisble = true;
+ this.referConfigOption = {
+ referBtmName: this.form.referBtmName,
+ referBtmId: this.form.referBtmId,
+ referConfig: this.form.referConfig || '',
}
+ this.$refs.referConfig.$el.querySelector('input').blur();
}
- },
-
- // 褰撳墠宸插瓨鍦ㄧ紪杈戣繃鐨勫弬鐓ч厤缃紝鎵�浠ョ洿鎺ユ墦寮�鍙傜収閰嶇疆鐣岄潰
- openReconfigInterFace(preReferConfigForm){
- const form = preReferConfigForm;
- // 缂栬緫鐮佹鏃秗eferConfig鍙兘浼氬湪涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊间箣鍚庢敼鍙�
- let referConfigValue =JSON.parse(form.referConfig);
- if(referConfigValue.referType != form.referBtmId){
- referConfigValue.referType = form.referBtmId || '';
- referConfigValue.referTypeName = form.referBtmName || form.referBtmId;
- this.form.referConfig = JSON.stringify(referConfigValue);
- }
- let data = {
- referTypeName: form.referBtmName,
- referType: form.referBtmId,
- referConfig: this.form.referConfig,
- }
- this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
- this.$refs.referConfigFormDialog.initPageData(data);
- },
- // 鎵撳紑鑷畾涔夊弬鐓ч厤缃垨鐩存帴閫夋嫨鍙傜収閰嶇疆鐨勬彁绀烘
- openTipsChooseOrCust(){
- this.$confirm('璇烽�夋嫨鍙傜収閰嶇疆鐨勫畾涔夋柟寮忥紵','鍙傜収閰嶇疆鐨勬柟寮�', {
- distinguishCancelAndClose: true,
- closeOnClickModal: false,
- confirmButtonText: '鑷畾涔夊弬鐓ч厤缃�',
- cancelButtonText: '鐩存帴閫夋嫨鍙傜収閰嶇疆'
- })
- .then(() => {
- // 鎵撳紑鑷畾鍙傜収閰嶇疆瀵硅瘽妗�
- this.$refs.referConfigFormDialog.isShowReferConfigForm = true;
- // 琛ㄦ牸閿欒鐨勯棶棰�
- this.$refs.referConfigFormDialog.onloadAttrData();
- })
- .catch(action => {
- if (action === "cancel") {
- // 鎵撳紑鐩存帴閫夋嫨鍙傜収閰嶇疆瀵硅瘽妗�
- this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true;
- this.$refs.referConfigCrudDialog.referConfigOnload();
- }
- //console.log(action);
- });
- // 璁╁弬鐓ч厤缃緭鍏ユ澶卞幓鐒︾偣锛屽惁鍒欒鎻愮ず妗嗘棤娉曡鍏抽棴
- this.$refs.referConfig.$el.querySelector('input').blur();
},
// 鐐瑰嚮杈撳叆妗嗙殑脳鍙凤紝娓呯┖杈撳叆妗嗕腑鐨勫唴瀹�
--
Gitblit v1.9.3