feat: 移除系统管理路由并优化路由结构

- 删除不再使用的系统管理路由模块
- 更新路由配置,确保仅保留必要的模块
- 添加Element Plus图标全局注册功能
- 优化分页组件,增加更多属性支持
- 重构表格操作列渲染逻辑,提升代码可读性和复用性
- 更新多个组件以支持新的操作列渲染方式
This commit is contained in:
zhangtao
2026-05-05 21:47:13 +08:00
parent 6db264bef3
commit 49ffb9dbb2
50 changed files with 936 additions and 3214 deletions
+3 -63
View File
@@ -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.tswidgets 已删则仅保留 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");