From bfe43369ef09c62613b893e5a8deded0010cad45 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Fri, 21 Feb 2025 22:46:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=91=20=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=95=B0=E6=8D=AE=E8=A7=A6=E5=8F=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimpleProcessDesignerV2/src/consts.ts | 17 +- .../src/nodes-config/TriggerNodeConfig.vue | 156 ++++++++++++++++-- .../components/ConditionDialog.vue | 3 +- 3 files changed, 158 insertions(+), 18 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index 7270b104..303db1ec 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -748,9 +748,13 @@ export enum TriggerTypeEnum { */ HTTP_REQUEST = 1, /** - * 流程表单更新触发器 + * 表单数据更新触发器 */ - FORM_UPDATE = 2 + FORM_UPDATE = 2, + /** + * 表单数据删除触发器 + */ + FORM_DELETE = 3 } /** @@ -777,11 +781,14 @@ export type FormTriggerSetting = { conditionExpression?: string // 条件组 conditionGroups?: ConditionGroup - // 更新表单字段 - updateFormFields?: Record + // 更新表单字段配置 + updateFormFields?: Record, + // 删除表单字段配置 + deleteFields?: string[] } export const TRIGGER_TYPES: DictDataVO[] = [ { label: 'HTTP 请求', value: TriggerTypeEnum.HTTP_REQUEST }, - { label: '修改表单数据', value: TriggerTypeEnum.FORM_UPDATE } + { label: '修改表单数据', value: TriggerTypeEnum.FORM_UPDATE }, + { label: '删除表单数据', value: TriggerTypeEnum.FORM_DELETE } ] diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue index b2e2e330..01c611a4 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue @@ -26,7 +26,7 @@
- +
+
@@ -150,8 +151,8 @@ type="success" effect="light" closable - @close="deleteFormUpdateCondition(formSetting)" - @click="openFormUpdateCondition(index, formSetting)" + @close="deleteFormSettingCondition(formSetting)" + @click="openFormSettingCondition(index, formSetting)" > {{ showConditionText(formSetting) }} @@ -160,7 +161,7 @@ v-else type="primary" text - @click="addFormUpdateCondition(index, formSetting)" + @click="addFormSettingCondition(index, formSetting)" > 添加条件 @@ -231,6 +232,76 @@ 添加设置
+ + +
+
+ + + + + +
+ + {{ showConditionText(formSetting) }} + +
+ + 添加条件 + + + 删除表单字段设置 + +
+ + + +
+
+
+ + + + 添加设置 + +