From b5e596e670ecb194157436b61e1ffd635e1130f7 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期六, 29 五月 2021 17:20:18 +0800
Subject: [PATCH] 企业应急-事件上报-管段定位修改
---
src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue
index 091d523..96388b5 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationPoint.vue
@@ -35,7 +35,8 @@
LongLatPos: {
longPos: '',
latPos: ''
- }
+ },
+ marker: null
}
},
methods: {
@@ -48,14 +49,14 @@
// console.log(as)
window.map.setView(as, 17)
pulseEffect(as)
- const marker = window.L.marker(as, {
+ this.marker = window.L.marker(as, {
icon: window.L.icon({
iconUrl: iconUrl,
iconSize: [30, 30],
iconAnchor: [15, 15]
})
})
- window.map.addLayer(marker)
+ window.map.addLayer(this.marker)
window.map.off('click')
})
},
@@ -65,19 +66,21 @@
// console.log(as)
window.map.setView(as, 17)
pulseEffect(as)
- const marker = window.L.marker(as, {
+ this.marker = window.L.marker(as, {
icon: window.L.icon({
iconUrl: iconUrl,
iconSize: [30, 30],
iconAnchor: [15, 15]
})
})
- window.map.addLayer(marker)
+ window.map.addLayer(this.marker)
this.LongLatPos.latPos = ''
this.LongLatPos.longPos = ''
},
// 鐐瑰嚮纭鎸夐挳浜嬩欢
confirm () {
+ window.mapManager.clearHighlight()
+ window.map.removeLayer(this.marker)
eventBus.$emit('location-setChange', true)
this.LongLatPos.longPos = ''
this.LongLatPos.latPos = ''
--
Gitblit v1.8.0