feat: 支持研究素材删除并统一 Semi 表格

This commit is contained in:
yuxuanhui
2026-09-11 23:21:08 +08:00
parent f29063c9a2
commit 8eec12f0e0
26 changed files with 1008 additions and 562 deletions
+40 -28
View File
@@ -1,6 +1,6 @@
import { ResearchList, ResearchDetail } from "./ResearchList";
import { useEffect, useState } from "react";
import { Banner, Button, Pagination } from "@douyinfe/semi-ui-19";
import { Banner, Button, Pagination, Table } from "@douyinfe/semi-ui-19";
import { api, formatTime } from "../api";
import type { PageContext, UIAction } from "../ai/types";
import { FlowLaunchForm } from "./FlowLaunchForm";
@@ -99,33 +99,45 @@ export function PipelinePage({
</>
}
>
<table className="research-table">
<thead>
<tr>
<th>研究名称</th>
<th>状态</th>
<th>轮次</th>
<th>创建时间</th>
</tr>
</thead>
<tbody>
{items.map((item) => (
<tr key={item.id}>
<td>
<Button theme="borderless" onClick={() => select(item.id)}>
{item.name}
</Button>
</td>
<td>{flowStatus[item.status]}</td>
<td>{item.round}</td>
<td>{formatTime(item.created_at)}</td>
</tr>
))}
</tbody>
</table>
{!items.length && (
<p className="research-list-empty">暂无研究运行,请新建自动研究。</p>
)}
<Table<FlowRun>
className="research-table"
dataSource={items}
rowKey="id"
pagination={false}
size="small"
sticky
style={{ minWidth: 640 }}
empty="暂无研究运行,请新建自动研究。"
columns={[
{
title: "研究名称",
key: "name",
render: (_, item) => (
<Button theme="borderless" onClick={() => select(item.id)}>
{item.name}
</Button>
),
},
{
title: "状态",
key: "status",
width: 140,
render: (_, item) => flowStatus[item.status],
},
{
title: "轮次",
key: "round",
width: 80,
render: (_, item) => item.round,
},
{
title: "创建时间",
key: "created_at",
width: 190,
render: (_, item) => formatTime(item.created_at),
},
]}
/>
</ResearchList>
<ResearchDetail
title={creating ? "新建自动研究" : "研究运行详情"}