You've already forked DataMate
feat(annotation): 添加标注类型显示功能
- 在前端页面中新增标注类型列并使用Tag组件展示 - 添加AnnotationTypeMap常量用于标注类型的映射 - 修改接口定义支持labelingType字段的传递 - 更新后端项目创建和更新逻辑以存储标注类型 - 添加标注类型配置键常量统一管理 - 扩展数据传输对象支持标注类型属性 - 实现模板标注类型的继承逻辑
This commit is contained in:
@@ -23,6 +23,12 @@ type AnnotationTaskPayload = {
|
||||
datasetId?: string;
|
||||
datasetName?: string;
|
||||
dataset_name?: string;
|
||||
labelingType?: string;
|
||||
labeling_type?: string;
|
||||
template?: {
|
||||
labelingType?: string;
|
||||
labeling_type?: string;
|
||||
};
|
||||
totalCount?: number;
|
||||
total_count?: number;
|
||||
annotatedCount?: number;
|
||||
@@ -48,6 +54,7 @@ export type AnnotationTaskListItem = {
|
||||
description?: string;
|
||||
datasetId?: string;
|
||||
datasetName?: string;
|
||||
labelingType?: string;
|
||||
totalCount?: number;
|
||||
annotatedCount?: number;
|
||||
inProgressCount?: number;
|
||||
@@ -90,6 +97,11 @@ export function mapAnnotationTask(task: AnnotationTaskPayload): AnnotationTaskLi
|
||||
const labelingProjId = task?.labelingProjId || task?.labelingProjectId || task?.projId || task?.labeling_project_id || "";
|
||||
const segmentationEnabled = task?.segmentationEnabled ?? task?.segmentation_enabled ?? false;
|
||||
const inProgressCount = task?.inProgressCount ?? task?.in_progress_count ?? 0;
|
||||
const labelingType =
|
||||
task?.labelingType ||
|
||||
task?.labeling_type ||
|
||||
task?.template?.labelingType ||
|
||||
task?.template?.labeling_type;
|
||||
|
||||
const statsArray = task?.statistics
|
||||
? [
|
||||
@@ -107,6 +119,7 @@ export function mapAnnotationTask(task: AnnotationTaskPayload): AnnotationTaskLi
|
||||
projId: labelingProjId,
|
||||
segmentationEnabled,
|
||||
inProgressCount,
|
||||
labelingType,
|
||||
name: task.name,
|
||||
description: task.description || "",
|
||||
datasetName: task.datasetName || task.dataset_name || "-",
|
||||
|
||||
Reference in New Issue
Block a user