2024-07-07 01:58:23 +08:00
|
|
|
import { createRouter, createWebHistory } from 'vue-router'
|
2024-07-14 16:42:38 +08:00
|
|
|
import AppLayout from '@/layouts/AppLayout.vue';
|
|
|
|
|
import BlankLayout from '@/layouts/BlankLayout.vue';
|
2024-07-07 01:58:23 +08:00
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
|
|
|
routes: [
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'main',
|
2024-07-14 16:42:38 +08:00
|
|
|
component: BlankLayout,
|
|
|
|
|
children: [ {
|
|
|
|
|
path: '',
|
2025-02-20 01:26:12 +08:00
|
|
|
name: 'Home',
|
2024-07-16 18:14:27 +08:00
|
|
|
component: () => import('../views/HomeView.vue'),
|
2024-07-14 16:42:38 +08:00
|
|
|
meta: { keepAlive: true }
|
|
|
|
|
}
|
|
|
|
|
]
|
2024-07-07 01:58:23 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/chat',
|
|
|
|
|
name: 'chat',
|
2024-07-14 16:42:38 +08:00
|
|
|
component: AppLayout,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'ChatComp',
|
2024-07-16 18:14:27 +08:00
|
|
|
component: () => import('../views/ChatView.vue'),
|
2024-07-14 16:42:38 +08:00
|
|
|
meta: { keepAlive: true }
|
|
|
|
|
}
|
|
|
|
|
]
|
2024-07-07 01:58:23 +08:00
|
|
|
},
|
2024-09-01 18:10:50 +08:00
|
|
|
{
|
|
|
|
|
path: '/graph',
|
|
|
|
|
name: 'graph',
|
|
|
|
|
component: AppLayout,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'GraphComp',
|
2024-09-01 18:10:50 +08:00
|
|
|
component: () => import('../views/GraphView.vue'),
|
2024-09-14 02:47:04 +08:00
|
|
|
meta: { keepAlive: false }
|
2024-09-01 18:10:50 +08:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2024-07-14 16:42:38 +08:00
|
|
|
{
|
2024-07-16 18:14:27 +08:00
|
|
|
path: '/database',
|
|
|
|
|
name: 'database',
|
2024-07-14 16:42:38 +08:00
|
|
|
component: AppLayout,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'DatabaseComp',
|
2024-07-16 18:14:27 +08:00
|
|
|
component: () => import('../views/DataBaseView.vue'),
|
2024-07-14 16:42:38 +08:00
|
|
|
meta: { keepAlive: true }
|
2024-07-16 18:14:27 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: ':database_id',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'DatabaseInfoComp',
|
2024-07-16 18:14:27 +08:00
|
|
|
component: () => import('../views/DataBaseInfoView.vue'),
|
2024-09-14 02:47:04 +08:00
|
|
|
meta: { keepAlive: false }
|
2024-07-14 16:42:38 +08:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/setting',
|
|
|
|
|
name: 'setting',
|
|
|
|
|
component: AppLayout,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'SettingComp',
|
2024-07-22 00:00:54 +08:00
|
|
|
component: () => import('../views/SettingView.vue'),
|
2024-07-14 16:42:38 +08:00
|
|
|
meta: { keepAlive: true }
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
2024-09-14 02:47:04 +08:00
|
|
|
{
|
|
|
|
|
path: '/tools',
|
|
|
|
|
name: 'tools',
|
|
|
|
|
component: AppLayout,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
2025-02-19 20:45:44 +08:00
|
|
|
name: 'ToolsComp',
|
2024-09-14 02:47:04 +08:00
|
|
|
component: () => import('../views/ToolsView.vue'),
|
|
|
|
|
meta: { keepAlive: true }
|
|
|
|
|
},
|
2024-09-25 13:46:51 +08:00
|
|
|
{
|
2024-10-02 20:11:28 +08:00
|
|
|
path: 'text-chunking',
|
2024-09-25 13:46:51 +08:00
|
|
|
name: 'TextChunking',
|
|
|
|
|
component: () => import('../components/TextChunkingComponent.vue'),
|
|
|
|
|
},
|
2024-09-29 16:13:35 +08:00
|
|
|
{
|
|
|
|
|
path: 'pdf2txt',
|
|
|
|
|
name: 'PDF_to_TXT',
|
|
|
|
|
component: () => import('../components/ConvertToTxtComponent.vue'),
|
|
|
|
|
},
|
2024-09-14 02:47:04 +08:00
|
|
|
]
|
|
|
|
|
},
|
2024-07-14 16:42:38 +08:00
|
|
|
{
|
|
|
|
|
path: '/:pathMatch(.*)*',
|
|
|
|
|
name: 'NotFound',
|
2024-07-16 18:14:27 +08:00
|
|
|
component: () => import('../views/EmptyView.vue')
|
2024-09-14 02:47:04 +08:00
|
|
|
},
|
2024-07-07 01:58:23 +08:00
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default router
|