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" > +