权限跳转修改+预算填报修改

This commit is contained in:
2026-03-10 08:53:03 +08:00
parent d379d7bb5b
commit 1d5af53e1a
3 changed files with 5 additions and 1 deletions

View File

@@ -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 })