diff --git a/frontend/src/views/KPIList.vue b/frontend/src/views/KPIList.vue index 932927b7..c65af241 100644 --- a/frontend/src/views/KPIList.vue +++ b/frontend/src/views/KPIList.vue @@ -447,7 +447,10 @@ async function loadCategories() { try { const r: any = await kpiApi.listCategories() categoryTree.value = [ - { key: '_all', label: '全部', count: r.total, children: r.tree || [] } + { key: '_all', label: '全部', count: r.total, children: (r.tree || []).map((dim: any) => ({ + ...dim, + children: (dim.children || []).map((cat: any) => ({ ...cat, label: CAT_MAP[cat.key] || cat.label })) + })) } ] defaultExpanded.value = ['_all', ...(r.tree || []).map((n: any) => n.key)] } catch (e) {