wujingjing
2024-11-14 11738cfed9fced6927376d6de27bb8ba9077ba2f
src/views/project/yw/systemManage/agentGraph/types.ts
@@ -1,31 +1,4 @@
export const enum CustomLayout {
   /** @description 紧凑树布局 n <= 30*/
   NormalTree,
   /** @description 垂直紧凑树,根节点在中间 30 < n <= 50*/
   Vertical,
   /** @description 辐射紧凑树,> 50 */
   Radial,
}
export const customLayoutMap ={
    [CustomLayout.NormalTree]:'紧凑树布局',
    [CustomLayout.Vertical]:'垂直对称布局',
    [CustomLayout.Radial]:'辐射状布局'
}
export const getLayoutType = (maxLeafLen: number) => {
   if (maxLeafLen > 50) {
      return CustomLayout.Radial;
   } else if (30 < maxLeafLen) {
      return CustomLayout.Vertical;
   } else {
      return CustomLayout.NormalTree;
   }
};
export type OrgTreeItem = {
   treeId: string;