From eb9028dcc6254a7f3993397ded7156fe825ee49a Mon Sep 17 00:00:00 2001 From: duxingchen Date: Wed, 12 Aug 2026 14:04:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=BB=E5=8A=A1=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=9D=A1=E8=A1=A5=E5=85=A8=E9=A9=B3=E5=9B=9E=E6=AE=B5=20+=20?= =?UTF-8?q?=E5=9C=A8=E5=88=B6=E5=93=81=E5=90=8D=E7=A7=B0=E6=97=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BASN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 任务进度条: 3段→4段 (PENDING|WIP|COMPLETED|REJECTED) 解决总数11但进度条只覆盖9的视觉缺口 驳回以红色段显示, 拼图完整 2. 在制品行: 产品SN从第二行移到任务名旁边 旧: 装配 张三 → 新: 装配 A1B2C3D4 张三 一行看清: 做什么工序+哪台设备+谁在做 --- frontend/src/pages/admin/AdminDashboard.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/admin/AdminDashboard.tsx b/frontend/src/pages/admin/AdminDashboard.tsx index 26f4843..d161adc 100644 --- a/frontend/src/pages/admin/AdminDashboard.tsx +++ b/frontend/src/pages/admin/AdminDashboard.tsx @@ -30,10 +30,11 @@ function rangeToParams(key: DateRangeKey, customRange: [Dayjs, Dayjs] | null) { return { since: since.toISOString() }; } -// ─── 进度条 ─────────────────────────────────────────────── -function ProgressBar({ a, b, c, total, labels }: { +// ─── 进度条(支持3或4段) ───────────────────────────────── +function ProgressBar({ a, b, c, total, labels, d }: { a: number; b: number; c: number; total: number; labels: [string, string, string]; + d?: number; }) { if (total === 0) return
暂无数据
; const pct = (n: number) => Math.round((n / total) * 100); @@ -41,6 +42,7 @@ function ProgressBar({ a, b, c, total, labels }: { { n: a, color: "bg-amber-400", label: labels[0] }, { n: b, color: "bg-blue-500", label: labels[1] }, { n: c, color: "bg-emerald-500", label: labels[2] }, + ...(d !== undefined ? [{ n: d, color: "bg-red-400", label: "已驳回" }] : []), ].filter(s => s.n > 0); return (
@@ -87,10 +89,10 @@ function WipRow({ t }: { t: WipTask }) {
{t.task_name} + {t.product_sn} {t.assignee}
- {t.product_sn} {t.received_at && 接收: {t.received_at}}
@@ -282,7 +284,7 @@ export default function AdminDashboard() {

{stats.tasks_total}

PENDING/WIP 实时 | COMPLETED 按时段

+ total={stats.tasks_total} labels={["待接收", "进行中", "已完成"]} d={stats.tasks_rejected} />
{/* 品质 & 留言 */}