From 512111af3ef496dae2fb216154bfa0787f4f9a45 Mon Sep 17 00:00:00 2001 From: zou Date: Sat, 22 Aug 2026 15:41:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(F006):=20=E5=AE=8C=E5=96=84=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E7=AD=89=E7=BA=A7/=E8=AF=84=E7=BA=A7/=E8=AF=84?= =?UTF-8?q?=E5=88=86=20+=20=E8=A1=8C=E4=B8=9A=E9=A1=B5=20UI=20=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=8C=96=20-=204=E9=A1=B5=E5=8A=A0=E9=A1=B6=E9=83=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8D=A1=20+=20=E6=89=B9=E9=87=8F=E6=A0=8F?= =?UTF-8?q?=20+=20TableActions=20+=20st-pill,=E6=B6=88=E9=99=A4=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E5=89=B2=E8=A3=82=E6=84=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/category/CategoryDeepListView.vue | 57 +++++ .../EnterpriselevelListView.vue | 222 +++++++++++++----- .../EnterpriseratingListView.vue | 202 +++++++++++----- .../EnterprisescoreListView.vue | 219 ++++++++++++----- 4 files changed, 524 insertions(+), 176 deletions(-) diff --git a/src/modules/other/category/CategoryDeepListView.vue b/src/modules/other/category/CategoryDeepListView.vue index e79145c..4bc8585 100644 --- a/src/modules/other/category/CategoryDeepListView.vue +++ b/src/modules/other/category/CategoryDeepListView.vue @@ -72,6 +72,28 @@ function filterTree(nodes: Category[], kw: string): Category[] { } const displayList = computed(() => filterTree(LIST.value, search.name.trim())) +// 统计: 顶数 / 1级分类数 / 最深层级 / 已停用数 +const stats = computed(() => { + const total = LIST.value.length + const roots = LIST.value.length + let maxDepth = 1 + const flatten = (ns: Category[], d: number) => { + for (const n of ns) { if (d > maxDepth) maxDepth = d; if (n.children?.length) flatten(n.children, d + 1) } + } + flatten(LIST.value, 1) + let disabled = 0 + const count = (ns: Category[]) => { + for (const n of ns) { if (n.status === 1) disabled++; if (n.children?.length) count(n.children) } + } + count(LIST.value) + return [ + { label: '分类总数', value: total, icon: 'Files', color: 'var(--brand)' }, + { label: '一级分类', value: roots, icon: 'FolderOpened', color: 'var(--green)' }, + { label: '最大层级', value: 'Lv' + maxDepth, icon: 'Histogram', color: 'var(--amber)' }, + { label: '已停用', value: disabled, icon: 'CircleClose', color: 'var(--red)' } + ] +}) + async function load() { loading.value = true try { @@ -189,6 +211,19 @@ onMounted(load) + +
+
+
+ +
+
+
{{ s.label }}
+
{{ s.value }}
+
+
+
+ .rr-page { max-width: 1400px; } + +/* 顶部统计卡 */ +.stats-grid { + display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; + margin-bottom: 16px; +} +.stat-card { + background: var(--surface); border: 1px solid var(--border); + border-radius: var(--radius-lg); padding: 16px 18px; + display: flex; align-items: center; gap: 12px; + transition: all .15s; + &:hover { border-color: var(--border-strong); box-shadow: var(--shadow); } +} +.stat-icon { + width: 40px; height: 40px; border-radius: 10px; + display: flex; align-items: center; justify-content: center; + font-size: 20px; +} +.stat-info { flex: 1; min-width: 0; } +.stat-label { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; } +.stat-value { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; } + .rr-list-card { background: var(--surface); border-radius: 12px; overflow: hidden; } diff --git a/src/modules/user/enterpriselevel/EnterpriselevelListView.vue b/src/modules/user/enterpriselevel/EnterpriselevelListView.vue index 8503612..4984f00 100644 --- a/src/modules/user/enterpriselevel/EnterpriselevelListView.vue +++ b/src/modules/user/enterpriselevel/EnterpriselevelListView.vue @@ -1,8 +1,6 @@