fix(测试计划): 测试计划详情-修复规划视图下所属模块不展示的缺陷

--bug=1042464 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001042464
This commit is contained in:
teukkk 2024-06-18 17:33:14 +08:00 committed by 刘瑞斌
parent 3872d84dea
commit 2d7d462c57
4 changed files with 9 additions and 25 deletions

View File

@ -156,6 +156,7 @@ export interface PlanDetailFeatureCaseItem {
num: string; num: string;
name: string; name: string;
moduleId: string; moduleId: string;
moduleName: string;
versionName: string; versionName: string;
createUser: string; createUser: string;
createUserName: string; createUserName: string;
@ -286,6 +287,7 @@ export interface PlanDetailApiCaseItem {
num: number; num: number;
name: string; name: string;
moduleId: string; moduleId: string;
moduleName: string;
createUser: string; createUser: string;
createUserName: string; createUserName: string;
lastExecResult: LastExecuteResults; lastExecResult: LastExecuteResults;
@ -340,6 +342,7 @@ export interface PlanDetailApiScenarioItem {
environmentId: string; environmentId: string;
environmentName: string; environmentName: string;
moduleId: string; moduleId: string;
moduleName: string;
createUser: string; createUser: string;
createUserName: string; createUserName: string;
lastExecResult: LastExecuteResults; lastExecResult: LastExecuteResults;

View File

@ -144,7 +144,6 @@
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum'; import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { casePriorityOptions, lastReportStatusListOptions } from '@/views/api-test/components/config'; import { casePriorityOptions, lastReportStatusListOptions } from '@/views/api-test/components/config';
import { getModules } from '@/views/case-management/caseManagementFeature/components/utils';
const props = defineProps<{ const props = defineProps<{
modulesCount: Record<string, number>; // modulesCount: Record<string, number>; //
@ -258,7 +257,7 @@
}, },
{ {
title: 'common.belongModule', title: 'common.belongModule',
dataIndex: 'moduleId', dataIndex: 'moduleName',
showTooltip: true, showTooltip: true,
width: 200, width: 200,
showDrag: true, showDrag: true,
@ -314,13 +313,7 @@
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(
getPlanDetailApiCaseList, getPlanDetailApiCaseList,
tableProps.value, tableProps.value
(record) => {
return {
...record,
moduleId: getModules(record.moduleId, props.moduleTree),
};
}
); );
const tableRef = ref<InstanceType<typeof MsBaseTable>>(); const tableRef = ref<InstanceType<typeof MsBaseTable>>();

View File

@ -141,7 +141,6 @@
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum'; import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { casePriorityOptions, lastReportStatusListOptions } from '@/views/api-test/components/config'; import { casePriorityOptions, lastReportStatusListOptions } from '@/views/api-test/components/config';
import { getModules } from '@/views/case-management/caseManagementFeature/components/utils';
const props = defineProps<{ const props = defineProps<{
modulesCount: Record<string, number>; // modulesCount: Record<string, number>; //
@ -239,7 +238,7 @@
}, },
{ {
title: 'common.belongModule', title: 'common.belongModule',
dataIndex: 'moduleId', dataIndex: 'moduleName',
showTooltip: true, showTooltip: true,
width: 200, width: 200,
showDrag: true, showDrag: true,
@ -295,13 +294,7 @@
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(
getPlanDetailApiScenarioList, getPlanDetailApiScenarioList,
tableProps.value, tableProps.value
(record) => {
return {
...record,
moduleId: getModules(record.moduleId, props.moduleTree),
};
}
); );
const tableRef = ref<InstanceType<typeof MsBaseTable>>(); const tableRef = ref<InstanceType<typeof MsBaseTable>>();

View File

@ -178,11 +178,7 @@
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum'; import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { casePriorityOptions } from '@/views/api-test/components/config'; import { casePriorityOptions } from '@/views/api-test/components/config';
import { import { executionResultMap, getCaseLevels } from '@/views/case-management/caseManagementFeature/components/utils';
executionResultMap,
getCaseLevels,
getModules,
} from '@/views/case-management/caseManagementFeature/components/utils';
const props = defineProps<{ const props = defineProps<{
modulesCount: Record<string, number>; // modulesCount: Record<string, number>; //
@ -275,7 +271,7 @@
}, },
{ {
title: 'common.belongModule', title: 'common.belongModule',
dataIndex: 'moduleId', dataIndex: 'moduleName',
showTooltip: true, showTooltip: true,
width: 200, width: 200,
showDrag: true, showDrag: true,
@ -336,7 +332,6 @@
...record, ...record,
lastExecResult: record.lastExecResult ?? LastExecuteResults.PENDING, lastExecResult: record.lastExecResult ?? LastExecuteResults.PENDING,
caseLevel: getCaseLevels(record.customFields), caseLevel: getCaseLevels(record.customFields),
moduleId: getModules(record.moduleId, props.moduleTree),
}; };
} }
); );