Skip to content

Commit 1d199da

Browse files
committed
Merge remote-tracking branch 'origin/develop_930' into develop_930
2 parents a7c481b + 339a39a commit 1d199da

File tree

11 files changed

+46
-62
lines changed

11 files changed

+46
-62
lines changed

frontend/src/components/SearchControls.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ export function SearchControls({
117117

118118
return (
119119
<div className={className}>
120-
<div className="flex items-center justify-between gap-4">
120+
<div className="flex items-center justify-between gap-8">
121121
{/* Left side - Search and Filters */}
122122
<div className="flex items-center gap-2 flex-1">
123123
{/* Search */}
124-
<div className="relative flex-1 max-w-200">
124+
<div className="relative flex-1">
125125
<Input
126126
allowClear
127127
placeholder={searchPlaceholder}

frontend/src/pages/DataCleansing/Create/CreateTask.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function CleansingTaskCreate() {
1818
name: "",
1919
description: "",
2020
srcDatasetId: "",
21+
srcDatasetName: "",
2122
destDatasetName: "",
2223
destDatasetType: DatasetSubType.TEXT_DOCUMENT,
2324
type: DatasetType.TEXT,
@@ -34,7 +35,7 @@ export default function CleansingTaskCreate() {
3435
const handleSave = async () => {
3536
const task = {
3637
...taskConfig,
37-
operators: selectedOperators,
38+
instance: selectedOperators,
3839
};
3940
console.log("创建任务:", task);
4041
navigate("/data/cleansing");

frontend/src/pages/DataCleansing/Create/CreateTempate.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ export default function CleansingTemplateCreate() {
1313
const [templateConfig, setTemplateConfig] = useState({
1414
name: "",
1515
description: "",
16-
type: "",
1716
});
1817

1918
const handleSave = async () => {
20-
const values = form.getFieldsValue();
2119
const template = {
22-
...values,
20+
...templateConfig,
2321
operators: selectedOperators,
2422
};
2523
console.log("创建模板:", template);
@@ -38,11 +36,10 @@ export default function CleansingTemplateCreate() {
3836

3937
const canProceed = () => {
4038
const values = form.getFieldsValue();
41-
console.log(values);
4239

4340
switch (currentStep) {
4441
case 1:
45-
return values.name && values.type;
42+
return values.name;
4643
case 2:
4744
return selectedOperators.length > 0;
4845
default:

frontend/src/pages/DataCleansing/Create/components/CreateTaskStepOne.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,27 @@ export default function CreateTaskStepOne({
4949
return options;
5050
}, [taskConfig?.type]);
5151

52+
const handleValuesChange = (currentValue, allValues) => {
53+
const [key, value] = Object.entries(currentValue)[0];
54+
let dataset = null;
55+
if (key === "srcDatasetId") {
56+
dataset = datasets.find((d) => d.id === value);
57+
setTaskConfig({
58+
...taskConfig,
59+
...allValues,
60+
srcDatasetName: dataset?.name || "",
61+
});
62+
} else {
63+
setTaskConfig({ ...taskConfig, ...allValues });
64+
}
65+
};
66+
5267
return (
5368
<Form
5469
layout="vertical"
5570
form={form}
5671
initialValues={taskConfig}
57-
onValuesChange={(_, values) =>
58-
setTaskConfig({ ...taskConfig, ...values })
59-
}
72+
onValuesChange={handleValuesChange}
6073
>
6174
<h2 className="font-medium text-gray-900 text-lg mb-2">任务信息</h2>
6275
<Form.Item label="任务名称" name="name" required>

frontend/src/pages/DataCleansing/Create/components/CreateTemplateStepOne.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import RadioCard from "@/components/RadioCard";
2-
import { templateTypes } from "@/mock/cleansing";
31
import { Input, Form } from "antd";
42

53
const { TextArea } = Input;
@@ -35,19 +33,6 @@ export default function CreateTemplateStepOne({
3533
<Form.Item label="模板描述" name="description">
3634
<TextArea placeholder="描述模板的用途和特点" rows={4} />
3735
</Form.Item>
38-
<Form.Item
39-
label="模板类型"
40-
name="type"
41-
rules={[{ required: true, message: "请选择模板类型" }]}
42-
>
43-
<RadioCard
44-
options={templateTypes}
45-
value={templateConfig.type}
46-
onChange={(type) => {
47-
setTemplateConfig({ ...templateConfig, type });
48-
}}
49-
/>
50-
</Form.Item>
5136
</Form>
5237
);
5338
}

frontend/src/pages/DataCleansing/Create/components/OperatorConfig.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22
import { Tag, Divider, Form } from "antd";
3-
import { SettingOutlined } from "@ant-design/icons";
43
import ParamConfig from "./ParamConfig";
54
import { OperatorI } from "../../cleansing.model";
5+
import { Settings } from "lucide-react";
66

77
// OperatorConfig/OperatorTemplate 类型需根据主文件实际导入
88
interface OperatorConfigProps {
@@ -28,7 +28,7 @@ const OperatorConfig: React.FC<OperatorConfigProps> = ({
2828
<div className="w-1/4 flex flex-col h-screen">
2929
<div className="px-4 pb-4 border-b border-gray-200">
3030
<span className="font-semibold text-base flex items-center gap-2">
31-
<SettingOutlined />
31+
<Settings />
3232
参数配置
3333
</span>
3434
</div>
@@ -69,7 +69,7 @@ const OperatorConfig: React.FC<OperatorConfigProps> = ({
6969
</div>
7070
) : (
7171
<div className="text-center py-12 text-gray-400">
72-
<SettingOutlined className="text-5xl mb-4 opacity-50" />
72+
<Settings className="text-5xl mb-4 opacity-50" />
7373
<div>请选择一个算子进行参数配置</div>
7474
</div>
7575
)}

frontend/src/pages/DataCleansing/Create/components/OperatorLibrary.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Card, Input, Select, Tooltip, Collapse, Tag, Checkbox } from "antd";
33
import { StarFilled, StarOutlined, SearchOutlined } from "@ant-design/icons";
44
import type { OperatorI } from "@/pages/DataCleansing/cleansing.model";
55
import { CategoryI } from "@/pages/OperatorMarket/operator.model";
6+
import { Layers } from "lucide-react";
67

78
interface OperatorListProps {
89
operators: OperatorI[];
@@ -150,13 +151,14 @@ const OperatorLibrary: React.FC<OperatorLibraryProps> = ({
150151
return (
151152
<div className="w-1/4 h-screen flex flex-col">
152153
<div className="pb-4 border-b border-gray-200">
153-
<span className="font-semibold text-base">
154+
<span className="flex items-center font-semibold text-base">
155+
<Layers className="w-4 h-4 mr-2" />
154156
算子库({operatorList.length})
155157
</span>
156158
</div>
157159
<div className="flex flex-col h-full pt-4 pr-4 overflow-hidden">
158160
{/* 过滤器 */}
159-
<div className="flex gap-2 border-b border-gray-100">
161+
<div className="flex gap-2 border-b border-gray-100 pb-4">
160162
<Input
161163
prefix={<SearchOutlined />}
162164
placeholder="搜索算子..."

frontend/src/pages/DataCleansing/Create/components/OperatorOrchestration.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import React, { useState } from "react";
22
import { Card, Input, Tag, Select, Button } from "antd";
3-
import {
4-
SettingOutlined,
5-
DeleteOutlined,
6-
ShareAltOutlined,
7-
} from "@ant-design/icons";
3+
import { DeleteOutlined } from "@ant-design/icons";
84
import { CleansingTemplate, OperatorI } from "../../cleansing.model";
5+
import { Workflow } from "lucide-react";
96

107
interface OperatorFlowProps {
118
selectedOperators: OperatorI[];
@@ -78,7 +75,7 @@ const OperatorFlow: React.FC<OperatorFlowProps> = ({
7875
<div className="px-4 pb-2 border-b border-gray-200">
7976
<div className="flex justify-between items-start">
8077
<span className="font-semibold text-base flex items-center gap-2">
81-
<SettingOutlined />
78+
<Workflow className="w-5 h-5" />
8279
算子编排({selectedOperators.length}){" "}
8380
<Button
8481
type="link"
@@ -114,7 +111,7 @@ const OperatorFlow: React.FC<OperatorFlowProps> = ({
114111
>
115112
{selectedOperators.length === 0 && (
116113
<div className="text-center py-16 text-gray-400 border-2 border-dashed border-gray-100 rounded-lg">
117-
<ShareAltOutlined className="text-5xl mb-4 opacity-50" />
114+
<Workflow className="text-5xl mb-4 opacity-50" />
118115
<div className="text-lg font-medium mb-2">开始构建您的算子流程</div>
119116
<div className="text-sm">
120117
从左侧算子库拖拽算子到此处,或点击算子添加

frontend/src/pages/DataCleansing/Home/components/TaskList.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ export default function TaskList() {
3131
const { message } = App.useApp();
3232
const [viewMode, setViewMode] = useState<"card" | "list">("list");
3333
const filterOptions = [
34-
{
35-
key: "type",
36-
label: "类型",
37-
options: [
38-
{ label: "所有类型", value: "all" },
39-
...Object.values(templateTypesMap),
40-
],
41-
},
4234
{
4335
key: "status",
4436
label: "状态",

frontend/src/pages/DataManagement/Home/DataManagement.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default function DatasetManagementPage() {
122122
const handleDeleteDataset = async (id: number) => {
123123
if (!id) return;
124124
await deleteDatasetByIdUsingDelete(id);
125-
125+
fetchData();
126126
message.success("数据删除成功");
127127
};
128128

@@ -273,17 +273,6 @@ export default function DatasetManagementPage() {
273273

274274
{/* Statistics */}
275275
<div className="grid grid-cols-1 mt-4">
276-
{/* <Card title="数据集统计">
277-
<div className="grid grid-cols-4">
278-
{statisticsData.count?.map?.((item) => (
279-
<Statistic
280-
key={item.title}
281-
title={item.title}
282-
value={item.value}
283-
/>
284-
))}
285-
</div>
286-
</Card> */}
287276
<Card>
288277
<div className="grid grid-cols-4">
289278
{statisticsData.size?.map?.((item) => (

0 commit comments

Comments
 (0)