更新历史轨迹列表数据3
parent
7ffaff98c6
commit
de3fa3c423
|
@ -16,6 +16,7 @@ export default {
|
||||||
startTime:null,
|
startTime:null,
|
||||||
endTime:null
|
endTime:null
|
||||||
},
|
},
|
||||||
|
arr:[],
|
||||||
lineArr: [
|
lineArr: [
|
||||||
// [116.478935,39.997761],
|
// [116.478935,39.997761],
|
||||||
// [116.478939,39.997825],
|
// [116.478939,39.997825],
|
||||||
|
@ -54,7 +55,6 @@ export default {
|
||||||
},
|
},
|
||||||
getList(){
|
getList(){
|
||||||
getList().then(res=>{
|
getList().then(res=>{
|
||||||
console.log(res)
|
|
||||||
this.historyList = res.data
|
this.historyList = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -63,8 +63,12 @@ export default {
|
||||||
this.recordCar.startTime = recordCar.startTime
|
this.recordCar.startTime = recordCar.startTime
|
||||||
this.recordCar.endTime = recordCar.endTime
|
this.recordCar.endTime = recordCar.endTime
|
||||||
historyMap(this.recordCar).then(res=>{
|
historyMap(this.recordCar).then(res=>{
|
||||||
console.log(res)
|
console.log(res.data)
|
||||||
this.lineArr = res.data
|
res.data.forEach(item=>{
|
||||||
|
this.arr[0] = item.longitude
|
||||||
|
this.arr[1] = item.latitude
|
||||||
|
this.lineArr.push(this.arr)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.initMap()
|
this.initMap()
|
||||||
|
|
Loading…
Reference in New Issue