From 14d9c5a74dac33c40f96a4bd17216f1991de8ea8 Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期六, 09 九月 2023 14:21:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/code/code.vue |   77 ++++++++++++++++++++++++++++----------
 1 files changed, 56 insertions(+), 21 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index a3de81c..cdbc7b8 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -47,7 +47,7 @@
           </el-button>
           <el-button
             v-show="scope.row.lcStatus == 'Editing' ? true : false"
-            :disabled="releadDisabled"
+            :loading="releadDisabled"
             icon="el-icon-position"
             plain
             size="small"
@@ -284,6 +284,8 @@
             @row-click="codeOtherCloneRuleRowClick"
             @size-change="sizeChange"
             @selection-change="selectionOtherCloneCodeRuleChange"
+            @search-change="searchOtherCloneChange"
+            @search-reset="searchOtherCloneReset"
             @on-load="onLoad"
           >
           </avue-crud>
@@ -326,6 +328,7 @@
       append-to-body
       title="杞Щ鎵�鏈夎��"
       width="30%"
+      class= "avue-dialog avue-dialog--top"
     >
       <el-select v-model="ruleOwner" class="selects" placeholder="璇烽�夋嫨">
         <el-option
@@ -468,7 +471,7 @@
       append-to-body
       class="avue-dialog avue-dialog--top"
       destroy-on-close
-      style="height: 100vh"
+      style="height: 110vh"
       title="鐮佹鐮佸�肩鐞�"
       top="-3%"
       @close="clearFixedOrClassifyForm('close')"
@@ -476,17 +479,17 @@
       <!-- 鍒嗙被鐮佹鐮佸�肩鐞� -->
       <el-row v-show="!isShowFixedForm">
         <el-col :span="11">
-          <basic-container>
+          <basic-container style="overflow:hidden">
             <div
               class="box classify_value_box"
               style="height: 60vh; margin-bottom: -40px"
             >
               <basic-container>
-                <div class="abox" style="height: 54vh">
+                <div class="abox">
                   <avue-tree
                     :data="classifyValueTreeData"
                     :option="classisyValueTreeOption"
-                    style=""
+                    style="height: calc(60vh - 100px);"
                     @node-click="classisyValueTreeOnodeClick"
                   />
                 </div>
@@ -1274,9 +1277,8 @@
         <el-button
           :disabled="!showbtn"
           type="primary"
-          @click="saveOrEditBasicCode"
-          >淇� 瀛�</el-button
-        >
+          :loading="isLoadingSecCodeAddBtn"
+          @click="saveOrEditBasicCode">淇� 瀛�</el-button>
         <el-button @click="addBasicCodeSettingBox = false">鍙� 娑�</el-button>
       </div>
 
@@ -1455,7 +1457,6 @@
 import { mapGetters } from "vuex";
 import { getByRoleUserList } from "@/api/system/user";
 import func from "@/util/func";
-import logeVue from '../docking/loge.vue';
 
 export default {
   data() {
@@ -1474,6 +1475,7 @@
       optionRule: optionRule,
       data: [],
       currentRuleLcStatus: "",
+
       /*鍏嬮殕瀵硅瘽妗嗘帶鍒跺彉閲�*/
       cloneSettingBox: false,
       cloneTableLoading: false,
@@ -1484,11 +1486,15 @@
         name: "",
         description: "",
       },
+      
       /*浠庡叾浠栬鍒欏厠闅嗙爜娈�*/
       cloneOtherCodeRuleSettingBox: false,
       cloneBasicOption: cloneBasicOption,
       cloneCodeRuleOption: cloneCodeRuleOption,
-      selectionOtherCloneCodeBasicList: [], // 褰撳墠閫変腑鐨勫熀纭�鐮佹
+      selectionOtherCloneCodeBasicList: [], // 姝ょ晫闈㈠唴褰撳墠閫変腑鐨勫熀纭�鐮佹
+      selectionOtherCloneCodeRuleList: [], // 姝ょ晫闈㈠唴褰撳墠閫変腑鐨勭紪鐮佽鍒�
+      otherCloneQuery: {}, // 鏌ヨ鏉′欢瀵硅薄
+
       /** 杞Щ鎵�鏈夎�呭璇濇 */
       escapeOwnerVisible: false,
       ruleAdminUserList: [], //瑙勫垯绠$悊鍛樺垪琛�
@@ -1544,6 +1550,7 @@
       selectionBasicList: [],
       addBasicCodeSettingBox: false,
       showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
+      isLoadingSecCodeAddBtn: false,
       basicSecDialogTitle: "", //鍩虹鐮佹绗竴灞傚璇濇鏍囬
       basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
 
@@ -1748,6 +1755,7 @@
     });
   },
   methods: {
+
     /** 杞Щ瑙勫垯鎵�鏈夎�呭璇濇 */
     escapeOwner() {
       if (this.selectionList.length === 0) {
@@ -2514,6 +2522,7 @@
     updateStatus(oid, update) {
       updateStatus({ oid: oid, ts: new Date().getTime, update: update }).then(
         () => {
+          this.releadDisabled = false;
           this.onLoad(this.page);
           this.$message({
             type: "success",
@@ -2528,8 +2537,8 @@
     /** 鍙戝竷缂栫爜瑙勫垯 */
     async enableOrDeactivatse(oid, update) {
       if (update === "release") {
-        // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
         this.releadDisabled = true;
+        // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
         await checkLikeCodeRule(oid)
           .then((res) => {
             //console.log(res)
@@ -2540,17 +2549,15 @@
                 distinguishCancelAndClose: true,
                 confirmButtonText: "缁х画鍙戝竷",
                 cancelButtonText: "鍙栨秷",
-              })
-              .then(() => {
+              }).then(() => {
                 this.updateStatus(oid, update);
                 this.releadDisabled = false;
-              })
-              .catch((action) => {
-                this.releadDisabled = false;
+              }).catch((action) => {
                 this.$message({
                   type: "info",
                   message: "鍙栨秷鍙戝竷!",
                 });
+                this.releadDisabled = false;
               });
             }
           })
@@ -2561,6 +2568,7 @@
         this.updateStatus(oid, update);
       }
     },
+    
     /** 鎵撳紑缂栫爜瑙勫垯鍏嬮殕瀵硅瘽妗�*/
     openCodeRuleDialog() {
       if (!this.tipsMessage(this.selectionList)) {
@@ -2608,6 +2616,7 @@
       );
       //console.log(data);
     },
+
     /** 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�*/
     openOtherCodeRuleDialog() {
       if (!this.tipsMessage(this.selectionList)) {
@@ -2619,7 +2628,7 @@
       }
       this.cloneOtherCodeRuleSettingBox = true;
     },
-    //** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨*/
+    /** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨*/
     codeOtherCloneRuleRowClick(row) {
       this.$refs.crudCloneCodeRuleOther.toggleSelection();
       this.selectionOtherCloneCodeRuleList = row;
@@ -2654,7 +2663,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;
@@ -2692,6 +2721,7 @@
         }
       );
     },
+
     /** 娓呯┖鐮佸��*/
     clearAllCodeSec() {
       if (this.selectionList.length == 0) {
@@ -2793,10 +2823,12 @@
       }
       done();
     },
+    // 缂栫爜瑙勫垯蹇�熸煡璇㈤噸缃�
     searchReset() {
       this.query = {};
       this.onLoad(this.page);
     },
+    // 缂栫爜瑙勫垯蹇�熸煡璇�
     searchChange(params, done) {
       this.page.currentPage = 1;
       // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
@@ -2808,7 +2840,7 @@
         });
       }
       this.query = requestData;
-      this.onLoad(this.page);
+      this.onLoad(this.page, this.query);
       done();
     },
     /** 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�*/
@@ -2846,7 +2878,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;
@@ -2871,6 +2903,7 @@
     /** 闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��*/
     clearBasicAddForm() {
       this.form = this.$options.data().form;
+      //this.isLoadingSecCodeAddBtn = false;
       // this.changeSectypeFormItems(null);
     },
     /** 鎵撳紑鏂板绐楀彛*/
@@ -2912,6 +2945,7 @@
     },
     /** 鏂板鍩虹鐮佹*/
     async saveOrEditBasicCode() {
+      this.isLoadingSecCodeAddBtn = true;
       if (
         this.selectionList[0].oid == null ||
         this.selectionList[0].oid == ""
@@ -2966,6 +3000,7 @@
         // 鍏抽棴瀵硅瘽妗�
         this.addBasicCodeSettingBox = false;
       }
+      this.isLoadingSecCodeAddBtn = false;
     },
     /** 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�*/
     checkForm() {
@@ -3206,8 +3241,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