feat(annotation): 添加标注任务的数据量统计功能

- 在前端表格中新增数据量和已标注列显示
- 添加标注完成百分比计算和提示功能
- 在后端schema中增加totalCount和annotatedCount字段
- 实现项目统计数据查询服务方法
- 集成前后端数据映射和接口响应更新
This commit is contained in:
2026-01-19 22:43:41 +08:00
parent 649ab2f6bb
commit cc0a977349
4 changed files with 82 additions and 4 deletions

View File

@@ -160,6 +160,30 @@ export default function DataAnnotation() {
key: "datasetName",
width: 180,
},
{
title: "数据量",
dataIndex: "totalCount",
key: "totalCount",
width: 100,
align: "center" as const,
},
{
title: "已标注",
dataIndex: "annotatedCount",
key: "annotatedCount",
width: 100,
align: "center" as const,
render: (value: number, record: any) => {
const total = record.totalCount || 0;
const annotated = value || 0;
const percent = total > 0 ? Math.round((annotated / total) * 100) : 0;
return (
<span title={`${annotated}/${total} (${percent}%)`}>
{annotated}
</span>
);
},
},
{
title: "创建时间",
dataIndex: "createdAt",