Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FleetTruckView
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
FleetTruck
FleetTruckView
Commits
cd45784d
Commit
cd45784d
authored
Feb 04, 2024
by
高晓帆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
急停
parent
401f9683
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
598 additions
and
2 deletions
+598
-2
config_20240204110140.json
.history/public/config_20240204110140.json
+7
-0
config_20240204110206.json
.history/public/config_20240204110206.json
+7
-0
config_20240204110223.json
.history/public/config_20240204110223.json
+7
-0
config_20240204110224.json
.history/public/config_20240204110224.json
+7
-0
MapButtons_20240204115834.vue
.history/src/views/map/MapButtons_20240204115834.vue
+284
-0
MapButtons_20240204115840.vue
.history/src/views/map/MapButtons_20240204115840.vue
+284
-0
Truckmonitorview.zip
Truckmonitorview.zip
+0
-0
config.json
public/config.json
+1
-1
MapButtons.vue
src/views/map/MapButtons.vue
+1
-1
No files found.
.history/public/config_20240204110140.json
0 → 100644
View file @
cd45784d
{
"SERVICE_IP"
:
"172.16.0.114:1234"
,
"LOG_SERVE_IP"
:
"192.168.93.87:8020"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.4"
}
\ No newline at end of file
.history/public/config_20240204110206.json
0 → 100644
View file @
cd45784d
{
"SERVICE_IP"
:
"172.16.0.121:1234"
,
"LOG_SERVE_IP"
:
"192.168.93.87:8020"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.4"
}
\ No newline at end of file
.history/public/config_20240204110223.json
0 → 100644
View file @
cd45784d
{
"SERVICE_IP"
:
"172.16.0.166:1234"
,
"LOG_SERVE_IP"
:
"192.168.93.87:8020"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.4"
}
\ No newline at end of file
.history/public/config_20240204110224.json
0 → 100644
View file @
cd45784d
{
"SERVICE_IP"
:
"172.16.0.166:1234"
,
"LOG_SERVE_IP"
:
"192.168.93.87:8020"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.4"
}
\ No newline at end of file
.history/src/views/map/MapButtons_20240204115834.vue
0 → 100644
View file @
cd45784d
<
template
>
<div
class=
"buttons"
>
<!-- TODO:只有单机循迹时显示 -->
<div
v-if=
"singleTrackEnable"
type=
"info"
class=
"middle-btn"
data-name=
"loadcomeout"
@
click=
"doSend"
>
装载出场
</div>
<span
:class=
"['btn-span', !isLog && 'btn-span-active']"
@
click=
"changeLog"
>
{{
isLog
?
'关'
:
'开'
}}
</span>
<span
:class=
"['btn-span-load', !isLoad && 'btn-span-active']"
@
click=
"changeLoad"
>
{{
isLoad
?
'空车装载'
:
'空车卸载'
}}
</span>
<div
type=
"info"
class=
"middle-btn"
data-name=
"unload"
@
click=
"doSend"
>
卸载
</div>
<div
type=
"info"
class=
"middle-btn smiddle-btn"
data-name=
"comeout"
@
click=
"doSend"
>
<p>
卸 载
</p>
<p>
出 场
</p>
</div>
<div
type=
"info"
class=
"large-btn stop-btn"
data-name=
"estop"
@
dblclick=
"doSend"
>
急停
</div>
<div
type=
"info"
class=
"large-btn stop-btn"
data-name=
"stop"
@
click=
"doSend"
>
快停
</div>
<div
type=
"info"
class=
"large-btn slow-down-btn"
data-name=
"slow"
@
click=
"doSend"
>
缓停
</div>
<div
type=
"info"
class=
"large-btn run-btn"
data-name=
"run"
@
click=
"doSend"
>
行驶
</div>
<!--
<div
type=
"info"
:class=
"['middle-btn', isShield ? '' : 'disable']"
data-name=
"comeout"
@
click=
"handleShield"
>
OBC
</div>
-->
<div
type=
"info"
class=
"middle-btn"
data-name=
"comeout"
@
click=
"handleShield"
>
OBC
</div>
<Modal
v-model=
"isShow"
:mask-closable=
"false"
title=
"提示信息"
@
on-ok=
"duSure"
>
<p>
{{
content
}}
</p>
</Modal>
</div>
</
template
>
<
script
setup
>
import
{
watch
,
ref
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
useMapStore
}
from
'../../store/MapStore'
;
import
{
storeToRefs
}
from
'pinia'
;
import
{
Message
}
from
'view-ui-plus'
;
const
mapping
=
{
unload
:
10
,
comeout
:
11
,
stop
:
0
,
run
:
1
,
slow
:
2
,
loadcomeout
:
12
,
single_preview
:
13
,
estop
:
3
,
//急停
}
const
porps
=
defineProps
({
singleTrackEnable
:
Boolean
})
const
isLog
=
ref
(
true
)
const
isLoad
=
ref
(
true
)
const
isShow
=
ref
(
false
)
const
isShield
=
ref
(
false
)
const
currentName
=
ref
(
''
)
const
content
=
ref
(
''
)
const
vehicleStore
=
useVehicleStore
()
const
{
loadSwitch
,
logSwitch
,
debugack
}
=
storeToRefs
(
vehicleStore
)
const
mapStore
=
useMapStore
()
const
{
obstacleData
}
=
storeToRefs
(
mapStore
)
const
emits
=
defineEmits
(
'handleSend'
)
function
sendMsg
(
data
)
{
emits
(
'handleSend'
,
data
)
}
function
handleShield
()
{
// if (!isShield.value) return
isShow
.
value
=
true
content
.
value
=
'是否清除范围内的障碍物?'
currentName
.
value
=
'obstacle'
}
function
shieldObstacle
()
{
if
(
obstacleData
&&
obstacleData
.
value
.
length
)
{
let
msg
=
[]
obstacleData
.
value
.
map
(
obstacle
=>
{
let
{
typeColor
,
typeDescrip
,
ocoordinate
}
=
obstacle
msg
.
push
({
typeColor
,
typeDescrip
,
coordinate
:
JSON
.
parse
(
JSON
.
stringify
(
ocoordinate
))
})
})
let
data
=
{
timestamp
:
new
Date
().
getTime
(),
obstacle
:
msg
}
sendMsg
({
type
:
'/setting/ignoreObstacles'
,
msg
:
data
})
}
else
{
sendMsg
({
type
:
'/setting/ignoreObstacles'
,
msg
:
{
timestamp
:
new
Date
().
getTime
(),
obstacle
:
[]
}
})
}
}
function
duSure
()
{
if
(
currentName
.
value
===
'obstacle'
)
{
shieldObstacle
()
}
else
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
mapping
[
currentName
.
value
]
}
})
}
}
function
changeLoad
()
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
isLoad
.
value
?
7
:
6
}
})
}
function
changeLog
()
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
isLog
.
value
?
8
:
9
}
})
}
function
doSend
(
e
)
{
const
target
=
e
.
currentTarget
const
{
name
}
=
target
.
dataset
currentName
.
value
=
name
if
([
'unload'
,
'comeout'
,
'loadcomeout'
,
'run'
].
includes
(
name
))
{
let
names
=
{
unload
:
'卸载'
,
comeout
:
'卸载出场'
,
loadcomeout
:
'装载出场'
,
run
:
'行驶'
}
isShow
.
value
=
true
content
.
value
=
`是否确定执行
${
names
[
name
]}
操作?`
}
else
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
mapping
[
currentName
.
value
]}
})
}
}
watch
(
loadSwitch
,
(
value
)
=>
{
isLoad
.
value
=
value
},
{
deep
:
true
})
watch
(
logSwitch
,
(
value
)
=>
{
isLog
.
value
=
!
value
},
{
deep
:
true
})
watch
(
debugack
,
(
data
)
=>
{
let
value
=
data
&&
data
.
value
if
(
!
value
)
return
let
tipsMap
=
{
0
:
'stop'
,
1
:
'run'
,
10
:
'卸载'
,
11
:
'出场'
}
let
tips
=
tipsMap
[
value
]
if
(
tips
)
{
Message
.
success
(
`执行
${
tips
}
成功!`
)
}
else
{
switch
(
value
)
{
case
6
:
isLoad
.
value
=
true
break
case
7
:
isLoad
.
value
=
false
break
case
8
:
isLog
.
value
=
false
break
case
9
:
isLog
.
value
=
true
break
}
}
vehicleStore
.
setData
(
'debugack'
,
null
)
},
{
deep
:
true
})
watch
(
obstacleData
,
(
value
)
=>
{
isShield
.
value
=
value
&&
value
.
length
>
0
})
</
script
>
<
style
lang=
"less"
scoped
>
.buttons {
position: absolute;
top: 60px;
right: 10px;
z-index: 999;
display: flex;
align-items: center;
.middle-btn {
width: 5.5vw !important;
height: 5.5vw !important;
min-width: 44px;
min-height: 44px;
background: url('/image/btn-unload.png') no-repeat;
background-size: 100% 100%;
font-weight: 600;
color: #000;
display: flex;
align-items: center;
justify-content: center;
padding: 1vw;
cursor: pointer;
}
.smiddle-btn {
flex-direction: column;
}
.large-btn {
width: 5vw !important;
height: 5vw !important;
min-width: 50px;
min-height: 50px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
color: #fff;
background-repeat: no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.disable {
cursor: not-allowed;
opacity: .4;
}
.stop-btn {
background-image: url('/image/stop.png');
}
.slow-down-btn {
background-image: url('/image/slow-down.png');
}
.run-btn {
color: #4399FF;
background-image: url('/image/run.png');
}
.btn-span,
.btn-span-load {
display: inline-block;
padding: 5px 10px;
color: #000;
font-weight: 600;
cursor: pointer;
background-repeat: no-repeat;
background-size: 100% 100%;
}
.btn-span {
background-image: url('/image/btn-default.png');
}
.btn-span-load {
background-image: url('/image/btn-load.png');
min-width: 46px;
}
.btn-span-active {
opacity: .6;
}
}
</
style
>
\ No newline at end of file
.history/src/views/map/MapButtons_20240204115840.vue
0 → 100644
View file @
cd45784d
<
template
>
<div
class=
"buttons"
>
<!-- TODO:只有单机循迹时显示 -->
<div
v-if=
"singleTrackEnable"
type=
"info"
class=
"middle-btn"
data-name=
"loadcomeout"
@
click=
"doSend"
>
装载出场
</div>
<span
:class=
"['btn-span', !isLog && 'btn-span-active']"
@
click=
"changeLog"
>
{{
isLog
?
'关'
:
'开'
}}
</span>
<span
:class=
"['btn-span-load', !isLoad && 'btn-span-active']"
@
click=
"changeLoad"
>
{{
isLoad
?
'空车装载'
:
'空车卸载'
}}
</span>
<div
type=
"info"
class=
"middle-btn"
data-name=
"unload"
@
click=
"doSend"
>
卸载
</div>
<div
type=
"info"
class=
"middle-btn smiddle-btn"
data-name=
"comeout"
@
click=
"doSend"
>
<p>
卸 载
</p>
<p>
出 场
</p>
</div>
<div
type=
"info"
class=
"large-btn stop-btn"
data-name=
"estop"
@
dblclick=
"doSend"
>
急停
</div>
<div
type=
"info"
class=
"large-btn stop-btn"
data-name=
"stop"
@
click=
"doSend"
>
快停
</div>
<div
type=
"info"
class=
"large-btn slow-down-btn"
data-name=
"slow"
@
click=
"doSend"
>
缓停
</div>
<div
type=
"info"
class=
"large-btn run-btn"
data-name=
"run"
@
click=
"doSend"
>
行驶
</div>
<!--
<div
type=
"info"
:class=
"['middle-btn', isShield ? '' : 'disable']"
data-name=
"comeout"
@
click=
"handleShield"
>
OBC
</div>
-->
<div
type=
"info"
class=
"middle-btn"
data-name=
"comeout"
@
click=
"handleShield"
>
OBC
</div>
<Modal
v-model=
"isShow"
:mask-closable=
"false"
title=
"提示信息"
@
on-ok=
"duSure"
>
<p>
{{
content
}}
</p>
</Modal>
</div>
</
template
>
<
script
setup
>
import
{
watch
,
ref
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
useMapStore
}
from
'../../store/MapStore'
;
import
{
storeToRefs
}
from
'pinia'
;
import
{
Message
}
from
'view-ui-plus'
;
const
mapping
=
{
unload
:
10
,
comeout
:
11
,
stop
:
0
,
run
:
1
,
slow
:
2
,
loadcomeout
:
12
,
single_preview
:
13
,
estop
:
3
,
//急停
}
const
porps
=
defineProps
({
singleTrackEnable
:
Boolean
})
const
isLog
=
ref
(
true
)
const
isLoad
=
ref
(
true
)
const
isShow
=
ref
(
false
)
const
isShield
=
ref
(
false
)
const
currentName
=
ref
(
''
)
const
content
=
ref
(
''
)
const
vehicleStore
=
useVehicleStore
()
const
{
loadSwitch
,
logSwitch
,
debugack
}
=
storeToRefs
(
vehicleStore
)
const
mapStore
=
useMapStore
()
const
{
obstacleData
}
=
storeToRefs
(
mapStore
)
const
emits
=
defineEmits
(
'handleSend'
)
function
sendMsg
(
data
)
{
emits
(
'handleSend'
,
data
)
}
function
handleShield
()
{
// if (!isShield.value) return
isShow
.
value
=
true
content
.
value
=
'是否清除范围内的障碍物?'
currentName
.
value
=
'obstacle'
}
function
shieldObstacle
()
{
if
(
obstacleData
&&
obstacleData
.
value
.
length
)
{
let
msg
=
[]
obstacleData
.
value
.
map
(
obstacle
=>
{
let
{
typeColor
,
typeDescrip
,
ocoordinate
}
=
obstacle
msg
.
push
({
typeColor
,
typeDescrip
,
coordinate
:
JSON
.
parse
(
JSON
.
stringify
(
ocoordinate
))
})
})
let
data
=
{
timestamp
:
new
Date
().
getTime
(),
obstacle
:
msg
}
sendMsg
({
type
:
'/setting/ignoreObstacles'
,
msg
:
data
})
}
else
{
sendMsg
({
type
:
'/setting/ignoreObstacles'
,
msg
:
{
timestamp
:
new
Date
().
getTime
(),
obstacle
:
[]
}
})
}
}
function
duSure
()
{
if
(
currentName
.
value
===
'obstacle'
)
{
shieldObstacle
()
}
else
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
mapping
[
currentName
.
value
]
}
})
}
}
function
changeLoad
()
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
isLoad
.
value
?
7
:
6
}
})
}
function
changeLog
()
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
isLog
.
value
?
8
:
9
}
})
}
function
doSend
(
e
)
{
const
target
=
e
.
currentTarget
const
{
name
}
=
target
.
dataset
currentName
.
value
=
name
if
([
'unload'
,
'comeout'
,
'loadcomeout'
,
'run'
].
includes
(
name
))
{
let
names
=
{
unload
:
'卸载'
,
comeout
:
'卸载出场'
,
loadcomeout
:
'装载出场'
,
run
:
'行驶'
}
isShow
.
value
=
true
content
.
value
=
`是否确定执行
${
names
[
name
]}
操作?`
}
else
{
sendMsg
({
type
:
'/command/debug'
,
msg
:
{
value
:
mapping
[
currentName
.
value
]}
})
}
}
watch
(
loadSwitch
,
(
value
)
=>
{
isLoad
.
value
=
value
},
{
deep
:
true
})
watch
(
logSwitch
,
(
value
)
=>
{
isLog
.
value
=
!
value
},
{
deep
:
true
})
watch
(
debugack
,
(
data
)
=>
{
let
value
=
data
&&
data
.
value
if
(
!
value
)
return
let
tipsMap
=
{
0
:
'stop'
,
1
:
'run'
,
10
:
'卸载'
,
11
:
'出场'
}
let
tips
=
tipsMap
[
value
]
if
(
tips
)
{
Message
.
success
(
`执行
${
tips
}
成功!`
)
}
else
{
switch
(
value
)
{
case
6
:
isLoad
.
value
=
true
break
case
7
:
isLoad
.
value
=
false
break
case
8
:
isLog
.
value
=
false
break
case
9
:
isLog
.
value
=
true
break
}
}
vehicleStore
.
setData
(
'debugack'
,
null
)
},
{
deep
:
true
})
watch
(
obstacleData
,
(
value
)
=>
{
isShield
.
value
=
value
&&
value
.
length
>
0
})
</
script
>
<
style
lang=
"less"
scoped
>
.buttons {
position: absolute;
top: 60px;
right: 10px;
z-index: 999;
display: flex;
align-items: center;
.middle-btn {
width: 5.5vw !important;
height: 5.5vw !important;
min-width: 44px;
min-height: 44px;
background: url('/image/btn-unload.png') no-repeat;
background-size: 100% 100%;
font-weight: 600;
color: #000;
display: flex;
align-items: center;
justify-content: center;
padding: 1vw;
cursor: pointer;
}
.smiddle-btn {
flex-direction: column;
}
.large-btn {
width: 5vw !important;
height: 5vw !important;
min-width: 50px;
min-height: 50px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
color: #fff;
background-repeat: no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.disable {
cursor: not-allowed;
opacity: .4;
}
.stop-btn {
background-image: url('/image/stop.png');
}
.slow-down-btn {
background-image: url('/image/slow-down.png');
}
.run-btn {
color: #4399FF;
background-image: url('/image/run.png');
}
.btn-span,
.btn-span-load {
display: inline-block;
padding: 5px 10px;
color: #000;
font-weight: 600;
cursor: pointer;
background-repeat: no-repeat;
background-size: 100% 100%;
}
.btn-span {
background-image: url('/image/btn-default.png');
}
.btn-span-load {
background-image: url('/image/btn-load.png');
min-width: 46px;
}
.btn-span-active {
opacity: .6;
}
}
</
style
>
\ No newline at end of file
Truckmonitorview.zip
View file @
cd45784d
No preview for this file type
public/config.json
View file @
cd45784d
{
"SERVICE_IP"
:
"172.16.0.1
21
:1234"
,
"SERVICE_IP"
:
"172.16.0.1
66
:1234"
,
"LOG_SERVE_IP"
:
"192.168.93.87:8020"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.4"
...
...
src/views/map/MapButtons.vue
View file @
cd45784d
...
...
@@ -37,7 +37,7 @@
slow
:
2
,
loadcomeout
:
12
,
single_preview
:
13
,
estop
:
15
,
//急停
estop
:
3
,
//急停
}
const
porps
=
defineProps
({
...
...
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