forked from drone/command-center-dashboard

chenyao
2025-04-09 cc1aacf766bc902001f460fdfce20a9ec2ea097d
src/views/Home/Home.vue
@@ -1,15 +1,17 @@
<template>
   <template v-if="singleUavHome?.device_sn">
      <SignMachineNest />
   </template>
   <!--      单个机巢页面-->
   <SignMachineNest v-if="singleUavHome?.device_sn" />
   <!--      事件概述详细信息页面-->
   <EventOverviewDetail v-else-if="isEventOverviewDetail" />
   <AINowFly v-else-if="isAINowFly" />
   <!--         首页默认的页面-->
   <template v-else>
      <EventOverviewDetail v-if="isEventOverviewDetail" />
      <template v-else>
         <SearchBox />
         <HomeLeft />
         <HomeRight />
      </template>
      <HomeLeft />
      <HomeRight />
   </template>
   <SearchBox />
   <RSide />
   <Footer />
</template>
@@ -25,16 +27,19 @@
import { onMounted } from 'vue'
import cesiumOperation from '@/utils/cesium-tsa'
import EventOverviewDetail from '@/views/Home/EventOverviewDetail/EventOverviewDetail.vue'
import AINowFly from '@/views/Home/AINowFly.vue'
const store = useStore()
const { _init, viewerDestory } = cesiumOperation()
const singleUavHome = computed(() => store.state.home.singleUavHome)
const isEventOverviewDetail = computed(() => store.state.home.isEventOverviewDetail)
const isAINowFly = computed(() => store.state.home.footActiveIndex === 5)
onUnmounted(() => {
   store.commit('setSingleUavHome', null)
   console.log('home销毁')
   store.commit('setIsEventOverviewDetail', false)
   store.commit('setFootActiveIndex', 0)
   viewerDestory()
})