From a9b35ccdcba50c5c15425b35c2d729918bf50869 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Mon, 17 Jun 2024 13:05:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B&=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E7=94=A8=E4=BE=8B=E5=88=87=E6=8D=A2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98&=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/modules/test-plan/report.ts | 8 ++- .../components/bugDetailTab.vue | 1 - .../detail/component/apiAndScenarioTable.vue | 69 ++++++++++++------- .../testPlan/components/planTable.vue | 61 +++++----------- 4 files changed, 69 insertions(+), 70 deletions(-) diff --git a/frontend/src/api/modules/test-plan/report.ts b/frontend/src/api/modules/test-plan/report.ts index b923f39912..00c8b749ed 100644 --- a/frontend/src/api/modules/test-plan/report.ts +++ b/frontend/src/api/modules/test-plan/report.ts @@ -87,17 +87,23 @@ export function getShareValidity(id: string) { } // 测试计划-独立报告-接口用例 export function getApiPage(data: TableQueryParams) { + if (data.shareId) { + return MSR.post>({ url: reportUrl.ReportShareApiUrl, data }); + } return MSR.post>({ url: reportUrl.ReportIndependentApiUrl, data }); } // 测试计划-报告-获取分享链接时效 export function getScenarioPage(data: TableQueryParams) { + if (data.shareId) { + return MSR.post>({ url: reportUrl.ReportShareScenarioUrl, data }); + } 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 }); } diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index 110f8bb471..895b45afc3 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -25,7 +25,6 @@ :disabled="!contentEditAble" :placeholder="t('editor.placeholder')" :upload-image="handleUploadImage" - :auto-height="false" :preview-url="EditorPreviewFileUrl" />
diff --git a/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue b/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue index 81a823051b..555b4e25fa 100644 --- a/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue +++ b/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue @@ -1,5 +1,5 @@ - diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue index b0b31c9ff3..1e47f7e9ee 100644 --- a/frontend/src/views/test-plan/testPlan/components/planTable.vue +++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue @@ -239,27 +239,10 @@ @@ -727,13 +695,20 @@ return defaultCountDetailMap.value[id].scheduleConfig.enable; } + function isShowExecuteButton(record: TestPlanItem) { + return ( + ((record.type === testPlanTypeEnum.TEST_PLAN && getFunctionalCount(record.id) > 0) || + (record.type === testPlanTypeEnum.GROUP && record.childrenCount)) && + hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE']) && + record.status !== 'ARCHIVED' + ); + } + function getMoreActions(record: TestPlanItem) { const { status: planStatus } = record; - const useCount = defaultCountDetailMap.value[record.id]?.caseTotal ?? 0; // 有用例数量才可以执行 否则不展示执行 - const copyAction = - useCount > 0 && hasAnyPermission(['PROJECT_TEST_PLAN:READ+ADD']) && planStatus !== 'ARCHIVED' ? copyActions : []; + const copyAction = isShowExecuteButton(record) ? copyActions : []; let scheduledTaskAction: ActionsItem[] = []; if (planStatus !== 'ARCHIVED' && record.groupId && record.groupId === 'NONE') {