Commit edc37b0b by 前端

Merge branch 'develop' into 'master'

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

See merge request !21
2 parents 5d590cae 2921333f
...@@ -543,4 +543,16 @@ ...@@ -543,4 +543,16 @@
color: #606266; 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 \ No newline at end of file
...@@ -256,7 +256,7 @@ MapService.prototype = { ...@@ -256,7 +256,7 @@ MapService.prototype = {
EventBus.$emit('uiMap.copySuccess'); EventBus.$emit('uiMap.copySuccess');
}); });
clipboard.on('error', function (e) { clipboard.on('error', function (e) {
}); });
if (isInfoOpen) { if (isInfoOpen) {
...@@ -283,7 +283,7 @@ MapService.prototype = { ...@@ -283,7 +283,7 @@ MapService.prototype = {
var statusArr = ['行驶中', '静止', '离线', '在线'] var statusArr = ['行驶中', '静止', '离线', '在线']
if (info.status === 2) { 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 { } else {
infoDiv.querySelector('[data-status]').textContent = statusArr[info.status]; infoDiv.querySelector('[data-status]').textContent = statusArr[info.status];
} }
...@@ -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'
...@@ -355,12 +357,23 @@ MapService.prototype = { ...@@ -355,12 +357,23 @@ MapService.prototype = {
self.setFitView() self.setFitView()
}) })
wifiBtn && (wifiBtn.onclick = function (e) {
//infoDiv.querySelector('[data-transferAddress]').textContent = eLocation.transferAddress; // wifi数据
//infoDiv.querySelector('[data-time]').textContent = eLocation.time; wifiBtn && (wifiBtn.onclick = function (e) {
EventBus.$emit('uiMap.monitor.wifiLocate', { info, infoDiv, gpsBtn, baseBtn, wifiBtn }) if (info.wifiLocation && info.wifiLocation.elng) {
self.setFitView() 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) { if (info.alarmTypeSet && info.alarmTypeSet.length) {
...@@ -602,34 +615,28 @@ MapService.prototype = { ...@@ -602,34 +615,28 @@ MapService.prototype = {
<p><i class="icon icon-info_location"></i> 最后上点地址: <span class="des adr" data-transferAddress>${info.transferAddress}</span> <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> <a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
</p> </p>
<p><i class="icon icon-info_type"></i> 定位类型: <p><i class="icon icon-info_type"></i> 定位类型:<span class="el-button-group">`
${info.wifiLocation ?
(info.eLocateSingle ? // 是否有gps按钮
(info.eLocateType === 'gpsLocation' ? if (info.gpsLocation && info.gpsLocation.elng) {
`<span class="el-button-group"> _html += `<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-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"> if (info.bsLocation && info.bsLocation.elng) {
<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button> _html += `<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>`
) : // 是否有wifi按钮
`<span class="el-button-group"> if (info.hasWifi) {
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button> if (info.wifiLocation && info.wifiLocation.elng) {
<button type="button" class="el-button el-button--mini" data-base>基站</button> _html += `<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>`
<button type="button" class="el-button el-button--mini" data-wifi style="display:none">wifi</button> } else {
</span>` _html += `<button type="button" class="el-button el-button--mini history_btn_grey" data-wifi>wifi</button>`
) :
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> }
_html += ` </p>
<p class="redirect-row"> <p class="redirect-row">
<a class="redirect-btn" id="btn_replay" data-replay>轨迹回放</a> <a class="redirect-btn" id="btn_replay" data-replay>轨迹回放</a>
<a class="redirect-btn" id="btn_fence" data-fence>电子围栏</a> <a class="redirect-btn" id="btn_fence" data-fence>电子围栏</a>
......
...@@ -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!