From 8ebaf5de8e7cef89c04b72ff71689af0273a9fd2 Mon Sep 17 00:00:00 2001 From: v-zhangjc9 Date: Thu, 3 Jul 2025 19:18:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E4=BC=98=E5=8C=96=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=BB=BB=E5=8A=A1=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/pages/ai/flow/FlowEditor.tsx | 3 +++ .../ai/task/template/FlowTaskTemplate.tsx | 19 +++++++++++++++++++ service-web/client/src/route.tsx | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/service-web/client/src/pages/ai/flow/FlowEditor.tsx b/service-web/client/src/pages/ai/flow/FlowEditor.tsx index aac9161..c8cd1f2 100644 --- a/service-web/client/src/pages/ai/flow/FlowEditor.tsx +++ b/service-web/client/src/pages/ai/flow/FlowEditor.tsx @@ -55,6 +55,9 @@ const FlowableDiv = styled.div` } ` +export type FlowEditorProps = { +} + function FlowEditor() { const [messageApi, contextHolder] = message.useMessage() const [nodeDef] = useState<{ diff --git a/service-web/client/src/pages/ai/task/template/FlowTaskTemplate.tsx b/service-web/client/src/pages/ai/task/template/FlowTaskTemplate.tsx index 98468ad..a1cb014 100644 --- a/service-web/client/src/pages/ai/task/template/FlowTaskTemplate.tsx +++ b/service-web/client/src/pages/ai/task/template/FlowTaskTemplate.tsx @@ -85,6 +85,25 @@ const FlowTaskTemplate: React.FC = () => { }, }, }, + { + type: 'action', + label: '编辑流程', + level: 'link', + size: 'sm', + onEvent: { + click: { + actions: [ + { + actionType: 'custom', + // @ts-ignore + script: (context, doAction, event) => { + navigate(`/ai/flow_task_template/edit/${context.props.data['id']}`) + }, + }, + ], + }, + }, + }, { type: 'action', label: '删除', diff --git a/service-web/client/src/route.tsx b/service-web/client/src/route.tsx index 53079d4..249b412 100644 --- a/service-web/client/src/route.tsx +++ b/service-web/client/src/route.tsx @@ -255,7 +255,7 @@ export const menus = { }, { path: '/ai/flow_task_template', - name: '任务模板', + name: '流程模板', icon: , }, ]