From 92a680303503cf2cbc5fcd584f09fe0d29a71524 Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 16:57:23 +0800
Subject: [PATCH] feat(mes): 统一工作台报工记录与报工页面的提交批次号校验逻辑
---
src/router/guard.ts | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/router/guard.ts b/src/router/guard.ts
index 19493d5..88a80ee 100644
--- a/src/router/guard.ts
+++ b/src/router/guard.ts
@@ -1,10 +1,10 @@
import type { Router } from 'vue-router';
-import { LOGIN_PATH } from '../packages/constants/src';
-import { $t } from '../packages/locales/src';
-import { preferences } from '../packages/preferences/src';
-import { useAccessStore, useDictStore, useUserStore } from '../packages/stores/src';
-import { startProgress, stopProgress } from '../packages/utils/src';
+import { LOGIN_PATH } from '@vben/constants';
+import { $t } from '@vben/locales';
+import { preferences } from '@vben/preferences';
+import { useAccessStore, useDictStore, useUserStore } from '@vben/stores';
+import { startProgress, stopProgress } from '@vben/utils';
import { message } from 'ant-design-vue';
@@ -60,8 +60,7 @@
if (to.path === LOGIN_PATH && accessStore.accessToken) {
return decodeURIComponent(
(to.query?.redirect as string) ||
- userStore.userInfo?.homePath ||
- preferences.app.defaultHomePath,
+ '/analytics',
);
}
return true;
@@ -132,7 +131,7 @@
userStore.setUserRoles(userRoles);
const redirectPath = (from.query.redirect ??
(to.path === preferences.app.defaultHomePath
- ? userInfo?.homePath || preferences.app.defaultHomePath
+ ? '/analytics'
: to.fullPath)) as string;
return {
--
Gitblit v1.9.3