diff --git a/frontend/src/views/workbench/homePage/components/overview.vue b/frontend/src/views/workbench/homePage/components/overview.vue index ee61af2e21..6948e6fc07 100644 --- a/frontend/src/views/workbench/homePage/components/overview.vue +++ b/frontend/src/views/workbench/homePage/components/overview.vue @@ -37,7 +37,7 @@
- +
@@ -67,7 +67,7 @@ } from '@/models/workbench/homePage'; import { WorkCardEnum } from '@/enums/workbenchEnum'; - import { getColorScheme, getSeriesData } from '../utils'; + import { createCustomTooltip, getColorScheme, getSeriesData } from '../utils'; const { t } = useI18n(); @@ -176,6 +176,7 @@ }); } } + const chartRef = ref>(); async function handleRefreshKeyChange() { await nextTick(() => { @@ -187,8 +188,15 @@ }, 0); } - onMounted(() => { - initOverViewDetail(); + onMounted(async () => { + await initOverViewDetail(); + + setTimeout(() => { + const chartDom = chartRef.value?.chartRef; + if (chartDom && chartDom.chart) { + createCustomTooltip(chartDom); + } + }, 0); }); watch( diff --git a/frontend/src/views/workbench/homePage/components/overviewMember.vue b/frontend/src/views/workbench/homePage/components/overviewMember.vue index d4e3c98e6c..2695c634b8 100644 --- a/frontend/src/views/workbench/homePage/components/overviewMember.vue +++ b/frontend/src/views/workbench/homePage/components/overviewMember.vue @@ -37,7 +37,7 @@
- +
@@ -60,7 +60,7 @@ import type { SelectedCardItem, TimeFormParams } from '@/models/workbench/homePage'; - import { getColorScheme, getSeriesData } from '../utils'; + import { createCustomTooltip, getColorScheme, getSeriesData } from '../utils'; const { t } = useI18n(); const appStore = useAppStore(); @@ -132,6 +132,7 @@ value: e.id, })); } + const chartRef = ref>(); async function handleProjectChange(isRefreshKey: boolean = false, setAll = false) { await nextTick(); @@ -146,7 +147,14 @@ } } await nextTick(); - initOverViewMemberDetail(); + await initOverViewMemberDetail(); + + setTimeout(() => { + const chartDom = chartRef.value?.chartRef; + if (chartDom && chartDom.chart) { + createCustomTooltip(chartDom); + } + }, 0); } async function changeProject() { diff --git a/frontend/src/views/workbench/homePage/components/testPlanOverview.vue b/frontend/src/views/workbench/homePage/components/testPlanOverview.vue index eee48e42e0..934205c57f 100644 --- a/frontend/src/views/workbench/homePage/components/testPlanOverview.vue +++ b/frontend/src/views/workbench/homePage/components/testPlanOverview.vue @@ -6,36 +6,41 @@
{{ t(props.item.label) }}
-
- +
-