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

自动超车

parent a6ca5851
......@@ -13,7 +13,7 @@
<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)">
<i-switch size="large" :disabled="isDisabled(list.key)" v-model="form[list.key]" @on-change="handleChange($event, list.type)">
<template #open>
<span>开启</span>
</template>
......@@ -62,7 +62,7 @@
</template>
<script setup>
import { ref,reactive, toRefs, watch, markRaw } from 'vue';
import { ref,reactive, toRefs, watch, markRaw, computed } from 'vue';
import { useVehicleStore } from '../../store/VehicleStore';
import { storeToRefs } from 'pinia';
......@@ -97,6 +97,11 @@
label: '防滑',
key: 'antiSlideSlip',
type: '5'
},
{
label: '自检',
key: 'selfCheckSwitch',
type: 15,
}
],
[
......@@ -111,10 +116,11 @@
type: 9
},
{
label: '自',
key: 'selfCheckSwitch',
type: 15,
label: '自动超车',
key: 'overTakeSwitch',
type: 16
}
]
]
......@@ -128,7 +134,16 @@
const vehicleStoreToRefs = storeToRefs(vehicleStore)
const { controlInfo } = vehicleStoreToRefs
const isShow=ref(false);
const isShow = ref(false);
const isDisabled = computed(() => {
return (key) => {
if (key === 'overTakeSwitch') {
return !form.value['obstaclesBypassingEnable']
}
return false
}
})
const emits = defineEmits(['sendMsg'])
......
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