Skip to content

Commit d9019c1

Browse files
committedFeb 24, 2025
【代码评审】BPM:触发器 HTTP 异步
1 parent 32f2d40 commit d9019c1

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed
 

‎src/components/SimpleProcessDesignerV2/src/consts.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ export enum TriggerTypeEnum {
756756
* 发送 HTTP 请求触发器
757757
*/
758758
HTTP_REQUEST = 1,
759+
// TODO @jason:要不把 FORM_UPDATE、FORM_DELETE 调整从 10、11 这样?
759760
/**
760761
* 表单数据更新触发器
761762
*/
@@ -764,6 +765,7 @@ export enum TriggerTypeEnum {
764765
* 表单数据删除触发器
765766
*/
766767
FORM_DELETE = 3,
768+
// TODO @jason:1)HTTP_REQUEST_ASYNC 这个枚举值?;2)枚举值改成 2?;3)【有点纠结,微信讨论】异步是里面加个属性 async 属性,还是作为单独的枚举值。
767769
/**
768770
* 发起异步 HTTP 请求
769771
*/
@@ -795,7 +797,7 @@ export type FormTriggerSetting = {
795797
// 条件组
796798
conditionGroups?: ConditionGroup
797799
// 更新表单字段配置
798-
updateFormFields?: Record<string, any>,
800+
updateFormFields?: Record<string, any>
799801
// 删除表单字段配置
800802
deleteFields?: string[]
801803
}
@@ -813,11 +815,11 @@ export const TRIGGER_TYPES: DictDataVO[] = [
813815
export type ChildProcessSetting = {
814816
calledProcessDefinitionKey: string
815817
calledProcessDefinitionName: string
816-
async: boolean,
817-
inVariables?: IOParameter[],
818-
outVariables?: IOParameter[],
819-
skipStartUserNode: boolean,
820-
startUserSetting: StartUserSetting,
818+
async: boolean
819+
inVariables?: IOParameter[]
820+
outVariables?: IOParameter[]
821+
skipStartUserNode: boolean
822+
startUserSetting: StartUserSetting
821823
}
822824

823825
export type IOParameter = {

‎src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
</el-select>
3737
</el-form-item>
3838
<!-- HTTP 请求触发器 -->
39+
<!-- TODO @jason:可以考虑用 [].include 更简洁 -->
3940
<div
4041
v-if="
4142
(configForm.type === TriggerTypeEnum.HTTP_REQUEST ||
@@ -404,11 +405,12 @@ const changeTriggerType = () => {
404405
}
405406
configForm.value.formSettings = undefined
406407
return
407-
}
408-
408+
}
409+
409410
if (configForm.value.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST) {
410411
configForm.value.httpRequestSetting =
411-
originalSetting?.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST && originalSetting.httpRequestSetting
412+
originalSetting?.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST &&
413+
originalSetting.httpRequestSetting
412414
? originalSetting.httpRequestSetting
413415
: {
414416
url: '',

0 commit comments

Comments
 (0)
Please sign in to comment.