From 98312d84f785c09574bfd5add730ea448fb0cbd5 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 13 十月 2026 11:29:17 +0800
Subject: [PATCH] feat: 财务 1.惠牧添加财务模块
---
src/store/auth.ts | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/store/auth.ts b/src/store/auth.ts
index d014bfa..15fd19e 100644
--- a/src/store/auth.ts
+++ b/src/store/auth.ts
@@ -1,13 +1,13 @@
-import type { AuthPermissionInfo, Recordable, UserInfo } from '../packages/types/src';
+import type { AuthPermissionInfo, Recordable, UserInfo } from '@vben/types';
import type { AuthApi } from '#/api';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
-import { LOGIN_PATH } from '../packages/constants/src';
-import { preferences } from '../packages/preferences/src';
-import { resetAllStores, useAccessStore, useUserStore } from '../packages/stores/src';
+import { LOGIN_PATH } from '@vben/constants';
+import { preferences } from '@vben/preferences';
+import { resetAllStores, useAccessStore, useUserStore } from '@vben/stores';
import { notification } from 'ant-design-vue';
import { defineStore } from 'pinia';
@@ -21,6 +21,7 @@
socialLogin,
} from '#/api';
import { $t } from '#/locales';
+import { automaticApproval, loadAuditPolicy } from '#/store/audit-policy';
export const useAuthStore = defineStore('auth', () => {
const accessStore = useAccessStore();
@@ -86,9 +87,7 @@
// oxlint-disable-next-line no-unused-expressions
onSuccess
? await onSuccess?.()
- : await router.push(
- userInfo.homePath || preferences.app.defaultHomePath,
- );
+ : await router.push('/analytics');
}
if (userInfo?.nickname) {
@@ -136,6 +135,7 @@
// eslint-disable-next-line no-useless-assignment
let authPermissionInfo: AuthPermissionInfo | null = null;
authPermissionInfo = await getAuthPermissionInfoApi();
+ await loadAuditPolicy();
// userStore
userStore.setUserInfo(authPermissionInfo.user);
userStore.setUserRoles(authPermissionInfo.roles);
@@ -147,6 +147,7 @@
function $reset() {
loginLoading.value = false;
+ automaticApproval.value = false;
}
return {
--
Gitblit v1.9.3