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 @@
}
.map-controll.toleft{
left: 150px;
right: calc(100% - 316px)
right: calc(100% - 330px)
}
.map-bottom-controll {
......@@ -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
......@@ -21,7 +21,14 @@ export default {
// vBreadcrumb
},
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>
......
......@@ -203,7 +203,7 @@ export default {
mapLoading: false,
isInitMap: false,
flag: false,
searchText: "", //65MA08605HG349105 75108160001 1510112899
searchText: this.$route.query.vin || "", //65MA08605HG349105 75108160001 1510112899
searchType: "2",
isSearching: false,
monitorFilterType: "",
......@@ -775,6 +775,7 @@ export default {
//_this.$refs.tree.setCheckedKeys(keys);
_this.checkedKeys.push(item.id);
console.log("勾选key:", _this.checkedKeys);
_this.$refs.tree.setCheckedKeys(_this.checkedKeys);
this.addMonitor({
sn: item.label,
name: item.label1,
......
......@@ -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>
......@@ -732,7 +739,7 @@ MapService.prototype = {
</div>`;
},
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">
<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>
......
......@@ -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!