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 });
|
return MSR.post<CommonList<MinderJsonNode>>({ url: `${GetCaseMinderUrl}`, data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@
|
|||||||
moduleId: string;
|
moduleId: string;
|
||||||
moduleName: string;
|
moduleName: string;
|
||||||
modulesCount: Record<string, number>; // 模块数量
|
modulesCount: Record<string, number>; // 模块数量
|
||||||
|
tableSorter: Record<string, any>;
|
||||||
}>();
|
}>();
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'save'): void;
|
(e: 'save'): void;
|
||||||
@ -445,6 +446,7 @@
|
|||||||
projectId: appStore.currentProjectId,
|
projectId: appStore.currentProjectId,
|
||||||
moduleId: data.id,
|
moduleId: data.id,
|
||||||
current: 1,
|
current: 1,
|
||||||
|
sort: props.tableSorter,
|
||||||
});
|
});
|
||||||
const fakeNode = node.children?.find((e) => e.data?.id === 'fakeNode'); // 移除占位的虚拟节点
|
const fakeNode = node.children?.find((e) => e.data?.id === 'fakeNode'); // 移除占位的虚拟节点
|
||||||
if (fakeNode) {
|
if (fakeNode) {
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
@change="changeHandler"
|
@change="changeHandler"
|
||||||
@cell-click="handleCellClick"
|
@cell-click="handleCellClick"
|
||||||
@filter-change="filterChange"
|
@filter-change="filterChange"
|
||||||
|
@sorter-change="handleSorterChange"
|
||||||
>
|
>
|
||||||
<template #num="{ record }">
|
<template #num="{ record }">
|
||||||
<span type="text" class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">
|
<span type="text" class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">
|
||||||
@ -239,6 +240,7 @@
|
|||||||
:module-id="props.activeFolder"
|
:module-id="props.activeFolder"
|
||||||
:modules-count="modulesCount"
|
:modules-count="modulesCount"
|
||||||
:module-name="props.moduleName"
|
:module-name="props.moduleName"
|
||||||
|
:table-sorter="tableSorter"
|
||||||
@save="handleMinderSave"
|
@save="handleMinderSave"
|
||||||
/>
|
/>
|
||||||
<MsDrawer v-model:visible="visible" :width="480" :mask="false">
|
<MsDrawer v-model:visible="visible" :width="480" :mask="false">
|
||||||
@ -1809,6 +1811,11 @@
|
|||||||
emitTableParams();
|
emitTableParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tableSorter = ref<Record<string, string>>({});
|
||||||
|
function handleSorterChange(sorter: { [key: string]: string }) {
|
||||||
|
tableSorter.value = sorter;
|
||||||
|
}
|
||||||
|
|
||||||
async function mountedLoad() {
|
async function mountedLoad() {
|
||||||
await initFilter();
|
await initFilter();
|
||||||
await initData();
|
await initData();
|
||||||
|
Loading…
Reference in New Issue
Block a user