mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
feat(功能用例): 脑图根据表格字段排序
This commit is contained in:
parent
52b93b0b1d
commit
275703f0c9
@ -199,7 +199,12 @@ export function saveCaseMinder(data: FeatureCaseMinderUpdateParams) {
|
||||
}
|
||||
|
||||
// 获取脑图
|
||||
export function getCaseMinder(data: { projectId: string; moduleId: string; current: number }) {
|
||||
export function getCaseMinder(data: {
|
||||
projectId: string;
|
||||
moduleId: string;
|
||||
current: number;
|
||||
sort?: Record<string, any>;
|
||||
}) {
|
||||
return MSR.post<CommonList<MinderJsonNode>>({ url: `${GetCaseMinderUrl}`, data });
|
||||
}
|
||||
|
||||
|
@ -141,6 +141,7 @@
|
||||
moduleId: string;
|
||||
moduleName: string;
|
||||
modulesCount: Record<string, number>; // 模块数量
|
||||
tableSorter: Record<string, any>;
|
||||
}>();
|
||||
const emit = defineEmits<{
|
||||
(e: 'save'): void;
|
||||
@ -445,6 +446,7 @@
|
||||
projectId: appStore.currentProjectId,
|
||||
moduleId: data.id,
|
||||
current: 1,
|
||||
sort: props.tableSorter,
|
||||
});
|
||||
const fakeNode = node.children?.find((e) => e.data?.id === 'fakeNode'); // 移除占位的虚拟节点
|
||||
if (fakeNode) {
|
||||
|
@ -64,6 +64,7 @@
|
||||
@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))]">
|
||||
@ -239,6 +240,7 @@
|
||||
: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">
|
||||
@ -1809,6 +1811,11 @@
|
||||
emitTableParams();
|
||||
}
|
||||
|
||||
const tableSorter = ref<Record<string, string>>({});
|
||||
function handleSorterChange(sorter: { [key: string]: string }) {
|
||||
tableSorter.value = sorter;
|
||||
}
|
||||
|
||||
async function mountedLoad() {
|
||||
await initFilter();
|
||||
await initData();
|
||||
|
Loading…
Reference in New Issue
Block a user