feat(脑图): 评审脑图&测试计划用例脑图支持表格排序
This commit is contained in:
parent
275703f0c9
commit
12fb9e86ae
|
@ -199,12 +199,7 @@ export function saveCaseMinder(data: FeatureCaseMinderUpdateParams) {
|
|||
}
|
||||
|
||||
// 获取脑图
|
||||
export function getCaseMinder(data: {
|
||||
projectId: string;
|
||||
moduleId: string;
|
||||
current: number;
|
||||
sort?: Record<string, any>;
|
||||
}) {
|
||||
export function getCaseMinder(data: { projectId: string; moduleId: string; current: number }) {
|
||||
return MSR.post<CommonList<MinderJsonNode>>({ url: `${GetCaseMinderUrl}`, data });
|
||||
}
|
||||
|
||||
|
|
|
@ -165,6 +165,7 @@
|
|||
reviewProgress: string;
|
||||
reviewPassRule: ReviewPassRule; // 评审规则
|
||||
moduleTree: ModuleTreeNode[];
|
||||
tableSorter: Record<string, any>;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -302,6 +303,7 @@
|
|||
moduleId: node.data?.id,
|
||||
reviewId: route.query.id as string,
|
||||
viewStatusFlag: props.viewStatusFlag,
|
||||
sort: props.tableSorter,
|
||||
});
|
||||
// 移除占位的虚拟节点
|
||||
removeFakeNode(node, loadMoreCurrent ? `tmp-${node.data?.id}` : 'fakeNode');
|
||||
|
|
|
@ -141,7 +141,6 @@
|
|||
moduleId: string;
|
||||
moduleName: string;
|
||||
modulesCount: Record<string, number>; // 模块数量
|
||||
tableSorter: Record<string, any>;
|
||||
}>();
|
||||
const emit = defineEmits<{
|
||||
(e: 'save'): void;
|
||||
|
@ -446,7 +445,6 @@
|
|||
projectId: appStore.currentProjectId,
|
||||
moduleId: data.id,
|
||||
current: 1,
|
||||
sort: props.tableSorter,
|
||||
});
|
||||
const fakeNode = node.children?.find((e) => e.data?.id === 'fakeNode'); // 移除占位的虚拟节点
|
||||
if (fakeNode) {
|
||||
|
|
|
@ -285,6 +285,7 @@
|
|||
planId: string;
|
||||
canEdit: boolean; // 已归档的测试计划不能操作
|
||||
treeType: 'MODULE' | 'COLLECTION';
|
||||
tableSorter: Record<string, any>;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
@ -399,6 +400,7 @@
|
|||
...(props.treeType === 'COLLECTION' ? { collectionId: node.data?.id } : { moduleId: node.data?.id }),
|
||||
projectId: node.data?.projectId,
|
||||
planId: props.planId,
|
||||
sort: props.tableSorter,
|
||||
});
|
||||
// 移除占位的虚拟节点
|
||||
removeFakeNode(node, loadMoreCurrent ? `tmp-${node.data?.id}` : 'fakeNode');
|
||||
|
|
|
@ -272,6 +272,7 @@ export interface CaseReviewMinderParams {
|
|||
current?: number;
|
||||
reviewId: string;
|
||||
viewStatusFlag: boolean; // 我的评审结果
|
||||
sort?: Record<string, any>;
|
||||
}
|
||||
|
||||
// 测试计划用例脑图
|
||||
|
@ -281,4 +282,5 @@ export interface CasePlanMinderParams {
|
|||
collectionId?: string;
|
||||
current?: number;
|
||||
planId: string;
|
||||
sort?: Record<string, any>;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
@change="changeHandler"
|
||||
@cell-click="handleCellClick"
|
||||
@filter-change="filterChange"
|
||||
@sorter-change="handleSorterChange"
|
||||
>
|
||||
<template #num="{ record }">
|
||||
<span type="text" class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">
|
||||
|
@ -240,7 +239,6 @@
|
|||
:module-id="props.activeFolder"
|
||||
:modules-count="modulesCount"
|
||||
:module-name="props.moduleName"
|
||||
:table-sorter="tableSorter"
|
||||
@save="handleMinderSave"
|
||||
/>
|
||||
<MsDrawer v-model:visible="visible" :width="480" :mask="false">
|
||||
|
@ -1811,11 +1809,6 @@
|
|||
emitTableParams();
|
||||
}
|
||||
|
||||
const tableSorter = ref<Record<string, string>>({});
|
||||
function handleSorterChange(sorter: { [key: string]: string }) {
|
||||
tableSorter.value = sorter;
|
||||
}
|
||||
|
||||
async function mountedLoad() {
|
||||
await initFilter();
|
||||
await initData();
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
@keyword-search="searchCase()"
|
||||
@adv-search="handleAdvSearch"
|
||||
@refresh="handleRefreshAll"
|
||||
@sorter-change="handleSorterChange"
|
||||
>
|
||||
<template v-if="showType !== 'list'" #nameRight>
|
||||
<div v-if="reviewPassRule === 'MULTIPLE'" class="ml-[16px]">
|
||||
|
@ -179,6 +180,7 @@
|
|||
:module-tree="moduleTree"
|
||||
:review-progress="props.reviewProgress"
|
||||
:review-pass-rule="props.reviewPassRule"
|
||||
:table-sorter="tableSorter"
|
||||
@operation="handleMinderOperation"
|
||||
@handle-review-done="emit('refresh')"
|
||||
/>
|
||||
|
@ -591,6 +593,11 @@
|
|||
],
|
||||
};
|
||||
|
||||
const tableSorter = ref<Record<string, string>>({});
|
||||
function handleSorterChange(sorter: { [key: string]: string }) {
|
||||
tableSorter.value = sorter;
|
||||
}
|
||||
|
||||
function userIsReviewer(record: ReviewCaseItem) {
|
||||
return record.reviewers.some((e) => e === userStore.id);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
@drag-change="handleDragChange"
|
||||
@selected-change="handleTableSelect"
|
||||
@filter-change="getModuleCount"
|
||||
@sorter-change="handleSorterChange"
|
||||
>
|
||||
<template #num="{ record }">
|
||||
<MsButton type="text" @click="toCaseDetail(record)">{{ record.num }}</MsButton>
|
||||
|
@ -128,6 +129,7 @@
|
|||
:tree-type="props.treeType"
|
||||
:plan-id="props.planId"
|
||||
:can-edit="props.canEdit"
|
||||
:table-sorter="tableSorter"
|
||||
@operation="handleMinderOperation"
|
||||
@refresh-plan="emit('refresh')"
|
||||
/>
|
||||
|
@ -824,6 +826,11 @@
|
|||
await testPlanFeatureCaseStore.getModuleCount(params);
|
||||
}
|
||||
|
||||
const tableSorter = ref<Record<string, string>>({});
|
||||
function handleSorterChange(sorter: { [key: string]: string }) {
|
||||
tableSorter.value = sorter;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param getCount 获取模块树数量
|
||||
|
|
Loading…
Reference in New Issue