From 80f649c15c4e63b98cfdae845d5c60fe3f419a48 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 12 Jul 2023 11:35:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E9=80=9A=E7=94=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AEcsv=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027648 --user=王孝刚 【项目设置】github#25453,【项目设置】-项目环境:1、创建环境通用配置类型选择CSV,删除已上传文件重新上传提示“一次只能上传一个文件”;2、没有上传文件点击下载没有提示信息。 https://www.tapd.cn/55049933/s/1391974 --- .../main/java/io/metersphere/service/MockConfigService.java | 3 +++ .../src/components/environment/ApiEnvironmentConfig.vue | 2 +- .../environment/commons/variable/CsvFileUpload.vue | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java b/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java index 3592cae377..e340495f10 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/MockConfigService.java @@ -846,6 +846,9 @@ public class MockConfigService { if (project != null) { RequestMockParams requestMockParams = MockApiUtils.genRequestMockParamsFromHttpRequest(request, true); String urlSuffix = this.getUrlSuffix(project.getSystemId(), request); + LogUtil.info("Mock urlSuffix:{}", urlSuffix); + LogUtil.info("Mock requestHeaderMap:{}", requestHeaderMap); + LogUtil.info("Mock requestMockParams:{}", requestMockParams); List qualifiedApiList = apiDefinitionService.preparedUrl(project.getId(), method, urlSuffix, requestHeaderMap.get(MockApiHeaders.MOCK_API_RESOURCE_ID)); for (ApiDefinitionWithBLOBs api : qualifiedApiList) { if (StringUtils.isEmpty(returnStr)) { diff --git a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue index a2fbb1139c..bdd8dddb86 100644 --- a/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue +++ b/framework/sdk-parent/frontend/src/components/environment/ApiEnvironmentConfig.vue @@ -10,7 +10,7 @@ :delete-fuc="openDelEnv" @itemSelected="environmentSelected" ref="environmentItems"/> diff --git a/framework/sdk-parent/frontend/src/components/environment/commons/variable/CsvFileUpload.vue b/framework/sdk-parent/frontend/src/components/environment/commons/variable/CsvFileUpload.vue index b1a8e47e5b..03e5a025df 100644 --- a/framework/sdk-parent/frontend/src/components/environment/commons/variable/CsvFileUpload.vue +++ b/framework/sdk-parent/frontend/src/components/environment/commons/variable/CsvFileUpload.vue @@ -58,7 +58,8 @@ - 下载 + + {{this.$t('project.file_download')}} @@ -194,12 +195,14 @@ export default { callback: (action) => { if (action === 'confirm') { this.$refs.upload.handleRemove(file); + this.$refs.uploadLocal.handleRemove(file); for (let i = 0; i < this.parameter.files.length; i++) { let paramFileName = this.parameter.files[i].name ? this.parameter.files[i].name : this.parameter.files[i].file.name; if (fileName === paramFileName) { this.parameter.files.splice(i, 1); this.$refs.upload.handleRemove(file); + this.$refs.uploadLocal.handleRemove(file); break; } }