From b4046ad7d53728bfa1b3fc0a2179fa5cd8c2a48b Mon Sep 17 00:00:00 2001 From: baiqi Date: Mon, 9 Dec 2024 17:13:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=A4=8D=E5=88=B6=E6=AD=A5=E9=AA=A4&?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=9C=BA=E6=99=AF=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api-test/scenario/components/common/customApiDrawer.vue | 4 ++-- .../src/views/api-test/scenario/components/step/stepTree.vue | 2 +- .../api-test/scenario/components/step/useStepOperation.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue index 34d3541521..a3bbcaff76 100644 --- a/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue +++ b/frontend/src/views/api-test/scenario/components/common/customApiDrawer.vue @@ -1224,9 +1224,9 @@ stepType: props.step?.stepType, refType: props.step?.refType, isTempFile: false, // 复制未保存的步骤时 true - fileIds: Object.values(parseRequestBodyFiles(res.request.body, [], [], [])).flat(), + fileIds: parseRequestBodyFiles(res.request.body, [], [], []).uploadFileIds, }); - parseRequestBodyFiles(res.body, [], [], [], copyStepFileIdsMap.value); + parseRequestBodyFiles(res.request.body, [], [], [], copyStepFileIdsMap.value); } else { parseRequestBodyResult = parseRequestBodyFiles(res.request.body, [], [], [], copyStepFileIdsMap.value); // 解析请求体中的文件,将详情中的文件 id 集合收集,更新时以判断文件是否删除以及是否新上传的文件 } diff --git a/frontend/src/views/api-test/scenario/components/step/stepTree.vue b/frontend/src/views/api-test/scenario/components/step/stepTree.vue index c4c48ac9e1..8aeb53e63e 100644 --- a/frontend/src/views/api-test/scenario/components/step/stepTree.vue +++ b/frontend/src/views/api-test/scenario/components/step/stepTree.vue @@ -949,7 +949,7 @@ stepType: node.stepType, refType: node.refType, isTempFile: !!stepDetail, // 复制未保存的步骤时 true - fileIds: Object.values(parseRequestBodyFiles((stepDetail as RequestParam).body, [], [], [])).flat(), + fileIds: parseRequestBodyFiles((stepDetail as RequestParam).body, [], [], []).uploadFileIds, }); parseRequestBodyFiles((stepDetail as RequestParam).body, [], [], [], newFileRes); } else { diff --git a/frontend/src/views/api-test/scenario/components/step/useStepOperation.ts b/frontend/src/views/api-test/scenario/components/step/useStepOperation.ts index 548ec3ea2b..502fb5beaf 100644 --- a/frontend/src/views/api-test/scenario/components/step/useStepOperation.ts +++ b/frontend/src/views/api-test/scenario/components/step/useStepOperation.ts @@ -74,7 +74,7 @@ export default function useStepOperation({ stepType: step.stepType, refType: step.refType, isTempFile: false, // 复制未保存的步骤时 true - fileIds: Object.values(parseRequestBodyFiles((res as RequestParam).body, [], [], [])).flat(), + fileIds: parseRequestBodyFiles((res as RequestParam).body, [], [], []).uploadFileIds, }); parseRequestBodyFiles(res.body, [], [], [], newFileRes); } else {