diff --git a/frontend/new-web/.env b/frontend/new-web/.env
index 4000d5b0..41f1a9c0 100755
--- a/frontend/new-web/.env
+++ b/frontend/new-web/.env
@@ -10,7 +10,7 @@ VITE_PORT = 5180
VITE_BASE_URL = /
# 权限模式【 frontend 仅前端路由 / backend 仅后端菜单 / mixed 后端菜单+前端路由模块合并 】
-VITE_ACCESS_MODE = mixed
+VITE_ACCESS_MODE = frontend
# 跨域请求时是否携带 Cookie(开启前需确保后端支持)
VITE_WITH_CREDENTIALS = false
diff --git a/frontend/new-web/art-design-pro b/frontend/new-web/art-design-pro
new file mode 160000
index 00000000..6b6d781a
--- /dev/null
+++ b/frontend/new-web/art-design-pro
@@ -0,0 +1 @@
+Subproject commit 6b6d781a63eb51782841ac9c29c2bb42a23911f2
diff --git a/frontend/new-web/scripts/clean-dev.ts b/frontend/new-web/scripts/clean-dev.ts
index 758c11d2..10f2317b 100644
--- a/frontend/new-web/scripts/clean-dev.ts
+++ b/frontend/new-web/scripts/clean-dev.ts
@@ -156,7 +156,6 @@ const targets = [
"CHANGELOG.md",
"CHANGELOG.zh-CN.md",
"src/views/safeguard",
- "src/views/system/nested",
"src/views/widgets",
"src/views/dashboard/analysis",
"src/views/dashboard/ecommerce",
@@ -254,73 +253,14 @@ async function cleanRouteModules() {
// 忽略
}
- // 重写 system.ts - 移除 nested 嵌套菜单
- const systemContent = `import { AppRouteRecord } from '@/types/router'
-
-export const systemRoutes: AppRouteRecord = {
- path: '/art-system',
- name: 'ArtSystem',
- component: '/index/index',
- meta: {
- title: 'menus.system.title',
- icon: 'ri:user-3-line',
- roles: ['R_SUPER', 'R_ADMIN']
- },
- children: [
- {
- path: 'user',
- name: 'ArtTplUser',
- component: '/system/user',
- meta: {
- title: 'menus.system.user',
- keepAlive: true,
- roles: ['R_SUPER', 'R_ADMIN']
- }
- },
- {
- path: 'role',
- name: 'ArtTplRole',
- component: '/system/role',
- meta: {
- title: 'menus.system.role',
- keepAlive: true,
- roles: ['R_SUPER']
- }
- },
- {
- path: 'menu',
- name: 'ArtTplMenus',
- component: '/system/menu',
- meta: {
- title: 'menus.system.menu',
- keepAlive: true,
- roles: ['R_SUPER'],
- authList: [
- { title: '新增', authMark: 'add' },
- { title: '编辑', authMark: 'edit' },
- { title: '删除', authMark: 'delete' }
- ]
- }
- }
- ]
-}
-`;
- await fs.writeFile(path.join(modulesPath, "system.ts"), systemContent, "utf-8");
-
- // 重写 index.ts - 只导入保留的模块
+ // 重写 index.ts:widgets 已删则仅保留 exception
const indexContent = `import { AppRouteRecord } from '@/types/router'
-import { systemRoutes } from './system'
-import { resultRoutes } from './result'
import { exceptionRoutes } from './exception'
/**
- * 导出所有模块化路由
+ * 导出所有模块化路由(业务菜单由后端动态下发)
*/
-export const routeModules: AppRouteRecord[] = [
- systemRoutes,
- resultRoutes,
- exceptionRoutes
-]
+export const routeModules: AppRouteRecord[] = [exceptionRoutes]
`;
await fs.writeFile(path.join(modulesPath, "index.ts"), indexContent, "utf-8");
diff --git a/frontend/new-web/src/components/Pagination/index.vue b/frontend/new-web/src/components/Pagination/index.vue
index 72d092f8..bbf32135 100644
--- a/frontend/new-web/src/components/Pagination/index.vue
+++ b/frontend/new-web/src/components/Pagination/index.vue
@@ -6,8 +6,11 @@
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:background="background"
+ :disabled="disabled"
:layout="layout"
:page-sizes="pageSizes"
+ :pager-count="pagerCount"
+ :size="size"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
@@ -17,6 +20,8 @@
diff --git a/frontend/new-web/src/config/setting.ts b/frontend/new-web/src/config/setting.ts
index 9769ff5e..93fb2fab 100644
--- a/frontend/new-web/src/config/setting.ts
+++ b/frontend/new-web/src/config/setting.ts
@@ -114,7 +114,7 @@ export const SETTING_DEFAULT_CONFIG = {
/** 是否显示语言切换 */
showLanguage: true,
/** 是否显示进度条 */
- showNprogress: false,
+ showNprogress: true,
/** 是否显示设置引导 */
showSettingGuide: true,
/** 是否显示节日文本 */
diff --git a/frontend/new-web/src/hooks/core/useAuth.ts b/frontend/new-web/src/hooks/core/useAuth.ts
index 0d06e658..f43276b9 100644
--- a/frontend/new-web/src/hooks/core/useAuth.ts
+++ b/frontend/new-web/src/hooks/core/useAuth.ts
@@ -35,13 +35,13 @@ import { storeToRefs } from "pinia";
import { useUserStore } from "@/store/modules/user.store";
import { useAppMode } from "@/hooks/core/useAppMode";
import type { AppRouteRecord } from "@/types/router";
+import { ROLE_ROOT } from "@/constants";
type AuthItem = NonNullable[number];
-const userStore = useUserStore();
-
export const useAuth = () => {
const route = useRoute();
+ const userStore = useUserStore();
const { isFrontendMode } = useAppMode();
const { info } = storeToRefs(userStore);
@@ -54,17 +54,28 @@ export const useAuth = () => {
: [];
/**
- * 检查是否拥有某权限标识(前后端模式通用)
- * @param auth 权限标识
- * @returns 是否有权限
+ * 检查是否拥有某权限标识(与 v-hasPerm / 表格内 ArtButtonMore 全码一致)
+ * @param auth 权限标识(多为后端菜单 permission 全码,如 module_system:role:update)
*/
const hasAuth = (auth: string): boolean => {
- // 前端模式
+ if (!auth) return true;
+
+ const userPrems = userStore.prems;
+ const roles = userStore.basicInfo?.roles as { code?: string }[] | undefined;
+
+ // 与 directives/permission hasPerm 一致:超级管理员、通配
+ if (roles?.some((r) => r.code === ROLE_ROOT)) return true;
+ if (userPrems.includes("*:*:*")) return true;
+
+ /** 登录后由菜单树汇总的全局权限码(与 v-hasPerm 同源) */
+ if (userPrems.includes(auth)) return true;
+
+ // 前端模式:兼容 info.permissions
if (isFrontendMode.value) {
return frontendAuthList.includes(auth);
}
- // 后端模式
+ // 后端模式:当前路由 meta 短标识(与 v-auth 一致)
return backendAuthList.some((item) => item?.authMark === auth);
};
diff --git a/frontend/new-web/src/layouts/art-page-content/index.vue b/frontend/new-web/src/layouts/art-page-content/index.vue
index 30805bfc..0fc4698d 100644
--- a/frontend/new-web/src/layouts/art-page-content/index.vue
+++ b/frontend/new-web/src/layouts/art-page-content/index.vue
@@ -1,14 +1,9 @@
-