文件上传下载修正
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import url("./DocumentDetail.scss");
|
||||
</style>
|
||||
@@ -0,0 +1 @@
|
||||
export {default as DocumentDetail} from './DocumentDetail/DocumentDetail.vue'
|
||||
@@ -1,6 +1,7 @@
|
||||
export * from './fileupload'
|
||||
export * from './base'
|
||||
export * from './dynamicFormItem'
|
||||
export * from './ai'
|
||||
|
||||
// 通用视图组件
|
||||
export { default as IframeView } from './iframe/IframeView.vue'
|
||||
@@ -76,8 +76,8 @@ const devConfig: AppRuntimeConfig = {
|
||||
|
||||
file: {
|
||||
// 同样走代理,保持与 api.baseUrl 一致
|
||||
downloadUrl: '/api/file/download/',
|
||||
uploadUrl: '/api/file/upload',
|
||||
downloadUrl: '/api/urban-lifeline/file/download/',
|
||||
uploadUrl: '/api/urban-lifeline/file/upload',
|
||||
maxSize: {
|
||||
image: 5,
|
||||
video: 100,
|
||||
|
||||
Reference in New Issue
Block a user