diff --git a/frontend/src/api/modules/workbench.ts b/frontend/src/api/modules/workbench.ts index 02a2b5ac99..93c9f6460a 100644 --- a/frontend/src/api/modules/workbench.ts +++ b/frontend/src/api/modules/workbench.ts @@ -1,3 +1,5 @@ +import { CascaderOption } from '@arco-design/web-vue'; + import MSR from '@/api/http/index'; import type { ApiCaseDetail, ApiDefinitionDetail } from '@/models/apiTest/management'; @@ -48,6 +50,8 @@ import { WorkProOverviewDetailUrl, WorkReviewListUrl, WorkScenarioCaseCountDetailUrl, + WorkTestPlanListUrl, + WorkTestPlanOverviewUrl, WorkTestPlanRageUrl, WorkTodoBugListUrl, WorkTodoPlanListUrl, @@ -224,3 +228,12 @@ export function workbenchTodoBugList(data: TableQueryParams) { export function workbenchTodoTestPlanList(data: TableQueryParams) { return MSR.post>({ url: WorkTodoPlanListUrl, data }); } +// 待办-测试计划列表 +export function getWorkTestPlanListUrl(projectId: string) { + return MSR.get({ url: `${WorkTestPlanListUrl}/${projectId}` }); +} + +// 工作台-测试计划概览 +export function workTestPlanOverviewDetail(data: WorkHomePageDetail) { + return MSR.post({ url: WorkTestPlanOverviewUrl, data }, { ignoreCancelToken: true }); +} diff --git a/frontend/src/api/requrls/workbench.ts b/frontend/src/api/requrls/workbench.ts index 1d61ce15f2..9ccd1431b7 100644 --- a/frontend/src/api/requrls/workbench.ts +++ b/frontend/src/api/requrls/workbench.ts @@ -32,3 +32,5 @@ export const WorkPlanLegacyBugUrl = '/dashboard/plan_legacy_bug'; // 工作台- export const WorkApiCountCoverRateUrl = '/api/definition/rage'; // 工作台-首页-覆盖率 export const WorkTestPlanRageUrl = '/test-plan/rage'; // 工作台-首页-测试计划数 export const WorkProjectMemberListUrl = '/dashboard/member/get-project-member/option'; // 工作台-首页-项目成员下拉 +export const WorkTestPlanListUrl = '/dashboard/plan/option'; // 工作台-首页-测试计划概览下拉 +export const WorkTestPlanOverviewUrl = '/dashboard/plan_view'; // 工作台-首页-测试计划概览 diff --git a/frontend/src/assets/svg/test-plan-overview.svg b/frontend/src/assets/svg/test-plan-overview.svg new file mode 100644 index 0000000000..c9cd22ace5 --- /dev/null +++ b/frontend/src/assets/svg/test-plan-overview.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/business/ms-cascader/index.vue b/frontend/src/components/business/ms-cascader/index.vue index 8975cddb91..bad20e0e22 100644 --- a/frontend/src/components/business/ms-cascader/index.vue +++ b/frontend/src/components/business/ms-cascader/index.vue @@ -55,6 +55,7 @@ :trigger-props="{ contentClass: `ms-cascader-popper-native ms-cascader-popper--${props.optionSize}` }" :multiple="props.multiple" allow-clear + :load-more="props.loadMore" :check-strictly="props.strictly" :max-tag-count="props.shouldCalculateMaxTag ? maxTagCount : 1" :placeholder="props.placeholder" @@ -124,6 +125,7 @@ valueKey?: string; labelKey?: string; // 传入自定义的 labelKey shouldCalculateMaxTag?: boolean; // 是否需要计算最大标签数 + loadMore?: (option: CascaderOption, done: (children?: CascaderOption[]) => void) => void; } const props = withDefaults(defineProps(), { diff --git a/frontend/src/components/pure/ms-table/comp/defaultFilter.vue b/frontend/src/components/pure/ms-table/comp/defaultFilter.vue index 83a0fc24cd..69f710a7be 100644 --- a/frontend/src/components/pure/ms-table/comp/defaultFilter.vue +++ b/frontend/src/components/pure/ms-table/comp/defaultFilter.vue @@ -184,6 +184,15 @@ } } ); + + watch( + () => props.filter, + (val) => { + if (val[props.dataIndex as string] && val[props.dataIndex as string]?.length) { + checkedList.value = val[props.dataIndex as string]; + } + } + ); + diff --git a/frontend/src/views/workbench/homePage/components/caseCount.vue b/frontend/src/views/workbench/homePage/components/caseCount.vue index 032705d38c..aa5431d263 100644 --- a/frontend/src/views/workbench/homePage/components/caseCount.vue +++ b/frontend/src/views/workbench/homePage/components/caseCount.vue @@ -26,6 +26,7 @@
@@ -73,7 +74,7 @@ } from '@/models/workbench/homePage'; import { WorkCardEnum } from '@/enums/workbenchEnum'; - import { colorMapConfig, handlePieData, handleUpdateTabPie } from '../utils'; + import { colorMapConfig, handlePieData, handleUpdateTabPie, routeNavigationMap } from '../utils'; const appStore = useAppStore(); @@ -168,14 +169,17 @@ const { options, valueList } = handleUpdateTabPie(legacyData, hasPermission.value, `${props.item.key}-legacy`); legacyValueList.value = hasPermission.value - ? (statusStatisticsMap?.retentionRate || []).slice(1).map((item) => { + ? (statusStatisticsMap?.retentionRate || []).slice(1).map((item, i) => { return { value: item.count, label: item.name, name: item.name, + route: routeNavigationMap[props.item.key].legacy?.route, + status: routeNavigationMap[props.item.key].legacy?.status[i], }; }) : valueList; + legacyOptions.value = options; } catch (error) { // eslint-disable-next-line no-console diff --git a/frontend/src/views/workbench/homePage/components/overview.vue b/frontend/src/views/workbench/homePage/components/overview.vue index f245322a1f..ee61af2e21 100644 --- a/frontend/src/views/workbench/homePage/components/overview.vue +++ b/frontend/src/views/workbench/homePage/components/overview.vue @@ -6,7 +6,11 @@
{{ t(props.item.label) }}
-
+
+
+ {{ t('workbench.homePage.selected') }} + {{ innerProjectIds.length }} +
- +
@@ -63,7 +67,7 @@ } from '@/models/workbench/homePage'; import { WorkCardEnum } from '@/enums/workbenchEnum'; - import { getColorScheme, getCommonBarOptions, getSeriesData, handleNoDataDisplay } from '../utils'; + import { getColorScheme, getSeriesData } from '../utils'; const { t } = useI18n(); @@ -102,8 +106,6 @@ } ); - const hasRoom = computed(() => innerProjectIds.value.length >= 7 || props.item.projectIds.length === 0); - const options = ref>({}); const hasPermission = ref(false); @@ -122,16 +124,7 @@ }) .filter((e) => Object.keys(detail.caseCountMap).includes(e.value as string)); - options.value = getCommonBarOptions(hasRoom.value, getColorScheme(detail.projectCountList.length)); - const { invisible, text } = handleNoDataDisplay(detail.xaxis, hasPermission.value); - options.value.graphic.invisible = invisible; - options.value.graphic.style.text = text; - // x轴 - options.value.xAxis.data = detail.xaxis; - - const { maxAxis, data } = getSeriesData(detail.projectCountList); - options.value.series = data; - options.value.yAxis[0].max = maxAxis; + options.value = getSeriesData(contentTabList, detail, getColorScheme(detail.projectCountList.length)); } const showSkeleton = ref(false); diff --git a/frontend/src/views/workbench/homePage/components/overviewMember.vue b/frontend/src/views/workbench/homePage/components/overviewMember.vue index c2e5bc6be6..d4e3c98e6c 100644 --- a/frontend/src/views/workbench/homePage/components/overviewMember.vue +++ b/frontend/src/views/workbench/homePage/components/overviewMember.vue @@ -1,6 +1,6 @@