From a359332dbd9fbedee6db289a8dfcf1986d8639b1 Mon Sep 17 00:00:00 2001
From: gaosp <gaosp>
Date: 星期一, 29 一月 2024 23:52:16 +0800
Subject: [PATCH] update

---
 src/container/Map/Map.vue |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/container/Map/Map.vue b/src/container/Map/Map.vue
index 8f5a424..0803634 100644
--- a/src/container/Map/Map.vue
+++ b/src/container/Map/Map.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2024-01-05 23:47:53
  * @LastEditors: Sneed
- * @LastEditTime: 2024-01-23 21:41:33
+ * @LastEditTime: 2024-01-29 22:46:03
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue
 -->
 <template>
@@ -49,7 +49,7 @@
         </div>
         <el-dialog title="鏀剧疆璁惧" top="94px" :close-on-click-modal="false" width="100%" :visible.sync="addStatus" >
             <el-select class="wkshoplist" clearable v-model="deviceId" placeholder="璇烽�夋嫨">
-                <el-option v-for="item in deviceList" :key="item.machineId" :label="item.machineName"
+                <el-option v-show="!hasPushed.includes(item.machineId)" v-for="item in deviceList" :key="item.machineId" :label="item.machineName"
                     :value="item.machineId">
                 </el-option>
             </el-select>
@@ -133,7 +133,8 @@
             tdMounseDown: false,
             range: { x: '', x1: '', y: '', y1: '' },
             currentAdd: {},
-            colgroups: []
+            colgroups: [],
+            hasPushed: [],
         }
     },
     watch: {
@@ -368,6 +369,15 @@
         addDevice(e, v) {
             e.stopPropagation()
             this.addStatus = true
+            let hasPushed = []
+            this.map.forEach(item  => {
+                item.forEach(v =>  {
+                    if (v.id) {
+                        hasPushed.push(v.id)
+                    }
+                })
+            })
+            this.hasPushed = hasPushed
             this.deviceId = ''
             this.currentAdd = v
         },

--
Gitblit v1.9.3