From caeb0c1b3666655e2e05292c2fcaef82a9808cd1 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期五, 08 九月 2023 20:07:20 +0800
Subject: [PATCH] 代码提交

---
 Source/UBCS-WEB/src/views/code/code.vue |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index a3de81c..60a1acb 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"
@@ -326,6 +326,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 +469,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')"
@@ -1274,9 +1275,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 +1455,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() {
@@ -1544,6 +1543,7 @@
       selectionBasicList: [],
       addBasicCodeSettingBox: false,
       showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
+      isLoadingSecCodeAddBtn: false,
       basicSecDialogTitle: "", //鍩虹鐮佹绗竴灞傚璇濇鏍囬
       basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
 
@@ -2514,6 +2514,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 +2529,8 @@
     /** 鍙戝竷缂栫爜瑙勫垯 */
     async enableOrDeactivatse(oid, update) {
       if (update === "release") {
-        // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
         this.releadDisabled = true;
+        // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
         await checkLikeCodeRule(oid)
           .then((res) => {
             //console.log(res)
@@ -2540,17 +2541,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;
               });
             }
           })
@@ -2871,6 +2870,7 @@
     /** 闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��*/
     clearBasicAddForm() {
       this.form = this.$options.data().form;
+      //this.isLoadingSecCodeAddBtn = false;
       // this.changeSectypeFormItems(null);
     },
     /** 鎵撳紑鏂板绐楀彛*/
@@ -2912,6 +2912,7 @@
     },
     /** 鏂板鍩虹鐮佹*/
     async saveOrEditBasicCode() {
+      this.isLoadingSecCodeAddBtn = true;
       if (
         this.selectionList[0].oid == null ||
         this.selectionList[0].oid == ""
@@ -2966,6 +2967,7 @@
         // 鍏抽棴瀵硅瘽妗�
         this.addBasicCodeSettingBox = false;
       }
+      this.isLoadingSecCodeAddBtn = false;
     },
     /** 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�*/
     checkForm() {

--
Gitblit v1.9.3