diff --git a/ui/src/api/system-resource-management/knowledge.ts b/ui/src/api/system-resource-management/knowledge.ts index 031769541..725cfa61a 100644 --- a/ui/src/api/system-resource-management/knowledge.ts +++ b/ui/src/api/system-resource-management/knowledge.ts @@ -172,22 +172,6 @@ const putSyncWebKnowledge: ( return put(`${prefix}/${knowledge_id}/sync`, undefined, { sync_type }, loading) } -/** - * 创建知识库 - * @param 参数 - * { - "name": "string", - "folder_id": "string", - "desc": "string", - "embedding": "string" - } - */ -const postKnowledge: (data: knowledgeData, loading?: Ref) => Promise> = ( - data, - loading, -) => { - return post(`${prefix}/base`, data, undefined, loading, 1000 * 60 * 5) -} /** * 获取当前用户可使用的向量化模型列表(没用到) @@ -214,33 +198,6 @@ const getKnowledgeModel: (loading?: Ref) => Promise>> return get(`${prefix}/model`, loading) } -/** - * 创建Web知识库 - * @param 参数 - * { - "name": "string", - "folder_id": "string", - "desc": "string", - "embedding": "string", - "source_url": "string", - "selector": "string" - } - */ -const postWebKnowledge: (data: any, loading?: Ref) => Promise> = ( - data, - loading, -) => { - return post(`${prefix}/web`, data, undefined, loading) -} - -// 创建飞书知识库 -const postLarkKnowledge: (data: any, loading?: Ref) => Promise>> = ( - data, - loading, -) => { - return post(`${prefix}/lark/save`, data, null, loading) -} - const putLarkKnowledge: ( knowledge_id: string, data: any, @@ -262,10 +219,7 @@ export default { putGenerateRelated, putKnowledgeHitTest, putSyncWebKnowledge, - postKnowledge, getKnowledgeModel, - postWebKnowledge, - postLarkKnowledge, putLarkKnowledge } as { [key: string]: any diff --git a/ui/src/locales/lang/en-US/views/system.ts b/ui/src/locales/lang/en-US/views/system.ts index 9c0b156a1..ad6ddfd67 100644 --- a/ui/src/locales/lang/en-US/views/system.ts +++ b/ui/src/locales/lang/en-US/views/system.ts @@ -111,5 +111,6 @@ export default { }, resource_management: { label: 'Resource Management', + type: 'Type', }, } diff --git a/ui/src/locales/lang/zh-CN/views/system.ts b/ui/src/locales/lang/zh-CN/views/system.ts index 2a901bde5..3bf491083 100644 --- a/ui/src/locales/lang/zh-CN/views/system.ts +++ b/ui/src/locales/lang/zh-CN/views/system.ts @@ -111,5 +111,6 @@ export default { }, resource_management: { label: '资源管理', - }, + type: '类型', + } } diff --git a/ui/src/locales/lang/zh-Hant/views/system.ts b/ui/src/locales/lang/zh-Hant/views/system.ts index 9b856bd2a..5e4d67ac8 100644 --- a/ui/src/locales/lang/zh-Hant/views/system.ts +++ b/ui/src/locales/lang/zh-Hant/views/system.ts @@ -113,5 +113,6 @@ export default { resource_management: { label: '资源管理', + type: '类型', }, } diff --git a/ui/src/router/modules/system.ts b/ui/src/router/modules/system.ts index 20929ec48..12d6cdc1b 100644 --- a/ui/src/router/modules/system.ts +++ b/ui/src/router/modules/system.ts @@ -18,7 +18,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'user', + sameRoute: 'user', permission: [RoleConst.ADMIN, PermissionConst.USER_READ], }, component: () => import('@/views/system/user-manage/index.vue'), @@ -33,7 +33,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'role', + sameRoute: 'role', permission: [ new ComplexPermission( [RoleConst.ADMIN, RoleConst.WORKSPACE_MANAGE.getWorkspaceRole], @@ -55,7 +55,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'workspace', + sameRoute: 'workspace', permission: [ new ComplexPermission( [RoleConst.WORKSPACE_MANAGE, RoleConst.ADMIN], @@ -79,6 +79,18 @@ const systemRouter = { parentName: 'system', }, children: [ + // { + // path: '/system/resource-management/application', + // name: 'ApplicationResourceIndex', + // meta: { + // title: 'views.application.title', + // activeMenu: '/system', + // parentPath: '/system', + // parentName: 'system', + // }, + // component: () => + // import('@/views/system-resource-management/ApplicationResourceIndex.vue'), + // }, { path: '/system/resource-management/knowledge', name: 'KnowledgeResourceIndex', @@ -101,17 +113,17 @@ const systemRouter = { }, component: () => import('@/views/system-resource-management/ToolResourceIndex.vue'), }, - { - path: '/system/resource-management/model', - name: 'ModelResourceIndex', - meta: { - title: 'views.model.title', - activeMenu: '/system', - parentPath: '/system', - parentName: 'system', - }, - component: () => import('@/views/system-resource-management/ModelResourceIndex.vue'), - }, + // { + // path: '/system/resource-management/model', + // name: 'ModelResourceIndex', + // meta: { + // title: 'views.model.title', + // activeMenu: '/system', + // parentPath: '/system', + // parentName: 'system', + // }, + // component: () => import('@/views/system-resource-management/ModelResourceIndex.vue'), + // }, ], }, { @@ -124,7 +136,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'authorization', + sameRoute: 'authorization', }, component: () => import('@/views/system/resource-authorization/index.vue'), }, @@ -210,7 +222,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'chat', + sameRoute: 'chat', permission: [ new ComplexPermission( [RoleConst.WORKSPACE_MANAGE, RoleConst.ADMIN], @@ -290,7 +302,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'setting', + sameRoute: 'setting', }, children: [ { @@ -340,7 +352,7 @@ const systemRouter = { activeMenu: '/system', parentPath: '/system', parentName: 'system', - sameRoute: 'operate', + sameRoute: 'operate', permission: [EditionConst.IS_PE, EditionConst.IS_EE], }, component: () => import('@/views/system/operate-log/index.vue'), diff --git a/ui/src/views/system-resource-management/ApplicationResourceIndex.vue b/ui/src/views/system-resource-management/ApplicationResourceIndex.vue new file mode 100644 index 000000000..f89f2d594 --- /dev/null +++ b/ui/src/views/system-resource-management/ApplicationResourceIndex.vue @@ -0,0 +1,222 @@ + + + + + diff --git a/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue b/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue index d1351ba57..0a0187ba4 100644 --- a/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue +++ b/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue @@ -68,19 +68,19 @@ - - - - - - + @@ -234,7 +234,7 @@ const list_model = () => { onMounted(() => { getWorkspaceList() - list_model() + // list_model() }) diff --git a/ui/src/views/system-resource-management/ToolResourceIndex.vue b/ui/src/views/system-resource-management/ToolResourceIndex.vue index 1170e6917..53a588aad 100644 --- a/ui/src/views/system-resource-management/ToolResourceIndex.vue +++ b/ui/src/views/system-resource-management/ToolResourceIndex.vue @@ -68,7 +68,7 @@ - +