From 4a6d69f3ff895918b1b8f1e8e9b122ed8fcd5afa Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 24 十一月 2022 17:15:47 +0800
Subject: [PATCH] 1.自动排程实现静态部分

---
 src/views/sbgl/djbw.vue |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/views/sbgl/djbw.vue b/src/views/sbgl/djbw.vue
index 94b108d..8adfe3f 100644
--- a/src/views/sbgl/djbw.vue
+++ b/src/views/sbgl/djbw.vue
@@ -136,6 +136,10 @@
             sortable="custom"
           >
             <template slot-scope="{row}">
+              <div v-if="row.cycle==='Y'">骞�</div>
+              <div v-if="row.cycle==='S'">瀛�</div>
+              <div v-if="row.cycle==='M'">鏈�</div>
+              <div v-if="row.cycle==='W'">鍛�</div>
               <div v-if="row.cycle==='D'">鏃�</div>
             </template>
           </el-table-column>
@@ -233,7 +237,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>
@@ -284,6 +293,10 @@
         { code: 'N', name: '鍚�' }
       ],
       cycleArr: [
+        { code: 'Y', name: '骞�' },
+        { code: 'S', name: '瀛�' },
+        { code: 'M', name: '鏈�' },
+        { code: 'W', name: '鍛�' },
         { code: 'D', name: '鏃�' }
       ],
 
@@ -425,6 +438,7 @@
     dialogVisibleConfirm() {
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
+          this.$store.state.app.buttonIsDisabled = true
           const data = {
             id: this.dialogForm.id,
             checkitemcode: this.dialogForm.checkitemcode,
@@ -437,9 +451,10 @@
           }
           AddUpdateDeviceCheckItem(data).then(res => {
             if (res.code === '200') {
-              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
+              this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.getDeviceCheckItemSearch()
+              this.$store.state.app.buttonIsDisabled = false
             } else {
               this.$message.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
             }

--
Gitblit v1.9.3