This commit is contained in:
dengqichen 2024-12-17 16:59:41 +08:00
parent b3241f51fb
commit df3f6017f2
2 changed files with 16 additions and 12 deletions

View File

@ -183,6 +183,8 @@ const WorkflowDefinitionList: React.FC = () => {
{
title: '操作',
key: 'action',
fixed: 'right',
width: 200,
render: (_: any, record: WorkflowDefinition) => (
<Space size="middle">
{record.status === 'DRAFT' && (
@ -212,21 +214,20 @@ const WorkflowDefinitionList: React.FC = () => {
}
>
<Table
loading={loading}
dataSource={pageData?.content}
columns={columns}
dataSource={pageData?.content}
loading={loading}
rowKey="id"
scroll={{ x: 1300 }}
pagination={{
total: pageData?.totalElements,
current: (query.pageNum || 0) + 1,
pageSize: query.pageSize,
current: query.pageNum + 1,
onChange: (page, pageSize) => {
setQuery({
total: pageData?.totalElements || 0,
onChange: (page, pageSize) => setQuery({
...query,
pageNum: page - 1,
pageSize
});
}
}),
}}
/>
<EditModal

View File

@ -61,7 +61,7 @@ const WorkflowInstanceList: React.FC = () => {
render: (status: string) => {
if (!status) return '暂无';
const statusMap: Record<string, { color: string; text: string }> = {
TERMINATED: { color: 'red', text: '终止' },
TERMINATED: { color: 'red', text: '终止' },
COMPLETED: { color: 'green', text: '已完成' },
RUNNING: { color: 'blue', text: '运行中' },
};
@ -72,6 +72,8 @@ const WorkflowInstanceList: React.FC = () => {
{
title: '操作',
key: 'action',
fixed: 'right',
width: 120,
render: (_, record) => (
<Space size="middle">
<a onClick={() => handleViewDetail(record)}></a>
@ -98,6 +100,7 @@ const WorkflowInstanceList: React.FC = () => {
dataSource={data}
loading={loading}
rowKey="id"
scroll={{ x: 1200 }}
locale={{
emptyText: <Empty description="暂无数据" />
}}