|
|
|
|
@ -91,18 +91,11 @@ export default { |
|
|
|
|
this.baiduMap.addOverlay(marker); |
|
|
|
|
this.markList.push(marker); |
|
|
|
|
let sContent = `<div style="padding:0 10px 10px;font-size:14px;line-height:22px;"> |
|
|
|
|
<div>车主:${carInfo.UserName}</div> |
|
|
|
|
<div>车牌号:${carInfo.PlateNumber}</div> |
|
|
|
|
<div>设备号:${res.Data.IMEI}</div> |
|
|
|
|
<div>车架号:${carInfo.VinNumber}</div> |
|
|
|
|
<div>设备位置:${res2.Data}</div> |
|
|
|
|
<div>定位方式:${this.locationModel[res.Data.LocateMode]}</div> |
|
|
|
|
<div>最后定位时间:${res.Data.GPSTimeStamp.replace("T", " ")}</div> |
|
|
|
|
<div>最后检测时间:${res.Data.LastTimeStamp.replace("T", " ")}</div> |
|
|
|
|
<div>状态:${this.locationStatus[res.Data.SbcStatus]}</div> |
|
|
|
|
<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>`; |
|
|
|
|
let infoWindow = new BMapGL.InfoWindow(sContent); |
|
|
|
|
@ -124,10 +117,11 @@ 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(yesterDay1), 'yyyy-MM-dd'), |
|
|
|
|
"EndTime": dateFormat(new Date(), 'yyyy-MM-dd'), |
|
|
|
|
"StartTime": dateFormat(new Date(yesterDay2), 'yyyy-MM-dd'), |
|
|
|
|
"EndTime": dateFormat(new Date(yesterDay1), 'yyyy-MM-dd'), |
|
|
|
|
"MaxValue": 500 |
|
|
|
|
} |
|
|
|
|
lunzApi.getLocationsByImei(this.key, param).then(res => { |
|
|
|
|
@ -139,25 +133,25 @@ export default { |
|
|
|
|
this.baiduMap.removeOverlay(this.polyline); |
|
|
|
|
this.polyline = null; |
|
|
|
|
} |
|
|
|
|
// 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: 5, strokeOpacity: 1, }) |
|
|
|
|
this.baiduMap.addOverlay(this.polyline); |
|
|
|
|
// this.polyline = new BMapGL.Polyline(point, { |
|
|
|
|
// strokeColor: '#F5533D', |
|
|
|
|
// strokeWeight: 5, |
|
|
|
|
// strokeOpacity: 1, |
|
|
|
|
// }); |
|
|
|
|
// let trackAni = new BMapGLLib.TrackAnimation(this.baiduMap, this.polyline, { |
|
|
|
|
// overallView: true, |
|
|
|
|
// tilt: 30, |
|
|
|
|
// duration: 20000, |
|
|
|
|
// delay: 300 |
|
|
|
|
// }); |
|
|
|
|
// trackAni.start(); |
|
|
|
|
}, error => { |
|
|
|
|
this.$message({ |
|
|
|
|
message: '未查询到今日行车轨迹', |
|
|
|
|
type: 'warning' |
|
|
|
|
}); |
|
|
|
|
let trackAni = new BMapGLLib.TrackAnimation(this.baiduMap, this.polyline, { |
|
|
|
|
overallView: true, |
|
|
|
|
tilt: 30, |
|
|
|
|
duration: 20000, |
|
|
|
|
delay: 300 |
|
|
|
|
}, error => { |
|
|
|
|
this.$message({ |
|
|
|
|
message: '未查询到今日行车轨迹', |
|
|
|
|
type: 'warning' |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
trackAni.start(); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
openInfo(infoWindow, pt) { |
|
|
|
|
|