feat: add learning records and attachments tabs to profile Drawer, plus PDF report button
This commit is contained in:
@@ -647,8 +647,33 @@ const StudentsPage: React.FC = () => {
|
||||
</Descriptions>
|
||||
) : <div style={{ color: '#999' }}>暂无录取结果</div>,
|
||||
},
|
||||
{
|
||||
key: 'learning', label: `学情记录 (${drawerData.learningRecords?.length || 0})`,
|
||||
children: drawerData.learningRecords?.length ? (
|
||||
<Table rowKey="id" size="small" pagination={false} dataSource={drawerData.learningRecords} columns={[
|
||||
{ title: '日期', dataIndex: 'recordDate', width: 100 },
|
||||
{ title: '类型', dataIndex: 'recordType', width: 80 },
|
||||
{ title: '内容', dataIndex: 'content', ellipsis: true },
|
||||
{ title: '跟进方式', dataIndex: 'followUpMethod', width: 100 },
|
||||
{ title: '下一步', dataIndex: 'nextStep', width: 100 },
|
||||
]} />
|
||||
) : <div style={{ color: '#999' }}>暂无学情记录</div>,
|
||||
},
|
||||
{
|
||||
key: 'attachments', label: `附件 (${drawerData.attachments?.length || 0})`,
|
||||
children: drawerData.attachments?.length ? (
|
||||
<Table rowKey="id" size="small" pagination={false} dataSource={drawerData.attachments} columns={[
|
||||
{ title: '分类', dataIndex: 'category', width: 80 },
|
||||
{ title: '文件名', dataIndex: 'fileName', ellipsis: true },
|
||||
{ title: '大小', dataIndex: 'fileSize', width: 80, render: (v: number) => v ? `${(v / 1024).toFixed(1)} KB` : '-' },
|
||||
]} />
|
||||
) : <div style={{ color: '#999' }}>暂无附件</div>,
|
||||
},
|
||||
]} />
|
||||
)}
|
||||
<Button type="primary" icon={<DownloadOutlined />} style={{ marginTop: 16 }} onClick={() => {
|
||||
const token = localStorage.getItem('token');
|
||||
window.open(`/api/archive/${drawerData?.student?.id}/report?token=${token}`, '_blank');
|
||||
}}>生成档案报表</Button>
|
||||
</Drawer>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user