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: '/',
|
|
|
|
|
name: 'home',
|
2024-07-14 16:42:38 +08:00
|
|
|
component: BlankLayout,
|
|
|
|
|
children: [ {
|
|
|
|
|
path: '',
|
|
|
|
|
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: '',
|
|
|
|
|
name: 'Chat',
|
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: '',
|
|
|
|
|
name: 'Graph',
|
|
|
|
|
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: '',
|
2024-07-16 18:14:27 +08:00
|
|
|
name: 'database',
|
|
|
|
|
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',
|
|
|
|
|
name: 'databaseInfo',
|
|
|
|
|
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: '',
|
|
|
|
|
name: 'setting',
|
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: '',
|
|
|
|
|
name: 'ToolsView',
|
|
|
|
|
component: () => import('../views/ToolsView.vue'),
|
|
|
|
|
meta: { keepAlive: true }
|
|
|
|
|
},
|
2024-09-25 13:46:51 +08:00
|
|
|
{
|
|
|
|
|
path: 'text_chunking',
|
|
|
|
|
name: 'TextChunking',
|
|
|
|
|
component: () => import('../components/TextChunkingComponent.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
|