You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.3 KiB

1 month ago
<template>
<LeftPanel>
<Drawer style="width: 458px" v-if="showLeftDrawer">
1 month ago
<ProjectCountCard />
<MonitoringCard />
<InspectionCard />
</Drawer>
<RegionSelect />
1 month ago
</LeftPanel>
<RightPanel>
<div>
<div class="top">
<MapLayerSwitch @showChange="layerTreeChange"></MapLayerSwitch>
</div>
<div class="bottom">
<MapLegend></MapLegend>
<LayerTree :showDialog="showLayerTree" />
</div>
</div>
<Drawer style="width: 460px" v-if="showRightDrawer">
1 month ago
<SafetyOverviewCard />
</Drawer>
</RightPanel>
<BottomPanel v-if="showBottomPanel"></BottomPanel>
<Map></Map>
1 month ago
</template>
<script setup lang="ts">
import LeftPanel from "../LeftPanel/index.vue";
import RightPanel from "../RightPanel/index.vue";
import BottomPanel from "../BottomPanel/index.vue";
import Drawer from "../Drawer/index.vue";
import ProjectCountCard from "./ProjectCountCard/index.vue";
import MonitoringCard from "./MonitoringCard/index.vue";
import InspectionCard from "./InspectionCard/index.vue";
import SafetyOverviewCard from "./SafetyOverviewCard/index.vue";
import MapLegend from "./Map/components/Legend.vue";
import MapLayerSwitch from "./Map/components/LayerSwitch.vue";
import LayerTree from "./Map/components/LayerTree.vue";
import Map from "./Map/index.vue";
import RegionSelect from "../RegionSelect/index.vue";
import { onBeforeUnmount, onMounted, ref } from "vue";
1 month ago
defineOptions({
name: "main",
});
const showLeftDrawer = ref(true);
const showRightDrawer = ref(true);
const showBottomPanel = ref(true);
const showLayerTree = ref(false);
function layerTreeChange(val: boolean) {
showLayerTree.value = val;
}
onMounted(() => {
window.$bus.$on("open-left-panel", () => {
showLeftDrawer.value = true;
});
window.$bus.$on("close-left-panel", () => {
showLeftDrawer.value = false;
});
window.$bus.$on("open-right-panel", () => {
showRightDrawer.value = true;
});
window.$bus.$on("close-right-panel", () => {
showRightDrawer.value = false;
});
window.$bus.$on("open-bottom-panel", () => {
showBottomPanel.value = true;
});
window.$bus.$on("close-bottom-panel", () => {
showBottomPanel.value = false;
});
});
onBeforeUnmount(() => {
window.$bus.$all_off();
});
1 month ago
</script>
<style scoped></style>