fix: add materialId filter + column to RecordPage
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 6s
Some checks failed
Deploy Admin Frontend / build-and-deploy (push) Failing after 6s
Review finding: missing materialId filter input and list column. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
0fd0709b8b
commit
de415ff3c1
@ -304,8 +304,9 @@ export function RecordPage() {
|
||||
});
|
||||
|
||||
const columns = [
|
||||
{ title: '用户', dataIndex: 'userId', key: 'userId', width: 100, ellipsis: true },
|
||||
{ title: '标题', dataIndex: 'title', key: 'title', width: 200 },
|
||||
{ title: '用户', dataIndex: 'userId', key: 'userId', width: 90, ellipsis: true },
|
||||
{ title: '资料', dataIndex: 'materialId', key: 'materialId', width: 100, ellipsis: true, render: (v?: string) => v?.slice(0,12) || '-' },
|
||||
{ title: '标题', dataIndex: 'title', key: 'title', width: 180 },
|
||||
{ title: '类型', dataIndex: 'recordType', key: 'recordType', width: 100, render: (t: string) => <Tag>{t}</Tag> },
|
||||
{ title: '时长', dataIndex: 'durationSeconds', key: 'duration', width: 80 },
|
||||
{ title: '时间', dataIndex: 'occurredAt', key: 'occurredAt', width: 160, render: (t: string) => t ? dayjs(t).format('MM-DD HH:mm') : '-' },
|
||||
@ -315,6 +316,7 @@ export function RecordPage() {
|
||||
<PageWrapper title="学习记录">
|
||||
<Space style={{ marginBottom: 16 }} wrap>
|
||||
<Input placeholder="用户ID" allowClear onChange={e => setFilters(f => ({ ...f, userId: e.target.value }))} style={{ width: 140 }} />
|
||||
<Input placeholder="资料ID" allowClear onChange={e => setFilters(f => ({ ...f, materialId: e.target.value }))} style={{ width: 140 }} />
|
||||
<Button onClick={() => setPage(1)} type="primary">查询</Button>
|
||||
</Space>
|
||||
<Table rowKey="id" columns={columns} dataSource={data?.items || []} scroll={{ x: 700 }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user