Commit c3799d06 by 张杰

修复bug

1 parent c1075304
...@@ -313,6 +313,7 @@ MapService.prototype = { ...@@ -313,6 +313,7 @@ MapService.prototype = {
baseBtn && baseBtn.classList.remove('el-button--primary'); baseBtn && baseBtn.classList.remove('el-button--primary');
} }
// 基站
baseBtn && (baseBtn.onclick = function (e) { baseBtn && (baseBtn.onclick = function (e) {
if (info.eLocateType === 'bsLocation') return; if (info.eLocateType === 'bsLocation') return;
info.eLocateType = 'bsLocation' info.eLocateType = 'bsLocation'
...@@ -334,6 +335,7 @@ MapService.prototype = { ...@@ -334,6 +335,7 @@ MapService.prototype = {
self.setFitView() self.setFitView()
}) })
// gps
gpsBtn && (gpsBtn.onclick = function (e) { gpsBtn && (gpsBtn.onclick = function (e) {
if (info.eLocateType === 'gpsLocation') return; if (info.eLocateType === 'gpsLocation') return;
info.eLocateType = 'gpsLocation' info.eLocateType = 'gpsLocation'
...@@ -359,8 +361,14 @@ MapService.prototype = { ...@@ -359,8 +361,14 @@ MapService.prototype = {
// wifi数据 // wifi数据
wifiBtn && (wifiBtn.onclick = function (e) { wifiBtn && (wifiBtn.onclick = function (e) {
if (info.wifiLocation && info.wifiLocation.elng) { if (info.wifiLocation && info.wifiLocation.elng) {
infoDiv.querySelector('[data-transferAddress]').textContent = info.wifiLocation.transferAddress; console.log(info)
infoDiv.querySelector('[data-time]').textContent = info.wifiLocation.time; 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.changeELocate', info)
EventBus.$emit('uiMap.monitor.drawDone'); EventBus.$emit('uiMap.monitor.drawDone');
self.setFitView() self.setFitView()
......
...@@ -95,6 +95,7 @@ const monitor = { ...@@ -95,6 +95,7 @@ const monitor = {
EventBus.$on('uiMap.monitor.changeELocate', (item) => { EventBus.$on('uiMap.monitor.changeELocate', (item) => {
const snSourceType = `${item.sn}:${item.isSource}` const snSourceType = `${item.sn}:${item.isSource}`
let eLocation = item[item.eLocateType]; let eLocation = item[item.eLocateType];
console.log(eLocation)
if (this.markers[snSourceType]) { if (this.markers[snSourceType]) {
this.markers[snSourceType].setPosition(mapService.getLngLat(parseFloat(eLocation.elng), parseFloat(eLocation.elat))); this.markers[snSourceType].setPosition(mapService.getLngLat(parseFloat(eLocation.elng), parseFloat(eLocation.elat)));
this.infowins[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!