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
3dac4b99
Commit
3dac4b99
authored
Aug 19, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' of
http://120.77.149.83/root/bkunyun
into feat-20220801
parents
1ef99876
7fa06947
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
10 deletions
+57
-10
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+1
-1
interface.ts
src/views/Project/ProjectSubmitWork/interface.ts
+1
-0
index.tsx
src/views/Project/components/Flow/index.tsx
+28
-2
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+3
-3
index.tsx
src/views/WorkFlowEdit/index.tsx
+24
-4
No files found.
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
3dac4b99
...
@@ -208,7 +208,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -208,7 +208,7 @@ const ConfigForm = (props: ConfigFormProps) => {
[
styles
.
required
]:
parameter
.
required
,
[
styles
.
required
]:
parameter
.
required
,
})
}
})
}
>
>
{
parameter
.
nam
e
}
{
parameter
.
titl
e
}
<
span
className=
{
styles
.
parameterDataType
}
>
<
span
className=
{
styles
.
parameterDataType
}
>
{
parameter
.
classTypeName
}
{
parameter
.
classTypeName
}
</
span
>
</
span
>
...
...
src/views/Project/ProjectSubmitWork/interface.ts
View file @
3dac4b99
...
@@ -11,6 +11,7 @@ export interface IParameter {
...
@@ -11,6 +11,7 @@ export interface IParameter {
hidden
:
boolean
;
// 使用模板时是否展示 true 不展示 用户不需要填写
hidden
:
boolean
;
// 使用模板时是否展示 true 不展示 用户不需要填写
id
?:
string
;
id
?:
string
;
name
:
string
;
// 参数名称
name
:
string
;
// 参数名称
title
:
string
;
// 参数名称
required
:
boolean
;
// 是否必填
required
:
boolean
;
// 是否必填
defaultValue
:
any
;
// 默认值
defaultValue
:
any
;
// 默认值
domType
:
IDomType
;
// 前端组件类型
domType
:
IDomType
;
// 前端组件类型
...
...
src/views/Project/components/Flow/index.tsx
View file @
3dac4b99
...
@@ -583,12 +583,31 @@ const Flow = (props: IProps) => {
...
@@ -583,12 +583,31 @@ const Flow = (props: IProps) => {
[
connectModifyParameters
,
tasks
]
[
connectModifyParameters
,
tasks
]
);
);
// 获取算子类型 批算还是流算子
const
getTaskType
=
useCallback
(
(
taskId
:
string
)
=>
{
let
type
=
""
;
tasks
?.
forEach
((
task
)
=>
{
if
(
task
.
id
===
taskId
)
{
type
=
task
.
type
;
}
});
return
type
;
},
[
tasks
]
);
/** 已经连接线啦 */
/** 已经连接线啦 */
const
onConnect
=
useCallback
(
const
onConnect
=
useCallback
(
(
connection
:
Connection
)
=>
{
(
connection
:
Connection
)
=>
{
const
{
inputClassType
,
outClassType
}
=
getClassType
(
connection
);
const
{
inputClassType
,
outClassType
}
=
getClassType
(
connection
);
let
result
:
ITask
[]
=
[];
let
result
:
ITask
[]
=
[];
if
(
inputClassType
===
outClassType
)
{
if
(
getTaskType
(
connection
.
source
as
string
)
===
"FLOW"
||
getTaskType
(
connection
.
target
as
string
)
===
"FLOW"
)
{
return
;
}
else
if
(
inputClassType
===
outClassType
)
{
result
=
connectCheck
(
connection
)
as
ITask
[];
result
=
connectCheck
(
connection
)
as
ITask
[];
}
else
{
}
else
{
Message
.
error
(
"端口数据类型不一致,无法连接!"
);
Message
.
error
(
"端口数据类型不一致,无法连接!"
);
...
@@ -596,7 +615,14 @@ const Flow = (props: IProps) => {
...
@@ -596,7 +615,14 @@ const Flow = (props: IProps) => {
}
}
setTasks
&&
setTasks
(
result
);
setTasks
&&
setTasks
(
result
);
},
},
[
Message
,
connectCheck
,
getClassType
,
setTasks
,
tasksDeleteLine
]
[
Message
,
connectCheck
,
getClassType
,
setTasks
,
tasksDeleteLine
,
getTaskType
,
]
);
);
/** 点击连线 */
/** 点击连线 */
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
3dac4b99
...
@@ -442,7 +442,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -442,7 +442,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
[
styles
.
required
]:
parameter
.
required
,
[
styles
.
required
]:
parameter
.
required
,
})
}
})
}
>
>
{
parameter
.
nam
e
}
{
parameter
.
titl
e
}
</
div
>
</
div
>
<
div
className=
{
styles
.
parameterClassTypeName
}
>
<
div
className=
{
styles
.
parameterClassTypeName
}
>
{
parameter
.
classTypeName
}
{
parameter
.
classTypeName
}
...
@@ -569,7 +569,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -569,7 +569,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
[
styles
.
required
]:
parameter
.
required
,
[
styles
.
required
]:
parameter
.
required
,
})
}
})
}
>
>
{
parameter
.
nam
e
}
{
parameter
.
titl
e
}
</
div
>
</
div
>
<
div
className=
{
styles
.
inOutParameterdataType
}
>
<
div
className=
{
styles
.
inOutParameterdataType
}
>
{
parameter
.
classTypeName
}
{
parameter
.
classTypeName
}
...
@@ -614,7 +614,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -614,7 +614,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
[
styles
.
required
]:
parameter
.
required
,
[
styles
.
required
]:
parameter
.
required
,
})
}
})
}
>
>
{
parameter
.
nam
e
}
{
parameter
.
titl
e
}
</
div
>
</
div
>
<
div
className=
{
styles
.
inOutParameterdataType
}
>
<
div
className=
{
styles
.
inOutParameterdataType
}
>
{
parameter
.
classTypeName
}
{
parameter
.
classTypeName
}
...
...
src/views/WorkFlowEdit/index.tsx
View file @
3dac4b99
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* @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
*/
*/
import
React
,
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useCallback
,
useEffect
,
useState
,
useMemo
}
from
"react"
;
import
ArrowBackIosNewIcon
from
"@mui/icons-material/ArrowBackIosNew"
;
import
ArrowBackIosNewIcon
from
"@mui/icons-material/ArrowBackIosNew"
;
import
IconButton
from
"@mui/material/IconButton"
;
import
IconButton
from
"@mui/material/IconButton"
;
import
_
from
"lodash"
;
import
_
from
"lodash"
;
...
@@ -55,6 +55,7 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -55,6 +55,7 @@ const WorkFlowEdit = observer((props: IProps) => {
const
[
oldversion
,
setOldersion
]
=
useState
(
""
);
// 编辑是自定义模板的老版本
const
[
oldversion
,
setOldersion
]
=
useState
(
""
);
// 编辑是自定义模板的老版本
const
[
description
,
setDescription
]
=
useState
(
""
);
// 自定义模板描述
const
[
description
,
setDescription
]
=
useState
(
""
);
// 自定义模板描述
const
[
creator
,
setCreator
]
=
useState
(
""
);
// 自定义模板创建人
const
[
creator
,
setCreator
]
=
useState
(
""
);
// 自定义模板创建人
const
[
operatingArea
,
setOperatingArea
]
=
useState
<
'form'
|
'flow'
>
(
'form'
)
// 当前操作区域
const
[
leftContentType
,
setLeftContentType
]
=
useState
(
"list"
);
// 页面左侧展示的是算子列表还是参数设置
const
[
leftContentType
,
setLeftContentType
]
=
useState
(
"list"
);
// 页面左侧展示的是算子列表还是参数设置
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
...
@@ -62,6 +63,14 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -62,6 +63,14 @@ const WorkFlowEdit = observer((props: IProps) => {
"返回后,当前页面已填写内容将不保存,确认返回吗?"
"返回后,当前页面已填写内容将不保存,确认返回吗?"
);
);
// 是否要监听删除时间
const
listenState
=
useMemo
(()
=>
{
if
(
operatingArea
===
'form'
)
{
return
false
}
return
!
saveFormDialog
&&
!
showCustomOperator
},
[
operatingArea
,
saveFormDialog
,
showCustomOperator
])
// 编辑时获取模板详情的方法
// 编辑时获取模板详情的方法
const
{
run
:
fetchTemplateConfigInfoRun
}
=
useMyRequest
(
const
{
run
:
fetchTemplateConfigInfoRun
}
=
useMyRequest
(
fetchTemplateConfigInfo
,
fetchTemplateConfigInfo
,
...
@@ -206,7 +215,12 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -206,7 +215,12 @@ const WorkFlowEdit = observer((props: IProps) => {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
swContent
}
>
<
div
className=
{
styles
.
swContent
}
>
<
div
className=
{
styles
.
swFormBox
}
>
<
div
className=
{
styles
.
swFormBox
}
onClick=
{
()
=>
{
setOperatingArea
(
'form'
);
}
}
>
<
div
className=
{
styles
.
radiosBox
}
>
<
div
className=
{
styles
.
radiosBox
}
>
<
RadioGroupOfButtonStyle
<
RadioGroupOfButtonStyle
radioOptions=
{
radioOptions
}
radioOptions=
{
radioOptions
}
...
@@ -243,13 +257,19 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -243,13 +257,19 @@ const WorkFlowEdit = observer((props: IProps) => {
+
+
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
swFlowBox
}
id=
"workFlowEditRight"
>
<
div
className=
{
styles
.
swFlowBox
}
id=
"workFlowEditRight"
onClick=
{
()
=>
{
setOperatingArea
(
'flow'
);
}
}
>
<
Flow
<
Flow
tasks=
{
templateConfigInfo
}
tasks=
{
templateConfigInfo
}
setTasks=
{
setTemplateConfigInfo
}
setTasks=
{
setTemplateConfigInfo
}
type=
"edit"
type=
"edit"
onFlowNodeClick=
{
handleNodeClick
}
onFlowNodeClick=
{
handleNodeClick
}
ListenState=
{
!
saveFormDialog
&&
!
showCustomOperator
}
ListenState=
{
listenState
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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