标签栏完善、布局管理、监控系统、信息通知管理跳转

This commit is contained in:
2023-03-17 14:22:08 +08:00
parent e74846da17
commit 7138434472
18 changed files with 856 additions and 63 deletions

View File

@@ -6,6 +6,7 @@ const permission = {
state: {
routers: constantRouterMap,
addRouters: [],
topbarRouters: [],
sidebarRouters: []
},
mutations: {
@@ -13,6 +14,14 @@ const permission = {
state.addRouters = routers
state.routers = constantRouterMap.concat(routers)
},
SET_TOPBAR_ROUTES: (state, routes) => {
// 顶部导航菜单默认添加统计报表栏指向首页
const index = [{
path: 'index',
meta: { title: '统计报表', icon: 'dashboard' }
}]
state.topbarRouters = routes.concat(index)
},
SET_SIDEBAR_ROUTERS: (state, routers) => {
state.sidebarRouters = constantRouterMap.concat(routers)
}
@@ -22,6 +31,7 @@ const permission = {
commit('SET_ROUTERS', asyncRouter)
},
SetSidebarRouters({ commit }, sidebarRouter) {
commit('SET_TOPBAR_ROUTES', sidebarRouter)
commit('SET_SIDEBAR_ROUTERS', sidebarRouter)
}
}

View File

@@ -1,10 +1,15 @@
import variables from '@/assets/styles/element-variables.scss'
import defaultSettings from '@/settings'
const { tagsView, fixedHeader, sidebarLogo, uniqueOpened, showFooter, footerTxt, caseNumber } = defaultSettings
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, uniqueOpened, showFooter, footerTxt, caseNumber } = defaultSettings
// const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''
const storageSetting = JSON.stringify(localStorage.getItem('layout-setting')) || ''
const state = {
theme: variables.theme,
showSettings: false,
title: '',
theme: storageSetting.theme || '#409EFF',
sideTheme: storageSetting.sideTheme || sideTheme,
showSettings: showSettings,
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
tagsView: tagsView,
fixedHeader: fixedHeader,
sidebarLogo: sidebarLogo,
@@ -12,6 +17,7 @@ const state = {
showFooter: showFooter,
footerTxt: footerTxt,
caseNumber: caseNumber
}
const mutations = {
@@ -25,6 +31,10 @@ const mutations = {
const actions = {
changeSetting({ commit }, data) {
commit('CHANGE_SETTING', data)
},
// 设置网页标题
setTitle({ commit }, title) {
state.title = title
}
}