refactor(dataset): 优化数据集路径管理和关联关系处理

- 移除Dataset类中initCreateParam方法的parentPath参数
- 简化handleParentChange方法中的路径构建逻辑
- 更新错误消息将"子数据集"改为"关联数据集"
- 修改前端界面将"父数据集"相关术语统一为"关联数据集"
- 在导入配置组件中添加类型定义和改进文件处理逻辑
- 限制数据源选项排除COLLECTION类型避免错误选择
This commit is contained in:
2026-01-30 16:48:39 +08:00
parent accaa47a83
commit bd37858ccc
7 changed files with 101 additions and 71 deletions

View File

@@ -127,7 +127,7 @@ export default function DatasetDetail() {
if (!dataset?.parentDatasetId) {
items.push({
key: "children",
label: "数据集",
label: "关联数据集",
});
}
return items;
@@ -266,7 +266,7 @@ export default function DatasetDetail() {
? [
{
key: "create-child",
label: "创建数据集",
label: "创建关联数据集",
icon: <PlusOutlined />,
onClick: handleCreateChildDataset,
},
@@ -415,7 +415,7 @@ export default function DatasetDetail() {
{activeTab === "children" && (
<div className="pt-4">
<div className="flex items-center justify-between mb-3">
<h2 className="text-base font-semibold"></h2>
<h2 className="text-base font-semibold"></h2>
<span className="text-xs text-gray-500">
{childDatasets.length}
</span>
@@ -426,7 +426,7 @@ export default function DatasetDetail() {
dataSource={childDatasets}
loading={childDatasetsLoading}
pagination={false}
locale={{ emptyText: "暂无数据集" }}
locale={{ emptyText: "暂无关联数据集" }}
/>
</div>
)}