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 })
|
|
|
|
|
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-13 09:59:21 +00:00
|
|
|
redirect: '/application',
|
2025-04-28 07:23:25 +00:00
|
|
|
children: [...rolesRoutes],
|
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-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
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// path: '/:pathMatch(.*)',
|
|
|
|
|
// name: '404',
|
|
|
|
|
// component: () => import('@/views/404/index.vue')
|
|
|
|
|
// }
|
|
|
|
|
]
|