From 6275e6a29e1ece35ff37c5cb166d8b6a4f96e9cd Mon Sep 17 00:00:00 2001 From: SunTao <328867980@qq.com> Date: Mon, 14 Apr 2025 10:16:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=A2=9E=E5=8A=A0=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=9C=B0=E5=9B=BE=E9=80=89=E4=B8=AD=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/map/fssm-map.vue | 14 +++++++++++++- src/views/xj/inspection/map-diease/index.vue | 8 ++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/components/map/fssm-map.vue b/src/components/map/fssm-map.vue index 208a2f2..83e64ff 100644 --- a/src/components/map/fssm-map.vue +++ b/src/components/map/fssm-map.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2024-10-14 10:46:23 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2025-03-31 13:02:21 + * @LastEditTime: 2025-04-14 09:54:46 * @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue * @Description: 公共地图 --> @@ -541,6 +541,18 @@ export default { this.selectSingClick.getFeatures().clear(); }, + /** + * @description: 清除地图上的选中事件 + * @return {void} + */ + clearSelectInteraction() { + if (this.selectSingClick) { + const map = this.instance.get("map"); + map.removeInteraction(this.selectSingClick); + this.selectSingClick = null; + } + }, + /** * @description: 绘制多边形地图 * @return {*} diff --git a/src/views/xj/inspection/map-diease/index.vue b/src/views/xj/inspection/map-diease/index.vue index 221364e..358f67a 100644 --- a/src/views/xj/inspection/map-diease/index.vue +++ b/src/views/xj/inspection/map-diease/index.vue @@ -2,7 +2,7 @@ * @Author: SunTao 328867980@qq.com * @Date: 2025-03-25 11:10:16 * @LastEditors: SunTao 328867980@qq.com - * @LastEditTime: 2025-04-10 17:22:39 + * @LastEditTime: 2025-04-14 09:28:11 * @FilePath: \znxjxt-ui\src\views\xj\inspection\map-diease\index.vue * @Description: 地图展示筛选病害-首页 --> @@ -98,8 +98,8 @@ ref="mapDieaseMap" class="map-diease-map" :maxZoom="24" - @feature-select="featureSelect" > +