Commit f9e8357e authored by 李玲燕's avatar 李玲燕

修改模式切换

parent ab553610
......@@ -70,6 +70,11 @@
const vehicleStore = useVehicleStore()
const vehicleStoreToRefs = storeToRefs(vehicleStore)
const pattern = computed(() => {
const {softDrivingPattern} = vehicleStoreToRefs
return softDrivingPattern.value
})
const isDisable = computed(() => {
const {isError, pattern , softDrivingPattern} = vehicleStoreToRefs
if (isError.value === 'fault' && softDrivingPattern.value === 0) {
......@@ -94,7 +99,8 @@
if (name === 'mode_switch' && isDisable.value === 'disabled') {
return
}
if(name=='mode_switch'){
// 模式切换:有人切无人 pattern(0:有人)
if(name=='mode_switch' && pattern == 0){
if (!(['N', 0].includes(Current_Gear) && (loadBrakeStatus || parkBrakeStatus))) {
Message.error('不能切换无人模式')
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment