feat(测试计划): 测试计划同步添加功能用例的关联用例展示调整和设置默认值
This commit is contained in:
parent
d618fcf5a8
commit
981646dc4b
|
@ -147,7 +147,7 @@
|
||||||
|
|
||||||
const virtualListProps = computed(() => {
|
const virtualListProps = computed(() => {
|
||||||
return {
|
return {
|
||||||
height: 'calc(100vh - 236px)',
|
height: 'calc(100vh - 250px)',
|
||||||
threshold: 200,
|
threshold: 200,
|
||||||
fixedSize: true,
|
fixedSize: true,
|
||||||
buffer: 15, // 缓冲区默认 10 的时候,虚拟滚动的底部 padding 计算有问题
|
buffer: 15, // 缓冲区默认 10 的时候,虚拟滚动的底部 padding 计算有问题
|
||||||
|
|
|
@ -282,7 +282,7 @@
|
||||||
/>
|
/>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="props.associatedType === CaseLinkEnum.FUNCTIONAL" class="ml-[16px] flex items-center">
|
<div v-if="props.associatedType === CaseLinkEnum.FUNCTIONAL && syncCase" class="ml-[16px] flex items-center">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
v-model="apiCaseCollectionId"
|
v-model="apiCaseCollectionId"
|
||||||
:field-names="{
|
:field-names="{
|
||||||
|
@ -292,6 +292,7 @@
|
||||||
}"
|
}"
|
||||||
class="w-[200px]"
|
class="w-[200px]"
|
||||||
:data="apiSetTree"
|
:data="apiSetTree"
|
||||||
|
allow-clear
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<div class="text-[var(--color-text-brand)]">{{ t('ms.case.associate.api') }}</div>
|
<div class="text-[var(--color-text-brand)]">{{ t('ms.case.associate.api') }}</div>
|
||||||
|
@ -311,6 +312,7 @@
|
||||||
children: 'children',
|
children: 'children',
|
||||||
}"
|
}"
|
||||||
class="ml-[12px] w-[200px]"
|
class="ml-[12px] w-[200px]"
|
||||||
|
allow-clear
|
||||||
:data="scenarioSetTree"
|
:data="scenarioSetTree"
|
||||||
>
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
|
@ -366,6 +368,7 @@
|
||||||
|
|
||||||
import type { ModuleTreeNode, TableQueryParams } from '@/models/common';
|
import type { ModuleTreeNode, TableQueryParams } from '@/models/common';
|
||||||
import type { ProjectListItem } from '@/models/setting/project';
|
import type { ProjectListItem } from '@/models/setting/project';
|
||||||
|
import type { PlanDetailApiCaseTreeParams } from '@/models/testPlan/testPlan';
|
||||||
import { CaseModulesApiTypeEnum, CasePageApiTypeEnum } from '@/enums/associateCaseEnum';
|
import { CaseModulesApiTypeEnum, CasePageApiTypeEnum } from '@/enums/associateCaseEnum';
|
||||||
import { CaseLinkEnum } from '@/enums/caseEnum';
|
import { CaseLinkEnum } from '@/enums/caseEnum';
|
||||||
|
|
||||||
|
@ -626,15 +629,20 @@
|
||||||
|
|
||||||
async function initTestSet() {
|
async function initTestSet() {
|
||||||
if (props.extraTableParams?.testPlanId) {
|
if (props.extraTableParams?.testPlanId) {
|
||||||
|
const params: PlanDetailApiCaseTreeParams = {
|
||||||
|
testPlanId: props.extraTableParams.testPlanId,
|
||||||
|
treeType: 'COLLECTION',
|
||||||
|
};
|
||||||
try {
|
try {
|
||||||
apiSetTree.value = await getApiCaseModule({
|
const [apiSetTreeResult, scenarioSetTreeResult] = await Promise.all([
|
||||||
testPlanId: props.extraTableParams.testPlanId,
|
getApiCaseModule(params),
|
||||||
treeType: 'COLLECTION',
|
getApiScenarioModule(params),
|
||||||
});
|
]);
|
||||||
scenarioSetTree.value = await getApiScenarioModule({
|
|
||||||
testPlanId: props.extraTableParams.testPlanId,
|
apiSetTree.value = apiSetTreeResult;
|
||||||
treeType: 'COLLECTION',
|
scenarioSetTree.value = scenarioSetTreeResult;
|
||||||
});
|
apiCaseCollectionId.value = apiSetTree.value[0].id;
|
||||||
|
apiScenarioCollectionId.value = scenarioSetTree.value[0].id;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,12 +33,8 @@
|
||||||
<MsIcon type="icon-icon_edit_outlined" class="mr-[8px]" />
|
<MsIcon type="icon-icon_edit_outlined" class="mr-[8px]" />
|
||||||
{{ t('common.edit') }}
|
{{ t('common.edit') }}
|
||||||
</MsButton>
|
</MsButton>
|
||||||
<MsTableMoreAction :list="reportMoreAction" @select="handleMoreReportSelect">
|
<MsTableMoreAction v-if="detail.status !== 'ARCHIVED'" :list="reportMoreAction" @select="handleMoreReportSelect">
|
||||||
<MsButton
|
<MsButton v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE'])" type="button" status="default">
|
||||||
v-if="hasAnyPermission(['PROJECT_TEST_PLAN:READ+EXECUTE']) && detail.status !== 'ARCHIVED'"
|
|
||||||
type="button"
|
|
||||||
status="default"
|
|
||||||
>
|
|
||||||
<MsIcon type="icon-icon_generate_report" class="mr-[8px]" />
|
<MsIcon type="icon-icon_generate_report" class="mr-[8px]" />
|
||||||
{{ t('testPlan.testPlanDetail.generateReport') }}
|
{{ t('testPlan.testPlanDetail.generateReport') }}
|
||||||
</MsButton>
|
</MsButton>
|
||||||
|
|
Loading…
Reference in New Issue