diff --git a/frontend/src/pages/DataAnnotation/Home/DataAnnotation.tsx b/frontend/src/pages/DataAnnotation/Home/DataAnnotation.tsx index cb2eabd..9fb8a38 100644 --- a/frontend/src/pages/DataAnnotation/Home/DataAnnotation.tsx +++ b/frontend/src/pages/DataAnnotation/Home/DataAnnotation.tsx @@ -378,6 +378,8 @@ export default function DataAnnotation() { open={!!exportTask} projectId={exportTask?.id || ""} projectName={exportTask?.name || ""} + datasetType={exportTask?.datasetType} + labelingType={exportTask?.labelingType} onClose={() => setExportTask(null)} /> diff --git a/frontend/src/pages/DataAnnotation/Home/ExportAnnotationDialog.tsx b/frontend/src/pages/DataAnnotation/Home/ExportAnnotationDialog.tsx index e8658a2..238c1c0 100644 --- a/frontend/src/pages/DataAnnotation/Home/ExportAnnotationDialog.tsx +++ b/frontend/src/pages/DataAnnotation/Home/ExportAnnotationDialog.tsx @@ -11,7 +11,7 @@ import { message, Alert, } from "antd"; -import { FileTextOutlined, CheckCircleOutlined } from "@ant-design/icons"; +import { FileTextOutlined, CheckCircleOutlined, InfoCircleOutlined } from "@ant-design/icons"; import { getExportStatsUsingGet, downloadAnnotationsUsingGet, @@ -22,6 +22,8 @@ interface ExportAnnotationDialogProps { open: boolean; projectId: string; projectName: string; + datasetType?: string; + labelingType?: string; onClose: () => void; } @@ -57,6 +59,8 @@ export default function ExportAnnotationDialog({ open, projectId, projectName, + datasetType, + labelingType, onClose, }: ExportAnnotationDialogProps) { const [form] = Form.useForm(); @@ -67,6 +71,15 @@ export default function ExportAnnotationDialog({ annotatedFiles: number; } | null>(null); + const normalizedDatasetType = datasetType?.toUpperCase().replace(/-/g, "_") || ""; + const normalizedLabelingType = labelingType?.toUpperCase().replace(/-/g, "_") || ""; + const hasDatasetType = Boolean(normalizedDatasetType); + const isTextDataset = normalizedDatasetType === "TEXT"; + const isDetectionCompatible = + normalizedDatasetType === "IMAGE" || + normalizedDatasetType === "OBJECT_DETECTION" || + normalizedLabelingType === "OBJECT_DETECTION"; + // 加载导出统计信息 useEffect(() => { if (open && projectId) { @@ -176,20 +189,46 @@ export default function ExportAnnotationDialog({ rules={[{ required: true, message: "请选择导出格式" }]} >