fix(测试计划): 测试计划详情-执行历史细节修改
This commit is contained in:
parent
03737a5cc6
commit
b3de5b92b4
|
@ -1,17 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="p-[16px]">
|
<div class="p-[16px]">
|
||||||
<ms-base-table v-bind="propsRes" no-disable v-on="propsEvent">
|
<ms-base-table v-bind="propsRes" no-disable v-on="propsEvent">
|
||||||
<template #[FilterSlotNameEnum.API_TEST_CASE_API_REPORT_EXECUTE_RESULT]="{ filterContent }">
|
<template #[FilterSlotNameEnum.TEST_PLAN_STATUS_FILTER]="{ filterContent }">
|
||||||
<ExecutionStatus :module-type="ReportEnum.API_REPORT" :status="filterContent.value" />
|
<ExecutionStatus :module-type="ReportEnum.API_REPORT" :status="filterContent.value" />
|
||||||
</template>
|
</template>
|
||||||
<template #triggerMode="{ record }">
|
<template #triggerMode="{ record }">
|
||||||
<span>{{ t(TriggerModeLabel[record.triggerMode as keyof typeof TriggerModeLabel]) }}</span>
|
<span>{{ t(TriggerModeLabel[record.triggerMode as keyof typeof TriggerModeLabel]) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #lastExecResult="{ record }">
|
<template #lastExecResult="{ record }">
|
||||||
<ExecutionStatus :status="record.execStatus" :module-type="ReportEnum.API_REPORT" />
|
<ExecutionStatus v-if="record.execStatus" :status="record.execStatus" :module-type="ReportEnum.API_REPORT" />
|
||||||
</template>
|
</template>
|
||||||
<template #executionStartAndEndTime="{ record }">
|
<template #executionStartAndEndTime="{ record }">
|
||||||
<div> {{ record.startTime }} 至 {{ record.endTime ?? '-' }} </div>
|
<div>
|
||||||
|
{{ dayjs(record.startTime).format('YYYY-MM-DD HH:mm:ss') }} 至
|
||||||
|
{{ record.endTime ? dayjs(record.endTime).format('YYYY-MM-DD HH:mm:ss') : '-' }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<a-tooltip :content="t('project.executionHistory.cleared')" :disabled="!record.deleted">
|
<a-tooltip :content="t('project.executionHistory.cleared')" :disabled="!record.deleted">
|
||||||
|
@ -44,13 +47,11 @@
|
||||||
import { hasAnyPermission } from '@/utils/permission';
|
import { hasAnyPermission } from '@/utils/permission';
|
||||||
|
|
||||||
import type { PlanDetailExecuteHistoryItem } from '@/models/testPlan/testPlan';
|
import type { PlanDetailExecuteHistoryItem } from '@/models/testPlan/testPlan';
|
||||||
import { LastExecuteResults } from '@/enums/caseEnum';
|
import { PlanReportStatus, ReportEnum, TriggerModeLabel } from '@/enums/reportEnum';
|
||||||
import { ReportEnum, TriggerModeLabel } from '@/enums/reportEnum';
|
|
||||||
import { TestPlanRouteEnum } from '@/enums/routeEnum';
|
import { TestPlanRouteEnum } from '@/enums/routeEnum';
|
||||||
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
||||||
|
|
||||||
import { triggerModeOptions } from '@/views/api-test/report/utils';
|
import { triggerModeOptions } from '@/views/api-test/report/utils';
|
||||||
import { executionResultMap } from '@/views/case-management/caseManagementFeature/components/utils';
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
@ -58,6 +59,15 @@
|
||||||
|
|
||||||
const planId = ref(route.query.id as string);
|
const planId = ref(route.query.id as string);
|
||||||
|
|
||||||
|
const statusResultOptions = computed(() => {
|
||||||
|
return Object.keys(PlanReportStatus).map((key) => {
|
||||||
|
return {
|
||||||
|
value: key,
|
||||||
|
label: PlanReportStatus[key].statusText,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
const columns: MsTableColumn = [
|
const columns: MsTableColumn = [
|
||||||
{
|
{
|
||||||
title: 'apiTestManagement.order',
|
title: 'apiTestManagement.order',
|
||||||
|
@ -80,10 +90,8 @@
|
||||||
dataIndex: 'execStatus',
|
dataIndex: 'execStatus',
|
||||||
slotName: 'lastExecResult',
|
slotName: 'lastExecResult',
|
||||||
filterConfig: {
|
filterConfig: {
|
||||||
valueKey: 'key',
|
options: statusResultOptions.value,
|
||||||
labelKey: 'statusText',
|
filterSlotName: FilterSlotNameEnum.TEST_PLAN_STATUS_FILTER,
|
||||||
options: Object.values(executionResultMap),
|
|
||||||
filterSlotName: FilterSlotNameEnum.CASE_MANAGEMENT_EXECUTE_RESULT,
|
|
||||||
},
|
},
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
|
@ -97,7 +105,7 @@
|
||||||
title: 'testPlan.executeHistory.executionStartAndEndTime',
|
title: 'testPlan.executeHistory.executionStartAndEndTime',
|
||||||
dataIndex: 'startTime',
|
dataIndex: 'startTime',
|
||||||
slotName: 'executionStartAndEndTime',
|
slotName: 'executionStartAndEndTime',
|
||||||
width: 200,
|
width: 300,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'common.operation',
|
title: 'common.operation',
|
||||||
|
|
Loading…
Reference in New Issue