From a8c1604bec69cf910065ad3c9f2984866092135e Mon Sep 17 00:00:00 2001 From: Trae Assistant Date: Mon, 5 Oct 2026 09:25:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=80=E6=9C=89=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=EF=BC=88Excel=20+=20=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87/?= =?UTF-8?q?=E6=89=93=E5=8D=B0=EF=BC=89=E5=85=A8=E9=83=A8=E8=A1=A5=E9=BD=90?= =?UTF-8?q?=E4=B9=89=E5=B7=A5=E5=8F=B7=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Export.tsx 数据导出报告修复 3 个缺义工号的 MiniTable: * 03 全部时长明细:列头改为「序号/班级/姓名/义工号/工作组/活动/时长/备注」(原为只有班级+姓名,缺关键列) * 04 部员总时长排行:新增义工号列(排名/班级/姓名/义工号/工作组/活动数/累计时长) * 05 部员参加活动:卡片头部增加独立 tag 显示义工号(白底半透明 rounded 标签),与班级/姓名/工作组并排;活动次数右对齐 - 已核实 Excel 6 张 sheet (部员/时长/部员累计/部员活动明细/活动时长矩阵) 以及 Hours 活动独立导出 Excel/图片 均已原本包含义工号,无需改;后端 6 条 SQL 均已 SELECT u.volunteer_no - build 通过 --- client/src/pages/admin/Export.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/pages/admin/Export.tsx b/client/src/pages/admin/Export.tsx index 19b767e..a58ca71 100644 --- a/client/src/pages/admin/Export.tsx +++ b/client/src/pages/admin/Export.tsx @@ -339,7 +339,7 @@ export default function Export() {

03 全部时长明细({preview.hours.length} 条)

- [h.class, h.name, h.activity_title, Number(h.hours || 0).toFixed(2), h.remark || '-'])} /> + [i + 1, h.class, h.name, h.volunteer_no || '-', h.group_name || '-', h.activity_title, Number(h.hours || 0).toFixed(2), h.remark || '-'])} /> ) : null} {preview.user_totals?.length ? ( @@ -347,7 +347,7 @@ export default function Export() {

04 部员总时长排行

- [i + 1, u.class, u.name, u.group_name || '-', u.activity_count, Number(u.total_hours || 0).toFixed(2)])} /> + [i + 1, u.class, u.name, u.volunteer_no || '-', u.group_name || '-', u.activity_count, Number(u.total_hours || 0).toFixed(2)])} /> ) : null} {preview.user_activities?.length ? ( @@ -359,7 +359,11 @@ export default function Export() { {preview.user_activities.map(u => (
- {u.class} {u.name}{u.group_name ? ` (${u.group_name})` : ''} +
+ {u.class} {u.name} + 义工号:{u.volunteer_no || '—'} + {u.group_name ? 工作组:{u.group_name} : null} +
共 {u.activities.length} 次活动
{u.activities.length === 0 ? (