From 46f31912cc0e4c6a6b3558e5c9a262b8624d7fcc Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 15 Aug 2023 13:48:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=8A=A5=E5=91=8A=E6=AD=A5=E9=AA=A4=E8=BE=83?= =?UTF-8?q?=E5=A4=9A-=E5=8A=A0=E8=BD=BD=E5=9B=BE=E6=A0=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E7=BD=AE=E9=9D=A0=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027903 --user=白奇 【接口测试】场景报告步骤较多-加载图标显示位置靠上 https://www.tapd.cn/55049933/s/1403657 --- .../automation/report/ApiReportDetail.vue | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/api-test/frontend/src/business/automation/report/ApiReportDetail.vue b/api-test/frontend/src/business/automation/report/ApiReportDetail.vue index 1a69f47223..453651e6f9 100644 --- a/api-test/frontend/src/business/automation/report/ApiReportDetail.vue +++ b/api-test/frontend/src/business/automation/report/ApiReportDetail.vue @@ -1,6 +1,6 @@ @@ -119,9 +119,9 @@ import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer import MsApiReportExport from './ApiReportExport'; import MsApiReportViewHeader from './ApiReportViewHeader'; import MsInfiniteScrollScenarioResults from '@/business/automation/report/components/InfiniteScrollScenarioResults.vue'; -import {RequestFactory} from '../../definition/model/ApiTestModel'; -import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token'; -import {getUUID} from 'metersphere-frontend/src/utils'; +import { RequestFactory } from '../../definition/model/ApiTestModel'; +import { getCurrentProjectID } from 'metersphere-frontend/src/utils/token'; +import { getUUID } from 'metersphere-frontend/src/utils'; import { getScenarioReport, getScenarioReportDetail, @@ -129,7 +129,7 @@ import { getShareScenarioReport, reportReName, } from '../../../api/scenario-report'; -import {STEP} from '../../automation/scenario/Setting'; +import { STEP } from '../../automation/scenario/Setting'; import MsCodeEdit from 'metersphere-frontend/src/components/MsCodeEdit'; import print from 'print-js'; @@ -243,7 +243,7 @@ export default { }, filterNodes(node, status) { if (status === 'ERROR' || status === 'FAKE_ERROR' || status === 'UN_EXECUTE') { - let data = {...node}; + let data = { ...node }; if (data.children.length > 0) { let filteredChildren = []; for (let i = 0; i < data.children.length; i++) { @@ -265,8 +265,13 @@ export default { if (data.value && data.value.status === 'PENDING' && data.type !== 'IfController') { return data; } - if ((data.type === 'IfController' || data.type === 'GenericController' || data.type === 'LoopController' || data.type === 'TransactionController') - && data.totalStatus === 'PENDING') { + if ( + (data.type === 'IfController' || + data.type === 'GenericController' || + data.type === 'LoopController' || + data.type === 'TransactionController') && + data.totalStatus === 'PENDING' + ) { return data; } } else if (status === 'ERROR') { @@ -661,7 +666,7 @@ export default { if (this.isNotRunning) { this.content = JSON.parse(this.report.content); if (!this.content) { - this.content = {scenarios: []}; + this.content = { scenarios: [] }; } this.formatResult(this.content); this.getFails(); @@ -760,14 +765,14 @@ export default { // 多次点击导出报告, 场景步骤未清空#771; this.content.scenarios = []; if (this.report.reportType === 'API_INTEGRATED' || this.report.reportType === 'UI_INTEGRATED') { - let scenario = {name: '', requestResults: []}; + let scenario = { name: '', requestResults: [] }; this.content.scenarios = [scenario]; this.formatExportApi(this.fullTreeNodes, scenario); } else { if (this.fullTreeNodes) { this.fullTreeNodes.forEach((item) => { if (item.type === 'scenario') { - let scenario = {name: item.label, requestResults: []}; + let scenario = { name: item.label, requestResults: [] }; if (this.content.scenarios && this.content.scenarios.length > 0) { this.content.scenarios.push(scenario); } else { @@ -780,7 +785,7 @@ export default { } } if (this.content.scenarios && this.content.scenarios[0].requestResults) { - this.content.scenarios[0].requestResults.push({responseResult: {}}); + this.content.scenarios[0].requestResults.push({ responseResult: {} }); } this.reportExportVisible = true; let reset = this.exportReportReset; @@ -905,6 +910,9 @@ export default {