forked from drone/command-center-dashboard

chenyao
2025-03-31 295eb3cc87aaa5176d64a4ef985cdad0bfefae9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
  <template v-if="!singleUavHome?.id">
    <SearchBox />
    <HomeLeft />
    <HomeRight />
  </template>
  <template v-else>
    <SignMachineNest />
  </template>
  <RSide />
  <Footer />
</template>
 
<script setup>
import HomeRight from './components/HomeRight/HomeRight.vue';
import HomeLeft from '@/views/Home/components/HomeLeft/HomeLeft.vue';
import SearchBox from '@/views/Home/SearchBox.vue';
import SignMachineNest from '@/views/SignMachineNest/SignMachineNest.vue';
import { useStore } from 'vuex';
import Footer from '@/views/Home/Footer.vue';
import RSide from '@/views/Home/RSide.vue';
import { onMounted } from 'vue';
import cesiumOperation from '@/utils/cesium-tsa';
const store = useStore();
const { _init,viewerDestory } = cesiumOperation();
 
const singleUavHome = computed(() => store.state.home.singleUavHome);
 
onBeforeUnmount(()=>{
  store.commit('setSingleUavHome',null);
  viewerDestory()
})
 
onMounted(() => {
  _init('cesium');
});
</script>