fix(user): 编辑用户「所在组」路径去掉分隔符两侧空格
build / build (push) Successful in 1m51s

groupOptions 拍平组织树时完整路径分隔符由 " / " 改为 "/",
使所在组显示为 教育云中心/信阳教育局/…/202601。
This commit is contained in:
chenxing
2026-09-11 10:14:22 +08:00
parent df5f5d2cff
commit e0252eb997
+2 -2
View File
@@ -110,8 +110,8 @@ const groupOptions = computed(() => {
const flat: { id: number; name: string }[] = [];
const walk = (list: any[], prefix = '') => {
list.forEach(n => {
flat.push({ id: n.id, name: prefix ? `${prefix} / ${n.name}` : n.name });
if (n.children?.length) walk(n.children, prefix ? `${prefix} / ${n.name}` : n.name);
flat.push({ id: n.id, name: prefix ? `${prefix}/${n.name}` : n.name });
if (n.children?.length) walk(n.children, prefix ? `${prefix}/${n.name}` : n.name);
});
};
walk(treeData.value);