文件上传下载修正

This commit is contained in:
2025-12-20 15:14:44 +08:00
parent 9b6e959973
commit 81508a1fdc
28 changed files with 1059 additions and 192 deletions

View File

@@ -80,14 +80,19 @@ export const aiKnowledgeAPI = {
// ====================== 文件管理 ======================
/**
* 获取知识库文档列表
* 获取知识库文档列表(查询本地数据库文件)
* @param knowledgeId 知识库ID
* @param page 页码
* @param limit 每页条数
* @param pageSize 每页条数
*/
async getDocumentList(knowledgeId: string, page = 1, limit = 20): Promise<ResultDomain<Record<string, any>>> {
const response = await api.get<Record<string, any>>(`${this.baseUrl}/${knowledgeId}/documents`, {
params: { page, limit }
async getDocumentList(knowledgeId: string, page = 1, pageSize = 20): Promise<ResultDomain<any>> {
const response = await api.post<any>(`${this.baseUrl}/${knowledgeId}/documents`, {
filter: { knowledgeId },
pageParam: {
page,
pageSize,
total: 0
}
})
return response.data
},

View File

@@ -2,7 +2,7 @@ import { api } from '@/api/index'
import { BatchFileUploadParam, FileUploadParam, ResultDomain, TbSysFileDTO } from '@/types';
export const fileAPI = {
baseUrl: "/file",
baseUrl: "/urban-lifeline/file",
/**
* 上传文件