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
53451bf0
Commit
53451bf0
authored
Oct 27, 2023
by
高晓帆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单车倒步
parent
a8cf27c6
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
341 additions
and
1627 deletions
+341
-1627
config_20231027181329.json
.history/public/config_20231027181329.json
+6
-0
config_20231027181332.json
.history/public/config_20231027181332.json
+6
-0
config_20231027181346.json
.history/public/config_20231027181346.json
+6
-0
SideBar_20231027182152.vue
.history/src/views/SideBar_20231027182152.vue
+143
-0
SideBar_20231027182156.vue
.history/src/views/SideBar_20231027182156.vue
+143
-0
RunControl_20230724112713.vue
.history/src/views/set-tags/RunControl_20230724112713.vue
+0
-201
RunControl_20230724113344.vue
.history/src/views/set-tags/RunControl_20230724113344.vue
+0
-201
RunControl_20230731182014.vue
.history/src/views/set-tags/RunControl_20230731182014.vue
+0
-201
RunControl_20230802095929.vue
.history/src/views/set-tags/RunControl_20230802095929.vue
+0
-201
RunControl_20230802100007.vue
.history/src/views/set-tags/RunControl_20230802100007.vue
+0
-202
RunControl_20230802100014.vue
.history/src/views/set-tags/RunControl_20230802100014.vue
+0
-202
RunControl_20230802100019.vue
.history/src/views/set-tags/RunControl_20230802100019.vue
+0
-202
RunControl_20230802103757.vue
.history/src/views/set-tags/RunControl_20230802103757.vue
+0
-202
RunControl_20231027181124.vue
.history/src/views/set-tags/RunControl_20231027181124.vue
+15
-6
config.json
public/config.json
+2
-1
SideBar.vue
src/views/SideBar.vue
+7
-4
RunControl.vue
src/views/set-tags/RunControl.vue
+13
-4
No files found.
.history/public/config_20231027181329.json
0 → 100644
View file @
53451bf0
{
"SERVICE_IP"
:
"172.16.0.118:1234:1234"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.3"
}
\ No newline at end of file
.history/public/config_20231027181332.json
0 → 100644
View file @
53451bf0
{
"SERVICE_IP"
:
"172.16.0.118:1234"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.3"
}
\ No newline at end of file
.history/public/config_20231027181346.json
0 → 100644
View file @
53451bf0
{
"SERVICE_IP"
:
"172.16.0.114:1234"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.3"
}
\ No newline at end of file
.history/src/views/SideBar_20231027182152.vue
0 → 100644
View file @
53451bf0
<
template
>
<div
class=
"side-bar"
>
<ul
class=
"side-list"
>
<li
v-if=
"isBasic"
data-name=
"basic_message"
class=
"active"
@
click=
"doCheck"
>
<i
:style=
"`background-image: url('/image/Info_white.png')`"
></i>
<span>
基本信息
</span>
</li>
<li
v-else
data-name=
"mode_information"
class=
"active"
@
click=
"doCheck"
>
<i
:style=
"`background-image: url('/image/debug_white.png')`"
></i>
<span>
调试信息
</span>
</li>
<li
v-for=
"item in list"
:key=
"item.index"
:data-name=
"item.name"
:class=
"active === item.name ? 'active' : ''"
@
click=
"changeActive"
>
<i
:class=
"item.name === 'mode_switch' ? isDisable : ''"
:style=
"`background-image: url('/image/$
{item.icon}${active === item.name ? '_white' : '_blue'}.png')`">
</i>
<span
:class=
"item.name === 'mode_switch' ? isDisable : ''"
>
{{
item
.
label
}}
</span>
</li>
</ul>
</div>
</
template
>
<
script
setup
>
import
{
markRaw
,
ref
,
computed
}
from
'vue'
;
import
{
useVehicleStore
}
from
'@/store/VehicleStore.js'
import
{
storeToRefs
}
from
'pinia'
import
{
Message
}
from
'view-ui-plus'
const
SIDE_BAR
=
[
{
name
:
'mode_switch'
,
label
:
'模式切换'
,
icon
:
'pattern'
},
{
name
:
'log'
,
label
:
'终端信息'
,
icon
:
'log'
},
{
name
:
'set'
,
label
:
'设置'
,
icon
:
'set'
},
{
name
:
'logout'
,
label
:
'退出'
,
icon
:
'quit'
},
]
/**
* defineProps 和 defineEmits 都是只能在 <script setup> 中使用的编译器宏。
* 他们不需要导入,且会随着 <script setup> 的处理过程一同被编译掉。
* defineProps 接收与 props 选项相同的值,defineEmits 接收与 emits 选项相同的值
*/
const
emit
=
defineEmits
([
'changeTab'
])
const
list
=
markRaw
(
SIDE_BAR
)
const
active
=
ref
(
'basic_message'
)
const
isBasic
=
ref
(
true
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
isDisable
=
computed
(()
=>
{
const
{
isError
,
pattern
}
=
vehicleStoreToRefs
if
(
isError
.
value
===
'fault'
&&
pattern
.
value
===
0
)
{
return
'disabled'
}
return
''
})
function
doCheck
(
evt
)
{
isBasic
.
value
=
!
isBasic
.
value
const
target
=
evt
.
currentTarget
const
{
name
}
=
target
.
dataset
active
.
value
=
name
===
'basic_message'
?
'mode_information'
:
'basic_message'
emit
(
'changeTab'
,
active
.
value
)
}
function
changeActive
(
evt
)
{
const
target
=
evt
.
currentTarget
const
{
name
}
=
target
.
dataset
const
{
debuginfo
}
=
vehicleStoreToRefs
const
{
Current_Gear
,
loadBrakeStatus
}
=
debuginfo
.
value
;
if
(
name
===
'mode_switch'
&&
isDisable
.
value
===
'disabled'
)
{
return
}
if
(
name
==
'mode_switch'
){
if
(
!
([
'P'
,
126
].
includes
(
Current_Gear
)
||
([
'N'
,
0
].
includes
(
Current_Gear
)
&&
loadBrakeStatus
!=
0
)))
{
Message
.
error
(
'不能切换无人模式'
)
return
}
}
active
.
value
=
name
emit
(
'changeTab'
,
name
)
}
function
changeMode
()
{
active
.
value
=
'basic_message'
}
defineExpose
({
changeMode
})
</
script
>
<
style
lang=
"less"
scoped
>
.side-list {
background: #202634;
color: #5490D6;
height: 100%;
overflow: auto;
li {
display: flex;
flex-direction: column;
align-items: center;
padding: .1rem;
cursor: pointer;
i {
display: inline-block;
width: 2.5vw;
height: 2.5vw;
background-size: cover;
}
&.active {
color: #fff;
}
}
.disabled {
cursor: not-allowed;
}
}
</
style
>
\ No newline at end of file
.history/src/views/SideBar_20231027182156.vue
0 → 100644
View file @
53451bf0
<
template
>
<div
class=
"side-bar"
>
<ul
class=
"side-list"
>
<li
v-if=
"isBasic"
data-name=
"basic_message"
class=
"active"
@
click=
"doCheck"
>
<i
:style=
"`background-image: url('/image/Info_white.png')`"
></i>
<span>
基本信息
</span>
</li>
<li
v-else
data-name=
"mode_information"
class=
"active"
@
click=
"doCheck"
>
<i
:style=
"`background-image: url('/image/debug_white.png')`"
></i>
<span>
调试信息
</span>
</li>
<li
v-for=
"item in list"
:key=
"item.index"
:data-name=
"item.name"
:class=
"active === item.name ? 'active' : ''"
@
click=
"changeActive"
>
<i
:class=
"item.name === 'mode_switch' ? isDisable : ''"
:style=
"`background-image: url('/image/$
{item.icon}${active === item.name ? '_white' : '_blue'}.png')`">
</i>
<span
:class=
"item.name === 'mode_switch' ? isDisable : ''"
>
{{
item
.
label
}}
</span>
</li>
</ul>
</div>
</
template
>
<
script
setup
>
import
{
markRaw
,
ref
,
computed
}
from
'vue'
;
import
{
useVehicleStore
}
from
'@/store/VehicleStore.js'
import
{
storeToRefs
}
from
'pinia'
import
{
Message
}
from
'view-ui-plus'
const
SIDE_BAR
=
[
{
name
:
'mode_switch'
,
label
:
'模式切换'
,
icon
:
'pattern'
},
{
name
:
'log'
,
label
:
'终端信息'
,
icon
:
'log'
},
{
name
:
'set'
,
label
:
'设置'
,
icon
:
'set'
},
{
name
:
'logout'
,
label
:
'退出'
,
icon
:
'quit'
},
]
/**
* defineProps 和 defineEmits 都是只能在 <script setup> 中使用的编译器宏。
* 他们不需要导入,且会随着 <script setup> 的处理过程一同被编译掉。
* defineProps 接收与 props 选项相同的值,defineEmits 接收与 emits 选项相同的值
*/
const
emit
=
defineEmits
([
'changeTab'
])
const
list
=
markRaw
(
SIDE_BAR
)
const
active
=
ref
(
'basic_message'
)
const
isBasic
=
ref
(
true
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
isDisable
=
computed
(()
=>
{
const
{
isError
,
pattern
}
=
vehicleStoreToRefs
if
(
isError
.
value
===
'fault'
&&
pattern
.
value
===
0
)
{
return
'disabled'
}
return
''
})
function
doCheck
(
evt
)
{
isBasic
.
value
=
!
isBasic
.
value
const
target
=
evt
.
currentTarget
const
{
name
}
=
target
.
dataset
active
.
value
=
name
===
'basic_message'
?
'mode_information'
:
'basic_message'
emit
(
'changeTab'
,
active
.
value
)
}
function
changeActive
(
evt
)
{
const
target
=
evt
.
currentTarget
const
{
name
}
=
target
.
dataset
const
{
debuginfo
}
=
vehicleStoreToRefs
const
{
Current_Gear
,
loadBrakeStatus
}
=
debuginfo
.
value
;
if
(
name
===
'mode_switch'
&&
isDisable
.
value
===
'disabled'
)
{
return
}
if
(
name
==
'mode_switch'
){
if
(
!
([
'P'
,
126
].
includes
(
Current_Gear
)
||
([
'N'
,
0
].
includes
(
Current_Gear
)
&&
loadBrakeStatus
!=
0
)))
{
Message
.
error
(
'不能切换无人模式'
)
return
}
}
active
.
value
=
name
emit
(
'changeTab'
,
name
)
}
function
changeMode
()
{
active
.
value
=
'basic_message'
}
defineExpose
({
changeMode
})
</
script
>
<
style
lang=
"less"
scoped
>
.side-list {
background: #202634;
color: #5490D6;
height: 100%;
overflow: auto;
li {
display: flex;
flex-direction: column;
align-items: center;
padding: .1rem;
cursor: pointer;
i {
display: inline-block;
width: 2.5vw;
height: 2.5vw;
background-size: cover;
}
&.active {
color: #fff;
}
}
.disabled {
cursor: not-allowed;
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230724112713.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
:closable=
"false"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230724113344.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<!-- <p class="c-box b-box">
<Button type="primary" @click="boxDown(10)">货箱回落</Button>
<span>仅在0/1级故障下且货箱功能正常时点击</span>
</p> -->
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
:closable=
"false"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230731182014.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
:closable=
"false"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230802095929.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230802100007.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
title=
""
:closable=
"false"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230802100014.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
title=
1"
:closable=
"false"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230802100019.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
title=
"22"
:closable=
"false"
:mask-closable=
"true"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_20230802103757.vue
deleted
100644 → 0
View file @
a8cf27c6
<
template
>
<div
class=
"run-control"
>
<div
class=
"content"
>
<div
v-for=
"item in topList"
:key=
"item.index"
class=
"c-box"
>
<Button
type=
"primary"
@
click=
"handleSave(item.key, item.value)"
>
{{
item
.
btn
}}
</Button>
<p>
<span
class=
"desc"
>
{{
item
.
des
}}
</span>
<InputNumber
v-model=
"form[item.value]"
controls-outside
></InputNumber>
</p>
</div>
</div>
<div
class=
"run-middle"
>
<div
class=
"content"
v-for=
"item in middleList"
:key=
"item.index"
>
<p
class=
"c-box"
v-for=
"list in item"
:key=
"list.key"
>
<span>
{{
list
.
label
}}
</span>
<i-switch
size=
"large"
v-model=
"form[list.key]"
@
on-change=
"handleChange($event, list.type)"
>
<template
#
open
>
<span>
开启
</span>
</
template
>
<
template
#
close
>
<span>
关闭
</span>
</
template
>
</i-switch>
</p>
</div>
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(7)"
>
加载参数
</Button>
<span>
触发控制模块重新加载参数
</span>
</p>
</div>
<Modal
v-model=
"isShow"
title=
"提示"
:closable=
"true"
:mask-closable=
"false"
@
on-ok=
"handleSave(10)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行货箱回落指令
</p>
</Modal>
</div>
</template>
<
script
setup
>
import
{
ref
,
reactive
,
toRefs
,
watch
,
markRaw
}
from
'vue'
;
import
{
useVehicleStore
}
from
'../../store/VehicleStore'
;
import
{
storeToRefs
}
from
'pinia'
;
const
RUN_CONTROL_TOP
=
[
{
btn
:
'打火'
,
key
:
'1'
,
des
:
'打火持续时间'
,
value
:
'engineStartTime'
},
{
btn
:
'熄火'
,
key
:
'2'
,
des
:
'熄火持续时间'
,
value
:
'engineStallTime'
},
{
btn
:
'上电'
,
key
:
'3'
,
des
:
'上电持续时间'
,
value
:
'powerOnTime'
},
]
const
RUN_CONTROL_MIDDLE
=
[
[
{
label
:
'举升'
,
key
:
'liftSwitch'
,
type
:
4
},
{
label
:
'防滑'
,
key
:
'antiSlideSlip'
,
type
:
'5'
}
],
[
// {
// label: '感知屏蔽',
// key: 'perceptionShielding',
// type: 8
// },
{
label
:
'绕障'
,
key
:
'obstaclesBypassingEnable'
,
type
:
9
}
]
]
const
topList
=
markRaw
(
RUN_CONTROL_TOP
)
const
middleList
=
markRaw
(
RUN_CONTROL_MIDDLE
)
const
data
=
reactive
({
form
:
{}
})
const
{
form
}
=
toRefs
(
data
)
const
vehicleStore
=
useVehicleStore
()
const
vehicleStoreToRefs
=
storeToRefs
(
vehicleStore
)
const
{
controlInfo
}
=
vehicleStoreToRefs
const
isShow
=
ref
(
false
);
const
emits
=
defineEmits
([
'sendMsg'
])
function
handleSend
(
msg
)
{
emits
(
'sendMsg'
,
{
type
:
'/setting/controlSetting'
,
msg
:
JSON
.
parse
(
JSON
.
stringify
(
msg
))
})
}
function
handleChange
(
value
,
key
)
{
let
data
=
value
?
1
:
2
handleSend
({
value
:
data
,
type
:
Number
(
key
)
})
}
function
handleSave
(
type
,
key
)
{
let
value
=
1
if
(
key
)
{
value
=
form
.
value
[
key
]
||
1
}
let
data
=
{
type
:
Number
(
type
),
value
}
handleSend
(
data
)
}
function
boxDown
(){
isShow
.
value
=
true
;
}
function
boxCancel
(){
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
data
.
form
=
{...
value
}
},
{
immediate
:
true
,
deep
:
true
})
</
script
>
<
style
lang=
"less"
scoped
>
.run-control {
overflow: auto;
.content {
padding: 10px 20px;
background: #111521;
border-radius: 8px;
.c-box {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 2px solid rgba(63,69,86,0.6);
&:nth-last-child(1) {
border: 0;
}
.desc {
margin-right: 5px;
}
/deep/.ivu-btn-primary {
width: 88px;
}
}
.b-box {
justify-content: flex-start;
span {
margin-left: 10px;
}
}
}
.run-middle {
display: flex;
margin: 10px 0;
.content {
width: 50%;
&:nth-child(1) {
margin-right: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
.history/src/views/set-tags/RunControl_2023
0802100028
.vue
→
.history/src/views/set-tags/RunControl_2023
1027181124
.vue
View file @
53451bf0
...
...
@@ -26,10 +26,14 @@
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<Button
type=
"primary"
@
click=
"boxDown(10
,'货箱回落'
)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(11,'单步倒车')"
>
单步倒车
</Button>
<span>
发生两车或多车锁死时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
...
...
@@ -40,11 +44,11 @@
</div>
<Modal
v-model=
"isShow"
title=
"提示"
:closable=
"
fals
e"
:mask-closable=
"
tru
e"
@
on-ok=
"handleSave(
10
)"
:closable=
"
tru
e"
:mask-closable=
"
fals
e"
@
on-ok=
"handleSave(
codeValue
)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行
货箱回落
指令
</p>
<p
style=
"text-align: center;"
>
是否执行
{{codeText}}
指令
</p>
</Modal>
</div>
</template>
...
...
@@ -143,10 +147,15 @@
handleSend
(
data
)
}
function
boxDown
(){
let
codeValue
=
ref
(
''
);
let
codeText
=
ref
(
''
);
function
boxDown
(
val
,
text
){
codeValue
.
value
=
val
;
codeText
.
value
=
text
;
isShow
.
value
=
true
;
}
function
boxCancel
(){
codeValue
.
value
=
''
;
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
...
...
public/config.json
View file @
53451bf0
{
"SERVICE_IP"
:
"172.
20.10.11
:1234"
,
"SERVICE_IP"
:
"172.
16.0.114
:1234"
,
"MAP_CENTER"
:
[
39.74441007068
,
111.24544532751
],
"version"
:
"1.1.3"
}
\ No newline at end of file
src/views/SideBar.vue
View file @
53451bf0
...
...
@@ -94,12 +94,15 @@
if
(
name
===
'mode_switch'
&&
isDisable
.
value
===
'disabled'
)
{
return
}
if
([
'P'
,
126
].
includes
(
Current_Gear
)
||
([
'N'
,
0
].
includes
(
Current_Gear
)
&&
loadBrakeStatus
!=
0
))
{
active
.
value
=
name
emit
(
'changeTab'
,
name
)
}
else
{
if
(
name
==
'mode_switch'
){
if
(
!
([
'P'
,
126
].
includes
(
Current_Gear
)
||
([
'N'
,
0
].
includes
(
Current_Gear
)
&&
loadBrakeStatus
!=
0
)))
{
Message
.
error
(
'不能切换无人模式'
)
return
}
}
active
.
value
=
name
emit
(
'changeTab'
,
name
)
}
function
changeMode
()
{
...
...
src/views/set-tags/RunControl.vue
View file @
53451bf0
...
...
@@ -26,10 +26,14 @@
</div>
<div
class=
"content"
>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(10)"
>
货箱回落
</Button>
<Button
type=
"primary"
@
click=
"boxDown(10
,'货箱回落'
)"
>
货箱回落
</Button>
<span>
仅在0/1级故障下且货箱功能正常时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"boxDown(11,'单步倒车')"
>
单步倒车
</Button>
<span>
发生两车或多车锁死时点击
</span>
</p>
<p
class=
"c-box b-box"
>
<Button
type=
"primary"
@
click=
"handleSave(6)"
>
解锁
</Button>
<span>
解锁上次异常退出导致的路权锁定
</span>
</p>
...
...
@@ -42,9 +46,9 @@
title=
"提示"
:closable=
"true"
:mask-closable=
"false"
@
on-ok=
"handleSave(
10
)"
@
on-ok=
"handleSave(
codeValue
)"
@
on-cancel=
"boxCancel()"
>
<p
style=
"text-align: center;"
>
是否执行
货箱回落
指令
</p>
<p
style=
"text-align: center;"
>
是否执行
{{codeText}}
指令
</p>
</Modal>
</div>
</template>
...
...
@@ -143,10 +147,15 @@
handleSend
(
data
)
}
function
boxDown
(){
let
codeValue
=
ref
(
''
);
let
codeText
=
ref
(
''
);
function
boxDown
(
val
,
text
){
codeValue
.
value
=
val
;
codeText
.
value
=
text
;
isShow
.
value
=
true
;
}
function
boxCancel
(){
codeValue
.
value
=
''
;
isShow
.
value
=
false
;
}
watch
(
controlInfo
,
(
value
)
=>
{
...
...
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