From 5f36c2343efcd3f5eef7ce0c6d3c6e30eedbf396 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Thu, 13 Jun 2024 18:29:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E7=8B=AC=E7=AB=8B=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E5=88=86=E6=9E=90?= =?UTF-8?q?&=E6=8E=A5=E5=8F=A3=E5=9C=BA=E6=99=AF=E5=88=86=E6=9E=90&?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=89=A7=E8=A1=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/modules/test-plan/report.ts | 23 +- .../src/api/modules/test-plan/testPlan.ts | 12 +- frontend/src/api/requrls/test-plan/report.ts | 8 + .../src/api/requrls/test-plan/testPlan.ts | 4 +- frontend/src/config/testPlan.ts | 32 +++ frontend/src/models/testPlan/report.ts | 12 + frontend/src/models/testPlan/testPlan.ts | 13 +- .../components/caseDetailDrawer.vue | 2 +- .../tabContent/tabComment/tabCommentIndex.vue | 13 +- .../report/detail/component/apiCaseTable.vue | 72 +++--- .../report/detail/component/planDetail.vue | 212 +++++++++--------- .../testPlan/components/planTable.vue | 46 ++-- 12 files changed, 276 insertions(+), 173 deletions(-) diff --git a/frontend/src/api/modules/test-plan/report.ts b/frontend/src/api/modules/test-plan/report.ts index 0858307e0b..bc5731e896 100644 --- a/frontend/src/api/modules/test-plan/report.ts +++ b/frontend/src/api/modules/test-plan/report.ts @@ -3,7 +3,12 @@ import * as reportUrl from '@/api/requrls/test-plan/report'; import type { GetShareId } from '@/models/apiTest/report'; import { CommonList, TableQueryParams } from '@/models/common'; -import { FeatureCaseItem, ReportBugItem, UpdateReportDetailParams } from '@/models/testPlan/report'; +import { + ApiOrScenarioCaseItem, + FeatureCaseItem, + ReportBugItem, + UpdateReportDetailParams, +} from '@/models/testPlan/report'; // 报告列表 export function reportList(data: TableQueryParams) { @@ -79,5 +84,21 @@ export function planGetShareHref(id: string) { export function getShareValidity(id: string) { return MSR.get({ url: `${reportUrl.GetShareValidityUrl}/${id}` }); } +// 测试计划-独立报告-接口用例 +export function getApiPage(data: TableQueryParams) { + return MSR.post>({ url: reportUrl.ReportIndependentApiUrl, data }); +} +// 测试计划-报告-获取分享链接时效 +export function getScenarioPage(data: TableQueryParams) { + return MSR.post>({ url: reportUrl.ReportIndependentScenarioUrl, data }); +} +// 测试计划-独立报告-接口用例 +export function getShareApiPage(data: TableQueryParams) { + return MSR.post>({ url: reportUrl.ReportShareApiUrl, data }); +} +// 测试计划-报告-获取分享链接时效 +export function getShareScenarioPage(data: TableQueryParams) { + return MSR.post>({ url: reportUrl.ReportShareScenarioUrl, data }); +} export default {}; diff --git a/frontend/src/api/modules/test-plan/testPlan.ts b/frontend/src/api/modules/test-plan/testPlan.ts index c482633717..49934a6a88 100644 --- a/frontend/src/api/modules/test-plan/testPlan.ts +++ b/frontend/src/api/modules/test-plan/testPlan.ts @@ -15,6 +15,7 @@ import { BatchDisassociateApiScenarioUrl, BatchDisassociateCaseUrl, BatchEditTestPlanUrl, + BatchExecutePlanUrl, BatchMoveApiCaseUrl, BatchMoveApiScenarioUrl, BatchMoveFeatureCaseUrl, @@ -36,7 +37,7 @@ import { dragPlanOnGroupUrl, EditPlanMinderUrl, ExecuteHistoryUrl, - ExecutePlanUrl, + ExecuteSinglePlanUrl, followPlanUrl, GenerateReportUrl, GetApiCaseModuleCountUrl, @@ -90,6 +91,7 @@ import type { AssociateCaseRequestType, BatchApiCaseParams, BatchExecuteFeatureCaseParams, + BatchExecutePlan, BatchFeatureCaseParams, BatchMoveApiCaseParams, BatchUpdateApiCaseExecutorParams, @@ -423,9 +425,13 @@ export function dragPlanOnGroup(data: DragSortParams) { export function configSchedule(data: CreateTask) { return MSR.post({ url: ConfigScheduleUrl, data }); } +// 测试计划-计划&计划组-执行 +export function executeSinglePlan(data: ExecutePlan) { + return MSR.post({ url: ExecuteSinglePlanUrl, data }); +} // 测试计划-计划&计划组-执行&批量执行 -export function executePlanOrGroup(data: ExecutePlan) { - return MSR.post({ url: ExecutePlanUrl, data }); +export function executePlanOrGroup(data: BatchExecutePlan) { + return MSR.post({ url: BatchExecutePlanUrl, data }); } // 测试计划-计划&计划组-执行&批量执行 export function deleteScheduleTask(testPlanId: string) { diff --git a/frontend/src/api/requrls/test-plan/report.ts b/frontend/src/api/requrls/test-plan/report.ts index cc667d7a37..a8fa095c7c 100644 --- a/frontend/src/api/requrls/test-plan/report.ts +++ b/frontend/src/api/requrls/test-plan/report.ts @@ -28,3 +28,11 @@ export const PlanGetShareHrefDetailUrl = '/test-plan/report/share/get'; export const GetShareValidityUrl = '/test-plan/report/share/get-share-time'; // 测试计划-报告-详情-富文本编辑器上传图片文件 export const EditorUploadFileUrl = '/test-plan/report/upload/md/file'; +// 测试计划-独立报告-接口用例 +export const ReportIndependentApiUrl = '/test-plan/report/detail/api/case/page'; +// 测试计划-独立报告-场景用例 +export const ReportIndependentScenarioUrl = '/test-plan/report/detail/scenario/case/page'; +// 测试计划-独立报告-接口用例-分享 +export const ReportShareApiUrl = '/test-plan/report/share/detail/api/case/page'; +// 测试计划-独立报告-场景用例-分享 +export const ReportShareScenarioUrl = '/test-plan/report/share/detail/scenario/case/page'; diff --git a/frontend/src/api/requrls/test-plan/testPlan.ts b/frontend/src/api/requrls/test-plan/testPlan.ts index 742b36c28a..5d86fd4a66 100644 --- a/frontend/src/api/requrls/test-plan/testPlan.ts +++ b/frontend/src/api/requrls/test-plan/testPlan.ts @@ -96,8 +96,10 @@ export const TestPlanGroupOptionsUrl = 'test-plan/group-list'; export const dragPlanOnGroupUrl = '/test-plan/sort'; // 测试计划-创建定时任务 export const ConfigScheduleUrl = '/test-plan/schedule-config'; +// 测试计划-计划&计划组-执行 +export const ExecuteSinglePlanUrl = '/test-plan-execute/single'; // 测试计划-计划&计划组-执行&批量执行 -export const ExecutePlanUrl = '/test-plan-execute/start'; +export const BatchExecutePlanUrl = '/test-plan-execute/batch'; // 测试计划-删除定时任务 export const DeleteScheduleTaskUrl = 'test-plan/schedule-config-delete'; diff --git a/frontend/src/config/testPlan.ts b/frontend/src/config/testPlan.ts index f03f79137a..da817c18db 100644 --- a/frontend/src/config/testPlan.ts +++ b/frontend/src/config/testPlan.ts @@ -128,4 +128,36 @@ export const statusConfig: StatusListType[] = [ }, ]; +export const commonConfig = { + tooltip: { + show: false, + trigger: 'item', + }, + legend: { + show: false, + }, +}; + +export const seriesConfig = { + name: '', + type: 'pie', + radius: ['62%', '80%'], + center: ['50%', '50%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center', + }, + emphasis: { + label: { + show: false, + fontSize: 40, + fontWeight: 'bold', + }, + }, + labelLine: { + show: false, + }, +}; + export default {}; diff --git a/frontend/src/models/testPlan/report.ts b/frontend/src/models/testPlan/report.ts index c165fbb30f..52c5d7ad84 100644 --- a/frontend/src/models/testPlan/report.ts +++ b/frontend/src/models/testPlan/report.ts @@ -23,3 +23,15 @@ export interface UpdateReportDetailParams { summary: string; richTextTmpFileIds: string[]; } + +export interface ApiOrScenarioCaseItem { + id: string; + num: number; + name: string; + moduleName: string; + priority: string; + executeResult: string; + executeUser: string; + bugCount: number; + reportId: string; +} diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 11d90d8682..4635f4905b 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -367,10 +367,15 @@ export interface CreateTask { cron: string; runConfig: { runMode: 'SERIAL' | 'PARALLEL' }; } -export interface ExecutePlan { - projectId: string; - executeIds: string[]; - executeMode: RunModeType; +export interface BatchExecutePlan { + projectId?: string; + executeIds?: string[]; + runMode: RunModeType; + executionSource: string; +} + +export interface ExecutePlan extends BatchExecutePlan { + executeId: string; } export interface PlanMinderNodeData extends MinderJsonNodeData { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue index 80063d9532..bb10fb50c5 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue @@ -131,7 +131,7 @@