Commit f638ea8b authored by 耿迪迪's avatar 耿迪迪

轨迹时间展示 gengdidi

parent 00274a32
...@@ -424,6 +424,7 @@ export default { ...@@ -424,6 +424,7 @@ export default {
} }
getVehicleLocations(this.backForm).then(res =>{ getVehicleLocations(this.backForm).then(res =>{
let paths = []; let paths = [];
let times = [];
if(res.data.length == 1){ if(res.data.length == 1){
this.$message({ this.$message({
message: '抱歉当前车辆只能查看位置信息,无法形成轨迹!', message: '抱歉当前车辆只能查看位置信息,无法形成轨迹!',
...@@ -436,10 +437,11 @@ export default { ...@@ -436,10 +437,11 @@ export default {
}); });
}else{ }else{
res.data.forEach(item => { res.data.forEach(item => {
paths.push([item.longitude,item.latitude]); paths.push([item.longitude,item.latitude]);
}) times.push(item.reportTime)
this.map.backTrack(this.backForm.vehicleId,paths); })
this.backOpen = false; this.map.backTrack(this.backForm.vehicleId,paths,times);
this.backOpen = false;
} }
}) })
......
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