fix(测试计划): 修复测试计划报告明细展示测试计划名称和用例需跳转详情
This commit is contained in:
parent
cd6083ee7e
commit
889fecd1ee
|
@ -17,6 +17,7 @@ export interface FeatureCaseItem {
|
|||
executeUserName: string;
|
||||
bugCount: number;
|
||||
reportId: string;
|
||||
projectId: string;
|
||||
}
|
||||
|
||||
export interface UpdateReportDetailParams {
|
||||
|
|
|
@ -135,6 +135,7 @@ const functionalList: FeatureCaseItem = {
|
|||
executeUserName: '',
|
||||
bugCount: 0,
|
||||
reportId: '',
|
||||
projectId: '',
|
||||
};
|
||||
// 缺陷明细
|
||||
const bugList: ReportBugItem = {
|
||||
|
|
|
@ -72,9 +72,10 @@
|
|||
shareId?: string;
|
||||
activeType: ReportCardTypeEnum;
|
||||
isPreview?: boolean;
|
||||
isGroup?: boolean;
|
||||
}>();
|
||||
|
||||
const columns: MsTableColumn = [
|
||||
const staticColumns: MsTableColumn = [
|
||||
{
|
||||
title: 'ID',
|
||||
dataIndex: 'num',
|
||||
|
@ -112,6 +113,16 @@
|
|||
width: 150,
|
||||
showDrag: true,
|
||||
},
|
||||
];
|
||||
const testPlanNameColumns: MsTableColumn = [
|
||||
{
|
||||
title: 'report.plan.name',
|
||||
dataIndex: 'planName',
|
||||
showTooltip: true,
|
||||
width: 200,
|
||||
},
|
||||
];
|
||||
const lastStaticColumns: MsTableColumn = [
|
||||
{
|
||||
title: 'common.belongModule',
|
||||
dataIndex: 'moduleName',
|
||||
|
@ -135,15 +146,22 @@
|
|||
},
|
||||
];
|
||||
|
||||
const columns = computed(() => {
|
||||
if (props.isGroup) {
|
||||
return [...staticColumns, ...testPlanNameColumns, ...lastStaticColumns];
|
||||
}
|
||||
return [...staticColumns, ...lastStaticColumns];
|
||||
});
|
||||
|
||||
const useApiTable = useTable(getApiPage, {
|
||||
scroll: { x: '100%' },
|
||||
columns,
|
||||
columns: columns.value,
|
||||
showSelectorAll: false,
|
||||
showSetting: false,
|
||||
});
|
||||
const useScenarioTable = useTable(getScenarioPage, {
|
||||
scroll: { x: '100%' },
|
||||
columns,
|
||||
columns: columns.value,
|
||||
showSelectorAll: false,
|
||||
showSetting: false,
|
||||
});
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<MsBaseTable v-bind="propsRes" v-on="propsEvent">
|
||||
<template #num="{ record }">
|
||||
<MsButton :disabled="!props.isPreview" type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
|
||||
</template>
|
||||
<template #caseLevel="{ record }">
|
||||
<CaseLevel :case-level="record.priority" />
|
||||
</template>
|
||||
|
@ -46,15 +49,19 @@
|
|||
getReportShareFeatureCaseList,
|
||||
} from '@/api/modules/test-plan/report';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useOpenNewPage from '@/hooks/useOpenNewPage';
|
||||
|
||||
import { FeatureCaseItem } from '@/models/testPlan/report';
|
||||
import type { ExecuteHistoryItem } from '@/models/testPlan/testPlan';
|
||||
import { CaseManagementRouteEnum } from '@/enums/routeEnum';
|
||||
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
||||
import { ReportCardTypeEnum } from '@/enums/testPlanReportEnum';
|
||||
|
||||
import { executionResultMap } from '@/views/case-management/caseManagementFeature/components/utils';
|
||||
import { detailTableExample } from '@/views/test-plan/report/detail/component/reportConfig';
|
||||
|
||||
const { openNewPage } = useOpenNewPage();
|
||||
|
||||
const props = defineProps<{
|
||||
reportId: string;
|
||||
shareId?: string;
|
||||
|
@ -162,6 +169,13 @@
|
|||
setLoadListParams({ reportId: props.reportId, shareId: props.shareId ?? undefined });
|
||||
loadList();
|
||||
}
|
||||
// 跳转用例详情
|
||||
function toDetail(record: FeatureCaseItem) {
|
||||
openNewPage(CaseManagementRouteEnum.CASE_MANAGEMENT_CASE, {
|
||||
id: record.id,
|
||||
pId: record.projectId,
|
||||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
[() => props.reportId, () => props.isPreview],
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
:share-id="shareId"
|
||||
:active-type="item.value"
|
||||
:is-preview="props.isPreview"
|
||||
:is-group="props.isGroup"
|
||||
/>
|
||||
<CustomRichText
|
||||
v-else-if="item.value === ReportCardTypeEnum.CUSTOM_CARD"
|
||||
|
|
Loading…
Reference in New Issue