Commit cc02f99c by 张杰

Merge branch 'develop' into 'v1.10.0'

更新v1.10.0版本代码

See merge request !27
2 parents aa7bb217 8c29360b
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
} }
.map-controll.toleft{ .map-controll.toleft{
left: 150px; left: 150px;
right: calc(100% - 316px) right: calc(100% - 330px)
} }
.map-bottom-controll { .map-bottom-controll {
...@@ -544,3 +544,15 @@ ...@@ -544,3 +544,15 @@
} }
} }
} }
.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
...@@ -21,7 +21,14 @@ export default { ...@@ -21,7 +21,14 @@ export default {
// vBreadcrumb // vBreadcrumb
}, },
created() { created() {
if(window.opener) this.isNewWindowOpenPage = true // 新窗口打开页面 菜单栏直接进入地图页面不隐藏菜单
let hiddenMenu = JSON.parse(localStorage.getItem('hiddenMenu'))
let locationHash = window.location.hash
let flag = true
hiddenMenu.map(val => {
if (locationHash.indexOf(val) > -1 && window.location.hash.indexOf('?') > -1) flag = false
})
if (!flag) this.isNewWindowOpenPage = true
} }
}; };
</script> </script>
......
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
mapLoading: false, mapLoading: false,
isInitMap: false, isInitMap: false,
flag: false, flag: false,
searchText: "", //65MA08605HG349105 75108160001 1510112899 searchText: this.$route.query.vin || "", //65MA08605HG349105 75108160001 1510112899
searchType: "2", searchType: "2",
isSearching: false, isSearching: false,
monitorFilterType: "", monitorFilterType: "",
...@@ -775,6 +775,7 @@ export default { ...@@ -775,6 +775,7 @@ export default {
//_this.$refs.tree.setCheckedKeys(keys); //_this.$refs.tree.setCheckedKeys(keys);
_this.checkedKeys.push(item.id); _this.checkedKeys.push(item.id);
console.log("勾选key:", _this.checkedKeys); console.log("勾选key:", _this.checkedKeys);
_this.$refs.tree.setCheckedKeys(_this.checkedKeys);
this.addMonitor({ this.addMonitor({
sn: item.label, sn: item.label,
name: item.label1, name: item.label1,
......
...@@ -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) {
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() 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">
<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>
// 是否有基站按钮
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>`
}
}
_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>
...@@ -732,7 +739,7 @@ MapService.prototype = { ...@@ -732,7 +739,7 @@ MapService.prototype = {
</div>`; </div>`;
}, },
createResidentInfo(info) { createResidentInfo(info) {
return `<h3 class="map-infowindow-title">${info.name}/${info.vin}/${info.sn}</h3> return `<h3 class="map-infowindow-title">${info.name}/${info.vin}</h3>
<div class="map-infowindow-ct"> <div class="map-infowindow-ct">
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">${info.sn}</span></p> <p><i class="icon icon-info_device"></i> 设备号: <span class="des">${info.sn}</span></p>
<p><i class="icon icon-info_location"></i> 常驻地址: <span class="des adr" >${info.transferAddress}</span> <p><i class="icon icon-info_location"></i> 常驻地址: <span class="des adr" >${info.transferAddress}</span>
......
...@@ -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!