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
9bd9cfdb
Commit
9bd9cfdb
authored
Nov 11, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 应用环境创建不能连接线
parent
ee3425e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
index.tsx
...ws/Project/components/Flow/components/BatchNode/index.tsx
+2
-2
index.tsx
src/views/Project/components/Flow/index.tsx
+7
-6
No files found.
src/views/Project/components/Flow/components/BatchNode/index.tsx
View file @
9bd9cfdb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:20:29
* @Date: 2022-07-12 11:20:29
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-
09-07 10:06:13
* @LastEditTime: 2022-
11-10 17:40:11
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -73,7 +73,7 @@ const BatchNode = (props: IBatchNode) => {
...
@@ -73,7 +73,7 @@ const BatchNode = (props: IBatchNode) => {
?
"1px solid #FF4E4E"
?
"1px solid #FF4E4E"
:
"1px solid #fff"
,
:
"1px solid #fff"
,
left
:
index
*
24
+
20
,
left
:
index
*
24
+
20
,
top
:
'-47
px'
,
top
:
isFlowNode
?
'-47px'
:
'-3
px'
,
}
}
}
}
type=
"target"
type=
"target"
position=
{
Position
.
Top
}
position=
{
Position
.
Top
}
...
...
src/views/Project/components/Flow/index.tsx
View file @
9bd9cfdb
...
@@ -269,22 +269,23 @@ const Flow = (props: IProps) => {
...
@@ -269,22 +269,23 @@ const Flow = (props: IProps) => {
positionYArr
.
sort
((
a
,
b
)
=>
{
positionYArr
.
sort
((
a
,
b
)
=>
{
return
a
-
b
;
return
a
-
b
;
});
});
const
initialHeight
=
isFlowNode
(
value
.
id
)
?
66
:
12
;
let
width
=
176
,
let
width
=
176
,
height
=
66
;
height
=
initialHeight
if
(
positionXArr
?.
length
)
{
if
(
positionXArr
?.
length
)
{
const
val
=
positionXArr
[
positionXArr
.
length
-
1
]
+
144
;
const
val
=
positionXArr
[
positionXArr
.
length
-
1
]
+
144
;
width
=
val
>
176
?
val
:
width
;
width
=
val
>
176
?
val
:
width
;
}
}
if
(
positionYArr
?.
length
)
{
if
(
positionYArr
?.
length
)
{
const
val
=
positionYArr
[
positionYArr
.
length
-
1
]
+
74
;
const
val
=
positionYArr
[
positionYArr
.
length
-
1
]
+
74
;
height
=
val
>
66
?
val
:
height
;
height
=
val
>
initialHeight
?
val
:
height
;
}
}
return
{
return
{
width
,
width
,
height
,
height
,
};
};
},
},
[
tasks
]
[
isFlowNode
,
tasks
]
);
);
/** 生成初始化node节点 */
/** 生成初始化node节点 */
...
@@ -322,7 +323,7 @@ const Flow = (props: IProps) => {
...
@@ -322,7 +323,7 @@ const Flow = (props: IProps) => {
/** 样式 */
/** 样式 */
style
:
{
style
:
{
...
getBatchStyle
(
item
),
...
getBatchStyle
(
item
),
marginTop
:
"-44px"
,
marginTop
:
isFlowNode
(
item
.
id
)
?
"-44px"
:
'0px'
,
padding
:
"12px 20px 20px 20px"
,
padding
:
"12px 20px 20px 20px"
,
visibility
:
'visible'
,
visibility
:
'visible'
,
},
},
...
@@ -495,7 +496,7 @@ const Flow = (props: IProps) => {
...
@@ -495,7 +496,7 @@ const Flow = (props: IProps) => {
const
getClassType
=
useCallback
(
const
getClassType
=
useCallback
(
(
connection
:
Connection
)
=>
{
(
connection
:
Connection
)
=>
{
let
inputClassType
=
""
,
let
inputClassType
=
""
,
outClassType
:
string
|
undefined
=
undefined
;
outClassType
:
string
|
undefined
=
''
;
tasks
?.
length
&&
tasks
?.
length
&&
tasks
.
forEach
((
item
)
=>
{
tasks
.
forEach
((
item
)
=>
{
if
([
connection
.
source
,
connection
.
target
].
includes
(
item
.
id
))
{
if
([
connection
.
source
,
connection
.
target
].
includes
(
item
.
id
))
{
...
@@ -613,7 +614,7 @@ const Flow = (props: IProps) => {
...
@@ -613,7 +614,7 @@ const Flow = (props: IProps) => {
getTaskType
(
connection
.
target
as
string
)
===
"FLOW"
getTaskType
(
connection
.
target
as
string
)
===
"FLOW"
)
{
)
{
return
;
return
;
}
else
if
(
inputClassType
===
outClassType
)
{
}
else
if
(
outClassType
&&
(
inputClassType
.
includes
(
outClassType
)
||
outClassType
.
includes
(
inputClassType
))
)
{
result
=
connectCheck
(
connection
)
as
ITask
[];
result
=
connectCheck
(
connection
)
as
ITask
[];
}
else
{
}
else
{
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