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
b6bf6198
Commit
b6bf6198
authored
Aug 31, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 点击表单允许定位到流节点
parent
f90733fe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
50 deletions
+48
-50
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+16
-20
index.tsx
src/views/Project/ProjectSubmitWork/WorkFlow/index.tsx
+5
-5
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+4
-4
index.tsx
...ws/Project/components/Flow/components/BatchNode/index.tsx
+1
-1
index.tsx
...ews/Project/components/Flow/components/FlowNode/index.tsx
+1
-1
index.tsx
src/views/Project/components/Flow/index.tsx
+21
-19
No files found.
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
b6bf6198
...
@@ -23,11 +23,11 @@ type ConfigFormProps = {
...
@@ -23,11 +23,11 @@ type ConfigFormProps = {
templateConfigInfo
?:
ITemplateConfig
;
templateConfigInfo
?:
ITemplateConfig
;
setParameter
:
any
;
setParameter
:
any
;
onRef
?:
React
.
Ref
<
any
>
;
onRef
?:
React
.
Ref
<
any
>
;
set
SelectedBatch
NodeId
:
(
val
:
string
)
=>
void
;
set
ExternalSelected
NodeId
:
(
val
:
string
)
=>
void
;
};
};
const
ConfigForm
=
(
props
:
ConfigFormProps
)
=>
{
const
ConfigForm
=
(
props
:
ConfigFormProps
)
=>
{
const
{
templateConfigInfo
,
setParameter
,
set
SelectedBatch
NodeId
}
=
props
;
const
{
templateConfigInfo
,
setParameter
,
set
ExternalSelected
NodeId
}
=
props
;
const
[
name
,
setName
]
=
useState
<
string
>
(
""
);
// 任务名称
const
[
name
,
setName
]
=
useState
<
string
>
(
""
);
// 任务名称
const
[
fileSelectType
,
setFileSelectType
]
=
useState
<
FileSelectType
>
(
"path"
);
const
[
fileSelectType
,
setFileSelectType
]
=
useState
<
FileSelectType
>
(
"path"
);
...
@@ -192,7 +192,6 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -192,7 +192,6 @@ const ConfigForm = (props: ConfigFormProps) => {
const
randerParameters
=
(
const
randerParameters
=
(
parameters
:
Array
<
IParameter
>
,
parameters
:
Array
<
IParameter
>
,
taskId
:
string
,
taskId
:
string
,
batchId
?:
string
)
=>
{
)
=>
{
return
parameters
return
parameters
.
filter
((
parameter
)
=>
parameter
.
hidden
===
false
)
.
filter
((
parameter
)
=>
parameter
.
hidden
===
false
)
...
@@ -221,7 +220,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -221,7 +220,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"file"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"file"
&&
(
<
MyInput
<
MyInput
onClick=
{
()
=>
{
onClick=
{
()
=>
{
set
SelectedBatchNodeId
(
batch
Id
||
""
);
set
ExternalSelectedNodeId
(
task
Id
||
""
);
setFileSelectType
(
"file"
);
setFileSelectType
(
"file"
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
}
}
}
}
...
@@ -244,7 +243,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -244,7 +243,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"path"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"path"
&&
(
<
MyInput
<
MyInput
onClick=
{
()
=>
{
onClick=
{
()
=>
{
set
SelectedBatchNodeId
(
batch
Id
||
""
);
set
ExternalSelectedNodeId
(
task
Id
||
""
);
setFileSelectType
(
"path"
);
setFileSelectType
(
"path"
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
}
}
}
}
...
@@ -267,7 +266,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -267,7 +266,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"dataset"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"dataset"
&&
(
<
MyInput
<
MyInput
onClick=
{
()
=>
{
onClick=
{
()
=>
{
set
SelectedBatch
NodeId
(
taskId
);
set
ExternalSelected
NodeId
(
taskId
);
setFileSelectType
(
"dataset"
);
setFileSelectType
(
"dataset"
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
}
}
}
}
...
@@ -290,10 +289,9 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -290,10 +289,9 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
<
MyInput
<
MyInput
onFocus=
{
()
=>
{
onFocus=
{
()
=>
{
setSelectedBatchNodeId
(
batchId
||
""
);
setExternalSelectedNodeId
(
taskId
||
""
);
console
.
log
(
batchId
,
"111"
);
}
}
}
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
value=
{
parameter
.
value
||
""
}
value=
{
parameter
.
value
||
""
}
onChange=
{
(
e
:
any
)
=>
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
e
,
taskId
,
parameter
.
name
||
""
)
handleParameterChange
(
e
,
taskId
,
parameter
.
name
||
""
)
...
@@ -306,8 +304,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -306,8 +304,8 @@ const ConfigForm = (props: ConfigFormProps) => {
)
}
)
}
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"select"
&&
(
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"select"
&&
(
<
MySelect
<
MySelect
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
value=
{
parameter
.
value
}
value=
{
parameter
.
value
}
onChange=
{
(
e
:
any
)
=>
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
handleParameterChange
(
...
@@ -329,8 +327,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -329,8 +327,8 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"multipleselect"
&&
(
"multipleselect"
&&
(
<
MySelect
<
MySelect
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
value=
{
parameter
.
value
}
value=
{
parameter
.
value
}
onChange=
{
(
e
:
any
)
=>
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
handleParameterChange
(
...
@@ -356,8 +354,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -356,8 +354,8 @@ const ConfigForm = (props: ConfigFormProps) => {
onChange=
{
(
e
:
any
)
=>
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
e
,
taskId
,
parameter
.
name
||
""
)
handleParameterChange
(
e
,
taskId
,
parameter
.
name
||
""
)
}
}
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
options=
{
parameter
?.
choices
||
[]
}
options=
{
parameter
?.
choices
||
[]
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
...
@@ -378,8 +376,8 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -378,8 +376,8 @@ const ConfigForm = (props: ConfigFormProps) => {
)
)
}
}
options=
{
parameter
?.
choices
||
[]
}
options=
{
parameter
?.
choices
||
[]
}
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
/>
/>
...
@@ -448,7 +446,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -448,7 +446,7 @@ const ConfigForm = (props: ConfigFormProps) => {
<
MyInput
<
MyInput
value=
{
outputPath
||
""
}
value=
{
outputPath
||
""
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
set
SelectedBatch
NodeId
(
""
);
set
ExternalSelected
NodeId
(
""
);
setFileSelectType
(
"path"
);
setFileSelectType
(
"path"
);
handleOpenFileSelect
();
handleOpenFileSelect
();
}
}
}
}
...
@@ -500,7 +498,6 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -500,7 +498,6 @@ const ConfigForm = (props: ConfigFormProps) => {
{
randerParameters
(
{
randerParameters
(
task
.
parameters
.
filter
((
parameter
)
=>
!
parameter
?.
thrown
),
task
.
parameters
.
filter
((
parameter
)
=>
!
parameter
?.
thrown
),
task
.
id
,
task
.
id
,
task
.
id
)
}
)
}
{
task
.
flows
.
map
((
flow
)
=>
{
{
task
.
flows
.
map
((
flow
)
=>
{
if
(
if
(
...
@@ -527,7 +524,6 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -527,7 +524,6 @@ const ConfigForm = (props: ConfigFormProps) => {
{
randerParameters
(
{
randerParameters
(
flow
.
parameters
,
flow
.
parameters
,
flow
.
id
,
flow
.
id
,
flow
.
parentNode
?
flow
.
parentNode
:
flow
.
id
)
}
)
}
</
div
>
</
div
>
);
);
...
...
src/views/Project/ProjectSubmitWork/WorkFlow/index.tsx
View file @
b6bf6198
...
@@ -12,11 +12,11 @@ import { ITemplateConfig } from "../interface";
...
@@ -12,11 +12,11 @@ import { ITemplateConfig } from "../interface";
interface
IProps
{
interface
IProps
{
templateConfigInfo
?:
ITemplateConfig
;
templateConfigInfo
?:
ITemplateConfig
;
set
SelectedBatch
NodeId
?:
(
val
:
string
)
=>
void
;
set
ExternalSelected
NodeId
?:
(
val
:
string
)
=>
void
;
selectedBatch
NodeId
?:
string
;
externalSelected
NodeId
?:
string
;
}
}
const
WorkFlow
=
(
props
:
IProps
)
=>
{
const
WorkFlow
=
(
props
:
IProps
)
=>
{
const
{
templateConfigInfo
,
set
SelectedBatchNodeId
,
selectedBatch
NodeId
}
=
const
{
templateConfigInfo
,
set
ExternalSelectedNodeId
,
externalSelected
NodeId
}
=
props
;
props
;
/** 页面刷新提醒 */
/** 页面刷新提醒 */
...
@@ -36,8 +36,8 @@ const WorkFlow = (props: IProps) => {
...
@@ -36,8 +36,8 @@ const WorkFlow = (props: IProps) => {
return
(
return
(
<
Flow
<
Flow
tasks=
{
templateConfigInfo
?.
tasks
}
tasks=
{
templateConfigInfo
?.
tasks
}
set
SelectedBatchNodeId=
{
setSelectedBatch
NodeId
}
set
ExternalSelectedNodeId=
{
setExternalSelected
NodeId
}
selectedBatchNodeId=
{
selectedBatch
NodeId
}
externalSelectedNodeId=
{
externalSelected
NodeId
}
/>
/>
);
);
};
};
...
...
src/views/Project/ProjectSubmitWork/index.tsx
View file @
b6bf6198
...
@@ -42,7 +42,7 @@ const ProjectSubmitWork = observer(() => {
...
@@ -42,7 +42,7 @@ const ProjectSubmitWork = observer(() => {
let
configFormRef
:
any
=
React
.
createRef
();
let
configFormRef
:
any
=
React
.
createRef
();
/** 是否全屏 */
/** 是否全屏 */
const
[
fullScreenShow
,
setFullScreenShow
]
=
useState
<
boolean
>
(
false
);
const
[
fullScreenShow
,
setFullScreenShow
]
=
useState
<
boolean
>
(
false
);
const
[
selectedBatchNodeId
,
setSelectedBatch
NodeId
]
=
useState
<
string
>
(
""
);
const
[
externalSelectedNodeId
,
setExternalSelected
NodeId
]
=
useState
<
string
>
(
""
);
// 前往工作台
// 前往工作台
const
goToWorkbench
=
(
toWorkbenchList
=
false
)
=>
{
const
goToWorkbench
=
(
toWorkbenchList
=
false
)
=>
{
...
@@ -313,7 +313,7 @@ const ProjectSubmitWork = observer(() => {
...
@@ -313,7 +313,7 @@ const ProjectSubmitWork = observer(() => {
onRef=
{
configFormRef
}
onRef=
{
configFormRef
}
templateConfigInfo=
{
templateConfigInfo
}
templateConfigInfo=
{
templateConfigInfo
}
setParameter=
{
setParameter
}
setParameter=
{
setParameter
}
set
SelectedBatchNodeId=
{
setSelectedBatch
NodeId
}
set
ExternalSelectedNodeId=
{
setExternalSelected
NodeId
}
/>
/>
</
div
>
</
div
>
)
}
)
}
...
@@ -323,8 +323,8 @@ const ProjectSubmitWork = observer(() => {
...
@@ -323,8 +323,8 @@ const ProjectSubmitWork = observer(() => {
>
>
<
WorkFlow
<
WorkFlow
templateConfigInfo=
{
templateConfigInfo
}
templateConfigInfo=
{
templateConfigInfo
}
set
SelectedBatchNodeId=
{
setSelectedBatch
NodeId
}
set
ExternalSelectedNodeId=
{
setExternalSelected
NodeId
}
selectedBatchNodeId=
{
selectedBatch
NodeId
}
externalSelectedNodeId=
{
externalSelected
NodeId
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/views/Project/components/Flow/components/BatchNode/index.tsx
View file @
b6bf6198
...
@@ -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-08-
22 16:41:54
* @LastEditTime: 2022-08-
31 17:09:26
* @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
*/
*/
...
...
src/views/Project/components/Flow/components/FlowNode/index.tsx
View file @
b6bf6198
...
@@ -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:29:46
* @Date: 2022-07-12 11:29:46
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
22 19:16:06
* @LastEditTime: 2022-08-
31 17:09:31
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.tsx
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.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
*/
*/
...
...
src/views/Project/components/Flow/index.tsx
View file @
b6bf6198
...
@@ -33,9 +33,9 @@ interface IProps extends ReactFlowProps {
...
@@ -33,9 +33,9 @@ interface IProps extends ReactFlowProps {
/** 点击batch事件 */
/** 点击batch事件 */
onBatchClick
?:
(
val
:
string
)
=>
void
;
onBatchClick
?:
(
val
:
string
)
=>
void
;
/** 设置选中的batch节点id */
/** 设置选中的batch节点id */
set
SelectedBatch
NodeId
?:
(
val
:
string
)
=>
void
;
set
ExternalSelected
NodeId
?:
(
val
:
string
)
=>
void
;
/** 选中的batch节点id */
/** 选中的batch节点id */
selectedBatch
NodeId
?:
string
;
externalSelected
NodeId
?:
string
;
/** 类型, edit为编辑类型 */
/** 类型, edit为编辑类型 */
type
?:
"edit"
|
"default"
;
type
?:
"edit"
|
"default"
;
/** 设置组件数据 组件为编辑状态使用 */
/** 设置组件数据 组件为编辑状态使用 */
...
@@ -52,8 +52,8 @@ const Flow = (props: IProps) => {
...
@@ -52,8 +52,8 @@ const Flow = (props: IProps) => {
const
{
const
{
tasks
,
tasks
,
onBatchClick
,
onBatchClick
,
set
SelectedBatch
NodeId
,
set
ExternalSelected
NodeId
,
selectedBatch
NodeId
,
externalSelected
NodeId
,
type
:
flowType
=
"default"
,
type
:
flowType
=
"default"
,
setTasks
,
setTasks
,
onFlowNodeClick
,
onFlowNodeClick
,
...
@@ -305,13 +305,15 @@ const Flow = (props: IProps) => {
...
@@ -305,13 +305,15 @@ const Flow = (props: IProps) => {
/** 是否有流节点 */
/** 是否有流节点 */
isFlowNode
:
isFlowNode
(
item
.
id
),
isFlowNode
:
isFlowNode
(
item
.
id
),
/** 选中状态 */
/** 选中状态 */
selectedStatus
:
selectedBatch
NodeId
selectedStatus
:
externalSelected
NodeId
?
selectedBatchNodeId
===
item
.
id
?
externalSelectedNodeId
.
includes
(
item
.
id
)
:
inSideBatchNodeId
===
item
.
id
,
:
inSideBatchNodeId
===
item
.
id
,
/** tasks 数据 */
/** tasks 数据 */
tasks
:
tasks
,
tasks
:
tasks
,
}
}
:
{
selectedStatus
:
inSideFlowNodeId
===
item
.
id
}),
:
{
selectedStatus
:
externalSelectedNodeId
?
externalSelectedNodeId
.
includes
(
item
.
id
)
:
inSideFlowNodeId
===
item
.
id
,}),
/** 输入输出圆点状态 */
/** 输入输出圆点状态 */
// dotStatus: nodesInputAndOutputStatus(item.id),
// dotStatus: nodesInputAndOutputStatus(item.id),
...
@@ -343,7 +345,7 @@ const Flow = (props: IProps) => {
...
@@ -343,7 +345,7 @@ const Flow = (props: IProps) => {
tasks
,
tasks
,
flowType
,
flowType
,
isFlowNode
,
isFlowNode
,
selectedBatch
NodeId
,
externalSelected
NodeId
,
inSideBatchNodeId
,
inSideBatchNodeId
,
inSideFlowNodeId
,
inSideFlowNodeId
,
// nodesInputAndOutputStatus,
// nodesInputAndOutputStatus,
...
@@ -365,8 +367,8 @@ const Flow = (props: IProps) => {
...
@@ -365,8 +367,8 @@ const Flow = (props: IProps) => {
},
[]);
},
[]);
});
});
return
val
.
map
((
item
:
ILine
)
=>
{
return
val
.
map
((
item
:
ILine
)
=>
{
const
newSelectId
=
selectedBatch
NodeId
const
newSelectId
=
externalSelected
NodeId
?
selectedBatch
NodeId
?
externalSelected
NodeId
:
inSideBatchNodeId
;
:
inSideBatchNodeId
;
return
{
return
{
...
item
,
...
item
,
...
@@ -387,18 +389,18 @@ const Flow = (props: IProps) => {
...
@@ -387,18 +389,18 @@ const Flow = (props: IProps) => {
label
:
item
.
label
?
`(
${
item
.
label
}
)`
:
""
,
label
:
item
.
label
?
`(
${
item
.
label
}
)`
:
""
,
};
};
});
});
},
[
inSideBatchNodeId
,
selectedBatch
NodeId
,
selectedEdge
?.
id
,
tasks
]);
},
[
inSideBatchNodeId
,
externalSelected
NodeId
,
selectedEdge
?.
id
,
tasks
]);
/** 设置nodeId方法 */
/** 设置nodeId方法 */
const
setNodeIdFun
=
useCallback
(
const
setNodeIdFun
=
useCallback
(
(
id
:
string
)
=>
{
(
id
:
string
)
=>
{
set
SelectedBatch
NodeId
set
ExternalSelected
NodeId
?
set
SelectedBatch
NodeId
(
id
)
?
set
ExternalSelected
NodeId
(
id
)
:
setInSideBatchNodeId
(
id
);
:
setInSideBatchNodeId
(
id
);
onBatchClick
&&
onBatchClick
(
id
);
onBatchClick
&&
onBatchClick
(
id
);
setInSideFlowNodeId
(
""
);
setInSideFlowNodeId
(
""
);
},
},
[
onBatchClick
,
set
SelectedBatch
NodeId
]
[
onBatchClick
,
set
ExternalSelected
NodeId
]
);
);
/** flowNode点击事件 */
/** flowNode点击事件 */
...
@@ -410,7 +412,7 @@ const Flow = (props: IProps) => {
...
@@ -410,7 +412,7 @@ const Flow = (props: IProps) => {
}
else
{
}
else
{
setInSideFlowNodeId
(
node
.
id
);
setInSideFlowNodeId
(
node
.
id
);
setInSideBatchNodeId
(
""
);
setInSideBatchNodeId
(
""
);
set
SelectedBatchNodeId
&&
setSelectedBatch
NodeId
(
""
);
set
ExternalSelectedNodeId
&&
setExternalSelected
NodeId
(
""
);
}
}
document
.
getElementById
(
`point
${
node
.
id
}
`
)?.
scrollIntoView
(
true
);
document
.
getElementById
(
`point
${
node
.
id
}
`
)?.
scrollIntoView
(
true
);
}
}
...
@@ -423,8 +425,8 @@ const Flow = (props: IProps) => {
...
@@ -423,8 +425,8 @@ const Flow = (props: IProps) => {
};
};
const
handlePaneClick
=
()
=>
{
const
handlePaneClick
=
()
=>
{
set
SelectedBatch
NodeId
set
ExternalSelected
NodeId
?
set
SelectedBatch
NodeId
(
""
)
?
set
ExternalSelected
NodeId
(
""
)
:
setInSideBatchNodeId
(
""
);
:
setInSideBatchNodeId
(
""
);
setInSideFlowNodeId
(
""
);
setInSideFlowNodeId
(
""
);
onBatchClick
&&
onBatchClick
(
""
);
onBatchClick
&&
onBatchClick
(
""
);
...
@@ -632,9 +634,9 @@ const Flow = (props: IProps) => {
...
@@ -632,9 +634,9 @@ const Flow = (props: IProps) => {
/** 点击连线清除选中的node ID */
/** 点击连线清除选中的node ID */
setInSideFlowNodeId
(
""
);
setInSideFlowNodeId
(
""
);
setInSideBatchNodeId
(
""
);
setInSideBatchNodeId
(
""
);
set
SelectedBatchNodeId
&&
setSelectedBatch
NodeId
(
""
);
set
ExternalSelectedNodeId
&&
setExternalSelected
NodeId
(
""
);
},
},
[
set
SelectedBatch
NodeId
]
[
set
ExternalSelected
NodeId
]
);
);
// const onNodesChange = (val: any)=>{
// const onNodesChange = (val: any)=>{
...
...
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