feat(测试用例): 添加功能用例列表缓存

This commit is contained in:
xinxin.wu 2024-09-10 15:22:55 +08:00 committed by Craftsman
parent 8e10e32ab3
commit 6e10709fdb
3 changed files with 244 additions and 231 deletions

View File

@ -3,6 +3,7 @@ export enum CacheTabTypeEnum {
API_TEST_CASE_TABLE = 'API_TEST_CASE_TABLE', // 接口测试-定义-CASE列表
API_TEST_MOCK_TABLE = 'API_TEST_MOCK_TABLE', // 接口测试-定义-MOCK列表
API_SCENARIO_TABLE = 'API_SCENARIO_TABLE', // 接口测试-场景-场景列表
CASE_MANAGEMENT_TABLE_FILTER = 'CASE_MANAGEMENT_TABLE_FILTER', // 功能用例-列表
}
export default {};

View File

@ -1,8 +1,13 @@
<!-- eslint-disable prefer-destructuring -->
<template>
<div class="h-full">
<keep-alive :include="[CacheTabTypeEnum.CASE_MANAGEMENT_TABLE_FILTER]">
<MsCacheWrapper
v-if="showType === 'list'"
:key="CacheTabTypeEnum.CASE_MANAGEMENT_TABLE_FILTER"
:cache-name="CacheTabTypeEnum.CASE_MANAGEMENT_TABLE_FILTER"
>
<!-- 用例表开始 -->
<template v-if="showType === 'list'">
<MsAdvanceFilter
ref="msAdvanceFilterRef"
v-model:keyword="keyword"
@ -18,7 +23,12 @@
>
<template #left>
<div>
<a-button v-permission="['FUNCTIONAL_CASE:READ+ADD']" class="mr-[12px]" type="primary" @click="caseDetail">
<a-button
v-permission="['FUNCTIONAL_CASE:READ+ADD']"
class="mr-[12px]"
type="primary"
@click="caseDetail"
>
{{ t('common.newCreate') }}
</a-button>
<ImportCase ref="importCaseRef" @init-modules="emit('initModules')" @confirm-import="confirmImport" />
@ -187,7 +197,7 @@
</div>
</template>
</ms-base-table>
</template>
</MsCacheWrapper>
<!-- 用例表结束 -->
<div v-else class="h-full">
<div class="flex flex-row items-center justify-between">
@ -236,6 +246,7 @@
<!-- 脑图结束 -->
</div>
</div>
</keep-alive>
</div>
<a-modal
v-model:visible="showBatchMoveDrawer"
@ -371,6 +382,7 @@
import { getFilterCustomFields, MsAdvanceFilter } from '@/components/pure/ms-advance-filter';
import { FilterFormItem, FilterResult } from '@/components/pure/ms-advance-filter/type';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsCacheWrapper from '@/components/pure/ms-cache-wrapper/index.vue';
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
import { MsExportDrawerMap, MsExportDrawerOption } from '@/components/pure/ms-export-drawer/types';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
@ -443,6 +455,7 @@
} from '@/models/caseManagement/featureCase';
import { ModuleTreeNode } from '@/models/common';
import { FilterType, ViewTypeEnum } from '@/enums/advancedFilterEnum';
import { CacheTabTypeEnum } from '@/enums/cacheTabEnum';
import { CaseManagementRouteEnum, RouteEnum } from '@/enums/routeEnum';
import { ColumnEditTypeEnum, TableKeyEnum } from '@/enums/tableEnum';
import { FilterRemoteMethodsEnum, FilterSlotNameEnum } from '@/enums/tableFilterEnum';

View File

@ -92,7 +92,6 @@
</template>
</MsSplitBox>
</MsCard>
<!-- </div> -->
</template>
<script setup lang="ts">