|
|
|
|
@ -103,7 +103,7 @@ export default { |
|
|
|
|
<div>时速:${res.Data.spd}km/h</div> |
|
|
|
|
<div>海拔:${res.Data.alt}</div> |
|
|
|
|
<div>ACC检测:${this.locationAcc[res.Data.acc]}</div> |
|
|
|
|
<div style="display: inline-block;border: 1px solid #eee;border-radius: 3px;padding: 3px 8px;color: #0e94eb;cursor: pointer;" id="btnPath_${carInfo.DeviceNumber}">昨日轨迹</div> |
|
|
|
|
<div style="display: inline-block;border: 1px solid #eee;border-radius: 3px;padding: 3px 8px;color: #0e94eb;cursor: pointer;" id="btnPath_${carInfo.DeviceNumber}">行车轨迹</div> |
|
|
|
|
</div>`; |
|
|
|
|
let infoWindow = new BMapGL.InfoWindow(sContent); |
|
|
|
|
// marker添加点击事件 |
|
|
|
|
@ -124,11 +124,10 @@ export default { |
|
|
|
|
queryPath(deviceId) { |
|
|
|
|
let now = new Date(); |
|
|
|
|
let yesterDay1 = now.setDate(now.getDate() - 1); |
|
|
|
|
let yesterDay2 = now.setDate(now.getDate() - 1); |
|
|
|
|
let param = { |
|
|
|
|
"Imei": deviceId, |
|
|
|
|
"StartTime": dateFormat(new Date(yesterDay2), 'yyyy-MM-dd'), |
|
|
|
|
"EndTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'), |
|
|
|
|
"StartTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'), |
|
|
|
|
"EndTime": dateFormat(new Date(), 'yyyy-MM-dd'), |
|
|
|
|
"MaxValue": 500 |
|
|
|
|
} |
|
|
|
|
lunzApi.getLocationsByImei(this.key, param).then(res => { |
|
|
|
|
@ -142,16 +141,21 @@ export default { |
|
|
|
|
} |
|
|
|
|
// this.polyline = new BMapGL.Polyline(point, { strokeColor: '#F5533D', strokeWeight: 2, strokeOpacity: 1, }) |
|
|
|
|
// this.baiduMap.addOverlay(this.polyline); |
|
|
|
|
this.polyline = new BMapGL.Polyline(point,{ |
|
|
|
|
strokeColor: '#F5533D', |
|
|
|
|
strokeWeight: 3, |
|
|
|
|
strokeOpacity: 1, |
|
|
|
|
this.polyline = new BMapGL.Polyline(point, { |
|
|
|
|
strokeColor: '#F5533D', |
|
|
|
|
strokeWeight: 3, |
|
|
|
|
strokeOpacity: 1, |
|
|
|
|
}); |
|
|
|
|
let trackAni = new BMapGLLib.TrackAnimation(this.baiduMap, this.polyline, { |
|
|
|
|
overallView: true, |
|
|
|
|
tilt: 30, |
|
|
|
|
duration: 20000, |
|
|
|
|
delay: 300 |
|
|
|
|
overallView: true, |
|
|
|
|
tilt: 30, |
|
|
|
|
duration: 20000, |
|
|
|
|
delay: 300 |
|
|
|
|
}, error => { |
|
|
|
|
this.$message({ |
|
|
|
|
message: '未查询到今日行车轨迹', |
|
|
|
|
type: 'warning' |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
trackAni.start(); |
|
|
|
|
}) |
|
|
|
|
|