From 5d5ebde35007e8a56b526280f12caf14f1618538 Mon Sep 17 00:00:00 2001 From: teukkk Date: Tue, 10 Dec 2024 16:15:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=8A=A5=E5=91=8A-=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E5=92=8C=E5=9C=BA=E6=99=AF=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E8=A1=A8=E5=A4=B4=E5=A2=9E=E5=8A=A0=E8=80=97?= =?UTF-8?q?=E6=97=B6=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/models/testPlan/report.ts | 1 + .../report/detail/component/reportConfig.ts | 2 ++ .../component/system-card/apiAndScenarioTable.vue | 13 +++++++++++++ .../detail/component/system-card/testSetTable.vue | 13 +++++++++++++ .../system-card/testSetTableChildrenList.vue | 2 +- frontend/src/views/test-plan/report/locale/en-US.ts | 1 + frontend/src/views/test-plan/report/locale/zh-CN.ts | 1 + 7 files changed, 32 insertions(+), 1 deletion(-) diff --git a/frontend/src/models/testPlan/report.ts b/frontend/src/models/testPlan/report.ts index c99f6f81e1..ac6fccaf6c 100644 --- a/frontend/src/models/testPlan/report.ts +++ b/frontend/src/models/testPlan/report.ts @@ -25,4 +25,5 @@ export interface ApiOrScenarioCaseItem { bugCount: number; reportId: string; projectId: string; + requestTime?: number; } diff --git a/frontend/src/views/test-plan/report/detail/component/reportConfig.ts b/frontend/src/views/test-plan/report/detail/component/reportConfig.ts index e62cea5eb4..f7209aa8b1 100644 --- a/frontend/src/views/test-plan/report/detail/component/reportConfig.ts +++ b/frontend/src/views/test-plan/report/detail/component/reportConfig.ts @@ -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', diff --git a/frontend/src/views/test-plan/report/detail/component/system-card/apiAndScenarioTable.vue b/frontend/src/views/test-plan/report/detail/component/system-card/apiAndScenarioTable.vue index 48c61162ac..2fa87c9055 100644 --- a/frontend/src/views/test-plan/report/detail/component/system-card/apiAndScenarioTable.vue +++ b/frontend/src/views/test-plan/report/detail/component/system-card/apiAndScenarioTable.vue @@ -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, diff --git a/frontend/src/views/test-plan/report/detail/component/system-card/testSetTable.vue b/frontend/src/views/test-plan/report/detail/component/system-card/testSetTable.vue index 6abce70222..4339db779c 100644 --- a/frontend/src/views/test-plan/report/detail/component/system-card/testSetTable.vue +++ b/frontend/src/views/test-plan/report/detail/component/system-card/testSetTable.vue @@ -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(() => { return [ diff --git a/frontend/src/views/test-plan/report/detail/component/system-card/testSetTableChildrenList.vue b/frontend/src/views/test-plan/report/detail/component/system-card/testSetTableChildrenList.vue index 38a751934a..ebbfce3339 100644 --- a/frontend/src/views/test-plan/report/detail/component/system-card/testSetTableChildrenList.vue +++ b/frontend/src/views/test-plan/report/detail/component/system-card/testSetTableChildrenList.vue @@ -11,7 +11,7 @@ >
diff --git a/frontend/src/views/test-plan/report/locale/en-US.ts b/frontend/src/views/test-plan/report/locale/en-US.ts index 2c33ad85bb..658ec52cb4 100644 --- a/frontend/src/views/test-plan/report/locale/en-US.ts +++ b/frontend/src/views/test-plan/report/locale/en-US.ts @@ -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)', }; diff --git a/frontend/src/views/test-plan/report/locale/zh-CN.ts b/frontend/src/views/test-plan/report/locale/zh-CN.ts index 284b6c1dbc..553c123400 100644 --- a/frontend/src/views/test-plan/report/locale/zh-CN.ts +++ b/frontend/src/views/test-plan/report/locale/zh-CN.ts @@ -64,4 +64,5 @@ export default { 'report.detail.exportPdfSuccess': '{name} 报告导出成功', 'report.detail.batchExportPdfSuccess': '批量导出 PDF 报告已完成', 'report.detail.batchExportingPdf': '导出进度:{current}/{total}', + 'report.requestTime': '耗时(s)', };