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

增加梯子开关、修改调试信息排序

parent 42b0618d
......@@ -8,7 +8,7 @@ set (CMAKE_CXX_STANDARD 11)
# Version.
set (MAJOR_VERSION "1")
set (MINOR_VERSION "1")
set (PATCH_VERSION "8")
set (PATCH_VERSION "9")
# Import cmake modules.
list (APPEND CMAKE_MODULE_PATH "$ENV{HT_BUILDSYS_CMAKE_MODULES}")
......
{
"SERVICE_IP": "192.168.92.185:1234",
"SERVICE_IP": "192.168.92.153:1234",
"LOG_SERVE_IP":"192.168.93.87:8020",
"MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.4"
......
......@@ -71,53 +71,53 @@ export const INFORMATION_MESSAGE = [
],
[
{
name: 'parkBrakeCmd',
label: '驻车制动给定'
name: 'mechBrakeCmd',
label: '机械制动给定'
},
{
name: 'parkBrakeStatus',
name: 'mechBrakeStatus',
label: '反馈'
}
},
],
[
{
name: 'exhaustBrakeCmd',
label: '排气制动给定'
name: 'loadBrakeCmd',
label: '装载制动给定'
},
{
name: 'exhaustBrakeStatus',
name: 'loadBrakeStatus',
label: '反馈'
}
},
],
[
{
name: 'retarderGearCmd',
label: '缓行档位给定'
name: 'parkBrakeCmd',
label: '驻车制动给定'
},
{
name: 'retarderGearStatus',
name: 'parkBrakeStatus',
label: '反馈'
}
],
[
{
name: 'loadBrakeCmd',
label: '装载制动给定'
name: 'exhaustBrakeCmd',
label: '排气制动给定'
},
{
name: 'loadBrakeStatus',
name: 'exhaustBrakeStatus',
label: '反馈'
},
}
],
[
{
name: 'mechBrakeCmd',
label: '机械制动给定'
name: 'retarderGearCmd',
label: '缓行档位给定'
},
{
name: 'mechBrakeStatus',
name: 'retarderGearStatus',
label: '反馈'
},
}
],
[
{
......
......@@ -12,6 +12,30 @@
</template>
</i-switch>
</p>
<p>
<span class="light-label">梯子下降</span>
<i-switch :disabled="drivingPattern == 0" v-model="form['ladderDownSwitch']" size="large" @on-change="handleChange($event, 'ladderDownSwitch')">
<template #open>
<span>开启</span>
</template>
<template #close>
<span>关闭</span>
</template>
</i-switch>
<span style="margin-left: 10px;">下降状态:{{ ladderDownStatus == 0 ? '未下降到位' : '下降到位' }}</span>
</p>
<p>
<span class="light-label">梯子上升</span>
<i-switch :disabled="drivingPattern == 0" v-model="form['ladderUpSwitch']" size="large" @on-change="handleChange($event, 'ladderUpSwitch')">
<template #open>
<span>开启</span>
</template>
<template #close>
<span>关闭</span>
</template>
</i-switch>
<span style="margin-left: 10px;">上升状态:{{ ladderUpStatus == 0 ? '未上升到位' : '上升到位' }}</span>
</p>
</div>
<div class="footer">
<Button type="primary" @click="handleSave">保存</Button>
......@@ -20,7 +44,7 @@
</template>
<script setup>
import { reactive, toRefs, watch, markRaw } from 'vue';
import { reactive, toRefs, watch, markRaw, computed, ref } from 'vue';
import { useVehicleStore } from '../../store/VehicleStore';
import { storeToRefs } from 'pinia';
......@@ -57,7 +81,14 @@
const lists = markRaw(LIGHT_CONTROL_LIST)
const vehicleStore = useVehicleStore()
const vehicleStoreToRefs = storeToRefs(vehicleStore)
const { light } = vehicleStoreToRefs
const { light, getVehicleDebug, statusinfo } = vehicleStoreToRefs
const ladderUpStatus = ref(0)
const ladderDownStatus = ref(0)
// 软件层面有人-0;无人-1
const drivingPattern = computed(() => {
let pattern = statusinfo.value['softDrivingPattern']
return pattern
})
const emits = defineEmits(['sendMsg'])
......@@ -68,12 +99,28 @@
})
}
function handleChange(value, name) {
if (value) {
data.form[name === 'ladderUpSwitch' ? 'ladderDownSwitch' : 'ladderUpSwitch'] = false
}
}
watch(light, (value) => {
data.form = {...value}
}, {
immediate: true,
deep: true
})
watch(getVehicleDebug, (debugValue) => {
if (debugValue) {
ladderUpStatus.value = debugValue.ladderUpStatus
ladderDownStatus.value = debugValue.ladderDownStatus
}
}, {
immediate: true,
deep: true
})
</script>
<style lang="less" scoped>
......@@ -87,7 +134,7 @@
margin: 10px 0;
.light-label {
display: inline-block;
width: 4vw;
width: 5.5vw;
min-width: 55px;
}
}
......
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