From c94e889281b781d5cd1b15ae93067f4e027f5abe Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 18 Feb 2022 17:05:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E9=9B=86=E6=88=90=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=AF=BC=E5=87=BA=E4=B8=8D=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1010401 --user=赵勇 case集合报告 导出不现显示 case https://www.tapd.cn/55049933/s/1105837 --- .../api/automation/report/ApiReportDetail.vue | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue index 7b66bbbe79..58e8a7eca2 100644 --- a/frontend/src/business/components/api/automation/report/ApiReportDetail.vue +++ b/frontend/src/business/components/api/automation/report/ApiReportDetail.vue @@ -462,17 +462,23 @@ export default { }, handleExport() { if (this.report.reportVersion && this.report.reportVersion > 1) { - this.fullTreeNodes.forEach(item => { - if (item.type === "scenario") { - let scenario = {name: item.label, requestResults: []}; - if (this.content.scenarios && this.content.scenarios.length > 0) { - this.content.scenarios.push(scenario); - } else { - this.content.scenarios = [scenario]; + if(this.report.reportType === 'API_INTEGRATED'){ + let scenario = {name: "", requestResults: []}; + this.content.scenarios = [scenario]; + this.formatExportApi(this.fullTreeNodes, scenario); + }else { + this.fullTreeNodes.forEach(item => { + if (item.type === "scenario") { + let scenario = {name: item.label, requestResults: []}; + if (this.content.scenarios && this.content.scenarios.length > 0) { + this.content.scenarios.push(scenario); + } else { + this.content.scenarios = [scenario]; + } + this.formatExportApi(item.children, scenario); } - this.formatExportApi(item.children, scenario); - } - }) + }) + } } this.reportExportVisible = true; let reset = this.exportReportReset;