WholeProcessPlatform/frontend/src/layout/components/AppMain.vue
2026-08-11 16:24:41 +08:00

82 lines
2.4 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 GlobalRightDrawer from '@/components/GlobalRightDrawer/index.vue';
import basicInfoMod from '@/modules/rightSearchDrawer/basicInfo/index.vue';
import monitoringTableMod from '@/modules/rightSearchDrawer/monitoringTable/index.vue';
import { useModelStore } from '@/store/modules/model';
import GisView from '@/components/gis/GisView.vue';
const modelStore = useModelStore();
const tagsViewStore = useTagsViewStore();
const route = useRoute();
const routeKey = computed(() => route.path + Math.random());
// 智能配图页面隐藏底层 GisView避免地图叠放冲突
const isZhiNengPeiTu = computed(() => {
return route.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>
<!-- 全局抽屉承载锚点搜索内容基本信息 + 监测表格由锚点下拉 sttpCode 驱动打开 -->
<div class="global-drawer-wrap">
<GlobalRightDrawer>
<basicInfoMod />
<monitoringTableMod />
</GlobalRightDrawer>
</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;
}
.global-drawer-wrap {
position: absolute;
top: 0;
right: 0;
width: 450px;
height: 100%;
z-index: 100;
pointer-events: all;
}
</style>