From 7652c412202d844bf34b302f696d37acf23bb334 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Thu, 27 Feb 2025 09:05:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=91=E8=A7=A6=E5=8F=91=E5=99=A8=20?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=20Http=20=E6=94=B9=E6=88=90=20Http=20?= =?UTF-8?q?=E5=9B=9E=E8=B0=83?= 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 | 10 ++++------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index c7285f93..2b6ebce4 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -756,20 +756,19 @@ export enum TriggerTypeEnum { * 发送 HTTP 请求触发器 */ HTTP_REQUEST = 1, - // TODO @jason:要不把 FORM_UPDATE、FORM_DELETE 调整从 10、11 这样? + /** + * 发起 HTTP 回调请求触发器 + */ + HTTP_CALLBACK = 2, /** * 表单数据更新触发器 */ - FORM_UPDATE = 2, + FORM_UPDATE = 10, /** * 表单数据删除触发器 */ - FORM_DELETE = 3, - // TODO @jason:1)HTTP_CALLBACK 这个枚举值?然后,相关注释,朝着“HTTP 回调”走;2)枚举值改成 2? - /** - * 发起异步 HTTP 请求 - */ - ASYNC_HTTP_REQUEST = 4 + FORM_DELETE = 11 + } /** @@ -804,7 +803,7 @@ export type FormTriggerSetting = { export const TRIGGER_TYPES: DictDataVO[] = [ { label: 'HTTP 请求', value: TriggerTypeEnum.HTTP_REQUEST }, - { label: '异步 HTTP 请求', value: TriggerTypeEnum.ASYNC_HTTP_REQUEST }, + { label: 'HTTP 回调', value: TriggerTypeEnum.HTTP_CALLBACK }, { 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 29e9eea0..135fd93d 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue @@ -36,11 +36,9 @@ -
@@ -407,9 +405,9 @@ const changeTriggerType = () => { return } - if (configForm.value.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST) { + if (configForm.value.type === TriggerTypeEnum.HTTP_CALLBACK) { configForm.value.httpRequestSetting = - originalSetting?.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST && + originalSetting?.type === TriggerTypeEnum.HTTP_CALLBACK && originalSetting.httpRequestSetting ? originalSetting.httpRequestSetting : { @@ -566,7 +564,7 @@ const getShowText = (): string => { let showText = '' if ( configForm.value.type === TriggerTypeEnum.HTTP_REQUEST || - configForm.value.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST + configForm.value.type === TriggerTypeEnum.HTTP_CALLBACK ) { showText = `${configForm.value.httpRequestSetting?.url}` } else if (configForm.value.type === TriggerTypeEnum.FORM_UPDATE) {