权限跳转修改+预算填报修改
This commit is contained in:
@@ -66,7 +66,7 @@ router.beforeEach((to, from, next) => {
|
||||
// 根据 roles 权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||
const defaultPath = findDefaultPathFromMenus(userInfo.menus) || '/'
|
||||
store.commit('permission/SET_DEFAULT_PATH', defaultPath)
|
||||
store.dispatch('SetDefaultPath', defaultPath)
|
||||
// 仅当目标为根路径 '/' 时跳默认页;否则保持当前路径(含刷新场景),避免刷新被误判为“未匹配”而跳到默认页
|
||||
if (to.path === '/') {
|
||||
next({ path: defaultPath, replace: true })
|
||||
|
||||
@@ -52,6 +52,9 @@ const permission = {
|
||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||
resolve(rewriteRoutes)
|
||||
})
|
||||
},
|
||||
SetDefaultPath({commit}, path) {
|
||||
commit('SET_DEFAULT_PATH', path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,6 +316,7 @@ export default {
|
||||
this.getDataPage();
|
||||
});
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.$emit('updateLeft')
|
||||
}).catch(() => { });
|
||||
},
|
||||
// 请求下拉数据和表格数据(使用动态切换的getDataList接口)
|
||||
|
||||
Reference in New Issue
Block a user