From 13f2d9d9b067d571f37fc14fe8ea4399eaad2547 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 13 九月 2023 08:45:23 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue |   97 +++++++++++++++++++++++++-----------------------
 1 files changed, 51 insertions(+), 46 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue
index cf0f19d..9e75512 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue
@@ -1,11 +1,14 @@
 <template>
     <!-- 绗簩灞傚璇濇,灞炴�х爜娈碉紝鍏紡缂栬緫妗嗗脊绐� -->
     <el-dialog
+      :close-on-click-modal="false"
       title="鍙傜収閰嶇疆"
       append-to-body
       :visible.sync="isShowReferConfigForm"
       width="90%"
       id="refer-config-form"
+      top="0"
+      class= "avue-dialog avue-dialog--top"
       destroy-on-close
       @close="recoveryDataAndForm('initData')"
       style="height: 115vh; margin-top: -14vh; overflow-y: hidden">
@@ -16,7 +19,7 @@
                         <el-input :disabled="disabled"
                             :size="size"
                             v-model="form.referTypeName"
-                            ref="referTypeName" 
+                            ref="referTypeName"
                             placeholder="璇烽�夋嫨 鍙傜収鐨勪笟鍔$被鍨�"
                             prefix-icon="el-icon-search"
                             readonly="true"
@@ -28,7 +31,7 @@
                         <el-input :disabled="disabled"
                             :size="size"
                             v-model="form.sortField"
-                            ref="sortField" 
+                            ref="sortField"
                             placeholder="璇烽�夋嫨 鎺掑簭瀛楁"
                             prefix-icon="el-icon-search"
                             readonly="true"
@@ -48,7 +51,7 @@
                                     <el-input :disabled="disabled"
                                         :size="size"
                                         v-model="form.sortField"
-                                        ref="sortField" 
+                                        ref="sortField"
                                         placeholder="璇烽�夋嫨 鎺掑簭瀛楁"
                                         prefix-icon="el-icon-search"
                                         readonly="true"
@@ -109,7 +112,7 @@
                         <span slot="label"><i class="el-icon-search"></i>娣诲姞鏌ヨ鏉′欢</span>
                         <avue-crud
                             ref="crudAddCondition"
-                            :option="addSearchCondtionOption" 
+                            :option="addSearchCondtionOption"
                             @cell-click="clickAddSearchCondtionEdit"
                             :data="form.codeSrchCondConfigVOS">
                             <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
@@ -231,13 +234,13 @@
     </el-dialog>
 
 </template>
-    
+
 <script>
     import func from "@/util/func";
     export default {
         name: "referConfigFormDialog",
         props: {
-           
+
         },
         data() {
             let element = '';
@@ -312,20 +315,20 @@
                     dialogClickModal: false,
                     highlightCurrentRow: true,
                     indexFixed: false,
-                    menuFixed: false,  
+                    menuFixed: false,
                     column: [
                         {
                             label: "鍒楀瓧娈�(*)",
                             prop: "field",
                             cell: true,
                             clearable: false,
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "鍒楀悕(*)",
                             prop: "title",
                             cell: true,
                             clearable: false,
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "瀛楁绫诲瀷(*)",
                             prop: "fieldTypeText",
@@ -346,7 +349,7 @@
                             }, {
                                 value: 'textarea', label: '鏂囨湰鍩�'
                             }],
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "鍒楄〃鍙帓搴�",
                             prop: "sort",
@@ -355,19 +358,19 @@
                             type:"switch",
                             width: '80px',
                             value: true,
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "鎺掑簭瀛楁",
                             prop: "attrSortField",
                             cell: true,
                             clearable: false,
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "瀛楁瀹藉害",
                             prop: "width",
                             cell: true,
                             clearable: false,
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "鍒楀浐瀹氫綅缃�",
                             prop: "fixedPosition",
@@ -376,13 +379,13 @@
                             clearable: false,
                             value: 'noFixed',
                             dicData: [{value: 'noFixed', label: '涓嶅浐瀹�'}, {value: 'left', label: '宸﹁竟'}, {value: 'right', label: '鍙宠竟'}],
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "js鏄剧ず浠g爜",
                             prop: "templet",
                             cell: true,
                             clearable: false,
-                            blur: (value) => this.updateAttrBlur(value),
+                            // blur: (value) => this.updateAttrBlur(value),
                         },
                     ]
                 },
@@ -486,7 +489,7 @@
                     emptyBtn: false,
                     labelWidth: '145', //榛樿鏍囩瀹藉害
                     group: [
-                        {   
+                        {
                             // 鍩虹琛ㄥ崟淇℃伅灞曠ず鍖哄煙
                             //display: this.form.type=='default'||this.form.type=='grid',
                             icon: 'el-icon-info',
@@ -586,7 +589,7 @@
                                     change: ({ value, column }) => {
                                         // console.log("start",value);
                                         // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘�
-                                        let addFrom = {}; 
+                                        let addFrom = {};
                                         this.activeName = 'first'; // 榛樿鍒囨崲鑷崇涓�涓猼ab
                                         //鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟灞炴�ц繘琛岃皟鏁�
                                         if(value == 'stand'){
@@ -639,7 +642,7 @@
                                     span: 6,
                                     type: 'switch',
                                 },{
-                                    display: this.form.isPersistence | this.form.isPersistence=='true',
+                                    display: this.form.isPersistence || this.form.isPersistence=='true',
                                     label: '鍙傜収閰嶇疆缂栧彿',
                                     prop: 'id',
                                     tip: '璁剧疆璇ュ弬鐓ч厤缃寔涔呭寲瀛樺偍鏃剁殑缂栧彿銆�',
@@ -650,7 +653,7 @@
                                     }],
                                     span: 6,
                                 },{
-                                    display: this.form.isPersistence | this.form.isPersistence=='true',
+                                    display: this.form.isPersistence || this.form.isPersistence=='true',
                                     label: '鍙傜収閰嶇疆鍚嶇О',
                                     prop: 'name',
                                     tip: '璁剧疆璇ュ弬鐓ч厤缃寔涔呭寲瀛樺偍鏃剁殑鍚嶇О銆�',
@@ -661,10 +664,10 @@
                                     }],
                                     span: 6,
                                 }
-                                
+
                             ]
                         },
-                        {   
+                        {
                             icon: 'el-icon-info',
                             label: '椤甸潰鍙傛暟閰嶇疆',
                             collapse: false,
@@ -716,7 +719,7 @@
                                 }
                             ]
                         },
-                        {   
+                        {
                             icon: 'el-icon-info',
                             label: '鍚庡彴鍙傛暟閰嶇疆',
                             collapse: false,
@@ -725,7 +728,7 @@
                                 {
                                 label: '鑷畾涔夌殑鍚庡彴璺緞',
                                 prop: 'url',
-                                tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Tree>',
+                                tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Theme>',
                                 tipPlacement: 'right',
                                 span: 7,
                                 },{
@@ -763,7 +766,7 @@
                     emptyBtn: false,
                     labelWidth: '145', //榛樿鏍囩瀹藉害
                     group: [
-                        {   
+                        {
                             display: this.form.type=='default'||this.form.type=='grid',
                             icon: 'el-icon-info',
                             label: this.form.type=='default' ? '榛樿鍙傜収鐨勯厤缃�(涓嬫柟鍒楄〃)':'鍒楄〃鍙傜収鐨勯厤缃紙涓嬫柟鍒楄〃)',
@@ -800,7 +803,7 @@
                                 }
                             ]
                         },
-                        {   
+                        {
                             display: this.form.type=='stand',
                             icon: 'el-icon-info',
                             label: 'stand(骞冲彴閰嶇疆)鍙傜収',
@@ -823,7 +826,7 @@
                                 },
                             ]
                         },
-                        {   
+                        {
                             display: this.form.type=='tree',
                             icon: 'el-icon-info',
                             label: '鏍戝舰鍙傜収淇℃伅',
@@ -902,11 +905,11 @@
             this.element = document.getElementById('refer-config-form');
             this.element.addEventListener("click", (e) => {
                 //<table cellspacing="0" cellpadding="0" border="0" class="el-table__body" style="width: 911px;">
-                if (!this.$refs.crudAttr.$el.contains(e.target) && 
+                if (!this.$refs.crudAttr.$el.contains(e.target) &&
                    this.preClickAttrRow != '') {
                    this.preClickAttrRow.$cellEdit = false;
                 }
-                if (!this.$refs.crudAddCondition.$el.contains(e.target) && 
+                if (!this.$refs.crudAddCondition.$el.contains(e.target) &&
                    this.preClickAddSearchConditionRow != '') {
                    this.preClickAddSearchConditionRow.$cellEdit = false;
                 }
@@ -919,13 +922,13 @@
             },
             // 鐩戝惉鐖剁粍浠朵紶鐨勭獥鍙f樉绀洪殣钘忕殑鍊�
             isShowReferConfigForm (){
-                if(this.isShowReferConfigForm){
+                if(this.isShowReferConfigForm && this.codeShowFieldConfigVOS.length <= 0){
                     this.onloadAttrData();
                 }
             }
         },
         methods: {
-            
+
             // 閫夋嫨瀹屽弬鐓ч厤缃箣鍚庣偣鍑讳繚瀛樻寜閽Е鍙�
             async selectedListReferConfig(){
                 // 鏍囪鎵�鏈夎〃鍗曟槸鍚﹂�氳繃鏍¢獙鐨勫彉閲�
@@ -940,7 +943,7 @@
                             }
                             isValid = false;
                             //console.log(valid);
-                        }                            
+                        }
                         done();
                     })
                 })
@@ -965,7 +968,7 @@
             // 灞炴�ц〃鏍艰缂栬緫澶卞幓鐒︾偣鏃朵繚瀛樻柟娉�
             // updateAttrBlur(value){
                 //console.log(this.codeShowFieldConfigVOS[0]);
-                
+
             // },
 
             // 鍗曞嚮琛ㄦ牸瀹炵幇琛ㄦ牸琛岀紪杈�
@@ -982,6 +985,7 @@
                 // console.log(val.referConfig);
                 if(func.notEmpty(val.referConfig)){
                     this.form = JSON.parse(val.referConfig);
+                    this.form.isPersistence = this.form.isPersistence == 'true'||this.form.isPersistence ? true:false;
                     // 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩笉鍙��
                     // this.referTypeIsReadOnly = true;
                     if((this.form.type == 'default' || this.form.type  == 'grid') && (this.form.codeShowFieldConfigVOS != undefined && this.form.codeShowFieldConfigVOS.length > 0)){
@@ -1048,11 +1052,13 @@
                     // this.form.displayTable = '';
                     return;
                 }
-                Object.assign(this.$data,this.$options.data());    
+                Object.assign(this.$data,this.$options.data());
+                //this.preClickAttrRow.$cellEdit = false;
+                //console.log(this.preClickAttrRow.$cellEdit);
                 // 绉婚櫎缁戝畾鍦ㄨ椤甸潰瀵硅瘽妗嗕笂鐨勫叏灞�鐩戝惉浜嬩欢
                 if(this.element != ''){
                    let te = window.removeEventListener('click', this.element)
-                }     
+                }
             },
             // 鎻愪氦琛ㄥ崟涔嬪墠杩囨护鎺夌┖鎴栦笉闇�瑕佺殑琛ㄥ崟鏁版嵁
             filterForm(){
@@ -1070,8 +1076,8 @@
                     'useFormKey',
                     'paramForFormKey',
                     'isMuti',
-                    'mapFields', 
-                    'codeSrchCondConfigVOS', 
+                    'mapFields',
+                    'codeSrchCondConfigVOS',
                     'isOpenGlobal', //鏄惁寮�鍚叏灞�
                     'isPersistence',
                 ];
@@ -1084,9 +1090,9 @@
                     addArray = ['limit', 'sortField', 'sortType'];
                 } else if(oldForm.type == 'tree'){
                     addArray = [
-                        "parentFieldName", 
+                        "parentFieldName",
                         'parentUsedField',
-                        'parentValue', 
+                        'parentValue',
                         'loadType',
                         'onlyLeaf',
                         'sortField',
@@ -1094,7 +1100,7 @@
                     ];
                 }
                 // 寮�鍚寔涔呭寲鍙傜収閰嶇疆
-                if(oldForm.isPersistence=='true' | oldForm.isPersistence){
+                if(oldForm.isPersistence=='true' || oldForm.isPersistence){
                     submittDefaultForm =  submittDefaultForm.concat(['id','name'])
                 }
                 submittDefaultForm = submittDefaultForm.concat(addArray);
@@ -1111,7 +1117,7 @@
                     // console.log(!this.checkStringIsEmpty(oldForm[item]) || !this.checkArrayIsUndefined(oldForm[item]));
                     if((item == 'isMuti' || item == 'onlyLeaf') || (!this.checkStringIsEmpty(oldForm[item]) || !this.checkArrayIsUndefined(oldForm[item]))){
                         //console.log(item,oldForm[item]);
-                        newForm = Object.assign(newForm,{[item]:oldForm[item]});  
+                        newForm = Object.assign(newForm,{[item]:oldForm[item]});
                     }
                 });
                 //console.log(newForm);
@@ -1183,7 +1189,7 @@
                 this.$refs[this.selectedBtmTypeAttrParams.ref].selectedBtmTypeAttrOnLoad(params);
                 this.selectedBtmTypeAttrParams.selectedBtmTypeAttrSettingBox = true;
             },
-            
+
             /** 涓恒�愬弬鐓у紩鐢ㄧ殑涓氬姟绫诲瀷銆戦�夊彇鍊间箣鍚庣殑鍐呭鍥炴樉鏃惰皟鐢� */
             echoReferBtmType(content){
                 // 瀹炵幇鍥炴樉
@@ -1202,7 +1208,7 @@
                             {
                                 filterField: item.id,
                                 filterType: '_equal',
-                                filterTypeText: item.name, 
+                                filterTypeText: item.name,
                                 filterValue: '',
                                 $cellEdit: false
                             }
@@ -1211,7 +1217,7 @@
                 }else{
                     // 閫夋嫨鏄剧ず瀛楁
                     data.selectedArrary.forEach(item => {
-                        console.log(item);
+                        // console.log(item);
                         this.codeShowFieldConfigVOS.push(
                             {
                                 field: item.id,
@@ -1230,7 +1236,6 @@
                     })
                 }
             },
-
 
         }
     };
@@ -1253,5 +1258,5 @@
         -webkit-transition:opacity .0s !important;
         transition:opacity .0s !important;
     }
-    
-</style>
\ No newline at end of file
+
+</style>

--
Gitblit v1.9.3