From d144a97b6d01641615625741c08f575a6832b2cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A6=82=E5=A8=81?= Date: Tue, 23 Sep 2025 16:37:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=8A=B6=E6=80=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/Client/index.jsx | 1 - frontend/src/pages/Flow/Detail.jsx | 22 +++++++++------------- frontend/src/pages/Flow/index.jsx | 12 +++++------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/frontend/src/pages/Client/index.jsx b/frontend/src/pages/Client/index.jsx index 8526c55..1f1edc7 100644 --- a/frontend/src/pages/Client/index.jsx +++ b/frontend/src/pages/Client/index.jsx @@ -48,7 +48,6 @@ const ClientPage = () => { await onDelete(record)}> - ] } diff --git a/frontend/src/pages/Flow/Detail.jsx b/frontend/src/pages/Flow/Detail.jsx index b90f385..f85a428 100644 --- a/frontend/src/pages/Flow/Detail.jsx +++ b/frontend/src/pages/Flow/Detail.jsx @@ -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; diff --git a/frontend/src/pages/Flow/index.jsx b/frontend/src/pages/Flow/index.jsx index 300183e..df39d7a 100644 --- a/frontend/src/pages/Flow/index.jsx +++ b/frontend/src/pages/Flow/index.jsx @@ -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' } } }, {