Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
holo-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinkong
holo-web
Commits
bc8709b6
Commit
bc8709b6
authored
Mar 04, 2025
by
董国亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修订速度的小数点fixed,经纬度转度分秒,轨迹socket从配置获取
parent
bc0726c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
11 deletions
+20
-11
detetorMixin.js
wj-manage-web/src/mixins/detetorMixin.js
+2
-2
index.vue
wj-manage-web/src/views/situation/index.vue
+2
-2
vehicleDetail.vue
wj-manage-web/src/views/situation/mapPopup/vehicleDetail.vue
+16
-7
No files found.
wj-manage-web/src/mixins/detetorMixin.js
View file @
bc8709b6
...
...
@@ -44,8 +44,8 @@ export default {
},
registDetetors
()
{
if
(
!
this
.
detetorsStatus
)
{
//
let wsUrl= ws_config.BASE_URL
let
wsUrl
=
`ws://
${
window
.
wsHost
}
/holows/subscribe`
let
wsUrl
=
ws_config
.
BASE_URL
//
let wsUrl = `ws://${window.wsHost}/holows/subscribe`
let
ws1
=
initWs
({
name
:
"
callDetetorA
"
,
url
:
wsUrl
,
...
...
wj-manage-web/src/views/situation/index.vue
View file @
bc8709b6
...
...
@@ -756,8 +756,8 @@ export default {
// 注册车辆实时ws
let
socket
=
initWs
({
name
:
"
callCar
"
,
//
url: ws_config.BASE_URL,
url
:
`ws://
${
window
.
wsHost
}
/holows/subscribe`
,
url
:
ws_config
.
BASE_URL
,
//
url: `ws://${window.wsHost}/holows/subscribe`,
callback
:
this
.
callCar
,
});
socket
.
ws
.
onopen
=
()
=>
{
...
...
wj-manage-web/src/views/situation/mapPopup/vehicleDetail.vue
View file @
bc8709b6
...
...
@@ -14,13 +14,13 @@
<span
class=
"left"
>
号牌颜色:
</span>
{{
convertDict
(
"
PlateColor
"
,
model
.
licenseColor
)
}}
</div>
<div
class=
"detailItem"
>
<span
class=
"left"
>
行驶速度:
</span>
{{
model
.
speed
||
0
}}
km/h
<span
class=
"left"
>
行驶速度:
</span>
{{
Number
(
model
.
speed
).
toFixed
(
2
)
||
0
}}
km/h
</div>
<div
class=
"detailItem"
v-show=
"notExceed"
>
<span
class=
"left"
>
车身颜色:
</span>
{{
convertDict
(
"
CarColor
"
,
model
.
originalColor
)
}}
</div>
<div
class=
"detailItem"
v-show=
"notExceed"
>
<span
class=
"left"
>
航向角:
</span>
{{
model
.
courseAngle
||
0
}}
<span
class=
"left"
>
航向角:
</span>
{{
Number
(
model
.
courseAngle
).
toFixed
(
1
)
||
0
}}
</div>
<div
class=
"detailItem"
>
<span
class=
"left"
>
车辆类型:
</span>
{{
convertDict
(
"
CarType
"
,
model
.
originalType
)
}}
...
...
@@ -40,14 +40,14 @@
<div
class=
"detailItem"
>
<span
class=
"left"
>
ID :
</span>
{{
model
.
id
}}
</div>
<div
class=
"detailItem"
v-show=
"notExceed"
:title=
"`经度:$
{
Number(model.longitude).toFixed(6
)}`">
<span
class=
"left"
>
经度:
</span>
{{
Number
(
model
.
longitude
).
toFixed
(
6
)
}}
<div
class=
"detailItem"
v-show=
"notExceed"
:title=
"`经度:$
{
decimalToDMS(parseFloat(model.longitude)
)}`">
<span
class=
"left"
>
经度:
</span>
{{
decimalToDMS
(
parseFloat
(
model
.
longitude
)
)
}}
</div>
<div
class=
"detailItem"
v-show=
"notExceed"
:title=
"`纬度:$
{
Number
(
<div
class=
"detailItem"
v-show=
"notExceed"
:title=
"`纬度:$
{
decimalToDMS(parseFloat
(
model.latitude
)
.toFixed(6
)}`">
))}`">
<span
class=
"left"
>
纬度:
</span>
{{
Number
(
model
.
latitude
).
toFixed
(
6
)
decimalToDMS
(
parseFloat
(
model
.
latitude
)
)
}}
</div>
</div>
...
...
@@ -86,6 +86,15 @@ export default {
closeDetail
()
{
this
.
$emit
(
"
actionFinished
"
,
this
.
dialogId
,
false
);
},
decimalToDMS
(
decimal
)
{
const
isNegative
=
decimal
<
0
;
const
absDecimal
=
Math
.
abs
(
decimal
);
const
degrees
=
Math
.
floor
(
absDecimal
);
const
minutes
=
Math
.
floor
((
absDecimal
-
degrees
)
*
60
);
const
seconds
=
((
absDecimal
-
degrees
-
minutes
/
60
)
*
3600
).
toFixed
(
2
);
return
`
${
isNegative
?
'
-
'
:
''
}${
degrees
}
°
${
minutes
}
'
${
seconds
}
"`
;
}
},
computed
:
{
overWidth
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment