File tree Expand file tree Collapse file tree 2 files changed +12
-15
lines changed
src/components/SimpleProcessDesignerV2/src Expand file tree Collapse file tree 2 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -756,20 +756,19 @@ export enum TriggerTypeEnum {
756
756
* 发送 HTTP 请求触发器
757
757
*/
758
758
HTTP_REQUEST = 1 ,
759
- // TODO @jason :要不把 FORM_UPDATE、FORM_DELETE 调整从 10、11 这样?
760
759
/**
761
- * 表单数据更新触发器
760
+ * 发起 HTTP 回调请求触发器
762
761
*/
763
- FORM_UPDATE = 2 ,
762
+ HTTP_CALLBACK = 2 ,
764
763
/**
765
- * 表单数据删除触发器
764
+ * 表单数据更新触发器
766
765
*/
767
- FORM_DELETE = 3 ,
768
- // TODO @jason :1)HTTP_CALLBACK 这个枚举值?然后,相关注释,朝着“HTTP 回调”走;2)枚举值改成 2?
766
+ FORM_UPDATE = 10 ,
769
767
/**
770
- * 发起异步 HTTP 请求
768
+ * 表单数据删除触发器
771
769
*/
772
- ASYNC_HTTP_REQUEST = 4
770
+ FORM_DELETE = 11
771
+
773
772
}
774
773
775
774
/**
@@ -804,7 +803,7 @@ export type FormTriggerSetting = {
804
803
805
804
export const TRIGGER_TYPES : DictDataVO [ ] = [
806
805
{ label : 'HTTP 请求' , value : TriggerTypeEnum . HTTP_REQUEST } ,
807
- { label : '异步 HTTP 请求 ' , value : TriggerTypeEnum . ASYNC_HTTP_REQUEST } ,
806
+ { label : 'HTTP 回调 ' , value : TriggerTypeEnum . HTTP_CALLBACK } ,
808
807
{ label : '修改表单数据' , value : TriggerTypeEnum . FORM_UPDATE } ,
809
808
{ label : '删除表单数据' , value : TriggerTypeEnum . FORM_DELETE }
810
809
]
Original file line number Diff line number Diff line change 36
36
</el-select >
37
37
</el-form-item >
38
38
<!-- HTTP 请求触发器 -->
39
- <!-- TODO @jason:可以考虑用 [].include 更简洁 -->
40
39
<div
41
40
v-if ="
42
- (configForm.type === TriggerTypeEnum.HTTP_REQUEST ||
43
- configForm.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST) &&
41
+ [TriggerTypeEnum.HTTP_REQUEST, TriggerTypeEnum.HTTP_CALLBACK].includes(configForm.type) &&
44
42
configForm.httpRequestSetting
45
43
"
46
44
>
@@ -407,9 +405,9 @@ const changeTriggerType = () => {
407
405
return
408
406
}
409
407
410
- if (configForm .value .type === TriggerTypeEnum .ASYNC_HTTP_REQUEST ) {
408
+ if (configForm .value .type === TriggerTypeEnum .HTTP_CALLBACK ) {
411
409
configForm .value .httpRequestSetting =
412
- originalSetting ?.type === TriggerTypeEnum .ASYNC_HTTP_REQUEST &&
410
+ originalSetting ?.type === TriggerTypeEnum .HTTP_CALLBACK &&
413
411
originalSetting .httpRequestSetting
414
412
? originalSetting .httpRequestSetting
415
413
: {
@@ -566,7 +564,7 @@ const getShowText = (): string => {
566
564
let showText = ' '
567
565
if (
568
566
configForm .value .type === TriggerTypeEnum .HTTP_REQUEST ||
569
- configForm .value .type === TriggerTypeEnum .ASYNC_HTTP_REQUEST
567
+ configForm .value .type === TriggerTypeEnum .HTTP_CALLBACK
570
568
) {
571
569
showText = ` ${configForm .value .httpRequestSetting ?.url } `
572
570
} else if (configForm .value .type === TriggerTypeEnum .FORM_UPDATE ) {
You can’t perform that action at this time.
0 commit comments