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 |   41 +++++++++++++++++++++--------------------
 1 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index fdf2ce5..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')"
@@ -944,8 +945,6 @@
                     :key="item.itemValue"
                     :label="item.itemName"
                     :value="item.itemValue"
-                    label="宸﹁ˉ浣�"
-                    value="codeattrsec"
                   >
                   </el-option>
                 </el-select>
@@ -1230,8 +1229,7 @@
               <el-form-item
                 :label-width="rightFormLabelWidth"
                 label="缂栫爜琛ヤ綅鏂瑰紡:"
-                required
-              >
+                required>
                 <el-select
                   v-model="form.codeFillType"
                   :disabled="basicSecOnlyRead"
@@ -1277,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>
 
@@ -1405,7 +1402,7 @@
     </el-dialog>
   </basic-container>
 </template>
- 
+
 <script>
 import {
   gridCodeRule,
@@ -1546,6 +1543,7 @@
       selectionBasicList: [],
       addBasicCodeSettingBox: false,
       showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
+      isLoadingSecCodeAddBtn: false,
       basicSecDialogTitle: "", //鍩虹鐮佹绗竴灞傚璇濇鏍囬
       basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
 
@@ -2516,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",
@@ -2530,8 +2529,8 @@
     /** 鍙戝竷缂栫爜瑙勫垯 */
     async enableOrDeactivatse(oid, update) {
       if (update === "release") {
-        // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
         this.releadDisabled = true;
+        // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
         await checkLikeCodeRule(oid)
           .then((res) => {
             //console.log(res)
@@ -2542,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;
               });
             }
           })
@@ -2873,6 +2870,7 @@
     /** 闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��*/
     clearBasicAddForm() {
       this.form = this.$options.data().form;
+      //this.isLoadingSecCodeAddBtn = false;
       // this.changeSectypeFormItems(null);
     },
     /** 鎵撳紑鏂板绐楀彛*/
@@ -2914,6 +2912,7 @@
     },
     /** 鏂板鍩虹鐮佹*/
     async saveOrEditBasicCode() {
+      this.isLoadingSecCodeAddBtn = true;
       if (
         this.selectionList[0].oid == null ||
         this.selectionList[0].oid == ""
@@ -2968,6 +2967,7 @@
         // 鍏抽棴瀵硅瘽妗�
         this.addBasicCodeSettingBox = false;
       }
+      this.isLoadingSecCodeAddBtn = false;
     },
     /** 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�*/
     checkForm() {
@@ -3481,8 +3481,7 @@
           serialStart:
             row != null && row.serialStart != "" ? row.serialStart : 1, //娴佹按鍙疯捣濮嬪��
           serialStep: row != null && row.serialStep != "" ? row.serialStep : 1, //娴佹按鐨勬闀�
-          codeFillType:
-            row != null && row.codeFillType != ""
+          codeFillType: row != null && row.codeFillType != ""
               ? row.codeFillType
               : "code_fill_left", //缂栫爜琛ヤ綅鏂瑰紡
           // codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0,    //琛ヤ綅鏃剁殑瀛楃锛岄�変腑鐨勪笅鎷夋鐨勪笅鏍�
@@ -3505,6 +3504,8 @@
               ? row.customCodeSerialClass
               : "", //鑷畾涔夋祦姘寸畻娉�
         });
+        console.log(this.form);
+        console.log(this.enumParam.codeFillType);
         this.loadCodeFillType();
         this.loadCodeFillSeparator();
       } else if (this.form.secType === "codelevelsec") {
@@ -3661,7 +3662,7 @@
   },
 };
 </script>
- 
+
 <style>
 [class^="icon-"] {
   font-size: 12px !important;
@@ -3804,4 +3805,4 @@
 /* .code-total > .basic-container__card {
     height: 100%;
   } */
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3