Commit 07216dd0 authored by 张伯涛's avatar 张伯涛

修改

parent d5acea1b
......@@ -35,9 +35,14 @@ router.beforeEach((to, from, next) => {
if (routers.accessedRoutes[0].path === '/entry') {
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
next({ path: '/Home', replace: true }) // hack方法 确保addRoutes已完成
} else {
} else if (routers.accessedRoutes[0].children[0].path) {
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
next({ path: routers.accessedRoutes[0].children[0].path, replace: true }) // 没有首页,自动切换跳转到下一级
} else {
Message.error('用户无权限')
store.dispatch('FedLogOut').then(() => {
next({ path: '/' })
})
}
// 测试 默认静态页面
// store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
......
......@@ -149,7 +149,7 @@ export default {
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
this.loading = false
// this.$router.push('/welcome')
this.$router.push('/productionInfo/Station')
this.$router.push('/Home')
this.$store.commit('SET_NAME', res.data.user.username)
})
.catch(() => {
......
......@@ -234,7 +234,7 @@
:data="menuOptions"
show-checkbox
node-key="id"
:check-strictly="false"
:check-strictly="!form.menuCheckStrictly"
empty-text="加载中,请稍后"
:props="defaultProps"
@check-change="addListChange"
......
......@@ -1203,6 +1203,7 @@ export default {
},
/** 导入按钮操作 */
handleImport() {
this.importLoading = false
this.upload.title = '用户导入'
this.upload.open = true
},
......
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