fix(接口自动化):修复报告请求饼图显示问题;修复 console 兼容历史数据;
This commit is contained in:
parent
5033aa4d2c
commit
8e3407bbcb
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<ms-report-export-template :title="title" :type="$t('report.api_test_report')">
|
||||
<ms-metric-chart :content="content" :totalTime="totalTime"/>
|
||||
<ms-metric-chart :content="content" :is-export="true" :totalTime="totalTime"/>
|
||||
<div class="scenario-result" v-for="(scenario, index) in content.scenarios" :key="index" :scenario="scenario">
|
||||
<div>
|
||||
<el-card>
|
||||
|
|
|
@ -9,13 +9,15 @@
|
|||
</div>
|
||||
</el-row>
|
||||
|
||||
<!--<ms-chart id="chart" ref="chart" :options="options" :autoresize="true"></ms-chart>-->
|
||||
<span class="ms-req ms-req-error" v-if="content.error && content.error>0">
|
||||
<div v-if="isExport">
|
||||
<span class="ms-req ms-req-error" v-if="content.error && content.error>0">
|
||||
<span class="ms-req-span"> {{content.success+content.error}} 请求</span>
|
||||
</span>
|
||||
<span class="ms-req ms-req-success" v-else>
|
||||
<span class="ms-req ms-req-success" v-else>
|
||||
<span class="ms-req-span"> {{content.success? content.success+content.error :0}} 请求</span>
|
||||
</span>
|
||||
</div>
|
||||
<ms-chart id="chart" ref="chart" :options="options" :autoresize="true" v-else/>
|
||||
<el-row type="flex" justify="center" align="middle">
|
||||
<i class="circle success"/>
|
||||
<div class="metric-box">
|
||||
|
@ -87,7 +89,11 @@
|
|||
components: {MsChart},
|
||||
props: {
|
||||
content: Object,
|
||||
totalTime: Number
|
||||
totalTime: Number,
|
||||
isExport:{
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="$t('api_test.definition.request.console')" name="console" class="pane">
|
||||
<pre>{{ console }}</pre>
|
||||
<pre>{{ console ? console : response.console }}</pre>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane :label="$t('api_report.assertions')" name="assertions" class="pane assertions">
|
||||
|
|
Loading…
Reference in New Issue