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 59870461
authored
May 24, 2022
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.7.0-zxw' into 'v1.7.0'
V1.7.0 zxw See merge request
!11
2 parents
d7d8abf1
b4ff9675
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
18 deletions
src/pages/monitor/historyLocation.vue
src/pages/monitor/resident.vue
src/utils/mapService.js
src/utils/replay.js
src/pages/monitor/historyLocation.vue
View file @
5987046
...
@@ -247,6 +247,8 @@
...
@@ -247,6 +247,8 @@
item
.
idx
=
idx
;
item
.
idx
=
idx
;
item
.
name
=
item
.
ownerName
||
'--'
item
.
name
=
item
.
ownerName
||
'--'
item
.
standno
=
item
.
workOrderNo
||
'--'
item
.
standno
=
item
.
workOrderNo
||
'--'
item
.
sn
=
item
.
sn
||
'--'
item
.
vin
=
item
.
vin
||
'--'
item
.
begintime
=
item
.
beginTime
item
.
begintime
=
item
.
beginTime
item
.
endtime
=
item
.
endTime
item
.
endtime
=
item
.
endTime
});
});
...
...
src/pages/monitor/resident.vue
View file @
5987046
...
@@ -161,6 +161,8 @@
...
@@ -161,6 +161,8 @@
item
.
idx
=
idx
;
item
.
idx
=
idx
;
item
.
name
=
item
.
ownerName
||
'--'
item
.
name
=
item
.
ownerName
||
'--'
item
.
standNo
=
item
.
workOrderNo
||
'--'
item
.
standNo
=
item
.
workOrderNo
||
'--'
item
.
sn
=
item
.
sn
||
'--'
item
.
vin
=
item
.
vin
||
'--'
});
});
this
.
resultList
=
data
;
this
.
resultList
=
data
;
EventBus
.
$emit
(
'uiMap.resident.draw'
,
data
);
EventBus
.
$emit
(
'uiMap.resident.draw'
,
data
);
...
...
src/utils/mapService.js
View file @
5987046
...
@@ -722,7 +722,7 @@ MapService.prototype = {
...
@@ -722,7 +722,7 @@ MapService.prototype = {
</div>`
;
</div>`
;
},
},
createLocationInfo
(
info
)
{
createLocationInfo
(
info
)
{
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standno
}
</h3>
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
vin
}
/
${
info
.
sn
}
</h3>
<div class="map-infowindow-ct">
<div class="map-infowindow-ct">
<p><i class="icon icon-info_time"></i> 停留时间: <span class="des">
${
info
.
begintime
}
</span></p>
<p><i class="icon icon-info_time"></i> 停留时间: <span class="des">
${
info
.
begintime
}
</span></p>
<p><i class="icon icon-info_location"></i> 停留地址: <span class="des adr" >
${
info
.
transferAddress
}
</span>
<p><i class="icon icon-info_location"></i> 停留地址: <span class="des adr" >
${
info
.
transferAddress
}
</span>
...
@@ -732,7 +732,7 @@ MapService.prototype = {
...
@@ -732,7 +732,7 @@ MapService.prototype = {
</div>`
;
</div>`
;
},
},
createResidentInfo
(
info
)
{
createResidentInfo
(
info
)
{
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
standNo
}
</h3>
return
`<h3 class="map-infowindow-title">
${
info
.
name
}
/
${
info
.
vin
}
/
${
info
.
sn
}
</h3>
<div class="map-infowindow-ct">
<div class="map-infowindow-ct">
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">
${
info
.
sn
}
</span></p>
<p><i class="icon icon-info_device"></i> 设备号: <span class="des">
${
info
.
sn
}
</span></p>
<p><i class="icon icon-info_location"></i> 常驻地址: <span class="des adr" >
${
info
.
transferAddress
}
</span>
<p><i class="icon icon-info_location"></i> 常驻地址: <span class="des adr" >
${
info
.
transferAddress
}
</span>
...
...
src/utils/replay.js
View file @
5987046
...
@@ -277,27 +277,36 @@ const replay = {
...
@@ -277,27 +277,36 @@ const replay = {
//mapService.setFitView(MAP);
//mapService.setFitView(MAP);
},
},
speedEvent
(
idx
,
dis
)
{
let
timeArr
=
[[
40
,
30
,
16
],
[
30
,
20
,
12
],
[
20
,
12
,
8
],
[
5
,
3
,
2
]]
// 慢 正常 快 很快
let
speed
if
(
dis
>=
100
)
{
// 100公里以上
speed
=
Math
.
floor
((
dis
/
timeArr
[
idx
][
0
])
*
3600
)
}
else
if
(
dis
>
10
&&
dis
<
100
)
{
// 10-100公里
speed
=
Math
.
floor
((
dis
/
timeArr
[
idx
][
1
])
*
3600
)
}
else
{
// 10公里以内
speed
=
Math
.
floor
((
dis
/
timeArr
[
idx
][
2
])
*
3600
)
}
return
speed
},
getSpeed
(
idx
,
dis
){
// 根据路径距离和回放时间 算出回放的speed
getSpeed
(
idx
,
dis
){
// 根据路径距离和回放时间 算出回放的speed
let
speed
;
//
let speed;
switch
(
idx
){
//
switch(idx){
case
1
:
//
case 1:
// speed = 2000
// speed = 2000
speed
=
dis
>=
100
?
Math
.
floor
((
dis
/
30
)
*
3600
)
:
dis
>
10
&&
dis
<
100
?
Math
.
floor
((
dis
/
20
)
*
3600
)
:
Math
.
floor
((
dis
/
12
)
*
3600
);
// break;
break
;
// case 2:
case
2
:
// speed = 5000;
// speed = 5000;
speed
=
dis
>=
100
?
Math
.
floor
((
dis
/
20
)
*
3600
)
:
dis
>
10
&&
dis
<
100
?
Math
.
floor
((
dis
/
12
)
*
3600
)
:
Math
.
floor
((
dis
/
8
)
*
3600
);
// break;
break
;
// case 3:
case
3
:
// speed = 10000;
// speed = 10000;
speed
=
dis
>=
100
?
Math
.
floor
((
dis
/
5
)
*
3600
)
:
dis
>
10
&&
dis
<
100
?
Math
.
floor
((
dis
/
3
)
*
3600
)
:
Math
.
floor
((
dis
/
2
)
*
3600
);
// break;
break
;
// default:
default
:
// speed = 500;
// speed = 500;
speed
=
dis
>=
100
?
Math
.
floor
((
dis
/
40
)
*
3600
)
:
dis
>
10
&&
dis
<
100
?
Math
.
floor
((
dis
/
30
)
*
3600
)
:
Math
.
floor
((
dis
/
16
)
*
3600
)
;
// break
;
break
;
// }
}
// return speed;
return
speed
;
return
this
.
speedEvent
(
idx
,
dis
)
},
},
clearTimeoutIds
(){
clearTimeoutIds
(){
replay
.
timeoutIds
.
forEach
((
item
)
=>
{
replay
.
timeoutIds
.
forEach
((
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