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 5a3a94c9
authored
Jun 15, 2022
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch '1.7.1' into 'v1.8.0'
1.7.1 See merge request
!22
2 parents
a9d96cc6
451823dc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
32 deletions
src/assets/scss/monitor.scss
src/utils/mapService.js
src/utils/monitor.js
src/assets/scss/monitor.scss
View file @
5a3a94c
...
@@ -544,3 +544,15 @@
...
@@ -544,3 +544,15 @@
}
}
}
}
}
}
.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
\ No newline at end of file
src/utils/mapService.js
View file @
5a3a94c
...
@@ -283,7 +283,7 @@ MapService.prototype = {
...
@@ -283,7 +283,7 @@ MapService.prototype = {
var
statusArr
=
[
'行驶中'
,
'静止'
,
'离线'
,
'在线'
]
var
statusArr
=
[
'行驶中'
,
'静止'
,
'离线'
,
'在线'
]
if
(
info
.
status
===
2
)
{
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
{
}
else
{
infoDiv
.
querySelector
(
'[data-status]'
).
textContent
=
statusArr
[
info
.
status
];
infoDiv
.
querySelector
(
'[data-status]'
).
textContent
=
statusArr
[
info
.
status
];
}
}
...
@@ -313,6 +313,7 @@ MapService.prototype = {
...
@@ -313,6 +313,7 @@ MapService.prototype = {
baseBtn
&&
baseBtn
.
classList
.
remove
(
'el-button--primary'
);
baseBtn
&&
baseBtn
.
classList
.
remove
(
'el-button--primary'
);
}
}
// 基站
baseBtn
&&
(
baseBtn
.
onclick
=
function
(
e
)
{
baseBtn
&&
(
baseBtn
.
onclick
=
function
(
e
)
{
if
(
info
.
eLocateType
===
'bsLocation'
)
return
;
if
(
info
.
eLocateType
===
'bsLocation'
)
return
;
info
.
eLocateType
=
'bsLocation'
info
.
eLocateType
=
'bsLocation'
...
@@ -334,6 +335,7 @@ MapService.prototype = {
...
@@ -334,6 +335,7 @@ MapService.prototype = {
self
.
setFitView
()
self
.
setFitView
()
})
})
// gps
gpsBtn
&&
(
gpsBtn
.
onclick
=
function
(
e
)
{
gpsBtn
&&
(
gpsBtn
.
onclick
=
function
(
e
)
{
if
(
info
.
eLocateType
===
'gpsLocation'
)
return
;
if
(
info
.
eLocateType
===
'gpsLocation'
)
return
;
info
.
eLocateType
=
'gpsLocation'
info
.
eLocateType
=
'gpsLocation'
...
@@ -355,12 +357,23 @@ MapService.prototype = {
...
@@ -355,12 +357,23 @@ MapService.prototype = {
self
.
setFitView
()
self
.
setFitView
()
})
})
wifiBtn
&&
(
wifiBtn
.
onclick
=
function
(
e
)
{
//infoDiv.querySelector('[data-transferAddress]').textContent = eLocation.transferAddress;
// wifi数据
//infoDiv.querySelector('[data-time]').textContent = eLocation.time;
wifiBtn
&&
(
wifiBtn
.
onclick
=
function
(
e
)
{
EventBus
.
$emit
(
'uiMap.monitor.wifiLocate'
,
{
info
,
infoDiv
,
gpsBtn
,
baseBtn
,
wifiBtn
})
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
()
self
.
setFitView
()
}
//EventBus.$emit('uiMap.monitor.wifiLocate', { info, infoDiv, gpsBtn, baseBtn, wifiBtn })
})
})
if
(
info
.
alarmTypeSet
&&
info
.
alarmTypeSet
.
length
)
{
if
(
info
.
alarmTypeSet
&&
info
.
alarmTypeSet
.
length
)
{
...
@@ -602,34 +615,28 @@ MapService.prototype = {
...
@@ -602,34 +615,28 @@ MapService.prototype = {
<p><i class="icon icon-info_location"></i> 最后上点地址: <span class="des adr" data-transferAddress>
${
info
.
transferAddress
}
</span>
<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>
<a class="copy-btn" data-clipboard-text=""><i class="icon icon-info_copy"></i></a>
</p>
</p>
<p><i class="icon icon-info_type"></i> 定位类型:
<p><i class="icon icon-info_type"></i> 定位类型:<span class="el-button-group">`
${
info
.
wifiLocation
?
(
info
.
eLocateSingle
?
// 是否有gps按钮
(
info
.
eLocateType
===
'gpsLocation'
?
if
(
info
.
gpsLocation
&&
info
.
gpsLocation
.
elng
)
{
`<span class="el-button-group">
_html
+=
`<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-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
>
// 是否有基站按钮
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>`
}
}
_html
+=
` </p>
<p class="redirect-row">
<p class="redirect-row">
<a class="redirect-btn" id="btn_replay" data-replay>轨迹回放</a>
<a class="redirect-btn" id="btn_replay" data-replay>轨迹回放</a>
<a class="redirect-btn" id="btn_fence" data-fence>电子围栏</a>
<a class="redirect-btn" id="btn_fence" data-fence>电子围栏</a>
...
...
src/utils/monitor.js
View file @
5a3a94c
...
@@ -95,6 +95,7 @@ const monitor = {
...
@@ -95,6 +95,7 @@ const monitor = {
EventBus
.
$on
(
'uiMap.monitor.changeELocate'
,
(
item
)
=>
{
EventBus
.
$on
(
'uiMap.monitor.changeELocate'
,
(
item
)
=>
{
const
snSourceType
=
`
${
item
.
sn
}
:
${
item
.
isSource
}
`
const
snSourceType
=
`
${
item
.
sn
}
:
${
item
.
isSource
}
`
let
eLocation
=
item
[
item
.
eLocateType
];
let
eLocation
=
item
[
item
.
eLocateType
];
console
.
log
(
eLocation
)
if
(
this
.
markers
[
snSourceType
])
{
if
(
this
.
markers
[
snSourceType
])
{
this
.
markers
[
snSourceType
].
setPosition
(
mapService
.
getLngLat
(
parseFloat
(
eLocation
.
elng
),
parseFloat
(
eLocation
.
elat
)));
this
.
markers
[
snSourceType
].
setPosition
(
mapService
.
getLngLat
(
parseFloat
(
eLocation
.
elng
),
parseFloat
(
eLocation
.
elat
)));
this
.
infowins
[
snSourceType
].
setPosition
(
mapService
.
getLngLat
(
parseFloat
(
eLocation
.
elng
),
parseFloat
(
eLocation
.
elat
)));
this
.
infowins
[
snSourceType
].
setPosition
(
mapService
.
getLngLat
(
parseFloat
(
eLocation
.
elng
),
parseFloat
(
eLocation
.
elat
)));
...
...
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