Commit dfc9d9f5 authored by 刘怀志's avatar 刘怀志

微服务详情页未隐藏2级菜单

parent 9853422c
...@@ -93,6 +93,8 @@ function render(props = {}) { ...@@ -93,6 +93,8 @@ function render(props = {}) {
store.commit('SET_NAME', temp.name) store.commit('SET_NAME', temp.name)
store.commit('SET_AVATAR', temp.avatar) store.commit('SET_AVATAR', temp.avatar)
store.commit('SET_DEPTID', temp.deptId) store.commit('SET_DEPTID', temp.deptId)
store.commit('SET_CHANGE', props.setGlobalState)
store.commit('SET_GOLBALSTATE', props.getGlobalState())
} }
instance = new Vue({ instance = new Vue({
......
...@@ -52,5 +52,6 @@ router.beforeEach((to, from, next) => { ...@@ -52,5 +52,6 @@ router.beforeEach((to, from, next) => {
}) })
router.afterEach(() => { router.afterEach(() => {
store.getters.setGlobalState({ microChange: store.getters.getGlobalState.microChange += 1 })
NProgress.done() NProgress.done()
}) })
...@@ -15,6 +15,8 @@ const getters = { ...@@ -15,6 +15,8 @@ const getters = {
permission_routes: state => state.permission.routes, permission_routes: state => state.permission.routes,
topbarRouters: state => state.permission.topbarRouters, topbarRouters: state => state.permission.topbarRouters,
defaultRoutes: state => state.permission.defaultRoutes, defaultRoutes: state => state.permission.defaultRoutes,
sidebarRouters: state => state.permission.sidebarRouters sidebarRouters: state => state.permission.sidebarRouters,
setGlobalState: state => state.user.setGlobalState,
getGlobalState: state => state.user.getGlobalState
} }
export default getters export default getters
...@@ -8,7 +8,9 @@ const user = { ...@@ -8,7 +8,9 @@ const user = {
avatar: '', avatar: '',
roles: [], roles: [],
permissions: [], permissions: [],
deptId: '' deptId: '',
setGlobalState: null,
getGlobalState: null
}, },
mutations: { mutations: {
...@@ -29,6 +31,12 @@ const user = { ...@@ -29,6 +31,12 @@ const user = {
}, },
SET_DEPTID: (state, deptId) => { SET_DEPTID: (state, deptId) => {
state.deptId = deptId state.deptId = deptId
},
SET_CHANGE: (state, setGlobalState) => {
state.setGlobalState = setGlobalState
},
SET_GOLBALSTATE: (state, getGlobalState) => {
state.getGlobalState = getGlobalState
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment