From 682bd4d3b940f2950efbfbb853d5ee29d8010bf2 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 15 Aug 2022 11:36:58 +0800
Subject: [PATCH] 首页的农事操作和农事操作分组以及农资情况跟随农场选择变化
---
src/components/map/plotMap.vue | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/components/map/plotMap.vue b/src/components/map/plotMap.vue
index 0e9d0bc..8f78a7e 100644
--- a/src/components/map/plotMap.vue
+++ b/src/components/map/plotMap.vue
@@ -285,8 +285,10 @@
that.$parent.plotDetailsPopupShow(e.overlay.attrParams)
})
+ console.log(item, 123)
+
plotRegionLayer.addOverlay(polygon)
- addPlotLayers.push({ center, name: item.landName })
+ addPlotLayers.push({ center, name: item.landName, id: item.id })
},
setCenter (name) {
@@ -337,6 +339,20 @@
})
},
+ setPlotAttr (params) {
+ let overLayers = plotRegionLayer.getOverlays()
+
+ overLayers.some(item => {
+
+ if (item.attrParams.id == params.id) {
+ item.attrParams = params
+
+ return true
+ }
+
+ })
+ },
+
// 经纬度测算中心位置
getCenter (arr) {
let centerLonLat = []
--
Gitblit v1.9.3