UnisKB/ui/src/router/routes.ts

82 lines
2.0 KiB
TypeScript
Raw Normal View History

2025-04-16 11:10:00 +00:00
import type { RouteRecordRaw } from 'vue-router'
2025-04-28 07:23:25 +00:00
const modules: any = import.meta.glob('./modules/*.ts', { eager: true })
2025-06-25 05:52:38 +00:00
2025-04-28 07:23:25 +00:00
const rolesRoutes: RouteRecordRaw[] = [...Object.keys(modules).map((key) => modules[key].default)]
2025-04-16 11:10:00 +00:00
export const routes: Array<RouteRecordRaw> = [
{
path: '/',
name: 'home',
2025-06-24 13:46:02 +00:00
redirect: '/application',
2025-06-24 13:16:43 +00:00
children: [
2025-06-25 05:52:38 +00:00
...rolesRoutes,
2025-06-24 13:16:43 +00:00
{
path: '/no-permission',
name: 'noPermission',
redirect: '/no-permission',
meta: {},
children: [
{
path: '/no-permission',
name: 'noPermissionD',
2025-07-10 09:56:42 +00:00
component: () => import('@/views/error/NoPermission.vue'),
2025-06-24 13:16:43 +00:00
},
],
component: () => import('@/layout/layout-template/SimpleLayout.vue'),
},
],
2025-04-16 11:10:00 +00:00
},
2025-06-03 08:08:49 +00:00
// 高级编排
{
path: '/application/:id/workflow',
name: 'ApplicationWorkflow',
meta: { activeMenu: '/application' },
component: () => import('@/views/application-workflow/index.vue'),
},
// 对话
{
path: '/chat/:accessToken',
name: 'Chat',
component: () => import('@/views/chat/index.vue'),
},
2025-06-13 13:56:01 +00:00
// 对话用户登录
2025-06-12 04:03:43 +00:00
{
path: '/user-login/:accessToken',
name: 'UserLogin',
component: () => import('@/views/chat/user-login/index.vue'),
},
2025-04-16 11:10:00 +00:00
{
path: '/login',
name: 'login',
component: () => import('@/views/login/index.vue'),
},
{
2025-06-09 12:09:51 +00:00
path: '/forgot_password',
name: 'ForgotPassword',
component: () => import('@/views/login/ForgotPassword.vue'),
2025-04-16 11:10:00 +00:00
},
{
path: '/reset_password/:code/:email',
name: 'ResetPassword',
2025-04-28 07:23:25 +00:00
component: () => import('@/views/login/ResetPassword.vue'),
2025-04-16 11:10:00 +00:00
},
2025-06-16 10:23:46 +00:00
{
path: '/permission',
name: 'permission',
component: () => import('@/views/Permission.vue'),
},
2025-07-10 09:56:42 +00:00
{
path: '/no-service',
name: 'NoService',
component: () => import('@/views/error/NoService.vue'),
},
{
path: '/:pathMatch(.*)',
name: '404',
component: () => import('@/views/error/404.vue'),
},
2025-04-16 11:10:00 +00:00
]