|
|
@ -2,11 +2,12 @@ |
|
|
|
<div class="root"> |
|
|
|
<div class="root"> |
|
|
|
<div class="menu-box"> |
|
|
|
<div class="menu-box"> |
|
|
|
<div class="logo"> |
|
|
|
<div class="logo"> |
|
|
|
<img :src="logoIcon" alt="" class="logo-icon" /> |
|
|
|
<img :src="iconLogo" alt="" class="logo-icon" /> |
|
|
|
<span class="logo-label">设备管理平台</span> |
|
|
|
<span class="logo-label">文档管理平台</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-scrollbar> |
|
|
|
<el-scrollbar> |
|
|
|
<el-menu :default-active="activeMenu" class="menu" @select="menuClick"> |
|
|
|
<el-menu :default-active="activeMenu" router class="menu" @select="menuClick"> |
|
|
|
<template v-for="(menu, idx) in menuData" :key="idx"> |
|
|
|
<template v-for="(menu, idx) in menuData" :key="idx"> |
|
|
|
<el-menu-item |
|
|
|
<el-menu-item |
|
|
|
:index="menu.path" |
|
|
|
:index="menu.path" |
|
|
@ -73,7 +74,7 @@ |
|
|
|
v-model="themeSwitch" |
|
|
|
v-model="themeSwitch" |
|
|
|
:active-action-icon="Moon" |
|
|
|
:active-action-icon="Moon" |
|
|
|
:inactive-action-icon="Sunny" |
|
|
|
:inactive-action-icon="Sunny" |
|
|
|
style="--el-switch-on-color: #2C2C2C; --el-switch-off-color: #F2F2F2 " |
|
|
|
style="--el-switch-on-color: #2c2c2c; --el-switch-off-color: #f2f2f2" |
|
|
|
@change="toggle" |
|
|
|
@change="toggle" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<!-- <el-dropdown |
|
|
|
<!-- <el-dropdown |
|
|
@ -108,7 +109,9 @@ import Icon from '@/components/dashboard/Icon/src/Icon.vue' |
|
|
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' |
|
|
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' |
|
|
|
import { cloneDeep, debounce } from 'lodash' |
|
|
|
import { cloneDeep, debounce } from 'lodash' |
|
|
|
import { RouterView, useRouter, useRoute } from 'vue-router' |
|
|
|
import { RouterView, useRouter, useRoute } from 'vue-router' |
|
|
|
import logoIcon from '@/assets/image/dashboard/common/icon_logo_pg.png' |
|
|
|
import logoDarkIcon from '@/assets/image/dashboard/common/icon_logo_pg_dark.svg' |
|
|
|
|
|
|
|
import logoIcon from '@/assets/image/dashboard/common/icon_logo_pg.svg' |
|
|
|
|
|
|
|
|
|
|
|
import { usePermissionStore } from '@/stores/permission' |
|
|
|
import { usePermissionStore } from '@/stores/permission' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import { useUserStore } from '@/stores/user' |
|
|
|
import { useUserStore } from '@/stores/user' |
|
|
@ -128,11 +131,19 @@ provide(INIT_OPTIONS_KEY, { |
|
|
|
devicePixelRatio: 2, |
|
|
|
devicePixelRatio: 2, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const Sunny = useIcon({icon: 'line-md:moon-filled-to-sunny-filled-loop-transition', color: '#2C2C2C'}) |
|
|
|
const Sunny = useIcon({ |
|
|
|
const Moon = useIcon({icon: 'line-md:sunny-filled-loop-to-moon-filled-transition', color: '#2C2C2C'}) |
|
|
|
icon: 'line-md:moon-filled-to-sunny-filled-loop-transition', |
|
|
|
|
|
|
|
color: '#2C2C2C', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
const Moon = useIcon({ |
|
|
|
|
|
|
|
icon: 'line-md:sunny-filled-loop-to-moon-filled-transition', |
|
|
|
|
|
|
|
color: '#2C2C2C', |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const themeSwitch = ref(theme.value === 'dark') |
|
|
|
const themeSwitch = ref(theme.value === 'dark') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const iconLogo = computed(() => (theme.value === 'dark' ? logoDarkIcon : logoIcon)) |
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
const route = useRoute() |
|
|
|
|
|
|
|
|
|
|
|
const breadcrumbItems = computed(() => { |
|
|
|
const breadcrumbItems = computed(() => { |
|
|
@ -216,6 +227,10 @@ const menuSwitch = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const menuClick = (index: string) => { |
|
|
|
const menuClick = (index: string) => { |
|
|
|
|
|
|
|
if (index === '/OnlineDocument') { |
|
|
|
|
|
|
|
window.open('http://192.168.1.3:5181/', '_blank') |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
activeIndex.value = index |
|
|
|
activeIndex.value = index |
|
|
|
push(activeIndex.value) |
|
|
|
push(activeIndex.value) |
|
|
|
} |
|
|
|
} |
|
|
|