Commit edc37b0b by 前端

Merge branch 'develop' into 'master'

v1.7.1版本需求已上线,现需合并代码到master

See merge request !21
2 parents 5d590cae 2921333f
......@@ -543,4 +543,16 @@
color: #606266;
}
}
}
.fence_btn_grey,.history_btn_grey,.resident_btn_grey {
border: 1px solid #d8d8d8 !important;
color: #999 !important;
background: #f2f2f2 !important;
&:hover {
border: 1px solid #d8d8d8 !important;
color: #999 !important;
background: #f2f2f2 !important;
}
}
\ No newline at end of file
......@@ -256,7 +256,7 @@ MapService.prototype = {
EventBus.$emit('uiMap.copySuccess');
});
clipboard.on('error', function (e) {
});
if (isInfoOpen) {
......@@ -283,7 +283,7 @@ MapService.prototype = {
var statusArr = ['行驶中', '静止', '离线', '在线']
if (info.status === 2) {
infoDiv.querySelector('[data-status]').textContent = `${statusArr[info.status]} | 已离线${info.statusTime}`;
infoDiv.querySelector('[data-status]').textContent = `${statusArr[info.status]} | 已离线${info.statusTime && info.statusTime != null?info.statusTime:''}`;
} else {
infoDiv.querySelector('[data-status]').textContent = statusArr[info.status];
}
......@@ -313,6 +313,7 @@ MapService.prototype = {
baseBtn && baseBtn.classList.remove('el-button--primary');
}
// 基站
baseBtn && (baseBtn.onclick = function (e) {
if (info.eLocateType === 'bsLocation') return;
info.eLocateType = 'bsLocation'
......@@ -334,6 +335,7 @@ MapService.prototype = {
self.setFitView()
})
// gps
gpsBtn && (gpsBtn.onclick = function (e) {
if (info.eLocateType === 'gpsLocation') return;
info.eLocateType = 'gpsLocation'
......@@ -355,12 +357,23 @@ MapService.prototype = {
self.setFitView()
})
wifiBtn && (wifiBtn.onclick = function (e) {
//infoDiv.querySelector('[data-transferAddress]').textContent = eLocation.transferAddress;
//infoDiv.querySelector('[data-time]').textContent = eLocation.time;
EventBus.$emit('uiMap.monitor.wifiLocate', { info, infoDiv, gpsBtn, baseBtn, wifiBtn })
self.setFitView()
// wifi数据
wifiBtn && (wifiBtn.onclick = function (e) {
if (info.wifiLocation && info.wifiLocation.elng) {
console.log(info)
if (info.eLocateType === 'wifiLocation') return;
info.eLocateType = 'wifiLocation'
gpsBtn && gpsBtn.classList.remove('el-button--primary');
wifiBtn && wifiBtn.classList.add('el-button--primary');
baseBtn && baseBtn.classList.remove('el-button--primary');
infoDiv.querySelector('[data-transferAddress]').textContent = info.wifiLocation.address;
infoDiv.querySelector('[data-time]').textContent = info.wifiLocation.dateTime;
EventBus.$emit('uiMap.monitor.changeELocate', info)
EventBus.$emit('uiMap.monitor.drawDone');
self.setFitView()
}
//EventBus.$emit('uiMap.monitor.wifiLocate', { info, infoDiv, gpsBtn, baseBtn, wifiBtn })
})
if (info.alarmTypeSet && info.alarmTypeSet.length) {
......@@ -602,34 +615,28 @@ MapService.prototype = {
<p><i class="icon icon-info_location"></i> 最后上点地址: <span class="des adr" data-transferAddress>${info.transferAddress}</span>
<a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
</p>
<p><i class="icon icon-info_type"></i> 定位类型:
${info.wifiLocation ?
(info.eLocateSingle ?
(info.eLocateType === 'gpsLocation' ?
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button>
</span>`:
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button>
</span>`
) :
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button>
</span>`
) :
info.eLocateSingle ?
(info.eLocateType === 'gpsLocation' ? `<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> ` :
`<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>`) :
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
</span>`
<p><i class="icon icon-info_type"></i> 定位类型:<span class="el-button-group">`
// 是否有gps按钮
if (info.gpsLocation && info.gpsLocation.elng) {
_html += `<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> `
}
// 是否有基站按钮
if (info.bsLocation && info.bsLocation.elng) {
_html += `<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>`
}
// 是否有wifi按钮
if (info.hasWifi) {
if (info.wifiLocation && info.wifiLocation.elng) {
_html += `<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>`
} else {
_html += `<button type="button" class="el-button el-button--mini history_btn_grey" data-wifi>wifi</button>`
}
</p>
}
_html += ` </p>
<p class="redirect-row">
<a class="redirect-btn" id="btn_replay" data-replay>轨迹回放</a>
<a class="redirect-btn" id="btn_fence" data-fence>电子围栏</a>
......
......@@ -95,6 +95,7 @@ const monitor = {
EventBus.$on('uiMap.monitor.changeELocate', (item) => {
const snSourceType = `${item.sn}:${item.isSource}`
let eLocation = item[item.eLocateType];
console.log(eLocation)
if (this.markers[snSourceType]) {
this.markers[snSourceType].setPosition(mapService.getLngLat(parseFloat(eLocation.elng), parseFloat(eLocation.elat)));
this.infowins[snSourceType].setPosition(mapService.getLngLat(parseFloat(eLocation.elng), parseFloat(eLocation.elat)));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!