Files
wms-ui/src/router/route.ts

85 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-02-26 17:31:18 +08:00
import type { RouteRecordRaw } from 'vue-router'
/** 默认布局 */
const Layout = () => import('@/layout/index.vue')
/** 系统路由 */
export const systemRoutes: RouteRecordRaw[] = [
{
path: '/login',
name: 'Login',
component: () => import('@/views/login/index.vue'),
meta: { hidden: true },
},
{
path: '/',
name: 'Dashboard',
component: Layout,
redirect: '/dashboard/analysis', // 改为跳转到分析页
meta: { title: '仪表盘', icon: 'dashboard', hidden: false },
children: [
{
path: '/dashboard/workplace',
name: 'Workplace',
component: () => import('@/views/dashboard/workplace/index.vue'),
meta: { title: '工作台', icon: 'desktop', hidden: true }, // 改为隐藏
},
{
path: '/dashboard/analysis',
name: 'Analysis',
component: () => import('@/views/dashboard/analysis/index.vue'),
2026-02-27 11:38:33 +08:00
meta: { title: '首页', icon: 'insert-chart', hidden: false, affix: true },
2026-02-26 17:31:18 +08:00
},
],
},
{
path: '/social/callback',
component: () => import('@/views/login/social/index.vue'),
meta: { hidden: true },
},
{
path: '/pwdExpired',
component: () => import('@/views/login/pwdExpired/index.vue'),
meta: { hidden: true },
},
{
path: '/setting',
name: 'Setting',
component: Layout,
meta: { hidden: true },
children: [
{
path: '/setting/profile',
name: 'SettingProfile',
component: () => import('@/views/setting/profile/index.vue'),
meta: { title: '个人中心', showInTabs: false },
},
],
},
]
// 固定路由(默认路由)
export const constantRoutes: RouteRecordRaw[] = [
{
path: '/redirect',
component: Layout,
meta: { hidden: true },
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/default/redirect/index.vue'),
},
],
},
{
path: '/:pathMatch(.*)*',
component: () => import('@/views/default/error/404.vue'),
meta: { hidden: true },
},
{
path: '/403',
component: () => import('@/views/default/error/403.vue'),
meta: { hidden: true },
},
]