From 54c402021a8aa0bd4454797c0583b2a1ff254ff4 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Wed, 24 Aug 2022 14:45:55 +0800
Subject: [PATCH] 首页地图地块点击事件
---
src/components/map/index.vue | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index 422fd13..4b39bbc 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -244,9 +244,9 @@
// })
},
/**
- * 添加农场点及范围的方法
+ * 添加基地点及范围的方法
* @param {*} positions 位置信息(范围信息)
- * @param {*} item 农场对应的所有信息(接口返回的数据)
+ * @param {*} item 基地对应的所有信息(接口返回的数据)
*/
addPolygon (positions, item) {
const that = this
@@ -317,11 +317,17 @@
polygon.setStyle({
material: global.DC.Namespace.Cesium.Color.fromBytes(
129, 255, 84,
- 200
+ 400
)
})
polygon.on(global.DC.MouseEventType.CLICK, (e) => {
+ polygon.setStyle({
+ material: global.DC.Namespace.Cesium.Color.fromBytes(
+ 129, 255, 0,
+ 200
+ )
+ })
that.$parent.plotDetailsPopupShow(e.overlay.attrParams)
})
@@ -400,7 +406,7 @@
/**
* 设置中心点
- * @param {*} name 对应站点(农场范围)的中心点 --- 对应的名字
+ * @param {*} name 对应站点(基地范围)的中心点 --- 对应的名字
*/
setCenter (name) {
let center
@@ -412,7 +418,7 @@
if (center == '') {
this.$message({
- message: '当前农场暂未绘制',
+ message: '当前基地暂未绘制',
type: 'warning'
})
return
@@ -523,12 +529,12 @@
}
return centerLonLat
},
- // 隐藏农场标记图层
+ // 隐藏基地标记图层
hiddenFarmLayer () {
farmLogoLayer.show = false
farmRegionLayer.show = false
},
- // 显示农场标记图层
+ // 显示基地标记图层
showFarmLayer () {
farmLogoLayer.show = true
farmRegionLayer.show = true
--
Gitblit v1.9.3