Commit 54f8d08a authored by ninglx's avatar ninglx

按需求改动超限 & 处理bug

parent b32ec1ee
......@@ -158,7 +158,8 @@ export default {
dict,
activeName: '11',
overData: [
// { "plateNo": "京A895413", "inDirName": "东向西", "type": "105", "timeStamp": "2024-08-27 15:39:18",length:10 },
// { "plateNo": "京A895413", "inDirName": "东向西", "type": "1", "timeStamp": "2024-09-26 14:36:35",length:10 ,globalId:'10551050',videoUrls:['videos/1.mp4']},
// { "plateNo": "京A895413", "inDirName": "东向西", "type": "1", "timeStamp": "2024-09-26 14:36:34",length:10 ,globalId:'10551050',videoUrls:['videos/1.mp4']},
// { "plateNo": "京A895413", "inDirName": "东向西", "type": "105", "timeStamp": "2024-08-27 15:39:18",length:10 },
// { "plateNo": "京A895413", "inDirName": "东向西", "type": "105", "timeStamp": "2024-08-27 15:39:18",length:10 },
// { "plateNo": "京A895413", "inDirName": "东向西", "type": "105", "timeStamp": "2024-08-27 15:39:18",length:10 },
......@@ -236,6 +237,7 @@ export default {
}, 1000 * 10);
this.timers.push(timer3);
// 右下超限列表
// todo
this.getOverData();
let timer4 = setInterval(() => {
this.getOverData();
......@@ -268,7 +270,6 @@ export default {
"globalId": row.globalId, //车辆ID
"overType": row.type, //超限类型
'urls': row.videoUrls,
// 'urls': ['video/1.mp4','video/1.mp4'],
}
if (row.type == '105') {
wsSend.vehicleHeight = row.length
......
......@@ -356,31 +356,27 @@ export default {
callback: this.callCar,
});
socket.ws.onopen = () => {
if (this.backToRealTimer) {
clearTimeout(this.backToRealTimer)
this.backToRealTimer = null
}
this.backToRealTimer = setTimeout(() => {
// vehiclePopups[`popup${id}`]?.remove();
// delete vehiclePopups[`popup${id}`];
// delete this.highLightCarTracks[id]
// delete this.overCarsPoints[id]
// popupVises[`popup${id}`] = false;
this.closeWs('callCar1').then(() => {
this.removeVehiclePopup()
this.overCarsPoints = {}
this.highLightCarTracks = {}
this.openRealTime()
})
this.backToRealTimer = null
}, 1000 * 20)
this.$nextTick(() => {
this.backToRealTimer = setTimeout(() => {
this.closeWs('callCar1').then(() => {
this.removeVehiclePopup()
this.overCarsPoints = {}
this.highLightCarTracks = {}
this.openRealTime()
})
this.backToRealTimer = null
}, 1000 * 20)
})
if (socket.ws.readyState === 1) {
this.sockets.push(socket);
delete this.historyWsToSend.urls
let msg = JSON.stringify(this.historyWsToSend)
socket.ws.send(msg);
// socket.ws.send('{"dataType":"OVER_RUN","timeStamp":"2024-09-13 16:44:30.000","endTime":"2024-09-13 16:44:40.000","globalId":"10552117","vehicleHeight":6,"vehicleWidth":2.55,"overType":1}')
// socket.ws.send('{"dataType":"OVER_RUN","timeStamp":"2024-09-26 14:36:25:316","endTime":"2024-09-26 14:36:35:316","globalId":"10551050","vehicleHeight":6,"vehicleWidth":2.55,"overType":1}')
}
};
},
......@@ -722,27 +718,27 @@ export default {
},
switchfirst() {
lastFrameTime = new Date().getTime();
trackTimer = setInterval(() => {
let currentTime = new Date().getTime();
if (currentTime - lastFrameTime > 60 * 1000) {
if (!noTrackMsg) {
noTrackMsg = ELEMENT.Message({
duration: 0,
message: "暂无轨迹数据...",
customClass: "noTrackMessageDialog",
});
window.tb?.clear(null, true);
window.tb?.update();
this.lastLocation = [];
this.removeLayers("vehiclePic,vehicle,vehicleSelectWave");
}
} else {
if (noTrackMsg) {
noTrackMsg.close();
noTrackMsg = null;
}
}
}, 100);
// trackTimer = setInterval(() => {
// let currentTime = new Date().getTime();
// if (currentTime - lastFrameTime > 60 * 1000) {
// if (!noTrackMsg) {
// noTrackMsg = ELEMENT.Message({
// duration: 0,
// message: "暂无轨迹数据...",
// customClass: "noTrackMessageDialog",
// });
// window.tb?.clear(null, true);
// window.tb?.update();
// this.lastLocation = [];
// this.removeLayers("vehiclePic,vehicle,vehicleSelectWave");
// }
// } else {
// if (noTrackMsg) {
// noTrackMsg.close();
// noTrackMsg = null;
// }
// }
// }, 100);
let arr = this.$store.state.dicts.CrossInfo.map(item => {
[item.longitude, item.latitude] = item.location.split(",")
return item
......@@ -1067,15 +1063,12 @@ export default {
}
// 筛选可见区域
for (let i = 0; i < msg.length; i++) {
// todo
if (!this.showHisVid) msg[i].overRun = null
// 缺失车牌号字段和非机动车类型 把车牌号字段置空
if (!msg[i].picLicense || dict.noVehicleTypes.includes(msg[i].originalType)) {
msg[i].picLicense = "";
}
// if (msg[i].id.toString().includes('120') && new Date().getMinutes() % 2 === 0) {
// msg[i].overRun = {
// overType: '1,2',
// }
// }
let pt = turf.point([msg[i].longitude, msg[i].latitude]);
let poly = turf.polygon(this.bounds);
if (!turf.booleanPointInPolygon(pt, poly)) {
......@@ -1084,12 +1077,10 @@ export default {
}
}
if (msg.length > 0) {
// console.log("车辆总数", msg.length);
// 第一帧 || 时间戳不相同 => 放行
if (msg.length === 1) {
console.log('msg', msg);
// console.log('msg', msg);
}
// if (this.lastLocation.length === 0) {
this.situationTimeVal = msg[0].dateTime;
// zoom 大于 18 : 移除圆点和图片图层
if (zoom >= 18) {
......@@ -1159,11 +1150,13 @@ export default {
}
} else {
delete this.overCarsPoints[item.id]
delete this.highLightCarTracks[item.id]
vehiclePopups[`popup${item.id}`]?.remove();
}
} else {
if (this.overCarsPoints[item.id]) {
delete this.overCarsPoints[item.id]
delete this.highLightCarTracks[item.id]
vehiclePopups[`popup${item.id}`]?.remove();
}
}
......
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