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

修改

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