From fa9a0f6023e7ea28ffe0ef5b9edc68ce978c6521 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 29 Jan 2021 14:45:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E8=B0=83=E8=AF=95=E6=97=B6csv?= =?UTF-8?q?=E4=B8=8D=E8=B5=B7=E4=BD=9C=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/DebugRun.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index ef4f21e5ed..f5f6880cc5 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -67,6 +67,19 @@ }); } } + if (item && item.files) { + item.files.forEach(fileItem => { + if (fileItem.file) { + if (!fileItem.id) { + let fileId = getUUID().substring(0, 12); + fileItem.name = fileItem.file.name; + fileItem.id = fileId; + } + obj.bodyUploadIds.push(fileItem.id); + bodyUploadFiles.push(fileItem.file); + } + }); + } }, recursiveFile(arr, bodyUploadFiles, obj) { arr.forEach(item => { @@ -86,6 +99,11 @@ this.recursiveFile(item.hashTree, bodyUploadFiles, obj); } }) + if (request.variables) { + request.variables.forEach(item => { + this.setFiles(item, bodyUploadFiles, obj); + }) + } return bodyUploadFiles; }, run() {