Commit afa8c754 by wangzhihui

地图经纬度替换

1 parent c840ead9
...@@ -139,14 +139,14 @@ export default { ...@@ -139,14 +139,14 @@ export default {
oParams.source = row.source || ""; oParams.source = row.source || "";
// gps 信息 // gps 信息
oParams.lng = gpsInfo.elng; oParams.lng = gpsInfo.blng;
oParams.lat = gpsInfo.elat; oParams.lat = gpsInfo.blat;
oParams.address = gpsInfo.address || ""; oParams.address = gpsInfo.address || "";
oParams.time = gpsInfo.dateTime || ""; oParams.time = gpsInfo.dateTime || "";
//基站信息 //基站信息
oParams.bsLng = bsInfo.elng; oParams.bsLng = bsInfo.blng;
oParams.bsLat = bsInfo.elat; oParams.bsLat = bsInfo.blat;
oParams.bsAddress = bsInfo.address || ""; oParams.bsAddress = bsInfo.address || "";
oParams.bsTime = bsInfo.dateTime || ""; oParams.bsTime = bsInfo.dateTime || "";
......
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-11-28 16:37:15
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2024-12-30 15:11:15
* @FilePath: \oEshield\src\pages\monitor\alarmAnalysis.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="main-container"> <div class="main-container">
<div id="alarmMap" class="map-container"></div> <div id="alarmMap" class="map-container"></div>
......
...@@ -418,18 +418,17 @@ export default { ...@@ -418,18 +418,17 @@ export default {
// 在地图上画圆形围栏 // 在地图上画圆形围栏
drawFenceCircle(info) { drawFenceCircle(info) {
let _this = this; let _this = this;
_this.form.lng = info.elng; _this.form.lng = info.blng;
_this.form.lat = info.elat; _this.form.lat = info.blat;
EventBus.$emit("uiMap.fence.createFenceCircle", { EventBus.$emit("uiMap.fence.createFenceCircle", {
lng: info.elng, lng: info.blng,
lat: info.elat, lat: info.blat,
radius: _this.form.radius, radius: _this.form.radius,
}); });
}, },
// 在地图上画行政区域 // 在地图上画行政区域
drawDistrict(areaCode) { drawDistrict(areaCode) {
console.log(areaCode);
EventBus.$emit("uiMap.fence.drawDistrict", areaCode); EventBus.$emit("uiMap.fence.drawDistrict", areaCode);
}, },
...@@ -452,14 +451,14 @@ export default { ...@@ -452,14 +451,14 @@ export default {
}; };
// GPS信息 // GPS信息
option.lngGPS = g.elng; option.lngGPS = g.blng;
option.latGPS = g.elat; option.latGPS = g.blat;
option.timeGPS = g.dateTime; option.timeGPS = g.dateTime;
option.transferAddressGPS = g.address; option.transferAddressGPS = g.address;
// 基站信息 // 基站信息
option.lngBase = b.elng; option.lngBase = b.blng;
option.latBase = b.elat; option.latBase = b.blat;
option.timeBase = b.dateTime; option.timeBase = b.dateTime;
option.transferAddressBase = b.address; option.transferAddressBase = b.address;
...@@ -563,8 +562,8 @@ export default { ...@@ -563,8 +562,8 @@ export default {
let cur = {}; let cur = {};
let _gps = k.gpsLocation || {}; let _gps = k.gpsLocation || {};
cur.address = _gps.address; cur.address = _gps.address;
cur.lat = _gps.elat; cur.lat = _gps.blat;
cur.lng = _gps.elng; cur.lng = _gps.blng;
cur.name = k.ownerName; cur.name = k.ownerName;
cur.sn = k.sn; cur.sn = k.sn;
cur.time = _gps.dateTime; cur.time = _gps.dateTime;
......
...@@ -1206,7 +1206,6 @@ export default { ...@@ -1206,7 +1206,6 @@ export default {
item.eLocateType = relItem.eLocateType; item.eLocateType = relItem.eLocateType;
item = this.filterGpsBase(item); item = this.filterGpsBase(item);
console.log("filterGpsBase", item);
item.isSource = relItem.source; item.isSource = relItem.source;
item.vidCode = this.vidCode; item.vidCode = this.vidCode;
item.sourceType = this.sourceType; item.sourceType = this.sourceType;
...@@ -1222,7 +1221,6 @@ export default { ...@@ -1222,7 +1221,6 @@ export default {
this.monitorList.itemArr.length > 0 this.monitorList.itemArr.length > 0
) { ) {
this.autoOpenLastInfoWindow = true; this.autoOpenLastInfoWindow = true;
console.log("drawData", drawData);
EventBus.$emit( EventBus.$emit(
"uiMap.monitor.draw", "uiMap.monitor.draw",
drawData, drawData,
...@@ -1299,7 +1297,6 @@ export default { ...@@ -1299,7 +1297,6 @@ export default {
//window.location.href = '../ots/login'; //window.location.href = '../ots/login';
}, },
drawDoneCb() { drawDoneCb() {
console.log("drawDoneCb");
this._drawTimeoutId && window.clearTimeout(this._drawTimeoutId); this._drawTimeoutId && window.clearTimeout(this._drawTimeoutId);
/* let arr = []; /* let arr = [];
for(let key in this.monitorList){ for(let key in this.monitorList){
...@@ -1323,7 +1320,6 @@ export default { ...@@ -1323,7 +1320,6 @@ export default {
exportExcel("vehicle/downLoadImportSearchModel"); exportExcel("vehicle/downLoadImportSearchModel");
}, },
changeELocate(item) { changeELocate(item) {
console.log("changeELocate", item);
this.monitorList[item.sn].eLocateType = item.eLocateType; this.monitorList[item.sn].eLocateType = item.eLocateType;
//item.eLocateType = item.eLocateType==='gpsLocation'?'bsLocation':'gpsLocation' //item.eLocateType = item.eLocateType==='gpsLocation'?'bsLocation':'gpsLocation'
}, },
......
...@@ -279,6 +279,7 @@ export default { ...@@ -279,6 +279,7 @@ export default {
BUSINESS_SERVICE.getPOI({ BUSINESS_SERVICE.getPOI({
sn: this.sn, sn: this.sn,
}).then((res) => { }).then((res) => {
console.log(res)
if (res.returnCode === "0") { if (res.returnCode === "0") {
if (res.data && res.data.length) { if (res.data && res.data.length) {
res.data.forEach((item) => { res.data.forEach((item) => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-11-28 16:37:15 * @Date: 2024-11-28 16:37:15
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2024-12-26 15:31:02 * @LastEditTime: 2024-12-30 14:58:58
* @FilePath: \oEshield\src\utils\fence.js * @FilePath: \oEshield\src\utils\fence.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -264,22 +264,18 @@ const fence = { ...@@ -264,22 +264,18 @@ const fence = {
bindPolyEvent(polyEditor) { bindPolyEvent(polyEditor) {
const self = this const self = this
polyEditor.on('addnode', function (event) { polyEditor.on('addnode', function (event) {
console.log('触发事件:addnode')
self.emitPolyEvent() self.emitPolyEvent()
}) })
polyEditor.on('adjust', function (event) { polyEditor.on('adjust', function (event) {
console.log('触发事件:adjust')
self.emitPolyEvent() self.emitPolyEvent()
}) })
polyEditor.on('removenode', function (event) { polyEditor.on('removenode', function (event) {
console.log('触发事件:removenode')
self.emitPolyEvent() self.emitPolyEvent()
}) })
polyEditor.on('end', function (event) { polyEditor.on('end', function (event) {
console.log('触发事件: end')
self.emitPolyEvent() self.emitPolyEvent()
// event.target 即为编辑后的多边形对象 // event.target 即为编辑后的多边形对象
}) })
...@@ -349,7 +345,7 @@ const fence = { ...@@ -349,7 +345,7 @@ const fence = {
if (data.radius) { if (data.radius) {
_this.radius = Number(data.radius); _this.radius = Number(data.radius);
} }
console.log(data)
// _this.createFenceCircle(data); // _this.createFenceCircle(data);
_this.updateFenceCircle(data) _this.updateFenceCircle(data)
return false; return false;
......
...@@ -17,7 +17,7 @@ const historyLocation = { ...@@ -17,7 +17,7 @@ const historyLocation = {
// v1.7.0历史停留为保证地址信息显示与导出一致 取后端返回的address 不需高德逆地址解析 // v1.7.0历史停留为保证地址信息显示与导出一致 取后端返回的address 不需高德逆地址解析
EventBus.$emit('uiMap.historyLocation.transferSuccess', data); EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{ this.data.forEach((item)=>{
let lnglatXY=mapService.getLngLat(item.elng, item.elat); let lnglatXY=mapService.getLngLat(item.blng, item.blat);
markers.push(lnglatXY) markers.push(lnglatXY)
let marker = mapService.createHistoryLocationMarker(lnglatXY, AMap); let marker = mapService.createHistoryLocationMarker(lnglatXY, AMap);
let infoWindow = mapService.bindLocationInfoWindow(marker, AMap, item); let infoWindow = mapService.bindLocationInfoWindow(marker, AMap, item);
...@@ -53,7 +53,6 @@ const historyLocation = { ...@@ -53,7 +53,6 @@ const historyLocation = {
for(let idx in this.markers){ for(let idx in this.markers){
markers.push(this.markers[idx]); markers.push(this.markers[idx]);
} }
console.log(markers)
this.cluster = AMap.invoke('Cluster', markers, data => { this.cluster = AMap.invoke('Cluster', markers, data => {
return { return {
point: [data.latLng.lng, data.latLng.lat], point: [data.latLng.lng, data.latLng.lat],
......
...@@ -44,8 +44,8 @@ const MAPGEO = { ...@@ -44,8 +44,8 @@ const MAPGEO = {
for (let idx = initIdx; idx < maxIdx; idx++) { for (let idx = initIdx; idx < maxIdx; idx++) {
// 防止出现gps点:.00000的错误 // 防止出现gps点:.00000的错误
if (Number(data[idx].elng) > 0 && Number(data[idx].elat) > 0) { if (Number(data[idx].blng) > 0 && Number(data[idx].blat) > 0) {
lnglatArr.push([data[idx].elng, data[idx].elat]) lnglatArr.push([data[idx].blng, data[idx].blat])
obj.realNum++; obj.realNum++;
} }
} }
...@@ -62,7 +62,7 @@ const MAPGEO = { ...@@ -62,7 +62,7 @@ const MAPGEO = {
function setAddress(row, item) { function setAddress(row, item) {
let _list = data.filter( let _list = data.filter(
(k) => (k) =>
fixed6(k.elng) == fixed6(row.lng) && fixed6(k.elat) == fixed6(row.lat) fixed6(k.blng) == fixed6(row.lng) && fixed6(k.blat) == fixed6(row.lat)
); );
_list.map((k) => { _list.map((k) => {
k.transferAddress = item.address; k.transferAddress = item.address;
......
...@@ -52,8 +52,8 @@ const MAPGEO = { ...@@ -52,8 +52,8 @@ const MAPGEO = {
for (let idx = initIdx; idx < maxIdx; idx++) { for (let idx = initIdx; idx < maxIdx; idx++) {
// 防止出现gps点:.00000的错误 // 防止出现gps点:.00000的错误
if (Number(data[idx].elng) > 0 && Number(data[idx].elat) > 0) { if (Number(data[idx].blng) > 0 && Number(data[idx].blat) > 0) {
lnglatArr.push([data[idx].elng, data[idx].elat]) lnglatArr.push([data[idx].blng, data[idx].blat])
obj.realNum++; obj.realNum++;
} }
} }
...@@ -71,7 +71,7 @@ const MAPGEO = { ...@@ -71,7 +71,7 @@ const MAPGEO = {
console.log('setAddress', row, item) console.log('setAddress', row, item)
let _list = data.filter( let _list = data.filter(
(k) => (k) =>
fixed6(k.elng) == fixed6(row.lng) && fixed6(k.elat) == fixed6(row.lat) fixed6(k.blng) == fixed6(row.lng) && fixed6(k.blat) == fixed6(row.lat)
); );
_list.map((k) => { _list.map((k) => {
k.transferAddress = item.formattedAddress; k.transferAddress = item.formattedAddress;
...@@ -89,7 +89,7 @@ const MAPGEO = { ...@@ -89,7 +89,7 @@ const MAPGEO = {
console.log('geocoderGetAdr', result) console.log('geocoderGetAdr', result)
result.regeocodes.forEach((item, idx) => { result.regeocodes.forEach((item, idx) => {
let o = arr[idx] let o = arr[idx]
// let _idx = data.findIndex(k => k.elng == o.lng && k.elat == o.lat); // let _idx = data.findIndex(k => k.blng == o.lng && k.blat == o.lat);
// //data[initIdx + idx].transferAddress = item.formattedAddress; // //data[initIdx + idx].transferAddress = item.formattedAddress;
// data[_idx].transferAddress = item.formattedAddress; // data[_idx].transferAddress = item.formattedAddress;
setAddress(o, item); setAddress(o, item);
......
...@@ -20,7 +20,7 @@ const monitor = { ...@@ -20,7 +20,7 @@ const monitor = {
compareText: null, compareText: null,
bindEvent() { bindEvent() {
EventBus.$on('uiMap.monitor.draw', (data, autoOpenLastInfoWindow) => { EventBus.$on('uiMap.monitor.draw', (data, autoOpenLastInfoWindow) => {
console.log('监听围栏更新', data) // console.log('监听围栏更新', data)
this.draw(data, autoOpenLastInfoWindow); this.draw(data, autoOpenLastInfoWindow);
}); });
...@@ -62,8 +62,6 @@ const monitor = { ...@@ -62,8 +62,6 @@ const monitor = {
}) })
EventBus.$on('uiMap.monitor.changeSourceType', (sourceType) => { EventBus.$on('uiMap.monitor.changeSourceType', (sourceType) => {
console.log('标记显示')
console.log(AMap)
let rourceReg = /^\d+\:(\d)$/; let rourceReg = /^\d+\:(\d)$/;
if (sourceType === '') { if (sourceType === '') {
for (let snSourceType in this.markers) { for (let snSourceType in this.markers) {
......
...@@ -38,7 +38,7 @@ const replay = { ...@@ -38,7 +38,7 @@ const replay = {
var replayData = [] var replayData = []
replay.data.forEach(function(item){ replay.data.forEach(function(item){
let lnglat=mapService.getLngLat(item.elng,item.elat) let lnglat=mapService.getLngLat(item.blng,item.blat)
replayData.push(lnglat) replayData.push(lnglat)
}); });
let p1=replayData[0]; let p1=replayData[0];
...@@ -82,8 +82,8 @@ const replay = { ...@@ -82,8 +82,8 @@ const replay = {
return `<div class="navg-info-window"> return `<div class="navg-info-window">
<div class="tit">${item.dateTime}</div> <div class="tit">${item.dateTime}</div>
<div class="main"> <div class="main">
<p><span class="lb">经度</span>${item.elng}</p> <p><span class="lb">经度</span>${item.blng}</p>
<p><span class="lb">纬度</span>${item.elat}</p> <p><span class="lb">纬度</span>${item.blat}</p>
<p><span class="lb">速度</span>${item.speed} km/h</p> <p><span class="lb">速度</span>${item.speed} km/h</p>
</div> </div>
</div>` </div>`
...@@ -106,7 +106,6 @@ const replay = { ...@@ -106,7 +106,6 @@ const replay = {
bindEvent(){ bindEvent(){
//解析轨迹地址 //解析轨迹地址
EventBus.$on('uiMap.replay.transferAdr', function(data){ EventBus.$on('uiMap.replay.transferAdr', function(data){
console.log(data)
replay.data = data; replay.data = data;
replay.transferAddressByGroup(); replay.transferAddressByGroup();
}); });
...@@ -123,7 +122,6 @@ const replay = { ...@@ -123,7 +122,6 @@ const replay = {
//播放轨迹 //播放轨迹
EventBus.$on('uiMap.replay.play', ()=>{ EventBus.$on('uiMap.replay.play', ()=>{
console.log(replay.navg)
if(replay.navg){ if(replay.navg){
if(this.idx === replay.data.length-1){ if(this.idx === replay.data.length-1){
AMap.invoke('stop') AMap.invoke('stop')
...@@ -214,7 +212,7 @@ const replay = { ...@@ -214,7 +212,7 @@ const replay = {
const { MAP, mapapi } = mapService const { MAP, mapapi } = mapService
EventBus.$emit('uiMap.historyLocation.transferSuccess', data) EventBus.$emit('uiMap.historyLocation.transferSuccess', data)
data.forEach((item) => { data.forEach((item) => {
const marker = mapService.createPointMarker(mapService.getLngLat(item.elng, item.elat), MAP) const marker = mapService.createPointMarker(mapService.getLngLat(item.blng, item.blat), MAP)
AMap.invoke('addOverlay', marker) AMap.invoke('addOverlay', marker)
const infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item) const infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item)
this.markers[item.idx] = marker this.markers[item.idx] = marker
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-11-28 16:37:15 * @Date: 2024-11-28 16:37:15
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2024-12-20 10:11:12 * @LastEditTime: 2024-12-30 15:13:49
* @FilePath: \oEshield\src\utils\resident.js * @FilePath: \oEshield\src\utils\resident.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -40,8 +40,8 @@ const resident = { ...@@ -40,8 +40,8 @@ const resident = {
// v1.7.0常驻地为保证导出内容与显示一致 取后端返回的address 不需高德逆地址解析 // v1.7.0常驻地为保证导出内容与显示一致 取后端返回的address 不需高德逆地址解析
EventBus.$emit('uiMap.historyLocation.transferSuccess', data); EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
this.data.forEach((item)=>{ this.data.forEach((item)=>{
if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return; if(parseFloat(item.blng) === 0 && parseFloat(item.blat) === 0) return;
let lnglatXY=mapService.getLngLat(parseFloat(item.elng), parseFloat(item.elat)); let lnglatXY=mapService.getLngLat(parseFloat(item.blng), parseFloat(item.blat));
paths.push(lnglatXY) paths.push(lnglatXY)
let marker = mapService.createConstantMarker(lnglatXY, MAP); let marker = mapService.createConstantMarker(lnglatXY, MAP);
let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item); let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!