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>
|
<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">
|
<a-spin class="w-full" :style="{ height: `calc(100vh - 346px)` }" :loading="loading">
|
||||||
<MsTree
|
<MsTree
|
||||||
v-model:focus-node-key="focusNodeKey"
|
v-model:focus-node-key="focusNodeKey"
|
||||||
:selected-keys="props.selectedKeys"
|
:selected-keys="props.selectedKeys"
|
||||||
:data="caseTree"
|
:data="caseTree"
|
||||||
:keyword="groupKeyword"
|
:keyword="props.groupKeyword"
|
||||||
:node-more-actions="caseMoreActions"
|
:node-more-actions="caseMoreActions"
|
||||||
:expand-all="props.isExpandAll"
|
:expand-all="props.isExpandAll"
|
||||||
:empty-text="t('common.noData')"
|
:empty-text="t('common.noData')"
|
||||||
|
@ -111,14 +105,13 @@
|
||||||
isExpandAll: boolean; // 是否展开用例节点
|
isExpandAll: boolean; // 是否展开用例节点
|
||||||
allNames?: string[]; // 所有的模块name列表
|
allNames?: string[]; // 所有的模块name列表
|
||||||
modulesCount?: Record<string, number>; // 模块数量统计对象
|
modulesCount?: Record<string, number>; // 模块数量统计对象
|
||||||
|
groupKeyword?: string; // 搜索关键字
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emits = defineEmits(['update:selectedKeys', 'caseNodeSelect', 'init', 'dragUpdate']);
|
const emits = defineEmits(['update:selectedKeys', 'caseNodeSelect', 'init', 'dragUpdate']);
|
||||||
|
|
||||||
const currentProjectId = computed(() => appStore.currentProjectId);
|
const currentProjectId = computed(() => appStore.currentProjectId);
|
||||||
|
|
||||||
const groupKeyword = ref<string>('');
|
|
||||||
|
|
||||||
const caseTree = ref<ModuleTreeNode[]>([]);
|
const caseTree = ref<ModuleTreeNode[]>([]);
|
||||||
|
|
||||||
const setFocusKey = (node: MsTreeNodeData) => {
|
const setFocusKey = (node: MsTreeNodeData) => {
|
||||||
|
|
|
@ -17,6 +17,12 @@
|
||||||
<template #first>
|
<template #first>
|
||||||
<div class="p-[24px] pb-0">
|
<div class="p-[24px] pb-0">
|
||||||
<div class="feature-case h-[100%]">
|
<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="case h-[38px]">
|
||||||
<div class="flex items-center" :class="getActiveClass('all')" @click="setActiveFolder('all')">
|
<div class="flex items-center" :class="getActiveClass('all')" @click="setActiveFolder('all')">
|
||||||
<MsIcon type="icon-icon_folder_filled1" class="folder-icon" />
|
<MsIcon type="icon-icon_folder_filled1" class="folder-icon" />
|
||||||
|
@ -64,6 +70,7 @@
|
||||||
:active-folder="activeFolder"
|
:active-folder="activeFolder"
|
||||||
:is-expand-all="isExpandAll"
|
:is-expand-all="isExpandAll"
|
||||||
:modules-count="modulesCount"
|
:modules-count="modulesCount"
|
||||||
|
:group-keyword="groupKeyword"
|
||||||
@case-node-select="caseNodeSelect"
|
@case-node-select="caseNodeSelect"
|
||||||
@init="setRootModules"
|
@init="setRootModules"
|
||||||
@drag-update="dragUpdate"
|
@drag-update="dragUpdate"
|
||||||
|
@ -163,7 +170,7 @@
|
||||||
const isExpandAll = ref(false);
|
const isExpandAll = ref(false);
|
||||||
const activeCaseType = ref<'folder' | 'module'>('folder'); // 激活用例类型
|
const activeCaseType = ref<'folder' | 'module'>('folder'); // 激活用例类型
|
||||||
const rootModulesName = ref<string[]>([]); // 根模块名称列表
|
const rootModulesName = ref<string[]>([]); // 根模块名称列表
|
||||||
|
const groupKeyword = ref<string>('');
|
||||||
// 全部展开或折叠
|
// 全部展开或折叠
|
||||||
const expandHandler = () => {
|
const expandHandler = () => {
|
||||||
isExpandAll.value = !isExpandAll.value;
|
isExpandAll.value = !isExpandAll.value;
|
||||||
|
|
Loading…
Reference in New Issue