From a728bc31004d60e25d4e22f2e4cc62c738ddcbed Mon Sep 17 00:00:00 2001 From: uname Date: Tue, 9 Dec 2025 20:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E6=A0=87?= =?UTF-8?q?=E6=B3=A8=EF=BC=9A=E6=A0=87=E6=B3=A8=E6=A8=A1=E6=9D=BF=E5=88=B0?= =?UTF-8?q?=E4=B8=BB=E6=B5=81=E8=AF=AD=E8=A8=80=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Template/TemplateDetail.tsx | 57 ++++--- scripts/db/data-annotation-init.sql | 158 ++++++------------ 2 files changed, 85 insertions(+), 130 deletions(-) diff --git a/frontend/src/pages/DataAnnotation/Template/TemplateDetail.tsx b/frontend/src/pages/DataAnnotation/Template/TemplateDetail.tsx index 2efbf9e..202aa6f 100644 --- a/frontend/src/pages/DataAnnotation/Template/TemplateDetail.tsx +++ b/frontend/src/pages/DataAnnotation/Template/TemplateDetail.tsx @@ -19,61 +19,61 @@ const TemplateDetail: React.FC = ({ return ( - + {template.name} - + {template.description || "-"} - + {template.dataType} - + {template.labelingType} - + {template.category} - + {template.style} - + - {template.builtIn ? "Built-in" : "Custom"} + {template.builtIn ? "系统内置" : "自定义"} - + {template.version} - + {new Date(template.createdAt).toLocaleString()} {template.updatedAt && ( - + {new Date(template.updatedAt).toLocaleString()} )} - Configuration + 配置详情 - + {template.configuration.objects.map((obj, index) => ( - Name: + 名称: {obj.name} - Type: + 类型: {obj.type} - Value: + 值: {obj.value} @@ -81,31 +81,34 @@ const TemplateDetail: React.FC = ({ - + {template.configuration.labels.map((label, index) => ( - +
- From Name: + 来源名称: {label.fromName} - To Name: + + 目标名称: {label.toName} - Type: + + 类型: {label.type} - {label.required && Required} + + {label.required && 必填}
{label.description && (
- Description: + 描述: {label.description}
)} {label.options && label.options.length > 0 && (
- Options: + 选项:
{label.options.map((opt, i) => ( {opt} @@ -116,7 +119,7 @@ const TemplateDetail: React.FC = ({ {label.labels && label.labels.length > 0 && (
- Labels: + 标签:
{label.labels.map((lbl, i) => ( {lbl} @@ -131,7 +134,7 @@ const TemplateDetail: React.FC = ({ {template.labelConfig && ( - +