feat(测试计划): 报告-接口用例明细和场景用例明细表头增加耗时字段

This commit is contained in:
teukkk 2024-12-10 16:15:04 +08:00 committed by Craftsman
parent 768185db2d
commit 5d5ebde350
7 changed files with 32 additions and 1 deletions

View File

@ -25,4 +25,5 @@ export interface ApiOrScenarioCaseItem {
bugCount: number;
reportId: string;
projectId: string;
requestTime?: number;
}

View File

@ -160,6 +160,7 @@ const apiCaseList: ApiOrScenarioCaseItem = {
priority: 'P0',
executeResult: 'SUCCESS',
executeUser: 'admin',
requestTime: 0,
bugCount: 0,
reportId: '718255970852864',
projectId: '718255970852864',
@ -172,6 +173,7 @@ const scenarioCaseList: ApiOrScenarioCaseItem = {
moduleName: '/未规划模块',
priority: 'P2',
executeResult: 'SUCCESS',
requestTime: 0,
executeUser: '社恐程序员',
bugCount: 0,
reportId: '718255970852864',

View File

@ -139,6 +139,19 @@
showInTable: true,
showDrag: true,
},
{
title: 'report.requestTime',
dataIndex: 'requestTime',
sortable: props.isPreview
? {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
: undefined,
width: 100,
showInTable: true,
showDrag: true,
},
];
const apiLastStaticColumns: MsTableColumn = [
...lastStaticColumns,

View File

@ -220,6 +220,19 @@
showInTable: true,
showDrag: true,
},
{
title: 'report.requestTime',
dataIndex: 'requestTime',
showDrag: true,
sortable: props.isPreview
? {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
: undefined,
width: 100,
showInTable: true,
},
];
const columns = computed<MsTableColumn>(() => {
return [

View File

@ -11,7 +11,7 @@
>
</div>
<div
v-if="['name','planName', 'bugCount', 'executeUser', 'moduleName'].includes(column.dataIndex as string)"
v-if="['name','planName','requestTime', 'bugCount', 'executeUser', 'moduleName'].includes(column.dataIndex as string)"
class="list-column"
:style="{ width: `${column.width}px` }"
>

View File

@ -64,4 +64,5 @@ export default {
'report.detail.exportPdfSuccess': '{name} report exported successfully',
'report.detail.batchExportPdfSuccess': 'Batch export of PDF reports completed',
'report.detail.batchExportingPdf': 'Export progress: {current}/{total}',
'report.requestTime': 'Time consumption (s)',
};

View File

@ -64,4 +64,5 @@ export default {
'report.detail.exportPdfSuccess': '{name} 报告导出成功',
'report.detail.batchExportPdfSuccess': '批量导出 PDF 报告已完成',
'report.detail.batchExportingPdf': '导出进度:{current}/{total}',
'report.requestTime': '耗时(s)',
};