diff --git a/core/core-frontend/src/views/chart/components/editor/filter/auth-tree-chart/RowAuth.vue b/core/core-frontend/src/views/chart/components/editor/filter/auth-tree-chart/RowAuth.vue index 62b70de1f6..4c1abac6b1 100644 --- a/core/core-frontend/src/views/chart/components/editor/filter/auth-tree-chart/RowAuth.vue +++ b/core/core-frontend/src/views/chart/components/editor/filter/auth-tree-chart/RowAuth.vue @@ -279,7 +279,7 @@ const calculateDepth = obj => { let path = '' const { x: depth, y } = obj obj.child.forEach((item, index) => { - const { y: sibingLg, z } = item + const { y: siblingLg, z } = item if (item.child?.length) { let parent = (dfs(obj.child, 0) * 41.4) / 2 + (getY(obj.child) || 0) * 41.4 let children = (dfs(item.child, 0) * 41.4) / 2 + getY(item.child) * 41.4 @@ -291,7 +291,7 @@ const calculateDepth = obj => { } else { ;[path1, path2] = [children, parent] } - if (y >= sibingLg) { + if (y >= siblingLg) { path1 = parent path2 = children } @@ -301,22 +301,22 @@ const calculateDepth = obj => { path += calculateDepth(item) } if (!item.child?.length) { - if (sibingLg >= y) { + if (siblingLg >= y) { path += `M${24 + depth * 68} ${y * 40} L${24 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - } L${68 + depth * 68} ${(sibingLg + 1) * 41.4 - 20.69921875}` + (siblingLg + 1) * 41.4 - 20.69921875 + } L${68 + depth * 68} ${(siblingLg + 1) * 41.4 - 20.69921875}` } else { path += `M${24 + depth * 68} ${ - (sibingLg + + (siblingLg + (lg === 1 && index === 0 ? 0 : 1) + - (obj.child[index + 1]?.child?.length ? y - sibingLg - 1 : 0)) * + (obj.child[index + 1]?.child?.length ? y - siblingLg - 1 : 0)) * 41.4 + 20 + (lg === 1 && index === 0 ? 26 : 0) } L${24 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) + (siblingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) } L${68 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) + (siblingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) }` } } diff --git a/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/RowAuth.vue b/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/RowAuth.vue index b26e407bcb..619937800c 100644 --- a/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/RowAuth.vue +++ b/core/core-frontend/src/views/chart/components/editor/filter/auth-tree/RowAuth.vue @@ -181,7 +181,7 @@ const calculateDepth = obj => { let path = '' const { x: depth, y } = obj obj.child.forEach((item, index) => { - const { y: sibingLg, z } = item + const { y: siblingLg, z } = item if (item.child?.length) { let parent = (dfs(obj.child, 0) * 41.4) / 2 + (getY(obj.child) || 0) * 41.4 let children = (dfs(item.child, 0) * 41.4) / 2 + getY(item.child) * 41.4 @@ -193,7 +193,7 @@ const calculateDepth = obj => { } else { ;[path1, path2] = [children, parent] } - if (y >= sibingLg) { + if (y >= siblingLg) { path1 = parent path2 = children } @@ -203,22 +203,22 @@ const calculateDepth = obj => { path += calculateDepth(item) } if (!item.child?.length) { - if (sibingLg >= y) { + if (siblingLg >= y) { path += `M${24 + depth * 68} ${y * 40} L${24 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - } L${68 + depth * 68} ${(sibingLg + 1) * 41.4 - 20.69921875}` + (siblingLg + 1) * 41.4 - 20.69921875 + } L${68 + depth * 68} ${(siblingLg + 1) * 41.4 - 20.69921875}` } else { path += `M${24 + depth * 68} ${ - (sibingLg + + (siblingLg + (lg === 1 && index === 0 ? 0 : 1) + - (obj.child[index + 1]?.child?.length ? y - sibingLg - 1 : 0)) * + (obj.child[index + 1]?.child?.length ? y - siblingLg - 1 : 0)) * 41.4 + 20 + (lg === 1 && index === 0 ? 26 : 0) } L${24 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) + (siblingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) } L${68 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) + (siblingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) }` } } diff --git a/core/core-frontend/src/views/visualized/data/dataset/auth-tree/RowAuth.vue b/core/core-frontend/src/views/visualized/data/dataset/auth-tree/RowAuth.vue index e4b8cd8e94..0f1a8a4392 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/auth-tree/RowAuth.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/auth-tree/RowAuth.vue @@ -162,7 +162,7 @@ const calculateDepth = obj => { let path = '' const { x: depth, y } = obj obj.child.forEach((item, index) => { - const { y: sibingLg, z } = item + const { y: siblingLg, z } = item if (item.child?.length) { let parent = (dfs(obj.child, 0) * 41.4) / 2 + (getY(obj.child) || 0) * 41.4 let children = (dfs(item.child, 0) * 41.4) / 2 + getY(item.child) * 41.4 @@ -174,7 +174,7 @@ const calculateDepth = obj => { } else { ;[path1, path2] = [children, parent] } - if (y >= sibingLg) { + if (y >= siblingLg) { path1 = parent path2 = children } @@ -184,22 +184,22 @@ const calculateDepth = obj => { path += calculateDepth(item) } if (!item.child?.length) { - if (sibingLg >= y) { + if (siblingLg >= y) { path += `M${24 + depth * 68} ${y * 40} L${24 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - } L${68 + depth * 68} ${(sibingLg + 1) * 41.4 - 20.69921875}` + (siblingLg + 1) * 41.4 - 20.69921875 + } L${68 + depth * 68} ${(siblingLg + 1) * 41.4 - 20.69921875}` } else { path += `M${24 + depth * 68} ${ - (sibingLg + + (siblingLg + (lg === 1 && index === 0 ? 0 : 1) + - (obj.child[index + 1]?.child?.length ? y - sibingLg - 1 : 0)) * + (obj.child[index + 1]?.child?.length ? y - siblingLg - 1 : 0)) * 41.4 + 20 + (lg === 1 && index === 0 ? 26 : 0) } L${24 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) + (siblingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) } L${68 + depth * 68} ${ - (sibingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) + (siblingLg + 1) * 41.4 - 20.69921875 - (lg === 1 && index === 0 ? (z || 0) * 1.4 : 0) }` } }