- Export.tsx 数据导出报告修复 3 个缺义工号的 MiniTable: * 03 全部时长明细:列头改为「序号/班级/姓名/义工号/工作组/活动/时长/备注」(原为只有班级+姓名,缺关键列) * 04 部员总时长排行:新增义工号列(排名/班级/姓名/义工号/工作组/活动数/累计时长) * 05 部员参加活动:卡片头部增加独立 tag 显示义工号(白底半透明 rounded 标签),与班级/姓名/工作组并排;活动次数右对齐 - 已核实 Excel 6 张 sheet (部员/时长/部员累计/部员活动明细/活动时长矩阵) 以及 Hours 活动独立导出 Excel/图片 均已原本包含义工号,无需改;后端 6 条 SQL 均已 SELECT u.volunteer_no - build 通过
This commit is contained in:
@@ -339,7 +339,7 @@ export default function Export() {
|
||||
<h3 className="font-semibold text-lg mb-3 border-l-4 border-primary-500 pl-3 inline-flex items-center gap-2 text-gray-800">
|
||||
<span className="chip-primary">03</span> 全部时长明细({preview.hours.length} 条)
|
||||
</h3>
|
||||
<MiniTable heads={['班级', '姓名', '活动', '时长(h)', '备注']} rows={preview.hours.map((h: any) => [h.class, h.name, h.activity_title, Number(h.hours || 0).toFixed(2), h.remark || '-'])} />
|
||||
<MiniTable heads={['序号', '班级', '姓名', '义工号', '工作组', '活动', '时长(h)', '备注']} rows={preview.hours.map((h: any, i) => [i + 1, h.class, h.name, h.volunteer_no || '-', h.group_name || '-', h.activity_title, Number(h.hours || 0).toFixed(2), h.remark || '-'])} />
|
||||
</section>
|
||||
) : null}
|
||||
{preview.user_totals?.length ? (
|
||||
@@ -347,7 +347,7 @@ export default function Export() {
|
||||
<h3 className="font-semibold text-lg mb-3 border-l-4 border-primary-500 pl-3 inline-flex items-center gap-2 text-gray-800">
|
||||
<span className="chip-primary">04</span> 部员总时长排行
|
||||
</h3>
|
||||
<MiniTable heads={['排名', '班级', '姓名', '工作组', '活动数', '累计时长(h)']} rows={preview.user_totals.map((u, i) => [i + 1, u.class, u.name, u.group_name || '-', u.activity_count, Number(u.total_hours || 0).toFixed(2)])} />
|
||||
<MiniTable heads={['排名', '班级', '姓名', '义工号', '工作组', '活动数', '累计时长(h)']} rows={preview.user_totals.map((u, i) => [i + 1, u.class, u.name, u.volunteer_no || '-', u.group_name || '-', u.activity_count, Number(u.total_hours || 0).toFixed(2)])} />
|
||||
</section>
|
||||
) : null}
|
||||
{preview.user_activities?.length ? (
|
||||
@@ -359,7 +359,11 @@ export default function Export() {
|
||||
{preview.user_activities.map(u => (
|
||||
<div key={u.id} className="card overflow-hidden">
|
||||
<div className="bg-[#275354] text-white px-4 py-2.5 border-b border-gray-200 font-semibold flex items-center justify-between flex-wrap gap-2">
|
||||
<span>{u.class} {u.name}{u.group_name ? ` (${u.group_name})` : ''}</span>
|
||||
<div className="flex items-center gap-3 flex-wrap">
|
||||
<span>{u.class} {u.name}</span>
|
||||
<span className="font-mono text-[12px] tracking-wider text-white/90 bg-white/10 rounded px-2 py-0.5">义工号:{u.volunteer_no || '—'}</span>
|
||||
{u.group_name ? <span className="text-xs font-medium text-white/85">工作组:{u.group_name}</span> : null}
|
||||
</div>
|
||||
<span className="text-xs font-medium text-white/85 font-mono tracking-wider">共 {u.activities.length} 次活动</span>
|
||||
</div>
|
||||
{u.activities.length === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user