From 9cea95a9d070df25bc2447e578b16904c81b133f Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 29 Jun 2025 23:09:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[BPM=20=E5=B7=A5=E4=BD=9C=E6=B5=81]=20?= =?UTF-8?q?=E5=AD=90=E6=B5=81=E7=A8=8B=E8=8A=82=E7=82=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child-process-node-config.vue | 825 ++++++++++++++++++ .../nodes-config/user-task-node-config.vue | 2 +- .../components/nodes/child-process-node.vue | 29 +- .../simple-process-design/consts.ts | 2 +- 4 files changed, 842 insertions(+), 16 deletions(-) create mode 100644 apps/web-antd/src/components/simple-process-design/components/nodes-config/child-process-node-config.vue diff --git a/apps/web-antd/src/components/simple-process-design/components/nodes-config/child-process-node-config.vue b/apps/web-antd/src/components/simple-process-design/components/nodes-config/child-process-node-config.vue new file mode 100644 index 000000000..4b48dd3d8 --- /dev/null +++ b/apps/web-antd/src/components/simple-process-design/components/nodes-config/child-process-node-config.vue @@ -0,0 +1,825 @@ + + + + + + + + + {{ nodeName }} + + + + + + + + + + + + + + {{ item.name }} + + + + + + + + + + + + + {{ field.title }} + + + + + + + + + {{ field.title }} + + + + + + + + + + + + + 添加一行 + + + + + + + + + {{ field.title }} + + + + + + + + + {{ field.title }} + + + + + + + + + + + + + 添加一行 + + + + + + {{ item.label }} + + + + + + + {{ field.title }} + + + + + + + {{ item.label }} + + + + + + 超时设置 + + + + + + + + {{ item.label }} + + + + + + + 当超过 + + + + + + + + + + {{ item.label }} + + + + + 后进入下一节点 + + + + + + + + + + + 后进入下一节点 + + + + + + + + + + + + + + diff --git a/apps/web-antd/src/components/simple-process-design/components/nodes-config/user-task-node-config.vue b/apps/web-antd/src/components/simple-process-design/components/nodes-config/user-task-node-config.vue index 03e2aea7d..66e6ed5ad 100644 --- a/apps/web-antd/src/components/simple-process-design/components/nodes-config/user-task-node-config.vue +++ b/apps/web-antd/src/components/simple-process-design/components/nodes-config/user-task-node-config.vue @@ -601,7 +601,7 @@ onMounted(() => { }); - + import type { SimpleFlowNode } from '../../consts'; -import { inject } from 'vue'; +import { inject, ref } from 'vue'; import { IconifyIcon } from '@vben/icons'; @@ -11,7 +11,7 @@ import { BpmNodeTypeEnum } from '#/utils'; import { NODE_DEFAULT_TEXT } from '../../consts'; import { useNodeName2, useTaskStatusClass, useWatchNode } from '../../helpers'; -// import ChildProcessNodeConfig from '../nodes-config/child-process-node-config.vue'; +import ChildProcessNodeConfig from '../nodes-config/child-process-node-config.vue'; import NodeHandler from './node-handler.vue'; defineOptions({ name: 'ChildProcessNode' }); @@ -20,7 +20,7 @@ const props = defineProps<{ flowNode: SimpleFlowNode; }>(); -// 定义事件,更新父组件。 +/** 定义事件,更新父组件。 */ const emits = defineEmits<{ 'update:flowNode': [node: SimpleFlowNode | undefined]; }>(); @@ -28,26 +28,27 @@ const emits = defineEmits<{ // 是否只读 const readonly = inject('readonly'); -// 监控节点的变化 +/** 监控节点的变化 */ const currentNode = useWatchNode(props); -// 节点名称编辑 +/** 节点名称编辑 */ const { showInput, changeNodeName, clickTitle, inputRef } = useNodeName2( currentNode, BpmNodeTypeEnum.CHILD_PROCESS_NODE, ); -// 打开节点配置 +// 节点配置 Ref +const nodeConfigRef = ref(); + +/** 打开节点配置 */ const openNodeConfig = () => { if (readonly) { - console.warn('TODO: 打开节点配置'); + return; } - // 暂时注释掉,因为child-process-node-config.vue文件不存在 - // nodeSetting.value.showChildProcessNodeConfig(currentNode.value); - // nodeSetting.value.openDrawer(); + nodeConfigRef.value.showChildProcessNodeConfig(currentNode.value); }; -// 删除节点。更新当前节点为孩子节点 +/** 删除节点。更新当前节点为孩子节点 */ const deleteNode = () => { emits('update:flowNode', currentNode.value.childNode); }; @@ -118,11 +119,11 @@ const deleteNode = () => { :current-node="currentNode" /> - + /> diff --git a/apps/web-antd/src/components/simple-process-design/consts.ts b/apps/web-antd/src/components/simple-process-design/consts.ts index fa2da26a2..cced73c1e 100644 --- a/apps/web-antd/src/components/simple-process-design/consts.ts +++ b/apps/web-antd/src/components/simple-process-design/consts.ts @@ -852,7 +852,7 @@ export const CHILD_PROCESS_START_USER_TYPE = [ label: '同主流程发起人', value: ChildProcessStartUserTypeEnum.MAIN_PROCESS_START_USER, }, - { label: '表单', value: ChildProcessStartUserTypeEnum.FROM_FORM }, + { label: '从表单中获取', value: ChildProcessStartUserTypeEnum.FROM_FORM }, ]; export const CHILD_PROCESS_START_USER_EMPTY_TYPE = [