|
|
@@ -1,54 +1,10 @@
|
|
|
-import Home from '../views/Home.vue';
|
|
|
+import { createRouter, createWebHashHistory } from 'vue-router';
|
|
|
+import { systemRoutes } from './route';
|
|
|
|
|
|
-/**
|
|
|
- * 路由表配置
|
|
|
- */
|
|
|
-const routes = [
|
|
|
- { path: '/', component: Home, redirect: '/chat/qa' },
|
|
|
+const router = createRouter({
|
|
|
+ history: createWebHashHistory(),
|
|
|
+ routes: [...systemRoutes],
|
|
|
+ scrollBehavior: () => ({ left: 0, top: 0 })
|
|
|
+});
|
|
|
|
|
|
- // 登录与注册
|
|
|
- { path: '/login', component: () => import('../views/Login.vue') },
|
|
|
- { path: '/reg', component: () => import('../views/Register.vue') },
|
|
|
-
|
|
|
- // 会话
|
|
|
- { path: '/chat', component: () => import('../views/Conversation.vue') },
|
|
|
- { path: '/chat/qa', component: () => import('../views/ConversationQA.vue') },
|
|
|
- { path: '/chat/history', component: () => import('../views/ConversationHistory.vue') },
|
|
|
- { path: '/chat/board', component: () => import('../views/ConversationBoard.vue') },
|
|
|
-
|
|
|
- // 知识库
|
|
|
- { path: '/knowledge', component: () => import('../views/Knowledge.vue') },
|
|
|
- { path: '/knowledge/detail', component: () => import('../views/KnowledgeDetail.vue') },
|
|
|
- // 模型
|
|
|
- { path: '/model', component: () => import('../views/Model.vue') },
|
|
|
- // Agent
|
|
|
- { path: '/agent', component: () => import('../views/Agent.vue') },
|
|
|
- // 智能体
|
|
|
- { path: '/intelligent', component: () => import('../views/Intelligent.vue') },
|
|
|
- // dify智能体详情
|
|
|
- { path: '/intelligent/detail', component: () => import('../views/difyDetail.vue') },
|
|
|
-
|
|
|
- // 权限管理
|
|
|
- {
|
|
|
- path: '/permission',
|
|
|
- component: () => import('../views/layout/LayoutPermission.vue'),
|
|
|
- children: [
|
|
|
- { path: '/permission/account', component: () => import('../views/PermissionAccount.vue') },
|
|
|
- { path: '/permission/org', component: () => import('../views/PermissionOrganization.vue') },
|
|
|
- { path: '/permission/resource', component: () => import('../views/PermissionResource.vue') },
|
|
|
- { path: '/permission/role', component: () => import('../views/PermissionRole.vue') },
|
|
|
- { path: '/permission/group', component: () => import('../views/PermissionGroup.vue') }
|
|
|
- ]
|
|
|
- },
|
|
|
-
|
|
|
- // 个人中心
|
|
|
- { path: '/profile', component: () => import('../views/Profiles.vue') },
|
|
|
- { path: '/setting', component: () => import('../views/Settings.vue') },
|
|
|
-
|
|
|
- { path: '/xiaoshu', component: () => import('../views/Xiaoshu.vue') },
|
|
|
-
|
|
|
- { path: '/ragchat', component: () => import('../views/RagFlowChat.vue') },
|
|
|
- { path: '/about', component: () => import('../views/About.vue') }
|
|
|
-];
|
|
|
-
|
|
|
-export default routes;
|
|
|
+export default router;
|