更新历史轨迹列表数据3

master
tangwenkang 2023-12-01 15:33:24 +08:00
parent 7ffaff98c6
commit de3fa3c423
1 changed files with 7 additions and 3 deletions

View File

@ -16,6 +16,7 @@ export default {
startTime:null,
endTime:null
},
arr:[],
lineArr: [
// [116.478935,39.997761],
// [116.478939,39.997825],
@ -54,7 +55,6 @@ export default {
},
getList(){
getList().then(res=>{
console.log(res)
this.historyList = res.data
})
},
@ -63,8 +63,12 @@ export default {
this.recordCar.startTime = recordCar.startTime
this.recordCar.endTime = recordCar.endTime
historyMap(this.recordCar).then(res=>{
console.log(res)
this.lineArr = res.data
console.log(res.data)
res.data.forEach(item=>{
this.arr[0] = item.longitude
this.arr[1] = item.latitude
this.lineArr.push(this.arr)
})
})
this.initMap()