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 e5135c47
authored
Dec 28, 2021
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1111
1 parent
c7b85eea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
src/pages/monitor/activeLocation.vue
src/utils/mapService.js
src/pages/monitor/activeLocation.vue
View file @
e5135c4
...
@@ -53,7 +53,8 @@ export default {
...
@@ -53,7 +53,8 @@ export default {
this
.
mapObj
=
mapService
.
init
(
"map"
);
this
.
mapObj
=
mapService
.
init
(
"map"
);
this
.
isInitMap
=
true
;
this
.
isInitMap
=
true
;
let
o
=
history
.
state
;
let
o
=
history
.
state
;
if
(
o
.
lng
)
{
console
.
log
(
o
)
if
(
o
.
lng
||
o
.
bsLng
)
{
o
.
elat
=
o
.
lat
;
o
.
elat
=
o
.
lat
;
o
.
elng
=
o
.
lng
;
o
.
elng
=
o
.
lng
;
this
.
addLocation
(
o
);
this
.
addLocation
(
o
);
...
...
src/utils/mapService.js
View file @
e5135c4
...
@@ -674,12 +674,23 @@ MapService.prototype = {
...
@@ -674,12 +674,23 @@ MapService.prototype = {
// 创建位置点弹框
// 创建位置点弹框
createActiveInfo
(
info
)
{
createActiveInfo
(
info
)
{
let
msg
=
'报警'
// 激活
if
(
info
.
type
==
1
){
msg
=
'激活'
}
// 定位
if
(
info
.
type
==
2
){
msg
=
'定位'
}
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standNo
}
</h3>
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standNo
}
</h3>
<div class="map-infowindow-ct">
<div class="map-infowindow-ct">
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">
${
info
.
sn
}
(
${
info
.
source
==
1
?
'有线'
:
'无线'
}
)</span></p>
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">
${
info
.
sn
}
(
${
info
.
source
==
1
?
'有线'
:
'无线'
}
)</span></p>
<p><i class="icon icon-info_time"></i>
报警
时间: <span class="des"data-time>
${
info
.
time
}
</span></p>
<p><i class="icon icon-info_time"></i>
${
msg
}
时间: <span class="des"data-time>
${
info
.
time
}
</span></p>
<div style="display:
${
info
.
bsLng
?
'block'
:
'none'
}
"><i class="icon icon-info_type"></i>定位类型: <a class="locate-btn active" id="locateTypeGps">GPS</a><a class="locate-btn" id="locateTypeBase">基站</a></div>
<div style="display:
${
info
.
bsLng
?
'block'
:
'none'
}
"><i class="icon icon-info_type"></i>定位类型: <a class="locate-btn active" id="locateTypeGps">GPS</a><a class="locate-btn" id="locateTypeBase">基站</a></div>
<p><i class="icon icon-info_location"></i>
报警
地址: <span class="des" data-transferAddress>
${
info
.
address
}
</span></p>
<p><i class="icon icon-info_location"></i>
${
msg
}
地址: <span class="des" data-transferAddress>
${
info
.
address
}
</span></p>
</div>`
</div>`
},
},
...
@@ -716,6 +727,14 @@ MapService.prototype = {
...
@@ -716,6 +727,14 @@ MapService.prototype = {
fillBase
()
fillBase
()
}
}
if
(
info
.
lng
){
fillGPS
()
}
if(!info.lng && info.bsLng){
fillBase()
}
return this.createActiveInfoWindow(marker, map, infoDiv)
return this.createActiveInfoWindow(marker, map, infoDiv)
},
},
...
...
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