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
f1521f2d
Commit
f1521f2d
authored
Aug 23, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 自定义算子删除bug修复
parent
2fccb697
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
12 deletions
+31
-12
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+1
-1
utils.ts
src/views/Project/ProjectJobDetail/utils.ts
+6
-7
index.tsx
...ct/components/Flow/components/BatchOperatorFlow/index.tsx
+12
-2
index.tsx
src/views/Project/components/Flow/index.tsx
+12
-2
No files found.
src/views/Project/ProjectJobDetail/index.tsx
View file @
f1521f2d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-2
2 16:22:29
* @LastEditTime: 2022-08-2
3 19:27:18
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/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/ProjectJobDetail/utils.ts
View file @
f1521f2d
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-15 15:03:10
* @Date: 2022-08-15 15:03:10
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
15 15:43:16
* @LastEditTime: 2022-08-
23 19:39:21
* @FilePath: /bkunyun/src/views/Project/ProjectJobDetail/utils.ts
* @FilePath: /bkunyun/src/views/Project/ProjectJobDetail/utils.ts
* @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
*/
*/
...
@@ -26,13 +26,12 @@ export const getDatasetPath = (path: string) => {
...
@@ -26,13 +26,12 @@ export const getDatasetPath = (path: string) => {
// 根据outputs的路径获取数据集的名称
// 根据outputs的路径获取数据集的名称
export
const
getDatasetName
=
(
path
:
string
)
=>
{
export
const
getDatasetName
=
(
path
:
string
)
=>
{
let
name
=
""
;
let
name
=
''
;
let
nameIndex
=
path
.
indexOf
(
"/.dataset/"
)
+
10
;
const
arr
=
path
.
split
(
'/.dataset/'
);
const
lastIndex
=
path
.
lastIndexOf
(
"/"
);
if
(
arr
.
length
===
2
)
{
if
(
nameIndex
!==
-
1
&&
lastIndex
!==
-
1
)
{
name
=
arr
[
1
]
name
=
path
.
slice
(
nameIndex
,
lastIndex
);
}
}
return
name
;
return
name
};
};
/** 根据批节点 判断是否在同一个批 */
/** 根据批节点 判断是否在同一个批 */
...
...
src/views/Project/components/Flow/components/BatchOperatorFlow/index.tsx
View file @
f1521f2d
...
@@ -234,9 +234,9 @@ const BatchOperatorFlow = (props: IProps) => {
...
@@ -234,9 +234,9 @@ const BatchOperatorFlow = (props: IProps) => {
};
};
/** node节点 */
/** node节点 */
const
[
nodes
,
setNodes
,
onNodesChange
]
=
useNodesState
(
initialNodes
);
const
[
nodes
,
setNodes
]
=
useNodesState
(
initialNodes
);
/** 连线数组 */
/** 连线数组 */
const
[
edges
,
setEdges
,
onEdgesChange
]
=
useEdgesState
(
initialEdges
);
const
[
edges
,
setEdges
]
=
useEdgesState
(
initialEdges
);
useEffect
(()
=>
{
useEffect
(()
=>
{
setEdges
(
initialEdges
);
setEdges
(
initialEdges
);
...
@@ -367,6 +367,16 @@ const BatchOperatorFlow = (props: IProps) => {
...
@@ -367,6 +367,16 @@ const BatchOperatorFlow = (props: IProps) => {
setInSideFlowNodeId
(
""
);
setInSideFlowNodeId
(
""
);
},
[]);
},
[]);
const
onNodesChange
=
(
val
:
any
)
=>
{
// 自定义change事件 不允许react flow组件本身删除事件
return
}
const
onEdgesChange
=
(
val
:
any
)
=>
{
// 自定义change事件 不允许react flow组件本身删除事件
return
;
}
const
reactFlowParams
=
const
reactFlowParams
=
flowType
===
"edit"
flowType
===
"edit"
?
{
?
{
...
...
src/views/Project/components/Flow/index.tsx
View file @
f1521f2d
...
@@ -434,9 +434,9 @@ const Flow = (props: IProps) => {
...
@@ -434,9 +434,9 @@ const Flow = (props: IProps) => {
};
};
/** node节点 */
/** node节点 */
const
[
nodes
,
setNodes
,
onNodesChange
]
=
useNodesState
(
initialNodes
);
const
[
nodes
,
setNodes
]
=
useNodesState
(
initialNodes
);
/** 连线数组 */
/** 连线数组 */
const
[
edges
,
setEdges
,
onEdgesChange
]
=
useEdgesState
(
initialEdges
);
const
[
edges
,
setEdges
]
=
useEdgesState
(
initialEdges
);
useEffect
(()
=>
{
useEffect
(()
=>
{
setEdges
(
initialEdges
);
setEdges
(
initialEdges
);
...
@@ -638,6 +638,16 @@ const Flow = (props: IProps) => {
...
@@ -638,6 +638,16 @@ const Flow = (props: IProps) => {
[
setSelectedBatchNodeId
]
[
setSelectedBatchNodeId
]
);
);
const
onNodesChange
=
(
val
:
any
)
=>
{
// 自定义change事件 不允许react flow组件本身删除事件
return
}
const
onEdgesChange
=
(
val
:
any
)
=>
{
// 自定义change事件 不允许react flow组件本身删除事件
return
;
}
const
reactFlowParams
=
const
reactFlowParams
=
flowType
===
"edit"
flowType
===
"edit"
?
{
?
{
...
...
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