新增磁导航内部交管和信号交互界面

This commit is contained in:
ykkokluo
2026-08-24 16:16:58 +08:00
parent 125372b157
commit 134c7480b3
21 changed files with 1188 additions and 16 deletions
@@ -185,6 +185,23 @@ export const useAuthStore = defineStore('auth', {
/** 向导保存成功后调用:清掉 needsWizard,避免守卫再次把用户导回 /wizard。 */
markWizardDone() {
this.needsWizard = false
},
/** 向导保存后刷新 allowedPages(数据中心等按选型裁剪的页),失败不登出。 */
async refreshPermissions() {
try {
const me = await apiGetMe()
this.user = me.user
this.scope = me.scope
this.runMode = me.runMode
this.effectivePermissions = me.effectivePermissions
this.needsWizard = me.needsWizard ?? false
localStorage.setItem(USER_KEY, JSON.stringify(me.user))
localStorage.setItem(SCOPE_KEY, me.scope)
localStorage.setItem(RUN_MODE_KEY, me.runMode)
localStorage.setItem(PERM_KEY, JSON.stringify(me.effectivePermissions))
} catch {
/* 保存已成功,权限下次进页 / 刷新再对齐 */
}
}
}
})