|
|
|
|
@ -6,7 +6,8 @@ |
|
|
|
|
<div class="close_act" @click="infoShow = false" title="关闭">x</div> |
|
|
|
|
<div class="base_info"> |
|
|
|
|
<div>{{ infoWindowObj.carNo }}</div> |
|
|
|
|
<div :class="infoWindowObj.obj.SbcStatus == 3 ? 'car_status on' : 'car_status'">{{ locationStatus[infoWindowObj.obj.SbcStatus] }}</div> |
|
|
|
|
<div :class="infoWindowObj.obj.SbcStatus == 3 ? 'car_status on' : 'car_status'">{{ |
|
|
|
|
locationStatus[infoWindowObj.obj.SbcStatus] }}</div> |
|
|
|
|
<div class="car_speed">{{ infoWindowObj.obj.spd }}km/h</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="flex_box"> |
|
|
|
|
@ -18,7 +19,7 @@ |
|
|
|
|
<div>{{ infoWindowObj.obj.GPSTimeStamp }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="path_box"> |
|
|
|
|
<div class="path_btn">行程轨迹</div> |
|
|
|
|
<div @click="queryPath(infoWindowObj.deviceId)" class="path_btn">行程轨迹</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
@ -73,6 +74,10 @@ export default { |
|
|
|
|
var point = new BMap.Point(118.880278, 35.649947); |
|
|
|
|
this.infoShow = false; |
|
|
|
|
this.baiduMap.centerAndZoom(point, 11); |
|
|
|
|
if (this.polyline) { |
|
|
|
|
this.baiduMap.removeOverlay(this.polyline); |
|
|
|
|
this.polyline = null; |
|
|
|
|
} |
|
|
|
|
// this.baiduMap.closeInfoWindow(); |
|
|
|
|
}, |
|
|
|
|
initMap() { |
|
|
|
|
@ -84,6 +89,8 @@ export default { |
|
|
|
|
this.baiduMap = new BMap.Map('container'); |
|
|
|
|
this.baiduMap.centerAndZoom(point, 11); |
|
|
|
|
this.baiduMap.enableScrollWheelZoom(true); |
|
|
|
|
// var opts = { type: BMAP_NAVIGATION_CONTROL_SMALL } |
|
|
|
|
// this.baiduMap.addControl(new BMap.NavigationControl(opts)); |
|
|
|
|
this.baiduMap.setMapStyle({ style: 'midnight' }); |
|
|
|
|
// this.baiduMap.setMapStyleV2({ |
|
|
|
|
// styleJson: styleJson |
|
|
|
|
@ -190,7 +197,7 @@ export default { |
|
|
|
|
// }) |
|
|
|
|
this.markList.push(marker); |
|
|
|
|
res.Data.GPSTimeStamp = res.Data.GPSTimeStamp.replace("T", " "); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// let sContent = `<div style="width:3.57rem;font-size:0.14rem;line-height:0.22rem;padding:0 0.05rem 0 0.1rem;"> |
|
|
|
|
// <div id="close_${deviceId}" style="display:inline-block;color:#fff;font-size:0.16rem;font-weight:bold;width:0.18rem;line-height:0.18rem;cursor:pointer;text-align:center;float:right;">x</div> |
|
|
|
|
// <div style="display:flex;align-items:center;margin-bottom:0.15rem;font-style: italic;font-size:0.2rem;font-family: FZSK;"> |
|
|
|
|
@ -214,6 +221,7 @@ export default { |
|
|
|
|
// }); |
|
|
|
|
marker.addEventListener('click', () => { |
|
|
|
|
this.infoWindowObj = { |
|
|
|
|
deviceId: deviceId, |
|
|
|
|
carNo: carNo, |
|
|
|
|
obj: res.Data, |
|
|
|
|
position: res2.Data |
|
|
|
|
@ -239,6 +247,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//昨日轨迹 |
|
|
|
|
queryPath(deviceId) { |
|
|
|
|
this.infoShow = false; |
|
|
|
|
let now = new Date(); |
|
|
|
|
let yesterDay1 = now.setDate(now.getDate() - 1); |
|
|
|
|
let yesterDay2 = now.setDate(now.getDate() - 1); |
|
|
|
|
@ -361,7 +370,7 @@ export default { |
|
|
|
|
border-radius: 100px; |
|
|
|
|
font-size: 0.16rem; |
|
|
|
|
padding: 0.04rem 0; |
|
|
|
|
margin-left:0.15rem; |
|
|
|
|
margin-left: 0.15rem; |
|
|
|
|
|
|
|
|
|
&.on { |
|
|
|
|
color: #ffffff; |
|
|
|
|
@ -378,7 +387,7 @@ export default { |
|
|
|
|
.flex_box { |
|
|
|
|
display: flex; |
|
|
|
|
padding: 0 0.2rem; |
|
|
|
|
margin-bottom:0.1rem; |
|
|
|
|
margin-bottom: 0.1rem; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.path_box { |
|
|
|
|
|