fix(用例管理): 用例模块数搜索调整
--bug=1036713 --user=王旭 【用例管理】功能用例树与用例评审树风格不一致 https://www.tapd.cn/55049933/s/1493806
This commit is contained in:
parent
c6b443d96c
commit
e1eff5a611
|
@ -1,16 +1,10 @@
|
|||
<template>
|
||||
<a-input-search
|
||||
v-model:model-value="groupKeyword"
|
||||
:placeholder="t('caseManagement.featureCase.searchTip')"
|
||||
allow-clear
|
||||
class="mb-[16px]"
|
||||
></a-input-search>
|
||||
<a-spin class="w-full" :style="{ height: `calc(100vh - 346px)` }" :loading="loading">
|
||||
<MsTree
|
||||
v-model:focus-node-key="focusNodeKey"
|
||||
:selected-keys="props.selectedKeys"
|
||||
:data="caseTree"
|
||||
:keyword="groupKeyword"
|
||||
:keyword="props.groupKeyword"
|
||||
:node-more-actions="caseMoreActions"
|
||||
:expand-all="props.isExpandAll"
|
||||
:empty-text="t('common.noData')"
|
||||
|
@ -111,14 +105,13 @@
|
|||
isExpandAll: boolean; // 是否展开用例节点
|
||||
allNames?: string[]; // 所有的模块name列表
|
||||
modulesCount?: Record<string, number>; // 模块数量统计对象
|
||||
groupKeyword?: string; // 搜索关键字
|
||||
}>();
|
||||
|
||||
const emits = defineEmits(['update:selectedKeys', 'caseNodeSelect', 'init', 'dragUpdate']);
|
||||
|
||||
const currentProjectId = computed(() => appStore.currentProjectId);
|
||||
|
||||
const groupKeyword = ref<string>('');
|
||||
|
||||
const caseTree = ref<ModuleTreeNode[]>([]);
|
||||
|
||||
const setFocusKey = (node: MsTreeNodeData) => {
|
||||
|
|
|
@ -17,6 +17,12 @@
|
|||
<template #first>
|
||||
<div class="p-[24px] pb-0">
|
||||
<div class="feature-case h-[100%]">
|
||||
<a-input-search
|
||||
v-model:model-value="groupKeyword"
|
||||
:placeholder="t('caseManagement.featureCase.searchTip')"
|
||||
allow-clear
|
||||
class="mb-[16px]"
|
||||
></a-input-search>
|
||||
<div class="case h-[38px]">
|
||||
<div class="flex items-center" :class="getActiveClass('all')" @click="setActiveFolder('all')">
|
||||
<MsIcon type="icon-icon_folder_filled1" class="folder-icon" />
|
||||
|
@ -64,6 +70,7 @@
|
|||
:active-folder="activeFolder"
|
||||
:is-expand-all="isExpandAll"
|
||||
:modules-count="modulesCount"
|
||||
:group-keyword="groupKeyword"
|
||||
@case-node-select="caseNodeSelect"
|
||||
@init="setRootModules"
|
||||
@drag-update="dragUpdate"
|
||||
|
@ -163,7 +170,7 @@
|
|||
const isExpandAll = ref(false);
|
||||
const activeCaseType = ref<'folder' | 'module'>('folder'); // 激活用例类型
|
||||
const rootModulesName = ref<string[]>([]); // 根模块名称列表
|
||||
|
||||
const groupKeyword = ref<string>('');
|
||||
// 全部展开或折叠
|
||||
const expandHandler = () => {
|
||||
isExpandAll.value = !isExpandAll.value;
|
||||
|
|
Loading…
Reference in New Issue