Commit e5135c47 by 张杰

1111

1 parent c7b85eea
......@@ -53,7 +53,8 @@ export default {
this.mapObj = mapService.init("map");
this.isInitMap = true;
let o = history.state;
if (o.lng) {
console.log(o)
if (o.lng || o.bsLng) {
o.elat = o.lat;
o.elng = o.lng;
this.addLocation(o);
......
......@@ -674,12 +674,23 @@ MapService.prototype = {
// 创建位置点弹框
createActiveInfo(info) {
let msg = '报警'
// 激活
if(info.type == 1){
msg = '激活'
}
// 定位
if(info.type == 2){
msg = '定位'
}
return `<h3 class="map-infowindow-title">${info.name}/${info.standNo}</h3>
<div class="map-infowindow-ct">
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">${info.sn} (${info.source == 1?'有线':'无线'})</span></p>
<p><i class="icon icon-info_time"></i>报警时间: <span class="des"data-time>${info.time}</span></p>
<p><i class="icon icon-info_time"></i>${msg}时间: <span class="des"data-time>${info.time}</span></p>
<div style="display:${info.bsLng?'block':'none'}"><i class="icon icon-info_type"></i>定位类型: <a class="locate-btn active" id="locateTypeGps">GPS</a><a class="locate-btn" id="locateTypeBase">基站</a></div>
<p><i class="icon icon-info_location"></i> 报警地址: <span class="des" data-transferAddress>${info.address}</span></p>
<p><i class="icon icon-info_location"></i> ${msg}地址: <span class="des" data-transferAddress>${info.address}</span></p>
</div>`
},
......@@ -716,6 +727,14 @@ MapService.prototype = {
fillBase()
}
if(info.lng){
fillGPS()
}
if(!info.lng && info.bsLng){
fillBase()
}
return this.createActiveInfoWindow(marker, map, infoDiv)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!