Commit b4ed3c04 authored by yj8888s's avatar yj8888s

弹窗bug

parent 56b6a5df
......@@ -150,7 +150,7 @@ export default {
bounds: [],
situationTimeVal: "",
loading: true,
selectVehicle: null,
selectVehicles: {},
boxesShow: true,
crossDetailData: null,
currentCheck: "first",
......@@ -861,7 +861,7 @@ export default {
mapTools.addOrUpdateWave(map, turf.featureCollection(features));
},
// 转换轨迹数据为geo 并更新轨迹图层
updateSelectVehcleTrack() {
updateSelectVehicleTrack() {
let trackFeatures = []
for (let key in this.highLightCarTracks) {
if (this.highLightCarTracks[key].lnglat.length > 1) {
......@@ -876,8 +876,8 @@ export default {
if (e.detail.selected) {
setTimeout(() => {
popupVises[e.detail.userData.data.id] = true
this.selectVehicle = e.detail.userData.data;
this.addCheckDetail(this.selectVehicle);
this.selectVehicles[e.detail.userData.data.id] = e.detail.userData.data;
this.addCheckDetail(this.selectVehicles[e.detail.userData.data.id]);
}, 0);
}
},
......@@ -1008,13 +1008,14 @@ export default {
let allData = this.diff(this.lastLocation, msg);
for (let item of allData) {
// 如果选中车辆存在 则弹窗更新 否则删除弹窗
if (this.selectVehicle && item.id === this.selectVehicle.id) {
if (this.selectVehicles[item.id]) {
if (["add", "com"].includes(item.dill)) {
if (popupVises[`popup${item.id}`]) {
this.addCheckDetail(item);
}
} else {
vehiclePopups[`popup${item.id}`]?.remove();
delete this.selectVehicles[item.id]
}
}
// 超限车辆弹窗判断 todo
......@@ -1121,7 +1122,7 @@ export default {
}
}
}
this.updateSelectVehcleTrack()
this.updateSelectVehicleTrack()
this.updateOverCarLnglat()
this.lastLocation = msg;
}
......@@ -1132,18 +1133,18 @@ export default {
const features = map.queryRenderedFeatures(e.point, {
layers: ["vehicle"],
});
this.layerClick(features);
// this.layerClick(features);
},
vehiclePicClick(e) {
const features = map.queryRenderedFeatures(e.point, {
layers: ["vehiclePic"],
});
this.layerClick(features);
},
layerClick(features) {
let prop = features[0].properties;
this.selectVehicle = prop;
// this.layerClick(features);
},
// layerClick(features) {
// let prop = features[0].properties;
// this.selectVehicle = prop;
// },
hideTb() {
if (window.tb) {
for (let key in vehicleModels) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment