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