feat: 状态调整

This commit is contained in:
李如威 2025-09-23 16:37:06 +08:00
parent 94db0b4d2a
commit d144a97b6d
3 changed files with 14 additions and 21 deletions

View File

@ -48,7 +48,6 @@ const ClientPage = () => {
<Popconfirm key='3' title="是否删除节点?" okText="删除" cancelText="取消" onConfirm={async () => await onDelete(record)}>
<Button type="link" danger style={{ padding: '0 0', border: 'none' }}>删除</Button>
</Popconfirm>
]
}

View File

@ -81,21 +81,17 @@ const FlowDetail = () => {
}
})
controlRef?.current?.updateNode(id);
setNodes(temp);
}
const onAdd = (type) => {
setNodes([
...nodes,
{
id: 'temp_' + new Date().getTime() + '_' + nodes.length,
position: { x: nodes.length * 5, y: 0 },
data: { label: type, style: { backgroundColor: COLORS[type] }, position: POSITION[type] },
sourcePosition: 'right',
targetPosition: 'left',
type: type,
detail: { title: type}
},
]);
controlRef?.current?.addNodes({
id: 'temp_' + new Date().getTime() + '_' + nodes.length,
position: { x: nodes.length * 5, y: 0 },
data: { label: type, style: { backgroundColor: COLORS[type] }, position: POSITION[type] },
sourcePosition: 'right',
targetPosition: 'left',
type: type,
detail: { title: type }
})
}
const onNodeClick = (_, record) => {
if (record?.type === 'first') return;

View File

@ -89,13 +89,11 @@ export default () => {
dataIndex: 'last_status',
title: '最后执行结果',
valueType: 'select',
fieldProps: {
options: [
{ value: 'RUNNING', "label": "执行中" },
{ value: 'SUCCESS', "label": "成功" },
{ value: 'FAILED', "label": "失败" },
{ value: 'CANCELLED', "label": "取消" }
]
valueEnum: {
'RUNNING': { text: "执行中", status: 'processing' },
'SUCCESS': { text: "成功", status: 'success' },
'FAILED': { text: "失败", status: 'error' },
'CANCELLED': { text: "取消", status: 'default' }
}
},
{