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
c1b2afe3
Commit
c1b2afe3
authored
Aug 22, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' into 'release'
Feat 20220801 See merge request
!64
parents
61bbd12c
e8ef7d31
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
16 deletions
+80
-16
MyButton.tsx
src/components/mui/MyButton.tsx
+1
-0
MyDialog.tsx
src/components/mui/MyDialog.tsx
+1
-1
index.module.css
src/views/MenuLayout/index.module.css
+1
-1
index.tsx
src/views/Project/ProjectData/AddFolder/index.tsx
+1
-1
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.module.css
src/views/WorkFlowEdit/index.module.css
+16
-2
index.tsx
src/views/WorkFlowEdit/index.tsx
+27
-5
No files found.
src/components/mui/MyButton.tsx
View file @
c1b2afe3
...
@@ -54,6 +54,7 @@ const theme = createTheme({
...
@@ -54,6 +54,7 @@ const theme = createTheme({
"&.MuiButton-outlinedError"
:
{
"&.MuiButton-outlinedError"
:
{
color
:
"rgba(255, 78, 78, 1)"
,
color
:
"rgba(255, 78, 78, 1)"
,
border
:
"1px solid rgba(255, 78, 78, 1)"
,
border
:
"1px solid rgba(255, 78, 78, 1)"
,
"&:hover"
:
{
backgroundColor
:
'transparent'
},
},
},
"& .MuiLoadingButton-loadingIndicator"
:
{
"& .MuiLoadingButton-loadingIndicator"
:
{
color
:
"#fff"
,
color
:
"#fff"
,
...
...
src/components/mui/MyDialog.tsx
View file @
c1b2afe3
...
@@ -103,7 +103,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
...
@@ -103,7 +103,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabled=
{
disabledConfirm
}
disabled=
{
disabledConfirm
}
isLoadingButton=
{
true
}
isLoadingButton=
{
true
}
loading=
{
loading
}
loading=
{
loading
}
style=
{
{
...
okSx
}
}
style=
{
{
marginLeft
:
'12px'
,
...
okSx
}
}
/>
/>
)
:
null
}
)
:
null
}
</
DialogActions
>
</
DialogActions
>
...
...
src/views/MenuLayout/index.module.css
View file @
c1b2afe3
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
color
:
#565c66
;
color
:
#565c66
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
22px
;
line-height
:
22px
;
border-left
:
3px
solid
#f
ff
;
border-left
:
3px
solid
#f
7f8fa
;
}
}
.listItem
:hover
{
.listItem
:hover
{
background-color
:
#eef1f5
;
background-color
:
#eef1f5
;
...
...
src/views/Project/ProjectData/AddFolder/index.tsx
View file @
c1b2afe3
...
@@ -54,7 +54,7 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -54,7 +54,7 @@ const AddFolder = (props: IAddFolderProps) => {
refresh
();
refresh
();
});
});
}
else
{
}
else
{
Message
.
info
(
fileNameCheck
.
help
||
"请输入文件夹名称"
);
Message
.
error
(
fileNameCheck
.
help
||
"请输入文件夹名称"
);
}
}
};
};
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
c1b2afe3
...
@@ -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 @
c1b2afe3
...
@@ -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 @
c1b2afe3
...
@@ -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 @
c1b2afe3
...
@@ -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.module.css
View file @
c1b2afe3
...
@@ -45,14 +45,28 @@
...
@@ -45,14 +45,28 @@
bottom
:
20px
;
bottom
:
20px
;
width
:
36px
;
width
:
36px
;
height
:
36px
;
height
:
36px
;
border-radius
:
50%
;
border-radius
:
18px
;
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
font-size
:
30px
;
font-size
:
30px
;
line-height
:
36px
;
line-height
:
36px
;
text-align
:
center
;
text-align
:
start
;
color
:
RGBA
(
66
,
141
,
255
,
1
);
color
:
RGBA
(
66
,
141
,
255
,
1
);
cursor
:
pointer
;
cursor
:
pointer
;
background-color
:
#fff
;
background-color
:
#fff
;
transition
:
width
1s
;
-webkit-transition
:
width
1s
;
overflow
:
hidden
;
display
:
flex
;
justify-content
:
start
;
align-items
:
center
;
}
.addOperator
:hover
{
width
:
105px
;
}
.addText
{
font-size
:
14px
;
line-height
:
36px
;
white-space
:
nowrap
;
}
}
.swFlowBox
{
.swFlowBox
{
flex
:
1
;
flex
:
1
;
...
...
src/views/WorkFlowEdit/index.tsx
View file @
c1b2afe3
...
@@ -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"
;
...
@@ -25,6 +25,7 @@ import { getCustomTemplateParameterCheckResult } from "./util";
...
@@ -25,6 +25,7 @@ import { getCustomTemplateParameterCheckResult } from "./util";
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
CustomOperator
from
"../CustomOperator"
;
import
CustomOperator
from
"../CustomOperator"
;
import
SaveCustomTemplate
from
"./components/SaveCustomTemplate"
;
import
SaveCustomTemplate
from
"./components/SaveCustomTemplate"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -55,6 +56,7 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -55,6 +56,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 +64,14 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -62,6 +64,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 +216,12 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -206,7 +216,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
}
...
@@ -240,16 +255,23 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -240,16 +255,23 @@ const WorkFlowEdit = observer((props: IProps) => {
className=
{
styles
.
addOperator
}
className=
{
styles
.
addOperator
}
onClick=
{
()
=>
setShowCustomOperator
(
true
)
}
onClick=
{
()
=>
setShowCustomOperator
(
true
)
}
>
>
+
<
AddIcon
sx=
{
{
padding
:
"6px"
}
}
/>
<
span
className=
{
styles
.
addText
}
>
添加算子
</
span
>
</
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