From cb4e11b19446843188cf628ac8f6be5fe1fa68c7 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期二, 06 六月 2023 18:01:52 +0800
Subject: [PATCH] 配置

---
 Source/UBCS-WEB/src/views/code/code.vue |  227 +++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 135 insertions(+), 92 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 9d36936..aaeef02 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -63,47 +63,54 @@
             @click="handleDelete">
             鍒� 闄�
           </el-button>
-          <el-button size="small"
+          <el-button type="primary"
+            size="small"
+            icon="el-icon-search"
+            plain
+            @click="openAdvancedQuery('codeRule')">
+            楂樼骇鏌ヨ
+          </el-button>
+          <el-button
+            size="small"
             icon="icon-kelong"
             plain
             @click="openCodeRuleDialog">
             鍏� 闅�
           </el-button>
-          <el-button size="small"
+          <el-button
+            size="small"
             icon="icon-lianjiekelong"
             style="font-size: 12px;"
             plain
             @click="openOtherCodeRuleDialog">
             浠庡叾浠栬鍒欎腑鍏嬮殕鐮佹
           </el-button>
-          <el-button size="small"
+          <el-button
+            size="small"
             icon="el-icon-s-help"
             plain
             @click="handleRange">
             浣跨敤鑼冨洿
           </el-button>
-          <el-button size="small"
+          <el-button 
+              size="small"
               icon="icon-qingkong"
               plain
               @click="clearAllCodeSec">
               娓呯┖鐮佸��
           </el-button>
-          <el-button size="small"
-            icon="el-icon-search"
-            plain
-            @click="openAdvancedQuery">
-            楂樼骇鏌ヨ
-        </el-button>
         </template>
       </avue-crud>
     </basic-container>
+
     <!-- 楂樼骇鏌ヨ瀵硅瘽妗� -->
     <advanced-query
-      ref="advancedQuery"
+      :ref="advancedQueryParam.ref"
       :options="advancedQueryParam.options"
       :visible.sync="advancedQueryParam.advancedQuerySettingBox"
-      v-model="value">
+      @echoContion="echoSeniorContionMap">
     </advanced-query>
+
     <!-- 缂栫爜瑙勫垯鐩稿叧瀵硅瘽妗� -->
     <el-dialog title="缂栫爜瑙勫垯浣跨敤鑼冨洿"
       append-to-body
@@ -117,6 +124,7 @@
         @refresh-change="refreshUseRangeChange">
       </avue-crud>
     </el-dialog>
+
     <!-- 缂栫爜瑙勫垯,鍏嬮殕瀵硅瘽妗� -->
     <el-dialog title="鍏嬮殕缂栫爜瑙勫垯"
       append-to-body
@@ -170,6 +178,7 @@
         <el-button @click="cloneSettingBox = false">鍙� 娑�</el-button>
       </div>
     </el-dialog>
+
     <!-- 缂栫爜瑙勫垯,浠庡叾浠栬鍒欏厠闅嗗璇濇 -->
     <el-dialog title="鍏嬮殕缂栫爜瑙勫垯鐨勫熀纭�淇℃伅"
       append-to-body
@@ -286,6 +295,13 @@
             plain
             @click="deleteBasicCode(scope.row)">
             鍒� 闄�
+        </el-button>
+        <el-button type="primary"
+            size="small"
+            icon="el-icon-search"
+            plain
+            @click="openAdvancedQuery('codeBasicSec')">
+            楂樼骇鏌ヨ
         </el-button>
       </template>
 
@@ -786,7 +802,7 @@
     addSave,
     refDataGridClassifySec,
   } from "@/api/code/codebasic";
-  import { treeTopCodeClassify, listClassifyLinkAttr } from "@/api/code/codeclassify";
+  import { listClassifyLinkAttr } from "@/api/code/codeclassify";
   import { gridCodeFixedValue,addSaveCodeFixedValue,deleteCodeFixedValue,editCodeFixedValue,saveOrder } from "@/api/code/codeFixedValue";
   import { treeCodeClassifyValue,addSaveCodeClassifyValue,editCodeClassifyValue,deleteCodeClassifyValue,saveCodeClassifyValueOrder } from "@/api/code/codeClassifyValue";
   import { getDictionary } from "@/api/omd/enum";
@@ -799,18 +815,14 @@
   import treeOption from "@/const/code/classifyTreeOptionDialog";
   import classisyValueTreeOption from "@/const/code/classisyValueTreeDialog";
   import parentClassifyParentOption from "@/const/code/parentClassifyParentOptionDialog";
-  import referBtmOption from "@/const/code/referBtmDialog";
   import fixedValueOption from "@/const/code/fixedValueMgrDialog";
   import {mapGetters} from "vuex";
   import func from "@/util/func";
   import {MasterTable} from "@/api/GetItem";
-import referBtmTypeCrudDialog from '../../components/code-dialog-page/referBtmTypeCrudDialog.vue';
 
   export default {
-  components: { referBtmTypeCrudDialog },
       data() {
         return {
-          value:"1",
           ruleForm: {},
           query: {},
           loading: true,
@@ -1054,67 +1066,11 @@
 
           // 楂樼骇鏌ヨ瀵硅瘽妗嗙浉鍏冲弬鏁�
           advancedQueryParam: {
+            ref: 'advancedQuery',
             advancedQuerySettingBox: false,
-            searchForm: {
-              name: 'advanced',
-            },
-            options: {
-              labelWidth: '110px',
-              // 鏌ヨ瀛楁
-              searchfeildName: [
-                    {
-                      label: '缂栧彿',
-                      value: 'id',
-                    },
-                    {
-                      label: '鍚嶇О',
-                      value: 'name',
-                    },
-                    {
-                      label: '鐘舵��',
-                      value: 'status',
-                    },
-              ], 
-              // 鏌ヨ鏉′欢 绛変簬銆佸寘鍚�佷笉绛変簬銆佷粙浜庘�︹��
-              searchCondition: [
-                {
-                  label: '绛変簬',
-                  value: '=',
-                },
-                {
-                  label: '鍖呭惈',
-                  value: 'like',
-                },
-                {
-                  label: '澶т簬绛変簬',
-                  value: '>=',
-                },
-                {
-                  label: '灏忎簬绛変簬',
-                  value: '<=',
-                },
-                {
-                  label: '涓嶇瓑浜�',
-                  value: '!=',
-                },
-                {
-                  label: '浠嬩簬',
-                  value: 'between',
-                },
-              ], 
-              column: [
-                {
-                  type: 'text',
-                  
-                  
-                },
-                {
-                  
-                },
-              ],
-            },
+            options: [],
+            //conditionMapParams: {},
           },
-          
 
         };
       },
@@ -1129,15 +1085,17 @@
           };
         },
       },
-      created() {
-          MasterTable({
-            codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
-            functionId: 5,
-          }).then(res=>{
-            console.log(res.data.tableDefineVO.seniorQueryColumns);
-          }) 
+      watch:{
+
       },
       methods: {
+
+        /** 楂樼骇鏌ヨ瀵硅瘽妗嗙粍浠�,缁勪欢杩斿洖鐨勫�兼槸condtionMap[field]褰㈠紡鐨勬煡璇㈡潯浠讹紝淇濈暀浜嗗拰涔嬪墠涓�鏍风殑鏂瑰紡 */
+        echoSeniorContionMap(conditionMaps){
+          // console.log(conditionMaps);
+          this.query = conditionMaps;
+          this.onLoad(this.page);
+        },
 
         /* 鍏紡缂栬緫妗嗗唴瀹规敼鍙�,瀛愮粍浠剁紪杈戝畬鍏紡涔嬪悗鍐呭鍥炴樉鏃惰皟鐢� */
         updateFormulaContent(content){
@@ -2032,10 +1990,78 @@
 
         /** 缂栫爜瑙勫垯鐩稿叧鏂规硶 */
         // 鎵撳紑楂樼骇鏌ヨ绐楀彛
-        openAdvancedQuery(){
-          //this.$refs.advancedQuery.visible = true;
-          //this.advancedQueryParam.timer = new Date().getTime()
-          this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox;
+        openAdvancedQuery(condition){
+          // MasterTable({
+          //   codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3",
+          //   functionId: 5,
+          // }).then(res=>{
+          //   console.log(res.data.tableDefineVO.seniorQueryColumns);
+          // }) 
+          if(condition=='codeRule'){
+            this.advancedQueryParam.options = [
+              {
+                data: [],
+                title: '缂栧彿',
+                fieldType: 'text',
+                queryField: 'id',
+              },{
+                data: [],
+                title: '鍚嶇О',
+                fieldType: 'text',
+                queryField: 'name',
+              },{
+                data: [],
+                title: '鎻忚堪',
+                fieldType: 'text',
+                queryField: 'description',
+              },{
+                data: [
+                  // {
+                  //   key: '缂栬緫涓�',
+                  //   value: 'Editing',
+                  // },
+                  // {
+                  //   key: '宸插彂甯�',
+                  //   value: 'Released',
+                  // },
+                  // {
+                  //   key: '鍋滅敤',
+                  //   value: 'Disabled',
+                  // },
+                ],
+                title: '鐘舵��',
+                fieldType: 'combox',
+                queryField: 'lcStatus',
+                comboxKey: 'Eummaterialtype',
+              }
+            ]
+          }else {
+            this.advancedQueryParam.options = [
+              {
+                data: [],
+                title: '鐮佹缂栧彿',
+                fieldType: 'text',
+                queryField: 'id',
+              },{
+                data: [],
+                title: '鐮佹鍚嶇О',
+                fieldType: 'text',
+                queryField: 'name',
+              },{
+                data: [],
+                title: '鎻忚堪',
+                fieldType: 'text',
+                queryField: 'description',
+              },{
+                data: [],
+                title: '鐮佹绫诲瀷',
+                fieldType: 'combox',
+                queryField: 'secType',
+                comboxKey: 'codeSecType',
+              }
+            ]
+          }
+          this.advancedQueryParam.advancedQuerySettingBox = true;
         },
         // 鏌ヨ浣跨敤鑼冨洿
         handleRange(){
@@ -2304,16 +2330,22 @@
           this.onLoad(this.page);
         },
         searchChange(params, done) {
-          this.query = params;
           this.page.currentPage = 1;
-          this.onLoad(this.page, params);
+          // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
+          if(params){
+              Object.keys(params).forEach(key=>{
+                this.query['conditionMap['+key+'_like]'] = params[key];
+              });
+          }
+          console.log(this.query);
+          this.onLoad(this.page);
           done();
         }, 
         // 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�
         selectionChange(list) {
           this.selectionList = list;
           this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
-          //褰撳墠閫変腑琛屼负绌虹殑鏃跺�欏氨灏嗙爜娈电鐞嗚〃鏍兼暟鎹疆绌�
+          //褰撳墠閫変腑琛屼负绌虹殑鏃跺�欏氨灏嗙爜娈电鐞嗚〃鏍兼暟鎹疆绌�,骞剁鐢ㄧ浉鍏冲姛鑳�
           if(list == ''){
             this.basicData = [];
             this.hideBasicTable(false);
@@ -2337,14 +2369,25 @@
         refreshChange() {
           this.onLoad(this.page, this.query);
         },
-        onLoad(page, params = {}) {
+        onLoad(page,params={}) {
           this.loading = true;
-          gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          gridCodeRule(
+            page.currentPage, 
+            page.pageSize, 
+            this.query
+          ).then(res => {
             //console.log(res.data);
             const data = res.data.data;
             this.page.total = data.total;
             this.data = data.records;
             this.loading = false;
+            // 鏌ヨ鐨勫�间负绌烘椂锛岃灏嗙爜娈电鐞嗙浉鍏崇殑鍐呭绂佺敤
+            if(data.records.length <= 0) {
+              this.hideBasicTable(false);
+              this.selectionList = [];
+              this.basicData = [];
+              return;
+            }
             this.loadBasic(this.data[0])
             this.$nextTick(() => {
               this.$refs.crud.toggleRowSelection(this.data[0]);

--
Gitblit v1.9.3