feat: wire admin workflows to real APIs

This commit is contained in:
hectorzhao
2026-07-02 13:50:09 +08:00
parent f8c9b78c21
commit ab421cf8a7
42 changed files with 2596 additions and 250 deletions
+10 -1
View File
@@ -93,6 +93,14 @@ const initialTasks: ReportTask[] = [
},
];
function RemarkCell({ value }: { value?: string }) {
return (
<div className={['admin-remark-cell', value ? '' : 'admin-remark-cell--empty'].filter(Boolean).join(' ')}>
{value || '暂无备注'}
</div>
);
}
function StatusTag({ status }: { status: ReportTaskStatus }) {
return <Tag tone={statusMeta[status].tone}>{statusMeta[status].label}</Tag>;
}
@@ -252,11 +260,12 @@ export function AdminReportTasksPage() {
{ key: 'counts', title: '资料数量', width: '190px', render: (record) => <div className="admin-task-counts"><span> {record.signatureCount}</span><span> {record.drainageCount}</span><strong> {record.missingCount}</strong></div> },
{ key: 'status', title: '状态', width: '110px', render: (record) => <StatusTag status={record.status} /> },
{ key: 'time', title: '流转时间', width: '210px', render: (record) => <div className="report-task-time"><span> {record.createdAt}</span><span> {record.exportedAt ?? '-'}</span><span> {record.receiptAt ?? '-'}</span></div> },
{ key: 'remark', title: '备注', width: '300px', render: (record) => <RemarkCell value={record.remark} /> },
{
key: 'actions',
title: '操作',
align: 'right',
width: '260px',
width: '280px',
render: (record) => (
<div className="admin-task-actions">
<Button icon={<Eye size={14} />} onClick={() => setDetailTask(record)} size="sm" variant="ghost"></Button>