fix(测试计划): 测试计划详情-关联用例-点击id跳转

--bug=1042722 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001042722
This commit is contained in:
teukkk 2024-06-20 16:14:14 +08:00 committed by Craftsman
parent d71ce02d4c
commit e15209f5a8
4 changed files with 53 additions and 9 deletions

View File

@ -11,7 +11,7 @@
@filter-change="getModuleCount"
>
<template #num="{ record }">
<MsButton type="text">{{ record.num }}</MsButton>
<MsButton type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
</template>
<template #lastReportStatus="{ record }">
<ExecutionStatus
@ -57,19 +57,21 @@
import ExecuteResult from '@/components/business/ms-case-associate/executeResult.vue';
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
import { useI18n } from '@/hooks/useI18n';
import useOpenNewPage from '@/hooks/useOpenNewPage';
import { characterLimit } from '@/utils';
import { ApiCaseDetail } from '@/models/apiTest/management';
import type { TableQueryParams } from '@/models/common';
import { CasePageApiTypeEnum } from '@/enums/associateCaseEnum';
import { CaseLinkEnum } from '@/enums/caseEnum';
import { ReportEnum, ReportStatus } from '@/enums/reportEnum';
import { ApiTestRouteEnum } from '@/enums/routeEnum';
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { getPublicLinkCaseListMap } from './utils/page';
import { casePriorityOptions } from '@/views/api-test/components/config';
const { t } = useI18n();
const { openNewPage } = useOpenNewPage();
const props = defineProps<{
associationType: string; // | |
@ -330,6 +332,14 @@
};
}
//
function toDetail(record: ApiCaseDetail) {
openNewPage(ApiTestRouteEnum.API_TEST_MANAGEMENT, {
cId: record.id,
pId: record.projectId,
});
}
defineExpose({
getApiCaseSaveParams,
loadCaseList,

View File

@ -12,7 +12,7 @@
@filter-change="getModuleCount"
>
<template #num="{ record }">
<MsButton type="text">{{ record.num }}</MsButton>
<MsButton type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
</template>
<template #[FilterSlotNameEnum.API_TEST_API_REQUEST_METHODS]="{ filterContent }">
<apiMethodName :method="filterContent.value" />
@ -39,18 +39,23 @@
import apiMethodName from '@/views/api-test/components/apiMethodName.vue';
import { useI18n } from '@/hooks/useI18n';
import useOpenNewPage from '@/hooks/useOpenNewPage';
import useAppStore from '@/store/modules/app';
import { ApiDefinitionDetail } from '@/models/apiTest/management';
import type { TableQueryParams } from '@/models/common';
import { RequestMethods } from '@/enums/apiEnum';
import { CasePageApiTypeEnum } from '@/enums/associateCaseEnum';
import { CaseLinkEnum } from '@/enums/caseEnum';
import { ApiTestRouteEnum } from '@/enums/routeEnum';
import { FilterRemoteMethodsEnum, FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { getPublicLinkCaseListMap } from './utils/page';
const { t } = useI18n();
const { openNewPage } = useOpenNewPage();
const appStore = useAppStore();
const props = defineProps<{
associationType: string; // | |
activeModule: string;
@ -276,6 +281,14 @@
};
}
//
function toDetail(record: ApiDefinitionDetail) {
openNewPage(ApiTestRouteEnum.API_TEST_MANAGEMENT, {
dId: record.id,
pId: record.projectId,
});
}
defineExpose({
getApiSaveParams,
loadApiList,

View File

@ -11,7 +11,7 @@
@filter-change="getModuleCount"
>
<template #num="{ record }">
<MsButton type="text">{{ record.num }}</MsButton>
<MsButton type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
</template>
<template #reviewStatus="{ record }">
<MsIcon
@ -51,18 +51,20 @@
import CaseLevel from '@/components/business/ms-case-associate/caseLevel.vue';
import ExecuteResult from '@/components/business/ms-case-associate/executeResult.vue';
import { useI18n } from '@/hooks/useI18n';
import useOpenNewPage from '@/hooks/useOpenNewPage';
import type { CaseManagementTable } from '@/models/caseManagement/featureCase';
import type { TableQueryParams } from '@/models/common';
import { CasePageApiTypeEnum } from '@/enums/associateCaseEnum';
import { CaseLinkEnum } from '@/enums/caseEnum';
import { CaseManagementRouteEnum } from '@/enums/routeEnum';
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { getPublicLinkCaseListMap } from './utils/page';
import { casePriorityOptions } from '@/views/api-test/components/config';
import { executionResultMap, statusIconMap } from '@/views/case-management/caseManagementFeature/components/utils';
const { t } = useI18n();
const { openNewPage } = useOpenNewPage();
const props = defineProps<{
associationType: string; // | |
@ -271,7 +273,6 @@
const tableRef = ref<InstanceType<typeof MsBaseTable>>();
function getFunctionalSaveParams() {
console.log(111);
const { excludeKeys, selectedKeys, selectorStatus } = propsRes.value;
const tableParams = getTableParams();
return {
@ -282,6 +283,14 @@
};
}
//
function toDetail(record: CaseManagementTable) {
openNewPage(CaseManagementRouteEnum.CASE_MANAGEMENT_CASE, {
id: record.id,
pId: record.projectId,
});
}
watch(
() => props.currentProject,
() => {

View File

@ -11,7 +11,7 @@
@filter-change="getModuleCount"
>
<template #num="{ record }">
<MsButton type="text">{{ record.num }}</MsButton>
<MsButton type="text" @click="toDetail(record)">{{ record.num }}</MsButton>
</template>
<template #[FilterSlotNameEnum.CASE_MANAGEMENT_CASE_LEVEL]="{ filterContent }">
<CaseLevel :case-level="filterContent.value" />
@ -48,18 +48,22 @@
import ExecutionStatus from '@/views/api-test/report/component/reportStatus.vue';
import { useI18n } from '@/hooks/useI18n';
import useOpenNewPage from '@/hooks/useOpenNewPage';
import useAppStore from '@/store/modules/app';
import { ApiCaseDetail } from '@/models/apiTest/management';
import type { TableQueryParams } from '@/models/common';
import { CasePageApiTypeEnum } from '@/enums/associateCaseEnum';
import { CaseLinkEnum } from '@/enums/caseEnum';
import { ReportEnum, ReportStatus } from '@/enums/reportEnum';
import { ApiTestRouteEnum } from '@/enums/routeEnum';
import { FilterRemoteMethodsEnum, FilterSlotNameEnum } from '@/enums/tableFilterEnum';
import { getPublicLinkCaseListMap } from './utils/page';
import { casePriorityOptions } from '@/views/api-test/components/config';
const { t } = useI18n();
const { openNewPage } = useOpenNewPage();
const props = defineProps<{
associationType: string; // | |
@ -275,6 +279,14 @@
};
}
//
function toDetail(record: ApiCaseDetail) {
openNewPage(ApiTestRouteEnum.API_TEST_SCENARIO, {
id: record.id,
pId: record.projectId,
});
}
onMounted(() => {
loadScenarioList();
});