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 59845f9f
authored
May 24, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
常驻地 历史停留地址信息 取后端返回值 不用高德逆地址解析
1 parent
b4ff9675
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
23 deletions
src/pages/monitor/historyLocation.vue
src/pages/monitor/resident.vue
src/utils/historyLocation.js
src/utils/resident.js
src/pages/monitor/historyLocation.vue
View file @
59845f9
...
...
@@ -246,11 +246,11 @@
data
.
forEach
((
item
,
idx
)
=>
{
item
.
idx
=
idx
;
item
.
name
=
item
.
ownerName
||
'--'
item
.
standno
=
item
.
workOrderNo
||
'--'
item
.
sn
=
item
.
sn
||
'--'
item
.
vin
=
item
.
vin
||
'--'
item
.
begintime
=
item
.
beginTime
item
.
endtime
=
item
.
endTime
item
.
transferAddress
=
item
.
address
||
'--'
// 取后端返回address
});
this
.
resultList
=
data
;
...
...
src/pages/monitor/resident.vue
View file @
59845f9
...
...
@@ -160,9 +160,9 @@
data
.
forEach
((
item
,
idx
)
=>
{
item
.
idx
=
idx
;
item
.
name
=
item
.
ownerName
||
'--'
item
.
standNo
=
item
.
workOrderNo
||
'--'
item
.
sn
=
item
.
sn
||
'--'
item
.
vin
=
item
.
vin
||
'--'
item
.
transferAddress
=
item
.
address
||
'--'
// 取后端返回address
});
this
.
resultList
=
data
;
EventBus
.
$emit
(
'uiMap.resident.draw'
,
data
);
...
...
src/utils/historyLocation.js
View file @
59845f9
...
...
@@ -13,18 +13,29 @@ const historyLocation = {
const
MAP
=
mapService
.
map
;
this
.
data
=
data
;
MAPGEO
.
transferAddressByGroup
(
this
,
()
=>
{
EventBus
.
$emit
(
'uiMap.historyLocation.transferSuccess'
,
data
);
this
.
data
.
forEach
((
item
)
=>
{
let
marker
=
mapService
.
createHistoryLocationMarker
([
item
.
elng
,
item
.
elat
],
MAP
);
let
infoWindow
=
mapService
.
bindLocationInfoWindow
(
marker
,
MAP
,
item
);
this
.
markers
[
item
.
idx
]
=
marker
;
this
.
infowins
[
item
.
idx
]
=
infoWindow
;
});
console
.
log
(
this
.
markers
)
mapService
.
setFitView
(
MAP
);
this
.
createClusterer
();
// MAPGEO.transferAddressByGroup(this, ()=>{
// EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
// this.data.forEach((item)=>{
// let marker = mapService.createHistoryLocationMarker([item.elng, item.elat], MAP);
// let infoWindow = mapService.bindLocationInfoWindow(marker, MAP, item);
// this.markers[item.idx] = marker;
// this.infowins[item.idx] = infoWindow;
// });
// console.log(this.markers)
// mapService.setFitView(MAP);
// this.createClusterer();
// });
// v1.7.0历史停留为保证地址信息显示与导出一致 取后端返回的address 不需高德逆地址解析
EventBus
.
$emit
(
'uiMap.historyLocation.transferSuccess'
,
data
);
this
.
data
.
forEach
((
item
)
=>
{
let
marker
=
mapService
.
createHistoryLocationMarker
([
item
.
elng
,
item
.
elat
],
MAP
);
let
infoWindow
=
mapService
.
bindLocationInfoWindow
(
marker
,
MAP
,
item
);
this
.
markers
[
item
.
idx
]
=
marker
;
this
.
infowins
[
item
.
idx
]
=
infoWindow
;
});
console
.
log
(
this
.
markers
)
mapService
.
setFitView
(
MAP
);
this
.
createClusterer
();
});
EventBus
.
$on
(
'uiMap.historyLocation.destroy'
,
()
=>
{
...
...
src/utils/resident.js
View file @
59845f9
...
...
@@ -30,20 +30,33 @@ const resident = {
const
MAP
=
mapService
.
map
;
this
.
data
=
data
;
MAPGEO
.
transferAddressByGroup
(
this
,
()
=>
{
EventBus
.
$emit
(
'uiMap.historyLocation.transferSuccess'
,
data
);
this
.
data
.
forEach
((
item
)
=>
{
if
(
parseFloat
(
item
.
elng
)
===
0
&&
parseFloat
(
item
.
elat
)
===
0
)
return
;
//
MAPGEO.transferAddressByGroup(this, ()=>{
//
EventBus.$emit('uiMap.historyLocation.transferSuccess', data);
//
this.data.forEach((item)=>{
//
if(parseFloat(item.elng) === 0 && parseFloat(item.elat) === 0) return;
let
marker
=
mapService
.
createConstantMarker
([
parseFloat
(
item
.
elng
),
parseFloat
(
item
.
elat
)],
MAP
);
let
infoWindow
=
mapService
.
bindResidentInfoWindow
(
marker
,
MAP
,
item
);
this
.
markers
[
item
.
idx
]
=
marker
;
this
.
infowins
[
item
.
idx
]
=
infoWindow
;
//
let marker = mapService.createConstantMarker([parseFloat(item.elng), parseFloat(item.elat)], MAP);
//
let infoWindow = mapService.bindResidentInfoWindow(marker, MAP, item);
//
this.markers[item.idx] = marker;
//
this.infowins[item.idx] = infoWindow;
});
//
});
mapService
.
setFitView
(
MAP
);
// mapService.setFitView(MAP);
// });
// v1.7.0常驻地为保证导出内容与显示一致 取后端返回的address 不需高德逆地址解析
EventBus
.
$emit
(
'uiMap.historyLocation.transferSuccess'
,
data
);
this
.
data
.
forEach
((
item
)
=>
{
if
(
parseFloat
(
item
.
elng
)
===
0
&&
parseFloat
(
item
.
elat
)
===
0
)
return
;
let
marker
=
mapService
.
createConstantMarker
([
parseFloat
(
item
.
elng
),
parseFloat
(
item
.
elat
)],
MAP
);
let
infoWindow
=
mapService
.
bindResidentInfoWindow
(
marker
,
MAP
,
item
);
this
.
markers
[
item
.
idx
]
=
marker
;
this
.
infowins
[
item
.
idx
]
=
infoWindow
;
});
mapService
.
setFitView
(
MAP
);
},
intervalDraw
(){
...
...
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