Skip to content

Commit f3fff4a

Browse files
feat: resource
1 parent d90805a commit f3fff4a

File tree

9 files changed

+273
-85
lines changed

9 files changed

+273
-85
lines changed

ui/src/api/system-resource-management/knowledge.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,6 @@ const putSyncWebKnowledge: (
172172
return put(`${prefix}/${knowledge_id}/sync`, undefined, { sync_type }, loading)
173173
}
174174

175-
/**
176-
* 创建知识库
177-
* @param 参数
178-
* {
179-
"name": "string",
180-
"folder_id": "string",
181-
"desc": "string",
182-
"embedding": "string"
183-
}
184-
*/
185-
const postKnowledge: (data: knowledgeData, loading?: Ref<boolean>) => Promise<Result<any>> = (
186-
data,
187-
loading,
188-
) => {
189-
return post(`${prefix}/base`, data, undefined, loading, 1000 * 60 * 5)
190-
}
191175

192176
/**
193177
* 获取当前用户可使用的向量化模型列表(没用到)
@@ -214,33 +198,6 @@ const getKnowledgeModel: (loading?: Ref<boolean>) => Promise<Result<Array<any>>>
214198
return get(`${prefix}/model`, loading)
215199
}
216200

217-
/**
218-
* 创建Web知识库
219-
* @param 参数
220-
* {
221-
"name": "string",
222-
"folder_id": "string",
223-
"desc": "string",
224-
"embedding": "string",
225-
"source_url": "string",
226-
"selector": "string"
227-
}
228-
*/
229-
const postWebKnowledge: (data: any, loading?: Ref<boolean>) => Promise<Result<any>> = (
230-
data,
231-
loading,
232-
) => {
233-
return post(`${prefix}/web`, data, undefined, loading)
234-
}
235-
236-
// 创建飞书知识库
237-
const postLarkKnowledge: (data: any, loading?: Ref<boolean>) => Promise<Result<Array<any>>> = (
238-
data,
239-
loading,
240-
) => {
241-
return post(`${prefix}/lark/save`, data, null, loading)
242-
}
243-
244201
const putLarkKnowledge: (
245202
knowledge_id: string,
246203
data: any,
@@ -262,10 +219,7 @@ export default {
262219
putGenerateRelated,
263220
putKnowledgeHitTest,
264221
putSyncWebKnowledge,
265-
postKnowledge,
266222
getKnowledgeModel,
267-
postWebKnowledge,
268-
postLarkKnowledge,
269223
putLarkKnowledge
270224
} as {
271225
[key: string]: any

ui/src/locales/lang/en-US/views/system.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,6 @@ export default {
111111
},
112112
resource_management: {
113113
label: 'Resource Management',
114+
type: 'Type',
114115
},
115116
}

ui/src/locales/lang/zh-CN/views/system.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,6 @@ export default {
111111
},
112112
resource_management: {
113113
label: '资源管理',
114-
},
114+
type: '类型',
115+
}
115116
}

ui/src/locales/lang/zh-Hant/views/system.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,6 @@ export default {
113113

114114
resource_management: {
115115
label: '资源管理',
116+
type: '类型',
116117
},
117118
}

ui/src/router/modules/system.ts

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const systemRouter = {
1818
activeMenu: '/system',
1919
parentPath: '/system',
2020
parentName: 'system',
21-
sameRoute: 'user',
21+
sameRoute: 'user',
2222
permission: [RoleConst.ADMIN, PermissionConst.USER_READ],
2323
},
2424
component: () => import('@/views/system/user-manage/index.vue'),
@@ -33,7 +33,7 @@ const systemRouter = {
3333
activeMenu: '/system',
3434
parentPath: '/system',
3535
parentName: 'system',
36-
sameRoute: 'role',
36+
sameRoute: 'role',
3737
permission: [
3838
new ComplexPermission(
3939
[RoleConst.ADMIN, RoleConst.WORKSPACE_MANAGE.getWorkspaceRole],
@@ -55,7 +55,7 @@ const systemRouter = {
5555
activeMenu: '/system',
5656
parentPath: '/system',
5757
parentName: 'system',
58-
sameRoute: 'workspace',
58+
sameRoute: 'workspace',
5959
permission: [
6060
new ComplexPermission(
6161
[RoleConst.WORKSPACE_MANAGE, RoleConst.ADMIN],
@@ -79,6 +79,18 @@ const systemRouter = {
7979
parentName: 'system',
8080
},
8181
children: [
82+
// {
83+
// path: '/system/resource-management/application',
84+
// name: 'ApplicationResourceIndex',
85+
// meta: {
86+
// title: 'views.application.title',
87+
// activeMenu: '/system',
88+
// parentPath: '/system',
89+
// parentName: 'system',
90+
// },
91+
// component: () =>
92+
// import('@/views/system-resource-management/ApplicationResourceIndex.vue'),
93+
// },
8294
{
8395
path: '/system/resource-management/knowledge',
8496
name: 'KnowledgeResourceIndex',
@@ -101,17 +113,17 @@ const systemRouter = {
101113
},
102114
component: () => import('@/views/system-resource-management/ToolResourceIndex.vue'),
103115
},
104-
{
105-
path: '/system/resource-management/model',
106-
name: 'ModelResourceIndex',
107-
meta: {
108-
title: 'views.model.title',
109-
activeMenu: '/system',
110-
parentPath: '/system',
111-
parentName: 'system',
112-
},
113-
component: () => import('@/views/system-resource-management/ModelResourceIndex.vue'),
114-
},
116+
// {
117+
// path: '/system/resource-management/model',
118+
// name: 'ModelResourceIndex',
119+
// meta: {
120+
// title: 'views.model.title',
121+
// activeMenu: '/system',
122+
// parentPath: '/system',
123+
// parentName: 'system',
124+
// },
125+
// component: () => import('@/views/system-resource-management/ModelResourceIndex.vue'),
126+
// },
115127
],
116128
},
117129
{
@@ -124,7 +136,7 @@ const systemRouter = {
124136
activeMenu: '/system',
125137
parentPath: '/system',
126138
parentName: 'system',
127-
sameRoute: 'authorization',
139+
sameRoute: 'authorization',
128140
},
129141
component: () => import('@/views/system/resource-authorization/index.vue'),
130142
},
@@ -210,7 +222,7 @@ const systemRouter = {
210222
activeMenu: '/system',
211223
parentPath: '/system',
212224
parentName: 'system',
213-
sameRoute: 'chat',
225+
sameRoute: 'chat',
214226
permission: [
215227
new ComplexPermission(
216228
[RoleConst.WORKSPACE_MANAGE, RoleConst.ADMIN],
@@ -290,7 +302,7 @@ const systemRouter = {
290302
activeMenu: '/system',
291303
parentPath: '/system',
292304
parentName: 'system',
293-
sameRoute: 'setting',
305+
sameRoute: 'setting',
294306
},
295307
children: [
296308
{
@@ -340,7 +352,7 @@ const systemRouter = {
340352
activeMenu: '/system',
341353
parentPath: '/system',
342354
parentName: 'system',
343-
sameRoute: 'operate',
355+
sameRoute: 'operate',
344356
permission: [EditionConst.IS_PE, EditionConst.IS_EE],
345357
},
346358
component: () => import('@/views/system/operate-log/index.vue'),

0 commit comments

Comments
 (0)