refactor(性能测试): 修改报告列表显示测试的时间和执行时长格式

This commit is contained in:
CaptainB 2022-11-13 16:22:26 +08:00 committed by 刘瑞斌
parent 9039113a2e
commit 12a6203286
1 changed files with 7 additions and 5 deletions

View File

@ -70,7 +70,7 @@
sortable sortable
:field="item" :field="item"
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
min-width="65" min-width="100"
:label="$t('report.max_users')"> :label="$t('report.max_users')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
@ -82,6 +82,7 @@
:label="$t('report.response_time')"> :label="$t('report.response_time')">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
min-width="100"
prop="tps" prop="tps"
sortable sortable
:field="item" :field="item"
@ -89,7 +90,7 @@
label="TPS"> label="TPS">
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
min-width="100" min-width="120"
:field="item" :field="item"
sortable sortable
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
@ -101,7 +102,7 @@
</template> </template>
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
min-width="100" min-width="120"
show-overflow-tooltip show-overflow-tooltip
:field="item" :field="item"
sortable sortable
@ -110,17 +111,18 @@
:label="$t('report.test_end_time')"> :label="$t('report.test_end_time')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<span v-if="scope.row.status === 'Completed'">{{ scope.row.testEndTime | datetimeFormat }}</span> <span v-if="scope.row.status === 'Completed'">{{ scope.row.testEndTime | datetimeFormat }}</span>
<span v-else>-</span>
</template> </template>
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
min-width="90" min-width="120"
prop="testDuration" prop="testDuration"
:field="item" :field="item"
sortable sortable
:fields-width="fieldsWidth" :fields-width="fieldsWidth"
:label="$t('report.test_execute_time')"> :label="$t('report.test_execute_time')">
<template v-slot:default="scope"> <template v-slot:default="scope">
<span v-if="scope.row.status === 'Completed'"> <span>
{{ $t('performance_test.report.test_duration', [scope.row.hours, scope.row.minutes, scope.row.seconds]) }} {{ $t('performance_test.report.test_duration', [scope.row.hours, scope.row.minutes, scope.row.seconds]) }}
</span> </span>
</template> </template>