diff --git a/src/views/vehicle/record.vue b/src/views/vehicle/record.vue index fff6721..e9f962a 100644 --- a/src/views/vehicle/record.vue +++ b/src/views/vehicle/record.vue @@ -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()