[全量] 初始化项目代码、配置、文档及Agent协同harness
This commit is contained in:
79
chat_web_front/src/router/index.ts
Normal file
79
chat_web_front/src/router/index.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import type { App } from 'vue'
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import { setupPageGuard } from './permission'
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
name: '/',
|
||||
redirect: '/chat'
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/chat',
|
||||
name: 'Chat',
|
||||
component: () => import('@/views/chat/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/writing',
|
||||
name: 'Documents',
|
||||
component: () => import('@/views/writing/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/writing/edit',
|
||||
name: 'DocWriting',
|
||||
component: () => import('@/views/writing/DocWriting.vue'),
|
||||
},
|
||||
{
|
||||
path: '/knowledgeBase',
|
||||
name: 'KnowledgeBase',
|
||||
component: () => import('@/views/reading/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/knowledgeBase/fileList',
|
||||
name: 'FileList',
|
||||
component: () => import('@/views/reading/fileList.vue'),
|
||||
},
|
||||
{
|
||||
path: '/knowledgeBase/fileDetail',
|
||||
name: 'FileDetail',
|
||||
component: () => import('@/views/reading/fileDetail.vue'),
|
||||
},
|
||||
{
|
||||
path: '/applications',
|
||||
name: 'Application',
|
||||
component: () => import('@/views/applications/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/translate',
|
||||
name: 'Translate',
|
||||
component: () => import('@/views/translate/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/translate/history',
|
||||
name: 'TranslateHistory',
|
||||
component: () => import('@/views/translate/history.vue'),
|
||||
},
|
||||
{
|
||||
path: '/translate/result',
|
||||
name: 'TranslateResult',
|
||||
component: () => import('@/views/translate/result.vue'),
|
||||
},
|
||||
]
|
||||
export const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes,
|
||||
// scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
})
|
||||
|
||||
setupPageGuard(router)
|
||||
|
||||
export async function setupRouter(app: App) {
|
||||
app.use(router)
|
||||
await router.isReady()
|
||||
}
|
||||
Reference in New Issue
Block a user