From e20bf5092ee15f5569bc3939204a0f598b75d15b Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 11 九月 2023 09:40:15 +0800
Subject: [PATCH] 编码规则-分类码段-码值管理树折叠

---
 Source/UBCS-WEB/src/views/code/code.vue |   50 +++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index f412952..65295a7 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -284,6 +284,8 @@
             @row-click="codeOtherCloneRuleRowClick"
             @size-change="sizeChange"
             @selection-change="selectionOtherCloneCodeRuleChange"
+            @search-change="searchOtherCloneChange"
+            @search-reset="searchOtherCloneReset"
             @on-load="onLoad"
           >
           </avue-crud>
@@ -483,8 +485,9 @@
               style="height: 60vh; margin-bottom: -40px"
             >
               <basic-container>
-                <div class="abox">
+                <div class="abox" v-for="item in classifyValueTreeData">
                   <avue-tree
+                    :node-key="item.oid"
                     :data="classifyValueTreeData"
                     :option="classisyValueTreeOption"
                     style="height: calc(60vh - 100px);"
@@ -1459,6 +1462,7 @@
 export default {
   data() {
     return {
+      nodeKey:'',
       ruleForm: {},
       query: {},
       loading: true,
@@ -1473,6 +1477,7 @@
       optionRule: optionRule,
       data: [],
       currentRuleLcStatus: "",
+
       /*鍏嬮殕瀵硅瘽妗嗘帶鍒跺彉閲�*/
       cloneSettingBox: false,
       cloneTableLoading: false,
@@ -1483,11 +1488,15 @@
         name: "",
         description: "",
       },
+
       /*浠庡叾浠栬鍒欏厠闅嗙爜娈�*/
       cloneOtherCodeRuleSettingBox: false,
       cloneBasicOption: cloneBasicOption,
       cloneCodeRuleOption: cloneCodeRuleOption,
-      selectionOtherCloneCodeBasicList: [], // 褰撳墠閫変腑鐨勫熀纭�鐮佹
+      selectionOtherCloneCodeBasicList: [], // 姝ょ晫闈㈠唴褰撳墠閫変腑鐨勫熀纭�鐮佹
+      selectionOtherCloneCodeRuleList: [], // 姝ょ晫闈㈠唴褰撳墠閫変腑鐨勭紪鐮佽鍒�
+      otherCloneQuery: {}, // 鏌ヨ鏉′欢瀵硅薄
+
       /** 杞Щ鎵�鏈夎�呭璇濇 */
       escapeOwnerVisible: false,
       ruleAdminUserList: [], //瑙勫垯绠$悊鍛樺垪琛�
@@ -1748,6 +1757,7 @@
     });
   },
   methods: {
+
     /** 杞Щ瑙勫垯鎵�鏈夎�呭璇濇 */
     escapeOwner() {
       if (this.selectionList.length === 0) {
@@ -2392,6 +2402,7 @@
         "conditionMap[codeclassifysecoid]": row.oid,
       };
       treeCodeClassifyValue(condtionData).then((res) => {
+        // console.log('res',res)
         this.classifyValueTreeData = res.data;
         //console.log(res.data);
       });
@@ -2560,6 +2571,7 @@
         this.updateStatus(oid, update);
       }
     },
+
     /** 鎵撳紑缂栫爜瑙勫垯鍏嬮殕瀵硅瘽妗�*/
     openCodeRuleDialog() {
       if (!this.tipsMessage(this.selectionList)) {
@@ -2607,6 +2619,7 @@
       );
       //console.log(data);
     },
+
     /** 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�*/
     openOtherCodeRuleDialog() {
       if (!this.tipsMessage(this.selectionList)) {
@@ -2618,7 +2631,7 @@
       }
       this.cloneOtherCodeRuleSettingBox = true;
     },
-    //** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨*/
+    /** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨*/
     codeOtherCloneRuleRowClick(row) {
       this.$refs.crudCloneCodeRuleOther.toggleSelection();
       this.selectionOtherCloneCodeRuleList = row;
@@ -2653,7 +2666,27 @@
         this.selectionOtherCloneCodeBasicList[list.length - 1]
       );
     },
-    /** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅*/
+    /** 浠庡叾浠栬鍒欏厠闅嗙爜娈电晫闈㈤噸缃悳绱㈠姛鑳� */
+    searchOtherCloneReset() {
+      this.otherCloneQuery = {};
+      this.onLoad(this.page);
+    },
+    /** 浠庡叾浠栬鍒欏厠闅嗙爜娈电晫闈㈡悳绱㈠姛鑳�*/
+    searchOtherCloneChange(params, done) {
+      this.page.currentPage = 1;
+      // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
+      let requestData = {};
+      if (params) {
+        Object.keys(params).forEach((key) => {
+          requestData["conditionMap" + "[" + key + "_like]"] =
+            params[key].trim();
+        });
+      }
+      this.otherCloneQuery = requestData;
+      this.onLoad(this.page,requestData);
+      done();
+    },
+    /** 淇濆瓨浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅*/
     saveOtherCodeBasic() {
       let oid = this.selectionList[0].oid;
       let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
@@ -2691,6 +2724,7 @@
         }
       );
     },
+
     /** 娓呯┖鐮佸��*/
     clearAllCodeSec() {
       if (this.selectionList.length == 0) {
@@ -2792,10 +2826,12 @@
       }
       done();
     },
+    // 缂栫爜瑙勫垯蹇�熸煡璇㈤噸缃�
     searchReset() {
       this.query = {};
       this.onLoad(this.page);
     },
+    // 缂栫爜瑙勫垯蹇�熸煡璇�
     searchChange(params, done) {
       this.page.currentPage = 1;
       // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
@@ -2807,7 +2843,7 @@
         });
       }
       this.query = requestData;
-      this.onLoad(this.page);
+      this.onLoad(this.page, this.query);
       done();
     },
     /** 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�*/
@@ -2845,7 +2881,7 @@
     },
     onLoad(page, params = {}) {
       this.loading = true;
-      gridCodeRule(page.currentPage, page.pageSize, this.query).then((res) => {
+      gridCodeRule(page.currentPage, page.pageSize, params).then((res) => {
         //console.log(res.data);
         const data = res.data.data;
         this.page.total = data.total;
@@ -3208,8 +3244,8 @@
         this.loadingBasic = true;
       }
       // console.log(row.oid);
-      //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
       if (row != "" || row != null) {
+        //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
         this.currentCodeRuleOid = row.oid;
         this.currentRuleLcStatus = row.lcStatus;
         this.sendGridCodeBasicSec({ pkCodeRule: row.oid }, false);

--
Gitblit v1.9.3