|
|
|
@ -1,15 +1,15 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="airport-information" v-if="airportVal">
|
|
|
|
|
<div class="title"
|
|
|
|
|
>机场信息:<span v-if="airportVal.mode_code">
|
|
|
|
|
<template v-if="airportVal.mode_code == 0">作业准备中</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 1">飞行作业中</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 2">作业后状态恢复</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 3">自定义飞行区更新中</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 4">地形障碍物更新中</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 5">任务空闲</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 255">飞行器异常</template>
|
|
|
|
|
<template v-else-if="airportVal.mode_code == 256">未知状态</template>
|
|
|
|
|
>机场信息:<span v-if="airportVal.flighttask_step_code">
|
|
|
|
|
<template v-if="airportVal.flighttask_step_code == 0">作业准备中</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 1">飞行作业中</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 2">作业后状态恢复</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 3">自定义飞行区更新中</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 4">地形障碍物更新中</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 5">任务空闲</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 255">飞行器异常</template>
|
|
|
|
|
<template v-else-if="airportVal.flighttask_step_code == 256">未知状态</template>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>未知状态</span>
|
|
|
|
|
</div>
|
|
|
|
@ -90,7 +90,7 @@
|
|
|
|
|
});
|
|
|
|
|
console.log(props);
|
|
|
|
|
const airportVal: any = ref({
|
|
|
|
|
mode_code: 0,
|
|
|
|
|
flighttask_step_code: 0,
|
|
|
|
|
wind_speed: 0,
|
|
|
|
|
environment_temperature: 0,
|
|
|
|
|
temperature: 0,
|
|
|
|
@ -109,9 +109,15 @@
|
|
|
|
|
(val) => {
|
|
|
|
|
// network_state网络状态
|
|
|
|
|
if (val.topic == 'thing/product/' + airPort.sn + '/osd' && val.message.data.network_state) {
|
|
|
|
|
// console.log(val);
|
|
|
|
|
airportVal.value = val.message.data;
|
|
|
|
|
time.value = timestampToFormattedDate(val.message.timestamp);
|
|
|
|
|
} else if (
|
|
|
|
|
val.topic == 'thing/product/' + airPort.sn + '/osd' &&
|
|
|
|
|
val.message.data.flighttask_step_code
|
|
|
|
|
) {
|
|
|
|
|
// console.log(val);
|
|
|
|
|
airportVal.value.flighttask_step_code = val.message.data.flighttask_step_code;
|
|
|
|
|
time.value = timestampToFormattedDate(val.message.timestamp);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|