You've already forked DataMate
fix: 配比任务能够跳转到目标数据集 (#59)
* fix:配比任务需要能够跳转到目标数据集 * feature:增加配比任务详情接口 * fix:删除不存在的配比详情页面
This commit is contained in:
@@ -60,6 +60,9 @@ export default function RatioTasksPage() {
|
||||
title: "任务名称",
|
||||
dataIndex: "name",
|
||||
key: "name",
|
||||
render: (text: string, record: RatioTaskItem) => (
|
||||
<a onClick={() => navigate(`/data/synthesis/ratio-task/detail/${record.id}`)}>{text}</a>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
@@ -81,6 +84,9 @@ export default function RatioTasksPage() {
|
||||
title: "目标数据集",
|
||||
dataIndex: "target_dataset_name",
|
||||
key: "target_dataset_name",
|
||||
render: (text: string, task: RatioTaskItem) => (
|
||||
<a onClick={() => navigate(`/data/management/detail/${task.target_dataset_id}`)}>{text}</a>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
@@ -173,6 +179,17 @@ export default function RatioTasksPage() {
|
||||
label: "目标数量",
|
||||
value: (task.totals ?? 0).toLocaleString(),
|
||||
},
|
||||
{
|
||||
label: "目标数据集",
|
||||
value: task.target_dataset_name ? (
|
||||
<a onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(`/data/management/detail/${task.target_dataset_id}`);
|
||||
}}>
|
||||
{task.target_dataset_name}
|
||||
</a>
|
||||
) : '无',
|
||||
},
|
||||
{
|
||||
label: "创建时间",
|
||||
value: task.created_at || "-",
|
||||
@@ -182,6 +199,7 @@ export default function RatioTasksPage() {
|
||||
}))}
|
||||
pagination={pagination}
|
||||
operations={operations}
|
||||
onView={(task) => {navigate(`/data/synthesis/ratio-task/detail/${task.id}`)}}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@ export function queryRatioTasksUsingGet(params?: any) {
|
||||
return get("/api/synthesis/ratio-task", params);
|
||||
}
|
||||
|
||||
// 查询配比任务详情
|
||||
export function getRatioTaskByIdUsingGet(id: string) {
|
||||
return get(`/api/synthesis/ratio-task/${id}`);
|
||||
}
|
||||
|
||||
// 创建配比任务
|
||||
export function createRatioTaskUsingPost(data: any) {
|
||||
return post("/api/synthesis/ratio-task", data);
|
||||
|
||||
@@ -77,6 +77,7 @@ export interface RatioTaskItem {
|
||||
ratio_method?: RatioMethod
|
||||
target_dataset_id?: string
|
||||
target_dataset_name?: string
|
||||
config: RatioConfigItem[]
|
||||
created_at?: string
|
||||
updated_at?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user