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/workplace', meta: { title: '仪表盘', icon: 'dashboard', hidden: false }, children: [ { path: '/dashboard/workplace', name: 'Workplace', component: () => import('@/views/dashboard/workplace/index.vue'), meta: { title: '工作台', icon: 'desktop', hidden: false, affix: true }, }, { path: '/dashboard/analysis', name: 'Analysis', component: () => import('@/views/dashboard/analysis/index.vue'), meta: { title: '分析页', icon: 'insert-chart', hidden: false }, }, ], }, { path: '/project', name: 'Project', component: Layout, meta: { title: '项目管理', icon: 'project', hidden: false, sort: 2 }, children: [ { path: '/project', name: 'ProjectList', component: () => import('@/views/project/index.vue'), meta: { title: '项目列表', icon: 'list', hidden: false }, }, { path: '/project/detail/:id', name: 'ProjectDetail', component: () => import('@/views/project/detail/index.vue'), meta: { title: '项目详情', icon: 'detail', hidden: true }, }, { path: '/project/task', name: 'TaskBoard', component: () => import('@/views/project/task/index.vue'), meta: { title: '任务看板', icon: 'table', hidden: false }, } ], }, { 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: '/user', name: 'User', component: Layout, meta: { hidden: true }, children: [ { path: '/user/profile', name: 'UserProfile', component: () => import('@/views/user/profile/index.vue'), meta: { title: '个人中心', showInTabs: false }, }, { path: '/user/message', name: 'UserMessage', component: () => import('@/views/user/message/index.vue'), meta: { title: '消息中心', showInTabs: false }, }, { path: '/user/notice', name: 'UserNotice', component: () => import('@/views/user/message/components/view/index.vue'), meta: { title: '查看公告' }, }, ], }, { path: '/about', name: 'About', component: Layout, meta: { title: '关于项目', icon: 'apps', hidden: false, sort: 999 }, redirect: '/about/document/api', children: [ { path: '/about/document/api', component: () => import('@/views/about/document/api/index.vue'), meta: { title: '接口文档', icon: 'swagger', hidden: false, keepAlive: true }, }, { path: 'https://continew.top', meta: { title: '在线文档', icon: 'continew', hidden: false }, }, { path: 'https://arco.design/vue/component/button', meta: { title: 'Arco Design文档', icon: 'arco', hidden: false }, }, { path: '/about/source', name: 'AboutSource', meta: { title: '开源地址', icon: 'github', hidden: false }, children: [ { path: 'https://gitee.com/continew/continew-admin', meta: { title: 'Gitee', icon: 'gitee', hidden: false }, }, { path: 'https://gitcode.com/continew/continew-admin', meta: { title: 'GitCode', icon: 'gitcode', hidden: false }, }, { path: 'https://github.com/continew-org/continew-admin', meta: { title: 'GitHub', icon: 'github', hidden: 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 }, }, ]