feat: 状态调整
This commit is contained in:
parent
94db0b4d2a
commit
d144a97b6d
|
|
@ -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>
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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' }
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue