Commit c3799d06 by 张杰

修复bug

1 parent c1075304
......@@ -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'
......@@ -359,8 +361,14 @@ MapService.prototype = {
// wifi数据
wifiBtn && (wifiBtn.onclick = function (e) {
if (info.wifiLocation && info.wifiLocation.elng) {
infoDiv.querySelector('[data-transferAddress]').textContent = info.wifiLocation.transferAddress;
infoDiv.querySelector('[data-time]').textContent = info.wifiLocation.time;
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()
......
......@@ -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!