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

---
 src/container/Map/Map.vue |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/container/Map/Map.vue b/src/container/Map/Map.vue
index 85117c2..0b2c9b4 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-16 00:19:18
+ * @LastEditTime: 2024-01-16 01:03:35
  * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/Map/Map.vue
 -->
 <template>
@@ -38,7 +38,7 @@
                                 :rowspan="v.rowspan" :colspan="v.colspan" :key="v.rowIndex + '-' + v.colIndex">
                                 <img @click="addDevice($event,v)" @mousedown="e => e.stopPropagation()" v-if="v.type ===2 && status!==2 && !v.id" src="./img/+.png" alt="娣诲姞鏈哄簥" title="娣诲姞鏈哄簥">
                                 <Device v-if="v.id" :id="v.id" style="width: 100%;height: 100%;" :deviceList="deviceList"
-:plantDeviceList="plantDeviceList"></Device>
+:plantDeviceList="plantDeviceList" ::info="info"></Device>
                             </td>
                         </tr>
                     </table>
@@ -46,7 +46,7 @@
             </div>
         </div>
         <el-dialog
-        :title="娣诲姞璁惧"
+        title="娣诲姞璁惧"
         :close-on-click-modal="false"
         width="20%"
         :visible.sync="addStatus">
@@ -182,6 +182,15 @@
         id (val) {
             if (!val) {
                 this.map = []
+            }else {
+                // getRequest('machineList',{plantId: val}).then(res => {
+                //         this.plantDeviceList = res.list.map(item => {
+                //             return {
+                //                 machineId: item.id,
+                //                 machineName: item.machineName
+                //             }
+                //         }) || []
+                //     })
             }
         },
         currentMap: {
@@ -266,7 +275,7 @@
         contextmenu(e) {
             console.log(e)
             if(this.status ===2) return
-            if (!this.range.x) return
+            if (this.range.x === undefined) return
             // if (this.range.x !=='') return 
             e.preventDefault()
             e.stopPropagation()
@@ -361,6 +370,7 @@
         addDevice (e,v) {
             e.stopPropagation()
             this.addStatus = true
+            this.deviceId = ''
             this.currentAdd =  v
         },
         del () {

--
Gitblit v1.9.3