diff --git a/src/pages/learning/DataPages.tsx b/src/pages/learning/DataPages.tsx index f00cd25..67f4c13 100644 --- a/src/pages/learning/DataPages.tsx +++ b/src/pages/learning/DataPages.tsx @@ -199,7 +199,15 @@ export function ProgressPage() { { title: 'Session', dataIndex: 'lastClientSessionId', key: 'sessionId', width: 120, ellipsis: true, render: (v?: string) => v?.slice(0,16) || '-' }, { title: '状态', dataIndex: 'status', key: 'status', width: 85, render: (s: string) => {progressStatusLabels[s] || s} }, { title: '进度', dataIndex: 'lastProgress', key: 'progress', width: 65, render: (v: number) => v != null ? `${Math.round(v * 100)}%` : '-' }, - { title: '位置', dataIndex: 'lastPosition', key: 'position', width: 100, ellipsis: true, render: (v?: object) => v ? JSON.stringify(v).slice(0,20) : '-' }, + { title: '位置', dataIndex: 'lastPosition', key: 'position', width: 100, ellipsis: true, render: (v?: any) => { + if (!v) return '-'; + const pct = v.scrollProgress != null ? `${Math.round(v.scrollProgress * 100)}%` : ''; + const type = v.type || ''; + if (type === 'Markdown' || type === 'Text') return `文本 · ${pct || '—'}`; + if (type === 'PDF' || type === 'Image') return `${type} · ${pct || '—'}`; + if (type === 'EPUB') return `EPUB · ${pct || '—'}`; + return pct || JSON.stringify(v).slice(0, 20); + } }, { title: '活跃秒', dataIndex: 'totalActiveSeconds', key: 'seconds', width: 70 }, { title: '已读', dataIndex: 'isMarkedRead', key: 'marked', width: 55, render: (v: boolean) => v ? '✅' : '' }, { title: '更新', dataIndex: 'lastReadAt', key: 'updatedAt', width: 140, render: (t?: string) => t ? dayjs(t).format('MM-DD HH:mm') : '-' },