From e9b405657b6117a8dcfcf8505cfd5d6eccd39cc8 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 30 五月 2023 18:32:57 +0800
Subject: [PATCH] code服务中部分do转vo时显示值转换改为缓存中拿值

---
 Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue |  304 +++++++++++++++++++++++++++++--------------------
 1 files changed, 179 insertions(+), 125 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 8fd0a67..24293a2 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/referConfigFormDialog.vue
@@ -64,7 +64,7 @@
                                 class="crud-attr"
                                 :option="attrOption"
                                 @cell-click="clickAttrEdit"
-                                :data="attrData">
+                                :data="codeShowFieldConfigVOS">
                                 <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
                                 <template slot="menu" slot-scope="scope">
                                     <el-button type="text"
@@ -90,7 +90,7 @@
                                     </el-button>
                                     <div class="tag-group" style="display: inline">
                                         <el-tag
-                                            v-for="item in attrData"
+                                            v-for="item in codeShowFieldConfigVOS"
                                             v-show="item.isquery && item.title!=''"
                                             style="margin-left: 3px"
                                             :key="item.title"
@@ -105,12 +105,12 @@
                         </el-row>
                     </el-tab-pane>
                     <el-tab-pane name="second">
-                        <span slot="label"><i class="el-icon-search"></i>鏌ヨ鏉′欢娣诲姞</span>
+                        <span slot="label"><i class="el-icon-search"></i>娣诲姞鏌ヨ鏉′欢</span>
                         <avue-crud
                             ref="crudAddCondition"
                             :option="addSearchCondtionOption" 
                             @cell-click="clickAddSearchCondtionEdit"
-                            :data="addSearchCondtionData">
+                            :data="form.codeSrchCondConfigVOS">
                             <!-- 琛ㄦ牸鍐呮搷浣滄寜閽� -->
                             <template slot="menu" slot-scope="scope">
                                 <el-button type="text"
@@ -276,6 +276,11 @@
                     paramForFormKey: '',
                     isMuti: false,
                     mapFields: '',
+                    isOpenGlobal: true, //鏄惁寮�鍚叏灞�
+                    codeSrchCondConfigVOS: [],
+                    isPersistence: true, // 鏄惁鎸佷箙鍖�
+                    id: '',
+                    name: '',
                      // 鏌ヨ鏉′欢鍒楄〃
                     // limit: '15',
                     // sortField: '',
@@ -288,7 +293,21 @@
                     // loadType: 'all',
                     // onlyLeaf: false,
                 },
-                attrData: [],
+                // type鍒囨崲鏃跺form琛ㄥ崟灞炴�ц繘琛岀Щ闄�
+                removeFormAttr: [
+                    'limit',
+                    'sortField',
+                    'sortType',
+                    'parentFieldName',
+                    'parentUsedField',
+                    'parentValue',
+                    'loadType',
+                    'onlyLeaf',
+                    'sortType',
+                    'referContent',
+                    'displayTable',
+                ],
+                codeShowFieldConfigVOS: [],
                 attrOption: {
                     height:'180',
                     tip: false,
@@ -353,7 +372,7 @@
                             blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "鎺掑簭瀛楁",
-                            prop: "sortField",
+                            prop: "attrSortField",
                             cell: true,
                             clearable: false,
                             blur: (value) => this.updateAttrBlur(value),
@@ -365,7 +384,7 @@
                             blur: (value) => this.updateAttrBlur(value),
                         },{
                             label: "鍒楀浐瀹氫綅缃�",
-                            prop: "fixedText",
+                            prop: "fixedPosition",
                             cell: true,
                             type:"select",
                             clearable: false,
@@ -381,7 +400,7 @@
                         },
                     ]
                 },
-                addSearchCondtionData: [],
+                // addSearchCondtionData: [],
                 addSearchCondtionOption: {
                     height:'150',
                     tip: false,
@@ -434,6 +453,7 @@
                         }
                     ]
                 },
+                // 涓や釜琛ㄥ崟鐨剅ef
                 formRefs: ['form','otherForm'],
 
                 // tabs鎺у埗
@@ -677,7 +697,7 @@
                             icon: 'el-icon-info',
                             label: '蹇呭~鐨勫弬鐓ч厤缃�',
                             collapse: true,
-                            labelWidth: '110',
+                            labelWidth: '115',
                             prop: 'groupDdefaultOrGrid',
                             column: [
                                 {
@@ -769,23 +789,11 @@
                                         trigger: "blur",
                                     }],
                                     change: ({ value, column }) => {
+                                        // console.log("start",value);
                                         // 澶嶅師琛ㄥ崟,鍥犱负鍏朵粬鍒嗙粍涓鏋滃瓨鍦ㄥ�硷紝鍦ㄥ垏鎹㈡椂,浼氫繚鐣欒緭鍏ョ殑瀛楁鍊兼墍浠ラ渶瑕佽繕鍘�
-                                        let oldForm = this.form;
-                                        this.form = {};  // 琛ㄥ崟瀵硅薄璧嬬┖
-                                        this.form.referType = oldForm.referType
-                                        this.form.textField = oldForm.textField
-                                        this.form.valueField = oldForm.valueField
-                                        this.form.type = oldForm.type //鍙傜収绐楀彛绫诲瀷
-                                        this.form.url =  oldForm.url
-                                        this.form.backPath =  oldForm.backPath
-                                        this.form.method =  oldForm.method
-                                        this.form.height =  oldForm.height
-                                        this.form.useFormKey =  oldForm.useFormKey
-                                        this.form.paramForFormKey =  oldForm.paramForFormKey
-                                        this.form.isMuti =  oldForm.isMuti
-                                        this.form.mapFields =  oldForm.mapFields
-                                        let addFrom = {};  //鏍规嵁绫诲瀷闇�瑕佹坊鍔犵殑涓嶅悓灞炴��
-                                        this.activeName = 'first';
+                                        let addFrom = {}; 
+                                        this.activeName = 'first'; // 榛樿鍒囨崲鑷崇涓�涓猼ab
+                                        //鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟灞炴�ц繘琛岃皟鏁�
                                         if(value == 'stand'){
                                             addFrom = {
                                                 referContent: '',
@@ -809,72 +817,108 @@
                                                 sortField: '',
                                                 sortType: 'asc',
                                             };
-                                            console.log('tree');
+                                            // 涓嶇煡閬撲负浠�涔坱ype涓簍ree鐨勬椂鍊欎細瑙﹀彂涓ゆchange浜嬩欢
+                                            // 瀵艰嚧type鍒囨崲澶辫触
+                                            this.form.type = 'tree';
                                             this.isDisabledTabs = false;
                                         }else {
                                             this.isDisabledTabs = true;
                                             this.activeName = 'second';
                                         }
+                                       // 绫诲瀷鍒囨崲鏃讹紝瀵逛笉闇�瑕佺殑灞炴�ц繘琛岀瓫闄�
+                                        this.removeFormAttr.forEach(attr=>{
+                                            // console.log(attr);
+                                            this.$delete(this.form,attr)
+                                        })
                                         // 鍚堝苟涓や釜琛ㄥ崟
                                         this.form = Object.assign(addFrom,this.form);
+                                        // console.log("endFilter",this.form.type);
                                         //console.log(this.form);
                                     },
+                                },{
+                                    label: '鏄惁寮�鍚寔涔呭寲',
+                                    prop: 'isPersistence',
+                                    tip: 'true:寮�鍚寔涔呭寲锛屽褰撳墠瀹氫箟鐨勫弬鐓ч厤缃繘琛屾寔涔呭寲瀛樺偍锛屼笅娆″彲鐩存帴閫夊彇锛沠alse:浠呭褰撳墠娆$爜娈垫柊澧炵敓鏁堛��',
+                                    tipPlacement: 'bottom',
+                                    span: 6,
+                                    type: 'switch',
+                                },{
+                                    display: this.form.isPersistence | this.form.isPersistence=='true',
+                                    label: '缂栧彿',
+                                    prop: 'id',
+                                    rules: [{
+                                        required: true,
+                                        message: "(寮�濮嬫寔涔呭寲鏃剁紪鍙�)蹇呭~椤逛笉鑳戒负绌�",
+                                        trigger: "blur",
+                                    }],
+                                    span: 6,
+                                },{
+                                    display: this.form.isPersistence | this.form.isPersistence=='true',
+                                    label: '鍚嶇О',
+                                    prop: 'name',
+                                    rules: [{
+                                        required: true,
+                                        message: "(寮�濮嬫寔涔呭寲鏃跺悕绉�)蹇呭~椤逛笉鑳戒负绌�",
+                                        trigger: "blur",
+                                    }],
+                                    span: 6,
                                 }
+                                
                             ]
                         },
                         {   
-                            //display: this.form.type=='default'||this.form.type=='grid',
                             icon: 'el-icon-info',
                             label: '椤甸潰鍙傛暟閰嶇疆',
                             collapse: false,
                             prop: 'webConfig',
-                            column: [{
-                                label: '绐楀彛鏄剧ず鐨勯珮搴�',
-                                prop: 'height',
-                                tip: '榛樿绌虹潃锛岃缃悗琛ㄧず寮哄埗鏄剧ず杩欐牱鐨勯珮搴�',
-                                tipPlacement: 'right',
-                                span: 7,
-                                rules:[{
-                                    validator: validateNumber,
-                                    message: "绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�",
-                                    trigger: "blur",
-                                }]
-                            },{
-                                label: '杩囨护(绾ц仈)灞炴��',
-                                prop: 'useFormKey',
-                                tip: '鑾峰彇琛ㄥ崟涓婄殑鍏朵粬灞炴�х殑灞炴�х殑鍊兼潵杩囨护,鎴栬�呬娇鐢ㄦ煇涓睘鎬ф潵绾ц仈閫夋嫨',
-                                tipPlacement: 'right',
-                                span: 7,
-                            },{
-                                label: '杩囨护灞炴�ц姹傚弬鏁�',
-                                prop: 'paramForFormKey',
-                                tip: '浣跨敤杩囨护灞炴�ф椂锛屽彂閫佺粰鍚庡彴鐨勮姹傚弬鏁�',
-                                tipPlacement: 'right',
-                                span: 7,
-                            },{
-                                label: '鏄犲皠鍏朵粬灞炴��',
-                                prop: 'mapFields',
-                                tip: '閫夋嫨鏁版嵁鍚庯紝灏嗛�夋嫨鐨勬暟鎹嫹璐濆埌琛ㄥ崟閲岀殑鍏朵粬灞炴�э紝涔﹀啓鏍煎紡涓簕褰撳墠琛ㄥ崟涓婄殑灞炴��:閫夋嫨鏁版嵁閲岀殑灞炴��,XXXXx:yyyy}',
-                                tipPlacement: 'right',
-                                span: 7,
-                            },{
-                                label: '鏄惁寮�鍚叏灞�',
-                                prop: 'isOpenGlobal',
-                                tip: '寮�鍚叏灞�涔嬪悗瀵瑰叏閮ㄥ弬鐓ч厤缃暟鎹繘琛屾煡璇紝榛樿鏍规嵁绉熸埛杩涜鏌ヨ銆�',
-                                tipPlacement: 'right',
-                                type: 'switch',
-                                span: 7,
-                            },{
-                                label: '鏄惁澶氶��',
-                                type: 'switch',
-                                prop: 'isMuti',
-                                value: false,
-                                span: 7,
-                                row: true,
-                            }]
+                            column: [
+                                {
+                                    label: '绐楀彛鏄剧ず鐨勯珮搴�',
+                                    prop: 'height',
+                                    tip: '榛樿绌虹潃锛岃缃悗琛ㄧず寮哄埗鏄剧ず杩欐牱鐨勯珮搴�',
+                                    tipPlacement: 'right',
+                                    span: 7,
+                                    rules:[{
+                                        validator: validateNumber,
+                                        message: "绐楀彛鏄剧ず鐨勯珮搴﹀繀椤讳负鏁板�肩被鍨�",
+                                        trigger: "blur",
+                                    }]
+                                },{
+                                    label: '杩囨护(绾ц仈)灞炴��',
+                                    prop: 'useFormKey',
+                                    tip: '鑾峰彇琛ㄥ崟涓婄殑鍏朵粬灞炴�х殑灞炴�х殑鍊兼潵杩囨护,鎴栬�呬娇鐢ㄦ煇涓睘鎬ф潵绾ц仈閫夋嫨',
+                                    tipPlacement: 'right',
+                                    span: 7,
+                                },{
+                                    label: '杩囨护灞炴�ц姹傚弬鏁�',
+                                    prop: 'paramForFormKey',
+                                    tip: '浣跨敤杩囨护灞炴�ф椂锛屽彂閫佺粰鍚庡彴鐨勮姹傚弬鏁�',
+                                    tipPlacement: 'right',
+                                    span: 7,
+                                },{
+                                    label: '鏄犲皠鍏朵粬灞炴��',
+                                    prop: 'mapFields',
+                                    tip: '閫夋嫨鏁版嵁鍚庯紝灏嗛�夋嫨鐨勬暟鎹嫹璐濆埌琛ㄥ崟閲岀殑鍏朵粬灞炴�э紝涔﹀啓鏍煎紡涓簕褰撳墠琛ㄥ崟涓婄殑灞炴��:閫夋嫨鏁版嵁閲岀殑灞炴��,XXXXx:yyyy}',
+                                    tipPlacement: 'right',
+                                    span: 7,
+                                },{
+                                    label: '鏄惁寮�鍚叏灞�',
+                                    prop: 'isOpenGlobal',
+                                    tip: '寮�鍚叏灞�涔嬪悗瀵瑰叏閮ㄥ弬鐓ч厤缃暟鎹繘琛屾煡璇紝榛樿鏍规嵁绉熸埛杩涜鏌ヨ銆�',
+                                    tipPlacement: 'right',
+                                    type: 'switch',
+                                    span: 7,
+                                },{
+                                    label: '鏄惁澶氶��',
+                                    type: 'switch',
+                                    prop: 'isMuti',
+                                    value: false,
+                                    span: 7,
+                                    row: true,
+                                }
+                            ]
                         },
                         {   
-                            //display: this.form.type=='default'||this.form.type=='grid',
                             icon: 'el-icon-info',
                             label: '鍚庡彴鍙傛暟閰嶇疆',
                             collapse: false,
@@ -886,29 +930,29 @@
                                 tip: '閫氬父涓虹┖;濡傛灉鏄垪琛紝鍚庡彴蹇呴』杩斿洖DataGrid锛屽鏋滄槸鏍戯紝鍚庡彴蹇呴』杩斿洖List<Tree>',
                                 tipPlacement: 'right',
                                 span: 7,
-                            },{
-                                label: '鏈嶅姟鐨勫湴鍧�',
-                                prop: 'backPath',
-                                tip: '閫氬父涓虹┖锛屽湪鏀寔寰湇鍔℃垨鑰呭垎甯冨紡閮ㄧ讲鐨勬椂鍊欐墠閰嶇疆',
-                                tipPlacement: 'right',
-                                span: 7,
-                            },{
-                                label: '璇锋眰鍚庡彴鐨勫崗璁柟寮�',
-                                prop: 'method',
-                                tip: 'HTTP鐨勫崗璁柟寮忥紝鏀寔POST,PUT,GET锛屼竴鑸兘鏄疓ET',
-                                tipPlacement: 'right',
-                                span: 7,
-                                value: 'GET',
-                                type: 'select',
-                                dicData: [{
-                                    label:'GET',value: "GET"
                                 },{
-                                    label:'PUT',value: "PUT"
+                                    label: '鏈嶅姟鐨勫湴鍧�',
+                                    prop: 'backPath',
+                                    tip: '閫氬父涓虹┖锛屽湪鏀寔寰湇鍔℃垨鑰呭垎甯冨紡閮ㄧ讲鐨勬椂鍊欐墠閰嶇疆',
+                                    tipPlacement: 'right',
+                                    span: 7,
+                                },{
+                                    label: '璇锋眰鍚庡彴鐨勫崗璁柟寮�',
+                                    prop: 'method',
+                                    tip: 'HTTP鐨勫崗璁柟寮忥紝鏀寔POST,PUT,GET锛屼竴鑸兘鏄疓ET',
+                                    tipPlacement: 'right',
+                                    span: 7,
+                                    value: 'GET',
+                                    type: 'select',
+                                    dicData: [{
+                                        label:'GET',value: "GET"
+                                    },{
+                                        label:'PUT',value: "PUT"
+                                    },
+                                    {
+                                        label:'POST',value: "POST"
+                                    }],
                                 },
-                                {
-                                    label:'POST',value: "POST"
-                                }],
-                            },
                             ]
                         },
                     ]
@@ -931,21 +975,21 @@
                                 {
                                     label: '姣忛〉鏄剧ず鏉℃暟',
                                     prop: 'limit',
-                                    span: 7,
+                                    span: 8,
                                     tip: '鍒嗛〉鏃舵瘡椤垫樉绀虹殑鏁伴噺锛屼笉鍒嗛〉濉�-1',
                                     //value: 15,
                                     tipPlacement: 'right',
                                 },{
                                     label: '鎺掑簭瀛楁',
                                     prop: 'sortField',
-                                    span: 7,
+                                    span: 8,
                                     tip: '鏌ヨ鏁版嵁鏃剁殑鎺掑簭瀛楁',
                                     //clearable: false,
                                     tipPlacement: 'right',
                                 },{
                                     label: '鎺掑簭绫诲瀷',
                                     prop: 'sortType',
-                                    span: 7,
+                                    span: 8,
                                     dicData: [{
                                         label: '鍗囧簭', value: 'asc'
                                     }, {
@@ -968,14 +1012,14 @@
                                 {
                                     label: '鍙傝�冪殑UI涓婁笅鏂�',
                                     prop: 'referContent',
-                                    span: 7,
+                                    span: 8,
                                     tip: '鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆,涓斿湪stand绫诲瀷涓嬫墠鑳界敓鏁�',
                                     tipPlacement: 'right',
                                 },
                                 {
                                     label: '骞冲彴鐨勮〃鏍肩紪鍙�',
                                     prop: 'displayTable',
-                                    span: 7,
+                                    span: 8,
                                     tip: '涓庡弬鐓х殑UI涓婁笅鏂囦簰鏂ワ紝鍙湁鍙傜収绐楀彛绫诲瀷鏄痵tand鏃舵墠蹇呴』璁剧疆锛屼笖鍦╯tand绫诲瀷涓嬫墠鑳界敓鏁�',
                                     tipPlacement: 'right',
                                 },
@@ -1076,8 +1120,7 @@
         },
         watch: {
             // 璐煎潙锛屽垏鎹㈢被鍨嬫椂琛ㄦ牸锛岄殣钘忓啀鏄剧ず灏变細鍑虹幇琛ㄦ牸閿欎綅闂锛�
-            'form.type'(val) {
-                //console.log(val);
+            'form.type'(value) {
                 this.onloadAttrData();
             }
         },
@@ -1086,33 +1129,39 @@
             // 鍗曞嚮琛ㄦ牸瀹炵幇琛ㄦ牸琛岀紪杈�
             clickAttrEdit(row, column, event){
                 if(this.preClickAttrRow && this.preClickAttrRow != row){
-                    //console.log(this.attrData[this.preClickAttrRow.$index]);
-                    this.attrData[this.preClickAttrRow.$index].$cellEdit = false;
+                    //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]);
+                    this.codeShowFieldConfigVOS[this.preClickAttrRow.$index].$cellEdit = false;
                 }
                 row.$cellEdit = true;
                 this.preClickAttrRow = row;
             },
             // 灞炴�ц〃鏍艰缂栬緫澶卞幓鐒︾偣鏃朵繚瀛樻柟娉�
             // updateAttrBlur(value){
-                //console.log(this.attrData[0]);
+                //console.log(this.codeShowFieldConfigVOS[0]);
                 
             // },
+
             // 鍗曞嚮琛ㄦ牸瀹炵幇琛ㄦ牸琛岀紪杈�
             clickAddSearchCondtionEdit(row, column, event){
                 if(this.preClickAddSearchConditionRow && this.preClickAddSearchConditionRow != row){
-                    //console.log(this.attrData[this.preClickAttrRow.$index]);
-                    this.addSearchCondtionData[this.preClickAddSearchConditionRow.$index].$cellEdit = false;
+                    //console.log(this.codeShowFieldConfigVOS[this.preClickAttrRow.$index]);
+                    this.form.codeSrchCondConfigVOS[this.preClickAddSearchConditionRow.$index].$cellEdit = false;
                 }
                 row.$cellEdit = true;
                 this.preClickAddSearchConditionRow = row;
             },
             //涓婁竴涓〉闈㈠凡缁忛�変腑鍙傜収搴旂敤鐨勪笟鍔$被鍨嬬殑鎯呭喌锛屽拰涓婁竴娆″凡缁忛厤缃繃鍙傜収閰嶇疆鐨勬儏鍐典笅杩涜椤甸潰鍒濆鍖栨覆鏌�
             initPageData(val){
-                console.log(val);
+                //console.log(val);
                 if(func.notEmpty(val.referConfig)){
                     this.form = JSON.parse(val.referConfig);
-                    //console.log(val);
+                    // console.log(this.form);
+                    this.form.isPersistence = this.form.isPersistence == 'true' ? true:false;
+                    // 鍙傜収寮曠敤鐨勪笟鍔$被鍨嬩笉鍙��
                     this.referTypeIsReadOnly = true;
+                    if((this.form.type == 'default' || this.form.type  == 'grid') && (this.form.codeShowFieldConfigVOS != undefined && this.form.codeShowFieldConfigVOS.length > 0)){
+                        this.codeShowFieldConfigVOS = this.form.codeShowFieldConfigVOS;
+                    }
                     return;
                 }
                 if(func.notEmpty(val.referType)){
@@ -1127,7 +1176,6 @@
             async selectedListReferConfig(){
                 // 鏍囪鎵�鏈夎〃鍗曟槸鍚﹂�氳繃鏍¢獙鐨勫彉閲�
                 let isValid = true;
-                
                 // 閬嶅巻琛ㄥ崟鏁扮粍锛屼緷娆″姣忎釜琛ㄥ崟杩涜鏍¢獙
                 await this.formRefs.forEach(ref => {
                     this.$refs[ref].validate((valid, done, msg) => {
@@ -1142,12 +1190,11 @@
                         done();
                     })
                 })
-                
                 // 濡傛灉鎵�鏈夎〃鍗曢兘鏍¢獙閫氳繃锛屾墽琛屾彁浜ゆ搷浣�
                 if (isValid) {
                     // 鏍规嵁绫诲瀷瀵筬orm琛ㄥ崟涓殑鍙傛暟杩涜杩囨护锛屽彧淇濈暀闈炵┖涓旈渶瑕佺殑灞炴��
                     let submitForm = this.filterForm();
-                    //console.log(submitForm);
+                    // console.log(submitForm);
                     this.$emit('echoReferConfig', submitForm) // 瑙﹀彂update:data灏嗗瓙缁勪欢鍊间紶閫掔粰鐖剁粍浠�
                     this.isShowReferConfigForm = false;
                 }
@@ -1155,14 +1202,14 @@
             /** 鍏跺疄閫夊彇灞炴�ц〃鏍肩殑榛樿鏁版嵁涓嶉渶瑕佸姞杞斤紝
              浣嗘槸寮圭獥鎵撳紑浼氭湁琛ㄦ牸閿欒闂鎵�浠ラ渶瑕佸湪杩欒皟鐢╠oLayout鏂规硶*/
             onloadAttrData(){
-                this.attrData = [
+                this.codeShowFieldConfigVOS = [
                     {
                         field: 'id',
                         title: '缂栧彿',
                         fieldType: 'text',
                         fieldTypeText: '鏂囨湰妗�',
                         sort: true,
-                        sortField: 'id',
+                        attrSortField: 'id',
                         width: '150',
                         isquery: true,
                         $cellEdit: false
@@ -1172,7 +1219,7 @@
                         fieldType: 'text',
                         fieldTypeText: '鏂囨湰妗�',
                         sort: true,
-                        sortField: 'name',
+                        attrSortField: 'name',
                         width: '180',
                         isquery: true,
                         $cellEdit: false
@@ -1185,10 +1232,10 @@
             // 灞炴�ч�夋嫨琛ㄦ牸涓殑绉婚櫎鎸夐挳鍔熻兘
             removeCurrentRow(row,condition){
                 if(condition=='removeAttr'){
-                    this.$delete(this.attrData, row.$index);
+                    this.$delete(this.codeShowFieldConfigVOS, row.$index);
                     return;
                 }
-                this.$delete(this.addSearchCondtionData, row.$index);
+                this.$delete(this.form.codeSrchCondConfigVOS, row.$index);
             },
             // 璇ョ晫闈㈢殑鏁版嵁杩涜鍒濆鍖栧鍘�
             recoveryDataAndForm(condition){
@@ -1224,7 +1271,9 @@
                     'paramForFormKey',
                     'isMuti',
                     'mapFields', 
-                    'searchCondition', 
+                    'codeSrchCondConfigVOS', 
+                    'isOpenGlobal', //鏄惁寮�鍚叏灞�
+                    'isPersistence',
                 ];
                 let addArray = [];
                 let newForm ={};
@@ -1244,14 +1293,18 @@
                         'sortType'
                     ];
                 }
+                // 寮�鍚寔涔呭寲鍙傜収閰嶇疆
+                if(oldForm.isPersistence=='true' | oldForm.isPersistence){
+                    submittDefaultForm =  submittDefaultForm.concat(['id','name'])
+                }
                 submittDefaultForm = submittDefaultForm.concat(addArray);
-                if(!this.checkArrayIsUndefined(this.addSearchCondtionData)){
+                if(!this.checkArrayIsUndefined(this.form.codeSrchCondConfigVOS)){
                     newForm = {
-                        searchCondition: this.addSearchCondtionData,
+                        codeSrchCondConfigVOS: this.form.codeSrchCondConfigVOS,
                     }
                 }
-                if((oldForm.type == 'default' || oldForm.type  == 'grid') && (this.attrData.length >= 0 && !this.checkArrayIsUndefined(this.addSearchCondtionData))){
-                    newForm = Object.assign(newForm,{attrData:this.attrData});
+                if((oldForm.type == 'default' || oldForm.type  == 'grid') && (this.codeShowFieldConfigVOS.length >= 0 && !this.checkArrayIsUndefined(this.codeShowFieldConfigVOS))){
+                    newForm = Object.assign(newForm,{codeShowFieldConfigVOS:this.codeShowFieldConfigVOS});
                 }
                 // 杩囨护鍑虹┖鍊煎睘鎬у拰涓嶉渶瑕佺殑灞炴��
                 submittDefaultForm.forEach(item=>{
@@ -1261,7 +1314,7 @@
                         newForm = Object.assign(newForm,{[item]:oldForm[item]});  
                     }
                 });
-                // console.log(newForm);
+                //console.log(newForm);
                 return newForm;
             },
             /**
@@ -1488,14 +1541,14 @@
                 }
                 //this.showFieldSelectList;
                 this.showFieldSelectList.forEach(item => {
-                    this.attrData.push(
+                    this.codeShowFieldConfigVOS.push(
                         {
                             field: item.id,
                             title: item.id,
                             fieldType: item.attrType,
                             fieldTypeText: item.attrTypeText,
                             sort: false,
-                            sortField: item.id,
+                            attrSortField: item.id,
                             width: item.attrLength,
                             isquery: false,
                             $cellEdit: false
@@ -1550,16 +1603,17 @@
                 this.sortFieldOnLoad();
             },
             selectedSearchCondition(){
-                console.log(this.searchConditionSelectList);
+                // console.log(this.searchConditionSelectList);
                 if(this.searchConditionSelectList.length <= 0) {
                     this.$message.warning("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�");
                     return;
                 }
                 this.searchConditionSelectList.forEach(item => {
-                    this.addSearchCondtionData.push(
+                    this.form.codeSrchCondConfigVOS.push(
                         {
                             filterField: item.id,
                             filterType: '=',
+                            filterTypeText: item.name, 
                             filterValue: '',
                             $cellEdit: false
                         }

--
Gitblit v1.9.3