From de7390c66ef3e3fe316e804495a78d05a01f0160 Mon Sep 17 00:00:00 2001 From: yangdelong <828900aaa> Date: 星期六, 29 五月 2021 18:39:00 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/develop' into develop --- src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue index 33bf401..709627b 100644 --- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue +++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue @@ -18,8 +18,8 @@ <!-- </el-pagination>--> </el-row> </el-scrollbar> - <el-row> - <el-button type="primary" @click="confirm" style="text-align: right">纭</el-button> + <el-row style="text-align: right"> + <el-button type="primary" @click="confirm">纭</el-button> </el-row> </div> </template> @@ -37,11 +37,12 @@ return { // 鐐瑰嚮瀹氫綅缁戝畾鏁版嵁 clickLocation: '', - searchList: [] + searchList: [], + marker: null } }, methods: { - // 鑾峰緱鐒︾偣 杩涜瀹氫綅 + // 鎼滅储瀹氫綅 focusLocation () { // console.log(this.clickLocation) // console.log(window.map.getZoom()) @@ -75,6 +76,7 @@ // } // } }) + this.clickLocation = '' }, // 鐐瑰嚮瀹氫綅 locationMapClick (val) { @@ -87,7 +89,7 @@ // iconSize: 16 // }) const htmls = '<div><ul><li>' + val.name + '</li> <br/> <li>' + val.address + '</li> <br/> <li>' + val.phone + '</li></ul></div>' - const marker = window.L.marker([ps[1], ps[0]], { + this.marker = window.L.marker([ps[1], ps[0]], { icon: window.L.icon({ iconUrl: iconUrl, iconSize: [30, 30], @@ -102,16 +104,17 @@ sticky: true, className: '' }) - window.map.addLayer(marker) + window.map.addLayer(this.marker) window.map.setView([ps[1], ps[0]], 17) pulseEffect([ps[1], ps[0]]) }, // 鐐瑰嚮纭鎸夐挳浜嬩欢 confirm () { - // 閫氳繃瀛愮粍浠跺悜鐖剁粍浠朵紶閫掓暟鎹� - // this.$emit('locationClick', this.LongLatPos) + window.mapManager.clearHighlight() + window.map.removeLayer(this.marker) + this.searchList = [] + this.clickLocation = '' eventBus.$emit('location-setChange', true) - // console.log('鎼滅储瀹氫綅') } } } -- Gitblit v1.8.0