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
25846d62
Commit
25846d62
authored
Sep 01, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nothing: 去掉一下console。log
parent
f1820f13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
12 deletions
+0
-12
index.tsx
src/views/CustomOperator/index.tsx
+0
-12
No files found.
src/views/CustomOperator/index.tsx
View file @
25846d62
...
@@ -27,18 +27,14 @@ const CustomOperator = observer((props: IProps) => {
...
@@ -27,18 +27,14 @@ const CustomOperator = observer((props: IProps) => {
/** 设置选中唯一标识符 */
/** 设置选中唯一标识符 */
const
handleNodeClick
=
useCallback
((
val
:
string
)
=>
{
const
handleNodeClick
=
useCallback
((
val
:
string
)
=>
{
// setSelectTaskId(val);
// setSelectTaskId(val);
// console.log(val);
},
[]);
},
[]);
// 判断 每个流算子必须至少有一条连接线。
// 判断 每个流算子必须至少有一条连接线。
const
checkHasOneLine
=
(
sourceArr
:
string
[],
targetArr
:
string
[])
=>
{
const
checkHasOneLine
=
(
sourceArr
:
string
[],
targetArr
:
string
[])
=>
{
console
.
log
(
"checkHasOneLine"
);
const
all
=
_
.
uniq
([...
sourceArr
,
...
targetArr
]);
const
all
=
_
.
uniq
([...
sourceArr
,
...
targetArr
]);
if
(
all
.
length
===
operatorList
.
length
)
{
if
(
all
.
length
===
operatorList
.
length
)
{
console
.
log
(
"checkHasOneLine1"
);
return
true
;
return
true
;
}
else
{
}
else
{
console
.
log
(
"checkHasOneLine2"
);
return
false
;
return
false
;
}
}
// _.uniq([2, 1, 2]);
// _.uniq([2, 1, 2]);
...
@@ -46,7 +42,6 @@ const CustomOperator = observer((props: IProps) => {
...
@@ -46,7 +42,6 @@ const CustomOperator = observer((props: IProps) => {
// 判断 每个起始算子(可以有多个起始点)的输入必须为文件的路径输入或数据集的路径输入。
// 判断 每个起始算子(可以有多个起始点)的输入必须为文件的路径输入或数据集的路径输入。
const
checkIn
=
(
targetArr
:
string
[])
=>
{
const
checkIn
=
(
targetArr
:
string
[])
=>
{
console
.
log
(
"checkIn"
);
const
uniqTargetArr
=
_
.
uniq
(
targetArr
);
const
uniqTargetArr
=
_
.
uniq
(
targetArr
);
if
(
uniqTargetArr
.
length
===
operatorList
.
length
)
{
if
(
uniqTargetArr
.
length
===
operatorList
.
length
)
{
// 流节点连成一个圈了
// 流节点连成一个圈了
...
@@ -82,7 +77,6 @@ const CustomOperator = observer((props: IProps) => {
...
@@ -82,7 +77,6 @@ const CustomOperator = observer((props: IProps) => {
// 判断 起码有一个结尾算子(可以有多个结尾点)的输出必须为文件保存或数据集保存。
// 判断 起码有一个结尾算子(可以有多个结尾点)的输出必须为文件保存或数据集保存。
const
checkOut
=
(
sourceArr
:
string
[])
=>
{
const
checkOut
=
(
sourceArr
:
string
[])
=>
{
console
.
log
(
"checkOut"
);
const
uniqSourceArr
=
_
.
uniq
(
sourceArr
);
const
uniqSourceArr
=
_
.
uniq
(
sourceArr
);
if
(
uniqSourceArr
.
length
===
operatorList
.
length
)
{
if
(
uniqSourceArr
.
length
===
operatorList
.
length
)
{
// 流节点连成一个圈了
// 流节点连成一个圈了
...
@@ -134,21 +128,15 @@ const CustomOperator = observer((props: IProps) => {
...
@@ -134,21 +128,15 @@ const CustomOperator = observer((props: IProps) => {
edge
.
target
&&
targetArr
.
push
(
edge
.
target
);
edge
.
target
&&
targetArr
.
push
(
edge
.
target
);
});
});
});
});
console
.
log
(
"operatorList"
,
operatorList
);
console
.
log
(
"sourceArr"
,
sourceArr
);
console
.
log
(
"targetArr"
,
targetArr
);
if
(
!
checkHasOneLine
([...
sourceArr
],
[...
targetArr
]))
{
if
(
!
checkHasOneLine
([...
sourceArr
],
[...
targetArr
]))
{
console
.
log
(
"checkHasOneLine"
);
Message
.
error
(
"部分算子没有流程线,请检查流程!"
);
Message
.
error
(
"部分算子没有流程线,请检查流程!"
);
return
;
return
;
}
}
if
(
!
checkIn
([...
targetArr
]))
{
if
(
!
checkIn
([...
targetArr
]))
{
console
.
log
(
"checkIn"
);
Message
.
error
(
"每个流程第一步需读取文件/数据集,请检查流程!"
);
Message
.
error
(
"每个流程第一步需读取文件/数据集,请检查流程!"
);
return
;
return
;
}
}
if
(
!
checkOut
([...
sourceArr
]))
{
if
(
!
checkOut
([...
sourceArr
]))
{
console
.
log
(
"checkOut"
);
Message
.
error
(
Message
.
error
(
"每个流程最后一步必须将数据写入为文件/数据集,请检查流程!"
"每个流程最后一步必须将数据写入为文件/数据集,请检查流程!"
);
);
...
...
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