diff --git a/frontend/src/config/testPlan.ts b/frontend/src/config/testPlan.ts index 1b1402907c..a982b36c75 100644 --- a/frontend/src/config/testPlan.ts +++ b/frontend/src/config/testPlan.ts @@ -157,7 +157,7 @@ export const toolTipConfig: TooltipOption = { appendTo: 'body', formatter(params: any) { const html = ` -
+
-
-
{{ item.label }}
-
- {{ hasPermission ? addCommasToNumber(item.value as number) : '-' }} -
+
+ +
{{ item.label }}
+
+
+ {{ hasPermission ? addCommasToNumber(item.value as number) : '-' }} +
+
+
@@ -44,6 +48,7 @@ value: number | string; status?: string; route?: string; + archivedPassed?: number; }[]; }>(); @@ -67,8 +72,8 @@ @apply flex items-center gap-2; .pass-rate-count { font-size: 20px; - color: rgb(var(--primary-4)); - @apply cursor-pointer font-medium; + gap: 8px; + @apply flex cursor-pointer items-center justify-start font-medium; } } } diff --git a/frontend/src/views/workbench/homePage/components/testPlanCount.vue b/frontend/src/views/workbench/homePage/components/testPlanCount.vue index aa3ed88593..1b027e83bc 100644 --- a/frontend/src/views/workbench/homePage/components/testPlanCount.vue +++ b/frontend/src/views/workbench/homePage/components/testPlanCount.vue @@ -29,7 +29,22 @@ :has-permission="hasPermission" :options="tabItem.options" :value-list="tabItem.valueList" - /> + > + +
@@ -59,7 +74,9 @@ import { workTestPlanRage } from '@/api/modules/workbench'; import getVisualThemeColor from '@/config/chartTheme'; import { useI18n } from '@/hooks/useI18n'; + import useOpenNewPage from '@/hooks/useOpenNewPage'; import useAppStore from '@/store/modules/app'; + import { addCommasToNumber } from '@/utils'; import type { SelectedCardItem, @@ -67,9 +84,12 @@ WorkTestPlanDetail, WorkTestPlanRageDetail, } from '@/models/workbench/homePage'; + import { WorkNavValueEnum } from '@/enums/workbenchEnum'; import { colorMapConfig, handlePieData, handleUpdateTabPie } from '../utils'; + const { openNewPage } = useOpenNewPage(); + const { t } = useI18n(); const appStore = useAppStore(); @@ -155,10 +175,12 @@ { name: t('workbench.homePage.havePassed'), count: passed, + archivedPassed: 0, }, { name: t('workbench.homePage.notPass'), count: notPassed, + archivedPassed: 0, }, ]; @@ -249,6 +271,24 @@ }); } + function goNavigation( + item: { label: string; value: number | string; status?: string; route?: string }, + index: number, + isArchived = false + ) { + let status; + if (isArchived) { + status = index === 0 ? WorkNavValueEnum.TEST_PLAN_PASSED_ARCHIVED : WorkNavValueEnum.TEST_PLAN_NOT_PASS_ARCHIVED; + } else { + status = item.status; + } + + openNewPage(item.route, { + pId: projectId.value, + home: status, + }); + } + onMounted(() => { initTestPlanCount(); }); @@ -296,4 +336,9 @@ :deep(.arco-tabs-tab) { padding: 0 !important; } + .pass-rate-count-archived { + font-size: 20px; + gap: 8px; + @apply grid cursor-pointer grid-cols-2 font-medium; + }