From de3fa3c423e18184bbf4c1684ed02486b593aca9 Mon Sep 17 00:00:00 2001 From: tangwenkang <2720983602@qq.com> Date: Fri, 1 Dec 2023 15:33:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8E=86=E5=8F=B2=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/vehicle/record.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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()