From 7429bcac56fa922cc2690b2bae000b0246f1a824 Mon Sep 17 00:00:00 2001 From: zhangli <2235006734@qq.com> Date: Mon, 23 Oct 2023 15:42:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8A=E4=BC=A0=E5=A2=9E=E5=8A=A0tabl?= =?UTF-8?q?eName=E5=92=8CtableId=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/path/infra.api.ts | 4 ++-- .../ContentConfigurations/components/CanvasPage/index.vue | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/api/path/infra.api.ts b/src/api/path/infra.api.ts index ee85c21..e2e9d94 100644 --- a/src/api/path/infra.api.ts +++ b/src/api/path/infra.api.ts @@ -3,9 +3,9 @@ import { httpErrorHandle } from '@/utils' import { RequestHttpEnum, ModuleTypeEnum, ContentTypeEnum } from '@/enums/httpEnum' // * 上传文件 -export const uploadFile = async (data: object) => { +export const uploadFile = async (data: object,upData: object) => { try { - const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.INFRA}/file/upload`, data, ContentTypeEnum.FORM_DATA) + const res = await http(RequestHttpEnum.POST)(`${ModuleTypeEnum.INFRA}/file/upload?tableId=${upData.tableId}&tableName=${upData.tableName}`, data, ContentTypeEnum.FORM_DATA) return res } catch { httpErrorHandle() diff --git a/src/views/chart/ContentConfigurations/components/CanvasPage/index.vue b/src/views/chart/ContentConfigurations/components/CanvasPage/index.vue index 865aae4..16cde1c 100644 --- a/src/views/chart/ContentConfigurations/components/CanvasPage/index.vue +++ b/src/views/chart/ContentConfigurations/components/CanvasPage/index.vue @@ -282,7 +282,12 @@ const customRequest = (options: UploadCustomRequestOptions) => { ) let uploadParams = new FormData() uploadParams.append('file', newNameFile) - const uploadRes = await uploadFile(uploadParams) + const upData = { + tableId: fetchRouteParamsLocation(), + tableName: 'reportGoViewProject', + } + + const uploadRes = await uploadFile(uploadParams, upData) if(uploadRes && uploadRes.code === ResultEnum.SUCCESS) { chartEditStore.setEditCanvasConfig(