From 5b9a1d6cb3a7d59c8f2de83c495bba1a069b2723 Mon Sep 17 00:00:00 2001
From: gaosp <gaosp>
Date: 星期五, 19 一月 2024 00:23:15 +0800
Subject: [PATCH] update

---
 src/container/workshop/device.vue |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/container/workshop/device.vue b/src/container/workshop/device.vue
index 2d7adad..37dc837 100644
--- a/src/container/workshop/device.vue
+++ b/src/container/workshop/device.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-01-13 20:46:33
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-16 01:08:39
+ * @LastEditTime: 2024-01-17 23:06:46
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/workshop/device.vue
 -->
 <template>
@@ -85,13 +85,17 @@
             return this.info.cycleCount || 0
         },
         machineName () {
+            let machineName = ''
             try {
-                let arr = [...this.deviceList,...this.plantDeviceList]
-                return arr.find(item => item.machineId=== this.id).machineName
-            } catch (error) {
-                return this.id
+                machineName =  this.deviceList.find(item => item.machineId=== this.id).machineName
+            } catch (error) {console.error(error)}
+            try {
+                machineName =  this.plantDeviceList.find(item => item.machineId=== this.id).machineName
+            } catch (error) {console.error(error)}
+            if (machineName) {
+                return machineName
             }
-             
+            return ''
         }
     },
     methods: {

--
Gitblit v1.9.3