From 17d7230744601a599b6bcb7da19dda3c8eb9b0df Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 24 三月 2025 13:51:14 +0800
Subject: [PATCH] 量值溯源计划-新增设备赋值优化

---
 src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
index 91d52a4..29618b3 100644
--- a/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
@@ -13,7 +13,8 @@
       </div>
       <div style="margin: 10px 0">
         <el-table ref="yearTable" :data="examinePlanDetailsList" id="templateParamTable" row-key="deviceId"
-                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="500px" style="width: 100% ;">
+                  v-loading="yearTableLoading"
+                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="500px">
           <el-table-column label="璁惧鍚嶇О" min-width="190" prop="deviceName">
             <template slot-scope="scope">
               <el-input v-model="scope.row.deviceName" clearable size="small"></el-input>
@@ -118,7 +119,8 @@
         planId: '',
         examinePlanDetailsList: [],
       },
-      operationType: ''
+      operationType: '',
+      yearTableLoading: false
     }
   },
   mounted() {
@@ -134,6 +136,7 @@
           planYear: '',
           examinePlanDetailsList: [],
         }
+        this.examinePlanDetailsList = []
       } else {
         this.getRowInfo(row)
       }
@@ -141,13 +144,17 @@
       this.getUserList()
     },
     getRowInfo(row) {
+      this.yearTableLoading = true
       getDeviceExaminePlan({ planId: row.planId }).then(res => {
+        this.yearTableLoading = false
         if (res.code == 200) {
           this.examinePlanDetailsList = res.data.examinePlanDetailsList
           this.form.planName = res.data.planName
           this.form.planYear = res.data.planYear
           this.form.planId = res.data.planId
         }
+      }).catch(error => {
+        this.yearTableLoading = false
       })
     },
     // 娣诲姞璁惧

--
Gitblit v1.9.3