|
@@ -182,8 +182,7 @@ function handleCloseInfo() {
|
|
|
|
|
|
onBeforeMount(() => {
|
|
|
getData()
|
|
|
- proxy.$bus.on('ueMsgReceived', (msg) => {
|
|
|
- if (msg.ModuleName !== 'DemoScene') return
|
|
|
+ proxy.$bus.on('ueReceived_DemoScene', (msg) => {
|
|
|
switch (msg.ActionName) {
|
|
|
case 'AlarmDetail': {
|
|
|
baseInfo.value.name = msg.Data.name
|
|
@@ -196,35 +195,17 @@ onBeforeMount(() => {
|
|
|
const { electricityWarning, weatherWarning, collision, noFlyZone, clearZone, nearstAircraft, routeDeviate } =
|
|
|
msg.Data.flightDataStatus
|
|
|
|
|
|
- if (electricityWarning !== 'SAFE' && electricityWarning !== '') {
|
|
|
- alertInfo.value.power.show = true
|
|
|
- } else {
|
|
|
- alertInfo.value.power.show = false
|
|
|
- }
|
|
|
+ alertInfo.value.power.show = electricityWarning !== 'SAFE' && electricityWarning !== ''
|
|
|
|
|
|
- if (weatherWarning !== 'SAFE' && weatherWarning !== '') {
|
|
|
- alertInfo.value.weather.show = true
|
|
|
- } else {
|
|
|
- alertInfo.value.weather.show = false
|
|
|
- }
|
|
|
+ alertInfo.value.weather.show = weatherWarning !== 'SAFE' && weatherWarning !== ''
|
|
|
|
|
|
- if ((nearstAircraft !== 'SAFE' && nearstAircraft !== '') || (collision !== 'SAFE' && collision !== '')) {
|
|
|
- alertInfo.value.collision.show = true
|
|
|
- } else {
|
|
|
- alertInfo.value.collision.show = false
|
|
|
- }
|
|
|
+ alertInfo.value.collision.show =
|
|
|
+ (nearstAircraft !== 'SAFE' && nearstAircraft !== '') || (collision !== 'SAFE' && collision !== '')
|
|
|
|
|
|
- if ((noFlyZone !== 'SAFE' && noFlyZone !== '') || (clearZone !== 'SAFE' && clearZone !== '')) {
|
|
|
- alertInfo.value.area.show = true
|
|
|
- } else {
|
|
|
- alertInfo.value.area.show = false
|
|
|
- }
|
|
|
+ alertInfo.value.area.show =
|
|
|
+ (noFlyZone !== 'SAFE' && noFlyZone !== '') || (clearZone !== 'SAFE' && clearZone !== '')
|
|
|
|
|
|
- if (routeDeviate === true) {
|
|
|
- alertInfo.value.offCourse.show = true
|
|
|
- } else {
|
|
|
- alertInfo.value.offCourse.show = false
|
|
|
- }
|
|
|
+ alertInfo.value.offCourse.show = routeDeviate
|
|
|
|
|
|
if (!uavInfoShow.value) uavInfoShow.value = true
|
|
|
if (layoutStore.sceneLoading) layoutStore.sceneLoading = false
|