fix:大屏修改查看详情弹窗,增加地图取消选择事件,病害巡检今日巡查修改

This commit is contained in:
2024-11-21 11:52:44 +08:00
parent 98ff8d75ec
commit 0a090e70d8
4 changed files with 134 additions and 55 deletions
+9 -3
View File
@@ -123,6 +123,7 @@ export default {
drawMarkers: [],
// 当前地图层级
sendZoom: "",
selectSingClick: null,
};
},
watch: {
@@ -268,9 +269,9 @@ export default {
this.$emit("map-moveend", zoom);
});
// 图层选择事件
let selectSingClick = new Select({ style: null });
map.addInteraction(selectSingClick);
selectSingClick.on("select", (e) => {
this.selectSingClick = new Select({ style: null });
map.addInteraction(this.selectSingClick);
this.selectSingClick.on("select", (e) => {
this.$emit("feature-select", e);
// let selectedFeatures = e.selected;
// if (selectedFeatures.length > 0) {
@@ -305,6 +306,11 @@ export default {
this.instance.set("map", map);
this.instance.set("overlay-list", []);
},
/* 删除图层选择对象 */
removeSelectClick() {
this.selectSingClick.getFeatures().clear();
},
/* 绘制地图 */
drawMap() {
if (this.drawMarkers.length < 1) {