WholeProcessPlatform/frontend/src/layout/components/AppMain.vue
2026-07-28 18:28:07 +08:00

62 lines
1.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
import { computed } from 'vue';
import { useTagsViewStore } from '@/store/modules/tagsView';
import { useRoute } from 'vue-router';
import MapModal from '@/components/MapModal/index.vue';
import ylfbModal from '@/components/ylfbModal/index.vue';
import { useModelStore } from '@/store/modules/model';
import GisView from '@/components/gis/GisView.vue';
const modelStore = useModelStore();
const tagsViewStore = useTagsViewStore();
const router = useRoute();
const routeKey = computed(() => router.path + Math.random());
// 智能配图页面隐藏底层 GisView避免地图叠放冲突
const isZhiNengPeiTu = computed(() => {
return router.path === '/zhiNengFenXi/zhiNengPeiTu/index';
});
</script>
<template>
<section class="app-main">
<GisView v-if="!isZhiNengPeiTu" />
<div class="gi-panels">
<router-view v-slot="{ Component, route }" :key="routeKey">
<transition name="router-fade" mode="out-in">
<keep-alive :include="tagsViewStore.cachedViews">
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</transition>
</router-view>
</div>
<MapModal
v-model:visible="modelStore.modalVisible"
:title="modelStore.title"
:tabs-config="modelStore.tabList"
/>
<!-- 鱼类分布 -->
<ylfbModal v-model:visible="modelStore.ylfbModalVisible" />
</section>
</template>
<style lang="scss" scoped>
@use '@/styles/variables.module.scss' as *;
.app-main {
min-height: calc(100vh - $layout-header-height - $locationbar-height);
width: 100%;
position: relative;
overflow: hidden;
background-color: #ffffff;
box-sizing: border-box;
}
.gi-panels {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
</style>