<!--
 * @Author: sjl
 * @Date: 2021-09-08 16:19:24
 * @Descripttion: 
-->
<template>
  <header-title />
  <Menu v-show="menuShow" />
  <Map />
  <router-view v-show="mapStore.sideMenu" />
</template>

<script>
import { defineComponent } from 'vue';
import HeaderTitle from '../header/HeaderTitle.vue';
import Map from '../map/Map.vue';
import Menu from '../menu/Menu.vue';
import { useMapStore } from '/@/store/modules/map';
import eventBus from '/@/utils/eventBus';
import { ref } from 'vue';
// 获取大屏基本信息
import { useBasicStore } from '/@/store/modules/basicData';
let basicStore = useBasicStore();
basicStore.getStDetailInfoAxios();
export default defineComponent({
  name: 'App',
  components: { HeaderTitle, Map, Menu },
  setup() {
    const mapStore = useMapStore();
    //注册中央事件用于控制下方按钮的显示与隐藏
    let menuShow = ref(true);
    eventBus.on('doubleScreenControl', (data) => {
      menuShow.value = data;
    });
    return {
      mapStore,
      menuShow,
    };
  },
});
</script>
