127 lines
3.6 KiB
Vue
127 lines
3.6 KiB
Vue
<!-- 经典布局 -->
|
|
<template>
|
|
<el-container class="layout">
|
|
<el-header>
|
|
<div class="header-lf">
|
|
<div @click="goHome" class="logo flx-center">
|
|
<!-- <img
|
|
:src="globalStore.systemConfigLogo ? globalStore.systemConfigLogo : 'src/assets/images/login/china.png'"
|
|
alt="logo"
|
|
/> -->
|
|
<span>佳信捷3D综合态势展示系统</span>
|
|
</div>
|
|
</div>
|
|
<img class="angel" src="@/assets/images/Mars3DIcon/Rectangle.png" alt="" />
|
|
<div class="header-menu">
|
|
<div @click="router.push('/largeScreen')" :class="route.path == '/largeScreen' ? 'selected-class' : ''">
|
|
<!-- <img src="@/assets/images/icon/fire.png" alt="" srcset="" /> -->
|
|
<span>首页</span>
|
|
</div>
|
|
<div @click="router.push('/config')" :class="route.path == '/config' ? 'selected-class' : ''">
|
|
<!-- <img src="@/assets/images/icon/fire.png" alt="" srcset="" /> -->
|
|
<span>信息展示</span>
|
|
</div>
|
|
</div>
|
|
<img class="angel" src="@/assets/images/Mars3DIcon/Rectangle.png" alt="" />
|
|
<ToolBarRight />
|
|
</el-header>
|
|
<el-container class="classic-content">
|
|
<el-aside>
|
|
<!-- <div class="menu" :style="{ width: isCollapse ? '65px' : '210px' }"> 根据屏幕自动收缩 -->
|
|
<div class="menu">
|
|
<el-scrollbar>
|
|
<el-menu
|
|
:default-active="activeMenu"
|
|
:router="false"
|
|
:collapse="isCollapse"
|
|
:collapse-transition="false"
|
|
:unique-opened="true"
|
|
background-color="#ffffff"
|
|
text-color="#333333"
|
|
style="--el-menu-hover-bg-color: #fff"
|
|
>
|
|
<SubMenu :menuList="menuList" />
|
|
</el-menu>
|
|
</el-scrollbar>
|
|
</div>
|
|
</el-aside>
|
|
<el-container class="classic-main">
|
|
<Main />
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
</template>
|
|
|
|
<script setup lang="ts" name="layoutClassic">
|
|
import { computed } from "vue";
|
|
import { useRoute, useRouter } from "vue-router";
|
|
import { GlobalStore } from "@/stores";
|
|
import { AuthStore } from "@/stores/modules/auth";
|
|
import Main from "@/layouts/components/Main/index.vue";
|
|
import SubMenu from "@/layouts/components/Menu/SubMenu.vue";
|
|
import ToolBarLeft from "@/layouts/components/Header/ToolBarLeft.vue";
|
|
import ToolBarRight from "@/layouts/components/Header/ToolBarRight.vue";
|
|
import { HOME_URL } from "@/enums/Home";
|
|
// import router from "@/routers";
|
|
|
|
const route = useRoute();
|
|
const router = useRouter();
|
|
const authStore = AuthStore();
|
|
const globalStore = GlobalStore();
|
|
const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu : route.path));
|
|
const menuList = computed(() => authStore.showMenuListGet);
|
|
const isCollapse = computed(() => globalStore.themeConfig?.isCollapse);
|
|
const moduleTitle = globalStore.moduleName;
|
|
// const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
|
|
|
const goHome = () => {
|
|
router.push(HOME_URL[globalStore.accountType - 1]);
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import "./index.scss";
|
|
</style>
|
|
|
|
<style lang="scss">
|
|
.classic {
|
|
.classic-content {
|
|
// margin-top: 10px;
|
|
// padding-top: 10px;
|
|
height: calc(100% - 72px); // 减去头部高度
|
|
.classic-main {
|
|
width: calc(100% - 200px);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
.el-menu,
|
|
.el-menu--popup {
|
|
.el-menu-item {
|
|
&.is-active {
|
|
// background: var(--el-color-primary-light-9);
|
|
&::before {
|
|
position: absolute;
|
|
top: 12px;
|
|
bottom: 0;
|
|
right: 0;
|
|
width: 4px;
|
|
height: 38px;
|
|
content: "";
|
|
background: var(--el-color-primary);
|
|
}
|
|
// border-right: 4px solid #008bff;
|
|
&.is:hover {
|
|
background-color: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// guide
|
|
#driver-highlighted-element-stage {
|
|
background-color: #606266 !important;
|
|
}
|
|
}
|
|
</style>
|