fix(接口测试): 修复用例集成报告导出不全问题
--bug=1010401 --user=赵勇 case集合报告 导出不现显示 case https://www.tapd.cn/55049933/s/1105837
This commit is contained in:
parent
b484e56eb5
commit
c94e889281
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue