Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
b04b3d61
Commit
b04b3d61
authored
Aug 17, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化保存模板时的错误提示
parent
857556d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
index.tsx
...ews/Project/components/Flow/components/FlowNode/index.tsx
+4
-2
index.tsx
src/views/WorkFlowEdit/index.tsx
+6
-3
No files found.
src/views/Project/components/Flow/components/FlowNode/index.tsx
View file @
b04b3d61
...
@@ -51,7 +51,8 @@ const FlowNode = (props: any) => {
...
@@ -51,7 +51,8 @@ const FlowNode = (props: any) => {
return
(
return
(
(
parameters
?.
length
&&
(
parameters
?.
length
&&
parameters
?.
filter
((
item
:
any
)
=>
{
parameters
?.
filter
((
item
:
any
)
=>
{
return
item
.
parameterGroup
===
"in"
&&
!
item
?.
thrown
;
return
item
.
parameterGroup
===
"in"
;
// return item.parameterGroup === "in" && !item?.thrown;
}))
||
}))
||
[]
[]
);
);
...
@@ -62,7 +63,8 @@ const FlowNode = (props: any) => {
...
@@ -62,7 +63,8 @@ const FlowNode = (props: any) => {
return
(
return
(
(
parameters
?.
length
&&
(
parameters
?.
length
&&
parameters
?.
filter
((
item
:
any
)
=>
{
parameters
?.
filter
((
item
:
any
)
=>
{
return
item
.
parameterGroup
===
"out"
&&
!
item
?.
thrown
;
return
item
.
parameterGroup
===
"out"
;
// return item.parameterGroup === "out" && !item?.thrown;
}))
||
}))
||
[]
[]
);
);
...
...
src/views/WorkFlowEdit/index.tsx
View file @
b04b3d61
...
@@ -143,8 +143,9 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -143,8 +143,9 @@ const WorkFlowEdit = observer((props: IProps) => {
return
;
return
;
}
}
let
templateConfigInfoClone
:
ITask
[]
=
_
.
cloneDeep
(
templateConfigInfo
);
let
templateConfigInfoClone
:
ITask
[]
=
_
.
cloneDeep
(
templateConfigInfo
);
let
check
=
true
;
let
tasksIsCheck
=
true
;
// 整体校验
templateConfigInfoClone
.
forEach
((
task
)
=>
{
templateConfigInfoClone
.
forEach
((
task
)
=>
{
let
taskIsCheck
=
true
;
// 单个task校验
task
.
parameters
.
forEach
((
parameter
)
=>
{
task
.
parameters
.
forEach
((
parameter
)
=>
{
if
(
task
.
type
===
"BATCH"
&&
parameter
.
thrown
)
{
if
(
task
.
type
===
"BATCH"
&&
parameter
.
thrown
)
{
return
;
return
;
...
@@ -153,12 +154,14 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -153,12 +154,14 @@ const WorkFlowEdit = observer((props: IProps) => {
parameter
.
error
=
checkResult
.
error
;
parameter
.
error
=
checkResult
.
error
;
parameter
.
helperText
=
checkResult
.
helperText
;
parameter
.
helperText
=
checkResult
.
helperText
;
if
(
checkResult
.
error
)
{
if
(
checkResult
.
error
)
{
check
=
false
;
taskIsCheck
=
false
;
tasksIsCheck
=
false
;
}
}
});
});
task
.
isCheck
=
taskIsCheck
;
});
});
setTemplateConfigInfo
(
templateConfigInfoClone
);
setTemplateConfigInfo
(
templateConfigInfoClone
);
if
(
!
c
heck
)
{
if
(
!
tasksIsC
heck
)
{
Message
.
error
(
"工作流校验未通过,请检查!"
);
Message
.
error
(
"工作流校验未通过,请检查!"
);
}
else
{
}
else
{
setSaveFormDialog
(
true
);
setSaveFormDialog
(
true
);
...
...
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