Commit 11376bb9 authored by 李玲燕's avatar 李玲燕

车辆位姿

parent 47edb76b
{ {
"SERVICE_IP": "192.168.109.84:1234", "SERVICE_IP": "192.168.14.38:1234",
"LOG_SERVE_IP":"192.168.93.87:8020", "LOG_SERVE_IP":"192.168.93.87:8020",
"MAP_CENTER": [39.74441007068,111.24544532751], "MAP_CENTER": [39.74441007068,111.24544532751],
"version": "1.1.4" "version": "1.1.4"
......
...@@ -124,8 +124,8 @@ export const useVehicleStore = defineStore('vehicle', { ...@@ -124,8 +124,8 @@ export const useVehicleStore = defineStore('vehicle', {
} }
}, },
setBasicInfo(data) { setBasicInfo(data) {
const {oil, isOil, tire0, tire1, tire2, tire3, tire4, tire5} = data const {oil, isOil, tire0, tire1, tire2, tire3, tire4, tire5, roll, pitch} = data
this.vehicleBasic = {oil, isOil, tire0, tire1, tire2, tire3, tire4, tire5} this.vehicleBasic = {oil, isOil, tire0, tire1, tire2, tire3, tire4, tire5, roll: roll.toFixed(1), pitch: pitch.toFixed(1)}
} }
} }
}) })
\ No newline at end of file
...@@ -5,6 +5,16 @@ ...@@ -5,6 +5,16 @@
<div class="navigate-preview"> <div class="navigate-preview">
<img src="/image/navigate.png" class="navigate" @click="changeNavigate" alt="" /> <img src="/image/navigate.png" class="navigate" @click="changeNavigate" alt="" />
</div> </div>
<div class="roll-pitch">
<div class="roll-pitch-item">
<img :style="`transform: rotateZ(${roll}deg)`" src="/image/roll_img.png" alt="" />
<span>{{ roll }}</span>
</div>
<div class="roll-pitch-item">
<img :style="`transform: rotateZ(${pitch}deg)`" src="/image/pitch_img.png" alt="" />
<span>{{ pitch }}</span>
</div>
</div>
</div> </div>
</template> </template>
...@@ -100,12 +110,28 @@ ...@@ -100,12 +110,28 @@
} = mapStoreToRefs } = mapStoreToRefs
const vehicleStore = useVehicleStore() const vehicleStore = useVehicleStore()
const vehicleStoreToRefs = storeToRefs(vehicleStore) const vehicleStoreToRefs = storeToRefs(vehicleStore)
const { vehiclesPositioninfo, safeObj, trajObj, paraminfo, deleteVehicles } = vehicleStoreToRefs const { vehiclesPositioninfo, safeObj, trajObj, paraminfo, deleteVehicles, vehicleBasic } = vehicleStoreToRefs
const deviceId = computed(() => { const deviceId = computed(() => {
return paraminfo.value.deviceId return paraminfo.value.deviceId
}) })
const roll = computed(() => {
if (vehicleBasic) {
return vehicleBasic.value.roll || 0
} else {
return 0
}
})
const pitch = computed(() => {
if (vehicleBasic) {
return vehicleBasic.value.pitch || 0
} else {
return 0
}
})
const emits = defineEmits(['handleSend']) const emits = defineEmits(['handleSend'])
onMounted(() => { onMounted(() => {
...@@ -830,18 +856,38 @@ ...@@ -830,18 +856,38 @@
width: 4vw; width: 4vw;
height: 4vw; height: 4vw;
z-index: 999; z-index: 999;
max-width: 60px;
max-height: 60px;
} }
.compass { .compass {
bottom: 88px; bottom: 88px;
max-width: 60px;
max-height: 60px;
} }
.navigate-preview { .navigate-preview {
bottom: 24px; bottom: 24px;
max-width: 60px; }
max-height: 60px; .roll-pitch {
position: absolute;
bottom: 24px;
right: 10px;
color: #fff;
z-index: 999;
img {
width: 6vw;
height: 6vw;
max-width: 100px;
max-height: 100px;
}
.roll-pitch-item {
position: relative;
span {
position: absolute;
left: 50%;
top: 45%;
transform: translateX(-50%);
}
}
} }
</style> </style>
<style lang="less"> <style lang="less">
......
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