From ecaf70a4e7d72ecc1c18302fef31b3baab8e6513 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 13 十月 2022 11:01:23 +0800
Subject: [PATCH] 1.看板新增自动刷新2小时一次

---
 src/views/jcsz/wldw.vue |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/views/jcsz/wldw.vue b/src/views/jcsz/wldw.vue
index 0e47aee..31b1ed2 100644
--- a/src/views/jcsz/wldw.vue
+++ b/src/views/jcsz/wldw.vue
@@ -248,7 +248,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>
@@ -505,6 +510,7 @@
     dialogVisibleConfirm() {
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
+          this.$store.state.app.buttonIsDisabled = true
           let mtypecode = null // 澶栬喘缂栫爜
           let btypecode = null // 澶栧崗缂栫爜
           let htypecode = null // 瀹㈡埛缂栫爜
@@ -530,14 +536,16 @@
             description: this.dialogForm.description,
             OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-          // console.log(data, 2)
+
           AddUpdateCurrentUnit(data).then(res => {
             if (res.code === '200') {
-              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
+              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.getCurrentUnitSearch()
+              this.$store.state.app.buttonIsDisabled = false
             } else {
               this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
+              this.$store.state.app.buttonIsDisabled = false
             }
           })
         }

--
Gitblit v1.9.3