Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7652c412
authored
Feb 27, 2025
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码评审修改】触发器 异步 Http 改成 Http 回调
parent
de35fd0a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
src/components/SimpleProcessDesignerV2/src/consts.ts
+8
-9
src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue
+4
-6
No files found.
src/components/SimpleProcessDesignerV2/src/consts.ts
View file @
7652c412
...
...
@@ -756,20 +756,19 @@ export enum TriggerTypeEnum {
* 发送 HTTP 请求触发器
*/
HTTP_REQUEST
=
1
,
// TODO @jason:要不把 FORM_UPDATE、FORM_DELETE 调整从 10、11 这样?
/**
*
表单数据更新
触发器
*
发起 HTTP 回调请求
触发器
*/
FORM_UPDATE
=
2
,
HTTP_CALLBACK
=
2
,
/**
* 表单数据
删除
触发器
* 表单数据
更新
触发器
*/
FORM_DELETE
=
3
,
// TODO @jason:1)HTTP_CALLBACK 这个枚举值?然后,相关注释,朝着“HTTP 回调”走;2)枚举值改成 2?
FORM_UPDATE
=
10
,
/**
*
发起异步 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
}
]
...
...
src/components/SimpleProcessDesignerV2/src/nodes-config/TriggerNodeConfig.vue
View file @
7652c412
...
...
@@ -36,11 +36,9 @@
</el-select>
</el-form-item>
<!-- HTTP 请求触发器 -->
<!-- TODO @jason:可以考虑用 [].include 更简洁 -->
<div
v-if=
"
(configForm.type === TriggerTypeEnum.HTTP_REQUEST ||
configForm.type === TriggerTypeEnum.ASYNC_HTTP_REQUEST) &&
[TriggerTypeEnum.HTTP_REQUEST, TriggerTypeEnum.HTTP_CALLBACK].includes(configForm.type) &&
configForm.httpRequestSetting
"
>
...
...
@@ -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) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment