forked from drone/command-center-dashboard

chenyao
2025-03-31 295eb3cc87aaa5176d64a4ef985cdad0bfefae9a
src/views/Home/Home.vue
@@ -1,27 +1,37 @@
<script setup></script>
<template>
  <div class="left">10</div>
  <div class="right">20</div>
  <template v-if="!singleUavHome?.id">
    <SearchBox />
    <HomeLeft />
    <HomeRight />
  </template>
  <template v-else>
    <SignMachineNest />
  </template>
  <RSide />
  <Footer />
</template>
<style scoped lang="scss">
div {
  font-size: 20px;
}
<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();
.left {
  left: 0;
  position: absolute;
  width: 300px;
  height: 100%;
  background: #2b373d;
}
.right{
  right: 0;
  position: absolute;
  width: 300px;
  height: 100%;
  background: #2b373d;
}
</style>
const singleUavHome = computed(() => store.state.home.singleUavHome);
onBeforeUnmount(()=>{
  store.commit('setSingleUavHome',null);
  viewerDestory()
})
onMounted(() => {
  _init('cesium');
});
</script>