fix(接口测试): 修复场景报告导出与详情不一致的缺陷

--bug=1013422 --user=王孝刚 【接口测试】场景-独立/聚合报告导出表头字段显示与报告详情不一致
https://www.tapd.cn/55049933/s/1162989
This commit is contained in:
wxg0103 2022-05-24 14:22:43 +08:00 committed by f2c-ci-robot[bot]
parent 25e67dd402
commit 794d8a7a9f
3 changed files with 15 additions and 14 deletions

View File

@ -1,13 +1,14 @@
<template>
<ms-report-export-template :title="title" :type="$t('report.api_test_report')">
<ms-report-export-template :title="title" :report="report" :type="$t('report.api_test_report')">
<ms-metric-chart :content="content" :is-export="true" :totalTime="totalTime" :report="report"/>
<div class="scenario-result" v-for="(scenario, index) in content.scenarios" :key="index" :scenario="scenario">
<div>
<el-card>
<template v-slot:header>
{{$t('api_report.scenario_name')}}{{scenario.name}}
{{ $t('api_report.scenario_name') }}{{ scenario.name }}
</template>
<div class="ms-border clearfix" v-for="(request, index) in scenario.requestResults" :key="index" :request="request">
<div class="ms-border clearfix" v-for="(request, index) in scenario.requestResults" :key="index"
:request="request">
<div class="request-top">
<div>
@ -17,7 +18,6 @@
{{request.url}}
</div>
</div>
<el-divider/>
<div class="request-middle">
<api-report-reqest-header-item :title="$t('api_test.request.method')">

View File

@ -1,6 +1,6 @@
<template>
<div class="report-export">
<ms-report-title :title="title" :type="type"/>
<ms-report-title :title="title" :type="type" :report="report"/>
<slot></slot>
</div>
</template>
@ -10,7 +10,7 @@
export default {
name: "MsReportExportTemplate",
components: {MsReportTitle},
props: {title: String, type: String},
props: {title: String, type: String, report: Object},
}
</script>

View File

@ -2,10 +2,13 @@
<div class="clearfix report-title">
<div class="report-left">
<div class="title">
{{type}}- {{title}}
</div>
<div>
<span class="time">{{new Date() | timestampFormatDate}}</span>
{{ type }}- {{ title }}
<span v-if="report.endTime || report.createTime">
<span style="margin-left: 10px">{{ $t('report.test_start_time') }}</span>
<span class="time"> {{ report.createTime | timestampFormatDate }}</span>
<span style="margin-left: 10px">{{ $t('report.test_end_time') }}</span>
<span class="time"> {{ report.endTime | timestampFormatDate }}</span>
</span>
</div>
</div>
<div class="report-right">
@ -18,11 +21,9 @@
<script>
export default {
name: "MsReportTitle",
props: {title: String, type: String},
props: {title: String, type: String, report: Object},
data() {
return {
}
return {}
}
}
</script>