fix:增加线段点击事件

This commit is contained in:
SunTao 2025-01-08 09:32:30 +08:00
parent 8b9b217cec
commit 4371111931
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:46:23
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2025-01-02 16:17:20
* @LastEditTime: 2025-01-07 17:07:28
* @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue
* @Description: 公共地图
-->
@ -428,9 +428,7 @@ export default {
this.$emit("map-moveend", zoom);
});
//
this.selectSingClick = new Select({
style: null,
});
this.selectSingClick = new Select();
map.addInteraction(this.selectSingClick);
this.selectSingClick.on("select", (e) => {
this.$emit("feature-select", e);

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-17 11:34:00
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2025-01-06 11:17:42
* @LastEditTime: 2025-01-08 09:11:29
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
* @Description: 大屏首页
-->
@ -1197,6 +1197,7 @@ export default {
segmentId: element.segmentId,
stakeEnd: element.stakeEnd,
stakeStart: element.stakeStart,
inspectDirection: element.inspectDirection,
},
type: "line",
});
@ -1336,7 +1337,7 @@ export default {
// 线
if (feature.getProperties().type === "line") {
// console.log(feature.get("data"), "线");
// this.drawDefectPoint(feature.get("data"));
this.drawDefectPoint(feature.get("data"));
} else if (feature.getProperties().type === "carPoint") {
console.log(feature, "小车点位");
} else {
@ -1378,6 +1379,7 @@ export default {
// map.getView().setZoom(16);
// });
// this.roadSelect = item.segmentId;
this.shouldLoadClusters = false;
this.getCenterPiont();
},