From 6a36771b4af08860352198e30f2e63a7dc0a511e Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Fri, 19 Aug 2022 16:17:34 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E8=BD=AC?= =?UTF-8?q?=E5=AD=98csv=E6=8A=A5=E9=94=99=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016037 --user=王孝刚 【项目设置】环境通用配置中,上传本地文件后转存,报错了 https://www.tapd.cn/55049933/s/1228007 --- .../components/environment/CsvFileUpload.vue | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/frontend/src/business/components/api/test/components/environment/CsvFileUpload.vue b/frontend/src/business/components/api/test/components/environment/CsvFileUpload.vue index fff18d06d3..251ae423f6 100644 --- a/frontend/src/business/components/api/test/components/environment/CsvFileUpload.vue +++ b/frontend/src/business/components/api/test/components/environment/CsvFileUpload.vue @@ -3,27 +3,27 @@ + action="#" + class="api-body-upload" + list-type="picture-card" + :file-list="parameter.files" + :beforeUpload="uploadValidate" + :on-exceed="exceed" + :limit="1" + ref="upload">
+ placement="right" + trigger="hover">
+ action="#" + class="ms-body-upload" + :http-request="upload" + :limit="1" + :on-exceed="exceed" + :beforeUpload="uploadValidate" + ref="uploadLocal"> {{ $t('permission.project_file.local_upload') }} @@ -90,12 +90,13 @@ export default { } let request = { id: getUUID(), - resourceId: this.id, + csv: true, + resourceId: this.file.id, moduleId: moduleId, projectId: getCurrentProjectID(), fileName: this.file.name }; - this.$fileUpload("/file/metadata/api/upload", null, files, request, (response) => { + this.$fileUpload("/file/metadata/dump/file", null, files, request, (response) => { this.$success(this.$t("organization.integration.successful_operation")); }); }, @@ -131,7 +132,7 @@ export default { for (let i = 0; i < this.parameter.files.length; i++) { let fileName = file.file ? file.file.name : file.name; let paramFileName = this.parameter.files[i].file ? - this.parameter.files[i].file.name : this.parameter.files[i].name; + this.parameter.files[i].file.name : this.parameter.files[i].name; if (fileName === paramFileName) { this.parameter.files.splice(i, 1); this.$refs.upload.handleRemove(file); @@ -177,7 +178,7 @@ export default { this.$refs.upload.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; + 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);