UnisKB/ui/src/router/modules/document.ts

81 lines
2.4 KiB
TypeScript
Raw Normal View History

2025-06-16 12:14:36 +00:00
import { ChatUserResourceEnum } from '@/enums/workspaceChatUser'
2025-06-17 12:35:24 +00:00
import { PermissionConst, EditionConst, RoleConst } from '@/utils/permission/data'
2025-06-03 09:29:33 +00:00
const DocumentRouter = {
2025-06-04 12:41:30 +00:00
path: '/knowledge/:id/:folderId',
2025-05-30 06:34:24 +00:00
name: 'KnowledgeDetail',
2025-05-27 11:06:47 +00:00
meta: { title: 'common.fileUpload.document', activeMenu: '/knowledge', breadcrumb: true },
component: () => import('@/layout/layout-template/MainLayout.vue'),
hidden: true,
children: [
{
path: 'document',
name: 'Document',
meta: {
icon: 'app-document',
iconActive: 'app-document-active',
title: 'common.fileUpload.document',
active: 'document',
2025-06-04 12:41:30 +00:00
parentPath: '/knowledge/:id/:folderId',
2025-05-30 06:34:24 +00:00
parentName: 'KnowledgeDetail',
2025-05-27 11:06:47 +00:00
},
component: () => import('@/views/document/index.vue'),
},
2025-05-30 06:34:24 +00:00
{
path: 'problem',
name: 'Problem',
meta: {
icon: 'app-problems',
iconActive: 'QuestionFilled',
title: 'views.problem.title',
active: 'problem',
2025-06-04 12:41:30 +00:00
parentPath: '/knowledge/:id/:folderId',
parentName: 'KnowledgeDetail',
2025-05-30 06:34:24 +00:00
},
component: () => import('@/views/problem/index.vue'),
2025-05-30 06:34:24 +00:00
},
{
path: 'hit-test',
2025-06-13 09:17:01 +00:00
name: 'KnowledgeHitTest',
2025-05-30 06:34:24 +00:00
meta: {
icon: 'app-hit-test',
title: 'views.application.hitTest.title',
active: 'hit-test',
2025-06-04 12:41:30 +00:00
parentPath: '/knowledge/:id/:folderId',
parentName: 'KnowledgeDetail',
2025-05-30 06:34:24 +00:00
},
component: () => import('@/views/hit-test/index.vue'),
2025-05-30 06:34:24 +00:00
},
2025-06-16 12:14:36 +00:00
{
path: 'chat-user',
name: 'KnowledgeChatUser',
meta: {
icon: 'app-document',
iconActive: 'app-document-active',
title: 'views.chatUser.title',
active: 'chat-log',
parentPath: '/knowledge/:id/:folderId',
parentName: 'KnowledgeDetail',
2025-06-17 12:35:24 +00:00
resourceType: ChatUserResourceEnum.KNOWLEDGE,
permission: [EditionConst.IS_PE, EditionConst.IS_EE],
2025-06-16 12:14:36 +00:00
},
2025-06-17 12:35:24 +00:00
component: () => import('@/views/chat-user/index.vue'),
2025-06-16 12:14:36 +00:00
},
2025-06-05 12:15:55 +00:00
{
path: 'setting',
name: 'KnowledgeSetting',
meta: {
icon: 'app-setting',
iconActive: 'app-setting-active',
title: 'common.setting',
active: 'setting',
parentPath: '/knowledge/:id/:folderId',
parentName: 'KnowledgeDetail',
2025-06-05 12:15:55 +00:00
},
component: () => import('@/views/knowledge/KnowledgeSetting.vue'),
},
2025-05-27 11:06:47 +00:00
],
}
2025-06-03 09:29:33 +00:00
export default DocumentRouter