From 512d5d7e79e0a64b36e24cbe5d7c5f8d0adc0b94 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 26 九月 2024 17:46:48 +0800
Subject: [PATCH] 1.升级了element-plus版本 2.对外支持模块新设备匹配工地功能完成 3.新增设备匹配模块单挑匹配记录编辑功能(未完成)

---
 src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue |   40 ++++++++++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue b/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue
index c098e85..33c01fb 100644
--- a/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue
+++ b/src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue
@@ -3,7 +3,6 @@
     <template #header>
       <div><el-text tag="b" size="large">鏁版嵁婧愭鏌�</el-text></div>
       <el-text size="small" type="info">妫�鏌ヨ瘎浼版墍闇�鏁版嵁婧愭槸鍚﹀畬鏁�</el-text>
-      <el-text size="small" type="info">妫�鏌ヨ瘎浼版墍闇�鏁版嵁婧愭槸鍚﹀畬鏁�</el-text>
     </template>
     <FormCol>
       <template v-for="(v, i) in checkResults" :key="i">
@@ -91,10 +90,24 @@
     async fetch() {
       this.loading = true;
       setTimeout(async () => {
-        const res = await _fetch();
-        this.pass = res ? res.pass : undefined;
-        this.des = res ? res.des : undefined;
-        this.loading = false;
+        if (_fetch != undefined) {
+          _fetch()
+            .then((res) => {
+              this.pass = res ? res.pass : undefined;
+              this.des = res ? res.des : undefined;
+            })
+            .catch(() => {
+              this.pass = false;
+              this.des = '缃戠粶閾炬帴閿欒';
+            })
+            .finally(() => {
+              this.loading = false;
+            });
+        } else {
+          this.pass = undefined;
+          this.des = undefined;
+          this.loading = false;
+        }
       }, 1000);
     }
   };
@@ -108,7 +121,7 @@
     // 姝ラ涓嬫爣
     modelValue: Number
   },
-  emits: ['update:modelValue'],
+  emits: ['update:modelValue', 'change'],
   data() {
     return {
       areaInfo: {},
@@ -160,7 +173,7 @@
           });
         }),
         // 鍖哄煙鑼冨洿鍐呯殑鐩戞祴鏁版嵁鏄惁瀛樺湪銆佹暟鎹椂闂磋法搴︽槸鍚﹀畬鏁淬�佹暟鎹殑鍒濇鍒嗘瀽鏄惁瀹屾垚
-        baseCheckItem('鐜板満鐩戞祴鏁版嵁', '', () => {}),
+        baseCheckItem('鐜板満鐩戞祴鏁版嵁', ''),
         // 鍖哄煙鑼冨洿鍐呯殑姣忎釜鐩戠鐐逛綅涓庣洃娴嬩华鍣ㄧ殑鍖归厤璁板綍鏄惁瀛樺湪锛岀己澶辨儏鍐电瓑
         baseCheckItem('鐩戠鐐逛綅涓庣洃娴嬬偣鍖归厤', '', () => {
           return userMapApi.fetchDeviceMap(this.areaInfo).then((res) => {
@@ -192,14 +205,12 @@
             return { pass, des };
           });
         }),
+        // complaintApi.fetchComplaints();
         // 鍖哄煙鑼冨洿鍐呯殑淇¤鎶曡瘔璁板綍鏄惁瀛樺湪锛屽彲闅忔椂琛ュ厖
-        baseCheckItem('淇¤鎶曡瘔', '', () => {
-          // complaintApi.fetchComplaints();
-        }),
+        baseCheckItem('淇¤鎶曡瘔', ''),
+        // complaintApi.fetchPunishment();
         // 鍖哄煙鑼冨洿鍐呯殑琛屾斂澶勭綒璁板綍鏄惁瀛樺湪锛屽彲闅忔椂琛ュ厖
-        baseCheckItem('琛屾斂澶勭綒', '', () => {
-          // complaintApi.fetchPunishment();
-        })
+        baseCheckItem('琛屾斂澶勭綒', '')
       ]
     };
   },
@@ -223,6 +234,7 @@
   methods: {
     // 璺宠浆涓嬩竴姝�
     nextStep() {
+      this.$emit('change', this.checkResults);
       this.$emit('update:modelValue', this.modelValue + 1);
     },
     // 璺宠浆涓婁竴姝�
@@ -252,7 +264,7 @@
       //   online: true,
       //   sourceType: v.sourceType
       // };
-      this.areaInfo = value
+      this.areaInfo = value;
 
       this.checkResults.forEach((e) => {
         e.fetch();

--
Gitblit v1.9.3