diff --git a/src/pages/LearningData.tsx b/src/pages/LearningData.tsx index 634282c..1d064ef 100644 --- a/src/pages/LearningData.tsx +++ b/src/pages/LearningData.tsx @@ -45,8 +45,8 @@ export default function LearningData() { const sessionColumns = [ { title: 'ID', dataIndex: 'id', width: 100, ellipsis: true }, - { title: '用户', dataIndex: 'userId', width: 100, ellipsis: true }, - { title: '知识库', dataIndex: 'knowledgeBaseId', width: 100, ellipsis: true }, + { title: '用户', dataIndex: 'userId', width: 100, ellipsis: true, render: (_: any, r: any) => r.userName || r.userId }, + { title: '知识库', dataIndex: 'knowledgeBaseId', width: 100, ellipsis: true, render: (_: any, r: any) => r.kbName || r.knowledgeBaseId }, { title: '模式', dataIndex: 'mode', width: 80 }, { title: '状态', dataIndex: 'status', width: 80, render: (s: string) => {sessionStatusLabels[s] || s} }, { title: '时长(分)', dataIndex: 'durationSeconds', width: 80, render: (s: number) => s ? Math.round(s / 60) : '-' }, @@ -56,7 +56,7 @@ export default function LearningData() { const analysisColumns = [ { title: 'ID', dataIndex: 'id', width: 100, ellipsis: true }, - { title: '用户', dataIndex: 'userId', width: 100, ellipsis: true }, + { title: '用户', dataIndex: 'userId', width: 100, ellipsis: true, render: (_: any, r: any) => r.userName || r.userId }, { title: '摘要', dataIndex: 'summary', width: 200, ellipsis: true }, { title: '掌握度', dataIndex: 'masteryScore', width: 80, render: (s: number | null) => s != null ? `${s}%` : '-' }, { title: '薄弱点', dataIndex: 'weaknesses', width: 200, render: (w: string[]) => (w || []).join('、') || '-' }, @@ -65,7 +65,7 @@ export default function LearningData() { const aiUsageColumns = [ { title: 'ID', dataIndex: 'id', width: 100, ellipsis: true }, - { title: '用户', dataIndex: 'userId', width: 100, ellipsis: true }, + { title: '用户', dataIndex: 'userId', width: 100, ellipsis: true, render: (_: any, r: any) => r.userName || r.userId }, { title: '模型', dataIndex: 'model', width: 140, ellipsis: true }, { title: '服务商', dataIndex: 'provider', width: 80 }, { title: '输入 Token', dataIndex: 'inputTokens', width: 90 },