From 72ae73764a162d1d4f1a79a67ded8288aa1424a6 Mon Sep 17 00:00:00 2001 From: simonkoson <28867558@qq.com> Date: Mon, 25 May 2026 13:38:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=AA=E8=A1=A8=E7=9B=98=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E4=BC=98=E5=8C=96-=E5=B1=85=E4=B8=AD/logo=E6=94=BE?= =?UTF-8?q?=E5=A4=A7/=E6=9F=B1=E5=9B=BE=E6=95=B0=E5=AD=97=E6=8C=AA?= =?UTF-8?q?=E9=A1=B6/=E8=8A=82=E7=9B=AE=E5=90=8D=E5=8A=A0=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Layout/AppLayout.css | 4 +++- frontend/src/pages/Dashboard/Dashboard.css | 10 ++++++---- frontend/src/pages/Dashboard/Dashboard.jsx | 16 ++++++++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/Layout/AppLayout.css b/frontend/src/components/Layout/AppLayout.css index 494bb3b..b063b3b 100644 --- a/frontend/src/components/Layout/AppLayout.css +++ b/frontend/src/components/Layout/AppLayout.css @@ -29,4 +29,6 @@ padding: 24px; background: var(--color-bg-cream); min-height: calc(100vh - 64px); -} \ No newline at end of file + max-width: 1400px; + margin: 0 auto; +} diff --git a/frontend/src/pages/Dashboard/Dashboard.css b/frontend/src/pages/Dashboard/Dashboard.css index b5f611e..1a20717 100644 --- a/frontend/src/pages/Dashboard/Dashboard.css +++ b/frontend/src/pages/Dashboard/Dashboard.css @@ -38,7 +38,7 @@ position: absolute; top: 16px; right: 16px; - height: 40px; + height: 64px; width: auto; opacity: 0.9; } @@ -177,6 +177,8 @@ flex: 1; max-width: 42px; min-width: 20px; + justify-content: flex-end; + height: 180px; } .bar { @@ -192,15 +194,15 @@ font-size: 9px; font-weight: 600; text-align: center; - margin-bottom: 3px; white-space: nowrap; + margin-bottom: 2px; } .bar-program { - font-size: 9px; + font-size: 10px; color: #6b6b6b; text-align: center; - max-width: 42px; + max-width: 64px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; diff --git a/frontend/src/pages/Dashboard/Dashboard.jsx b/frontend/src/pages/Dashboard/Dashboard.jsx index 6d6df95..498f208 100644 --- a/frontend/src/pages/Dashboard/Dashboard.jsx +++ b/frontend/src/pages/Dashboard/Dashboard.jsx @@ -51,7 +51,7 @@ function getBarHeight(share) { function getShortTitle(title) { if (!title) return '?' - return title.length > 12 ? title.slice(0, 12) + '...' : title + return title.length > 9 ? title.slice(0, 9) + '...' : title } function Dashboard() { @@ -83,10 +83,10 @@ function Dashboard() { }) }, []) - // 显示最近有份额数据的期次(最多9个) + // 显示最近有份额数据的期次(最多12个) const displayEpisodes = episodes .filter(e => e.audience_share != null) - .slice(0, 9) + .slice(0, 12) const bestEpisode = [...displayEpisodes].sort((a, b) => Number(b.audience_share) - Number(a.audience_share))[0] @@ -100,7 +100,7 @@ function Dashboard() { { icon: , bg: '#e8f5e9', - label: '近9期已录', + label: '近12期已录', value: displayEpisodes.length || '--', }, { @@ -188,7 +188,7 @@ function Dashboard() { {/* ===== 近9期收视柱图(全宽) ===== */}
-

近 9 期收视份额

+

近 12 期收视份额

悬浮看编导/期次/收视率·颜色只对收视份额
{loading ? ( @@ -212,6 +212,9 @@ function Dashboard() { ` return (
+
+ {ep.audience_share != null ? Number(ep.audience_share).toFixed(2) : '--'} +
}>
-
- {ep.audience_share != null ? Number(ep.audience_share).toFixed(2) : '--'} -
{getShortTitle(ep.program_name)}