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

自动超车

parent a6ca5851
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="content" v-for="item in middleList" :key="item.index"> <div class="content" v-for="item in middleList" :key="item.index">
<p class="c-box" v-for="list in item" :key="list.key"> <p class="c-box" v-for="list in item" :key="list.key">
<span>{{list.label}}</span> <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> <template #open>
<span>开启</span> <span>开启</span>
</template> </template>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</template> </template>
<script setup> <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 { useVehicleStore } from '../../store/VehicleStore';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
...@@ -97,6 +97,11 @@ ...@@ -97,6 +97,11 @@
label: '防滑', label: '防滑',
key: 'antiSlideSlip', key: 'antiSlideSlip',
type: '5' type: '5'
},
{
label: '自检',
key: 'selfCheckSwitch',
type: 15,
} }
], ],
[ [
...@@ -111,10 +116,11 @@ ...@@ -111,10 +116,11 @@
type: 9 type: 9
}, },
{ {
label: '自', label: '自动超车',
key: 'selfCheckSwitch', key: 'overTakeSwitch',
type: 15, type: 16
} }
] ]
] ]
...@@ -128,7 +134,16 @@ ...@@ -128,7 +134,16 @@
const vehicleStoreToRefs = storeToRefs(vehicleStore) const vehicleStoreToRefs = storeToRefs(vehicleStore)
const { controlInfo } = vehicleStoreToRefs 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']) 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