feat: 支持研究素材删除并统一 Semi 表格
This commit is contained in:
@@ -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 ? "新建自动研究" : "研究运行详情"}
|
||||
|
||||
Reference in New Issue
Block a user