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)}>
|
<Popconfirm key='3' title="是否删除节点?" okText="删除" cancelText="取消" onConfirm={async () => await onDelete(record)}>
|
||||||
<Button type="link" danger style={{ padding: '0 0', border: 'none' }}>删除</Button>
|
<Button type="link" danger style={{ padding: '0 0', border: 'none' }}>删除</Button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,21 +81,17 @@ const FlowDetail = () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
controlRef?.current?.updateNode(id);
|
controlRef?.current?.updateNode(id);
|
||||||
setNodes(temp);
|
|
||||||
}
|
}
|
||||||
const onAdd = (type) => {
|
const onAdd = (type) => {
|
||||||
setNodes([
|
controlRef?.current?.addNodes({
|
||||||
...nodes,
|
|
||||||
{
|
|
||||||
id: 'temp_' + new Date().getTime() + '_' + nodes.length,
|
id: 'temp_' + new Date().getTime() + '_' + nodes.length,
|
||||||
position: { x: nodes.length * 5, y: 0 },
|
position: { x: nodes.length * 5, y: 0 },
|
||||||
data: { label: type, style: { backgroundColor: COLORS[type] }, position: POSITION[type] },
|
data: { label: type, style: { backgroundColor: COLORS[type] }, position: POSITION[type] },
|
||||||
sourcePosition: 'right',
|
sourcePosition: 'right',
|
||||||
targetPosition: 'left',
|
targetPosition: 'left',
|
||||||
type: type,
|
type: type,
|
||||||
detail: { title: type}
|
detail: { title: type }
|
||||||
},
|
})
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
const onNodeClick = (_, record) => {
|
const onNodeClick = (_, record) => {
|
||||||
if (record?.type === 'first') return;
|
if (record?.type === 'first') return;
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,11 @@ export default () => {
|
||||||
dataIndex: 'last_status',
|
dataIndex: 'last_status',
|
||||||
title: '最后执行结果',
|
title: '最后执行结果',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
fieldProps: {
|
valueEnum: {
|
||||||
options: [
|
'RUNNING': { text: "执行中", status: 'processing' },
|
||||||
{ value: 'RUNNING', "label": "执行中" },
|
'SUCCESS': { text: "成功", status: 'success' },
|
||||||
{ value: 'SUCCESS', "label": "成功" },
|
'FAILED': { text: "失败", status: 'error' },
|
||||||
{ value: 'FAILED', "label": "失败" },
|
'CANCELLED': { text: "取消", status: 'default' }
|
||||||
{ value: 'CANCELLED', "label": "取消" }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue