From 881cd19ffa9e5d05b722cfeae951f50971c0593a Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 06 十二月 2022 14:01:08 +0800
Subject: [PATCH] 1.增加页签关闭时重新登录功能

---
 src/views/sbgl/bybw.vue |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/views/sbgl/bybw.vue b/src/views/sbgl/bybw.vue
index 6857a7f..5eda629 100644
--- a/src/views/sbgl/bybw.vue
+++ b/src/views/sbgl/bybw.vue
@@ -187,7 +187,12 @@
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button
+            type="primary"
+            :loading="$store.state.app.buttonIsDisabled"
+            :disabled="$store.state.app.buttonIsDisabled"
+            @click="dialogVisibleConfirm"
+          >纭� 瀹�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -253,7 +258,7 @@
       },
 
       title_value: '鏁版嵁瀵煎叆 / 淇濆吇閮ㄤ綅',
-      code: '4',
+      code: '11',
       shows: false
     }
   },
@@ -366,6 +371,7 @@
     dialogVisibleConfirm() {
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
+          this.$store.state.app.buttonIsDisabled = true
           const data = {
             id: this.dialogForm.id,
             maiitemcode: this.dialogForm.maiitemcode,
@@ -374,12 +380,12 @@
             isqrcode: this.dialogForm.isqrcode,
             OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-          console.log(data)
           AddUpdateDeviceMaiItem(data).then(res => {
             if (res.code === '200') {
-              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
+              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.getDeviceMaiItemSearch()
+              this.$store.state.app.buttonIsDisabled = false
             } else {
               this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
             }

--
Gitblit v1.9.3