Commit 719103d4 by 张杰

v1.6.0版本需求

1 parent 4d2a0d6c
...@@ -61,15 +61,30 @@ MapService.prototype = { ...@@ -61,15 +61,30 @@ MapService.prototype = {
if (info.type == 2) { if (info.type == 2) {
msg = '定位' msg = '定位'
} }
let _html = `<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>`
// 是否包含断电、光感报警
if (info.alarmTypeSet && info.alarmTypeSet.length > 0) {
let tg = '';
let cHmtl = ''
let typeList = {
1: '断电',
99: '光感'
}
info.alarmTypeSet.forEach((alarmType) => {
tg += `<a class="btn_danger">${typeList[alarmType]}</a>`
});
cHmtl = '<p><i class="icon icon-info_device_alarm"></i><span>报警状态:</span>' + tg + '</p>';
_html += cHmtl
}
return `<h3 class="map-infowindow-title">${info.name}/${info.standNo}</h3> _html += `<p><i class="icon icon-info_time"></i>${msg}时间: <span class="des"data-time>${info.time}</span></p>
<div class="map-infowindow-ct"> <p style="display:${info.bsLng ? 'flex' : 'none'}"><i class="icon icon-info_type"></i>定位类型: <a class="locate-btn active" id="locateTypeGps">GPS</a><a class="locate-btn" id="locateTypeBase">基站</a></p>
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">${info.sn} (${info.source == 1 ? '有线' : '无线'})</span></p> <p class="long_p"><i class="icon icon-info_location"></i><span>${msg}地址:</span><span class="des" data-transferAddress>${info.address}</span></p>
<p><i class="icon icon-info_device_alarm"></i><span>报警状态:</span><a class="btn_danger">光感</a><a class="btn_danger">断电</a> </p> </div>`;
<p><i class="icon icon-info_time"></i>${msg}时间: <span class="des"data-time>${info.time}</span></p> return _html
<p style="display:${info.bsLng ? 'flex' : 'none'}"><i class="icon icon-info_type"></i>定位类型: <a class="locate-btn active" id="locateTypeGps">GPS</a><a class="locate-btn" id="locateTypeBase">基站</a></p>
<p class="long_p"><i class="icon icon-info_location"></i><span>${msg}地址:</span><span class="des" data-transferAddress>${info.address}</span></p>
</div>`
}, },
// 位置点弹框 // 位置点弹框
...@@ -140,7 +155,7 @@ MapService.prototype = { ...@@ -140,7 +155,7 @@ MapService.prototype = {
}, },
// 打开激活位置点弹框 // 打开激活位置点弹框
openActiveInfoWindow(map,makers, infoWindow) { openActiveInfoWindow(map, makers, infoWindow) {
const MAP = map const MAP = map
const lnglat = makers.getPosition() const lnglat = makers.getPosition()
infoWindow.open(MAP, lnglat) infoWindow.open(MAP, lnglat)
......
...@@ -812,6 +812,8 @@ export default { ...@@ -812,6 +812,8 @@ export default {
// 定位类型 // 定位类型
oParams.type = 2; oParams.type = 2;
oParams.alarmTypeSet = row.alarmTypeSet || [];
return oParams; return oParams;
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!