From 9983b8634a8689f2daee0433f01cfbce9cf5a79a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 16 Jul 2022 08:46:59 +0800
Subject: [PATCH] 设备

---
 src/components/map/index.vue |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index 8bde44f..906da51 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -212,7 +212,7 @@
         },
 
         addPlotPolygon (positions, item) {
-            // const that = this
+            const that = this
 
             const center = this.getCenter(positions)
 
@@ -233,12 +233,18 @@
             // })
 
             const polygon = new global.DC.Polygon(positions)
+            polygon.attrParams = item
             polygon.setStyle({
                 material: global.DC.Namespace.Cesium.Color.fromBytes(
                     129, 255, 84,
                     200
                 )
             })
+
+            polygon.on(global.DC.MouseEventType.CLICK, (e) => {
+                that.$parent.plotDetailsPopupShow(e.overlay.attrParams)
+            })
+
             plotRegionLayer.addOverlay(polygon)
             addPlotLayers.push({ center, name: item.landName })
         },

--
Gitblit v1.9.3