From 142b0f7203068db918521e07b5f523d2ad4b40c6 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 23 May 2024 22:43:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BF=E9=92=89=E9=92=89=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8-=20=E5=AE=A1=E6=89=B9=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E8=B6=85=E6=97=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/NodeHandler.vue | 4 + .../SimpleProcessDesignerV2/src/consts.ts | 33 +++ .../src/nodes-config/UserTaskNodeConfig.vue | 225 +++++++++++++++--- .../src/nodes/CopyTaskNode.vue | 1 - .../src/nodes/UserTaskNode.vue | 1 - 5 files changed, 227 insertions(+), 37 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue index ebe70c3b..d13b7365 100644 --- a/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue +++ b/src/components/SimpleProcessDesignerV2/src/NodeHandler.vue @@ -68,6 +68,10 @@ const addNode = (type: number) => { candidateStrategy: CandidateStrategy.USER, candidateParam: undefined, fieldsPermission: undefined, + // 超时处理 + timeoutHandler: { + enable: false + } }, childNode: props.childNode } diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index befcc32e..32a9b658 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -46,6 +46,21 @@ export enum NodeType { */ INCLUSIVE_NODE_JOIN = 8 } +// 时间单位枚举 +export enum TimeUnitType { + /** + * 分钟 + */ + MINUTE = 1, + /** + * 小时 + */ + HOUR = 2, + /** + * 天 + */ + DAY = 3 +} // 条件配置类型 ( 用于条件节点配置 ) export enum ConditionConfigType { @@ -171,6 +186,11 @@ NODE_DEFAULT_NAME.set(NodeType.USER_TASK_NODE, '审批人') NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人') NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件') +export const TIME_UNIT_MAP = new Map() +NODE_DEFAULT_NAME.set(1, 'M') +NODE_DEFAULT_NAME.set(NodeType.COPY_TASK_NODE, '抄送人') +NODE_DEFAULT_NAME.set(NodeType.CONDITION_NODE, '条件') + export const APPROVE_METHODS: DictDataVO [] = [ { label: '单人审批', value: 1 }, @@ -184,6 +204,19 @@ export const CONDITION_CONFIG_TYPES: DictDataVO [] = [ { label: '条件规则', value: 2 } ] +// 时间单位类型 +export const TIME_UNIT_TYPES: DictDataVO [] = [ + { label: '分钟', value: TimeUnitType.MINUTE }, + { label: '小时', value: TimeUnitType.HOUR }, + { label: '天', value: TimeUnitType.DAY }, +] +// 超时处理执行动作类型 +export const TIMEOUT_HANDLER_ACTION_TYPES: DictDataVO [] = [ + { label: '自动提醒', value: 1 }, + { label: '自动同意', value: 2 }, + { label: '自动拒绝', value: 3 }, +] + // 比较运算符 export const COMPARISON_OPERATORS : DictDataVO = [ { diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue index cabd6a88..49d22874 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/UserTaskNodeConfig.vue @@ -17,9 +17,12 @@ v-mountedFocus v-model="currentNode.name" :placeholder="currentNode.name" - /> -
{{ currentNode.name }}
- + /> +
{{ currentNode.name }} +
+
@@ -149,7 +152,10 @@ {{ item.label }} @@ -157,16 +163,79 @@ + + + + + + + + + + + 当超过 + + + + + 未处理 + + + + - +
字段权限
-
- 字段名称 -
+
字段名称
可编辑 只读 @@ -205,7 +274,17 @@ - + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue b/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue index 411e7bfa..ca9ff0ea 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes/CopyTaskNode.vue @@ -34,7 +34,6 @@
-
-