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
cbeee6c2
Commit
cbeee6c2
authored
Nov 04, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 流程编排初始化position
parent
2002b65e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
15 deletions
+8
-15
index.tsx
src/views/Project/components/Flow/index.tsx
+2
-2
index.module.css
.../WorkflowOperator/components/AddOperator/index.module.css
+1
-1
index.tsx
...sources/WorkflowOperator/components/AddOperator/index.tsx
+2
-2
index.tsx
...ces/WorkflowOperator/components/OperatorDetails/index.tsx
+3
-10
No files found.
src/views/Project/components/Flow/index.tsx
View file @
cbeee6c2
...
...
@@ -270,14 +270,14 @@ const Flow = (props: IProps) => {
return
a
-
b
;
});
let
width
=
176
,
height
=
66
;
height
=
12
;
if
(
positionXArr
?.
length
)
{
const
val
=
positionXArr
[
positionXArr
.
length
-
1
]
+
144
;
width
=
val
>
176
?
val
:
width
;
}
if
(
positionYArr
?.
length
)
{
const
val
=
positionYArr
[
positionYArr
.
length
-
1
]
+
74
;
height
=
val
>
66
?
val
:
height
;
height
=
val
>
12
?
val
:
height
;
}
return
{
width
,
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.module.css
View file @
cbeee6c2
...
...
@@ -36,7 +36,6 @@
display
:
flex
;
position
:
relative
;
width
:
100%
;
/* overflow: hidden; */
border-radius
:
4px
;
margin-bottom
:
20px
;
height
:
562px
;
...
...
@@ -66,6 +65,7 @@
flex-direction
:
column
;
border-top-right-radius
:
4px
;
border-bottom-right-radius
:
4px
;
width
:
calc
(
100%
-
368px
);
}
.codeTitle
{
background-color
:
#353942
;
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
View file @
cbeee6c2
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-18 16:12:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-11-0
2 13:51:50
* @LastEditTime: 2022-11-0
4 15:07:53
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/components/AddOperator/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -548,7 +548,6 @@ const AddOperator = observer((props: IAddOperator) => {
}}
onBlur={paramsConfigBlur}
height={parametersError ? "486px" : "518px"}
width="600"
style={{ flex: 1 }}
/>
{parametersError ? (
...
...
@@ -672,6 +671,7 @@ const AddOperator = observer((props: IAddOperator) => {
tasks={operatorList}
setTasks={setOperatorList}
type="edit"
defaultPosition={[300, 100]}
// onFlowNodeClick={handleNodeClick}
flowNodeDraggable={true}
ListenState={!inputActive}
...
...
src/views/ResourceCenter/UserResources/WorkflowOperator/components/OperatorDetails/index.tsx
View file @
cbeee6c2
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-10-17 14:35:11
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-11-0
1 10:59:40
* @LastEditTime: 2022-11-0
4 15:09:09
* @FilePath: /bkunyun/src/views/ResourceCenter/UserResources/WorkflowOperator/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -106,14 +106,7 @@ const OperatorDetails = observer(() => {
onSuccess
:
(
res
:
any
)
=>
{
if
(
res
.
message
===
"success"
)
{
/** 设置详情数据 */
const
newData
=
res
.
data
.
map
((
item
:
any
)
=>
{
/** 初始化批算子偏移量 */
if
(
item
.
type
===
"BATCH"
)
{
item
.
position
=
{
x
:
100
,
y
:
100
};
}
return
item
;
});
setDetailData
(
newData
);
setDetailData
(
res
.
data
);
const
filterData
=
res
?.
data
?.
filter
((
item
:
any
)
=>
{
return
item
.
type
===
"BATCH"
;
});
...
...
@@ -226,7 +219,7 @@ const OperatorDetails = observer(() => {
)
:
null
}
{
contentType
===
"flowChart"
&&
!
envId
?
(
<
div
className=
{
styles
.
contentBox
}
>
<
Flow
tasks=
{
detailData
}
showControls=
{
false
}
/>
<
Flow
tasks=
{
detailData
}
showControls=
{
false
}
defaultPosition=
{
[
100
,
100
]
}
/>
</
div
>
)
:
null
}
{
contentType
===
"parameterList"
||
type
===
"FLOW"
?
(
...
...
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