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
04ddd5cd
Commit
04ddd5cd
authored
Aug 17, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' into 'release'
Feat 20220801 See merge request
!61
parents
b3565326
1f1d2f75
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
111 additions
and
21 deletions
+111
-21
MyTooltip.tsx
src/components/mui/MyTooltip.tsx
+3
-3
Tabs.tsx
src/components/mui/Tabs.tsx
+2
-2
index.module.css
src/views/MenuLayout/index.module.css
+1
-1
index.tsx
src/views/Project/ProjectData/UpLoaderFile/index.tsx
+0
-4
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+2
-2
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+1
-1
index.tsx
...ews/Project/components/Flow/components/FlowNode/index.tsx
+4
-2
index.tsx
src/views/Project/components/Flow/index.tsx
+81
-2
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+11
-1
index.tsx
src/views/WorkFlowEdit/index.tsx
+6
-3
No files found.
src/components/mui/MyTooltip.tsx
View file @
04ddd5cd
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
import
{
Tooltip
,
TooltipProps
}
from
"@mui/material"
;
import
{
Tooltip
,
TooltipProps
}
from
"@mui/material"
;
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles"
;
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles"
;
interface
IMyTooltipProps
extends
TooltipProps
{
interface
IMyTooltipProps
extends
Omit
<
TooltipProps
,
"title"
>
{
title
:
string
;
title
?:
string
|
boolean
;
}
}
const
theme
=
createTheme
({
const
theme
=
createTheme
({
...
@@ -33,7 +33,7 @@ const theme = createTheme({
...
@@ -33,7 +33,7 @@ const theme = createTheme({
});
});
const
MyTooltip
=
(
props
:
IMyTooltipProps
)
=>
{
const
MyTooltip
=
(
props
:
IMyTooltipProps
)
=>
{
const
{
title
,
children
,
placement
=
"top"
,
...
other
}
=
props
;
const
{
title
=
false
,
children
,
placement
=
"top"
,
...
other
}
=
props
;
return
(
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
ThemeProvider
theme=
{
theme
}
>
<
Tooltip
<
Tooltip
...
...
src/components/mui/Tabs.tsx
View file @
04ddd5cd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-1
0 11:06:12
* @LastEditTime: 2022-08-1
6 15:53:31
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/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
*/
*/
...
@@ -115,7 +115,7 @@ const Tabs = (props: IProps) => {
...
@@ -115,7 +115,7 @@ const Tabs = (props: IProps) => {
return
(
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
ThemeProvider
theme=
{
theme
}
>
<
TabContext
value=
{
value
}
>
<
TabContext
value=
{
value
}
>
<
Box
sx=
{
{
borderBottom
:
1
,
borderColor
:
"#
EDEFF2
"
}
}
>
<
Box
sx=
{
{
borderBottom
:
1
,
borderColor
:
"#
dde1e6
"
}
}
>
<
TabList
<
TabList
onChange=
{
(
e
:
any
,
val
:
string
)
=>
{
onChange=
{
(
e
:
any
,
val
:
string
)
=>
{
onChange
(
val
);
onChange
(
val
);
...
...
src/views/MenuLayout/index.module.css
View file @
04ddd5cd
...
@@ -37,5 +37,5 @@
...
@@ -37,5 +37,5 @@
.active
{
.active
{
border-left
:
3px
solid
#1370ff
;
border-left
:
3px
solid
#1370ff
;
color
:
#1370ff
;
color
:
#1370ff
;
background-color
:
#e
bed
f0
;
background-color
:
#e
6ea
f0
;
}
}
src/views/Project/ProjectData/UpLoaderFile/index.tsx
View file @
04ddd5cd
...
@@ -239,10 +239,6 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
...
@@ -239,10 +239,6 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
// lineHeight: "20px",
// lineHeight: "20px",
// color: "#8A9099",
// color: "#8A9099",
// }}
// }}
tableBodySx={{
backgroundColor:
fileList.length >= 10 ? "rgba(255, 0, 0, 0.6)" : "",
}}
tableContainerStyle={{
tableContainerStyle={{
maxHeight: "300px",
maxHeight: "300px",
}}
}}
...
...
src/views/Project/ProjectSubmitWork/index.tsx
View file @
04ddd5cd
...
@@ -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-
08 16:41:20
* @LastEditTime: 2022-08-
17 10:58:02
* @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
*/
*/
...
@@ -222,7 +222,7 @@ const ProjectSubmitWork = observer(() => {
...
@@ -222,7 +222,7 @@ const ProjectSubmitWork = observer(() => {
promotedParameters
,
promotedParameters
,
});
});
}
else
{
}
else
{
Message
.
error
(
"请完善
左侧表单再提交
"
);
Message
.
error
(
"请完善
算子信息后提交任务
"
);
}
}
};
};
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
04ddd5cd
...
@@ -411,7 +411,7 @@ const ProjectMembers = observer(() => {
...
@@ -411,7 +411,7 @@ const ProjectMembers = observer(() => {
<
Box
className=
{
styles
.
tabBoxMiddle
}
>
<
Box
className=
{
styles
.
tabBoxMiddle
}
>
<
img
alt=
""
src=
{
jobCost
}
/>
<
img
alt=
""
src=
{
jobCost
}
/>
<
div
className=
{
styles
.
tabBoxTime
}
>
<
div
className=
{
styles
.
tabBoxTime
}
>
{
item
.
jobCost
.
toFixed
(
2
)
}
元
{
item
.
jobCost
?
item
.
jobCost
.
toFixed
(
2
)
:
"--"
}
</
div
>
</
div
>
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
tabBoxJobStatus
}
>
<
Box
className=
{
styles
.
tabBoxJobStatus
}
>
...
...
src/views/Project/components/Flow/components/FlowNode/index.tsx
View file @
04ddd5cd
...
@@ -51,7 +51,8 @@ const FlowNode = (props: any) => {
...
@@ -51,7 +51,8 @@ const FlowNode = (props: any) => {
return
(
return
(
(
parameters
?.
length
&&
(
parameters
?.
length
&&
parameters
?.
filter
((
item
:
any
)
=>
{
parameters
?.
filter
((
item
:
any
)
=>
{
return
item
.
parameterGroup
===
"in"
&&
!
item
?.
thrown
;
return
item
.
parameterGroup
===
"in"
;
// return item.parameterGroup === "in" && !item?.thrown;
}))
||
}))
||
[]
[]
);
);
...
@@ -62,7 +63,8 @@ const FlowNode = (props: any) => {
...
@@ -62,7 +63,8 @@ const FlowNode = (props: any) => {
return
(
return
(
(
parameters
?.
length
&&
(
parameters
?.
length
&&
parameters
?.
filter
((
item
:
any
)
=>
{
parameters
?.
filter
((
item
:
any
)
=>
{
return
item
.
parameterGroup
===
"out"
&&
!
item
?.
thrown
;
return
item
.
parameterGroup
===
"out"
;
// return item.parameterGroup === "out" && !item?.thrown;
}))
||
}))
||
[]
[]
);
);
...
...
src/views/Project/components/Flow/index.tsx
View file @
04ddd5cd
...
@@ -77,7 +77,7 @@ const Flow = (props: IProps) => {
...
@@ -77,7 +77,7 @@ const Flow = (props: IProps) => {
/** 原始数据删除线 */
/** 原始数据删除线 */
const
tasksDeleteLine
=
useCallback
(
const
tasksDeleteLine
=
useCallback
(
(
connection
:
Connection
|
Edge
|
any
)
=>
{
(
connection
:
Connection
|
Edge
|
any
)
=>
{
cons
t
result
=
le
t
result
=
(
tasks
?.
length
&&
(
tasks
?.
length
&&
tasks
.
map
((
item
)
=>
{
tasks
.
map
((
item
)
=>
{
/** 删除batch起始的edges中的一项 === 等于删除了一根连线 */
/** 删除batch起始的edges中的一项 === 等于删除了一根连线 */
...
@@ -123,6 +123,45 @@ const Flow = (props: IProps) => {
...
@@ -123,6 +123,45 @@ const Flow = (props: IProps) => {
}
}
}))
||
}))
||
[];
[];
// 更新批节点下对应流节点的hidden和错误提示
result
=
result
.
map
((
task
)
=>
{
if
(
task
.
parentNode
===
connection
.
target
)
{
let
isCheck
=
true
;
const
parametersChange
=
task
.
parameters
.
map
((
parameter
)
=>
{
if
(
parameter
.
name
===
connection
.
targetHandle
)
{
const
{
error
,
helperText
}
=
getCustomTemplateParameterCheckResult
({
...
parameter
,
linked
:
false
,
hidden
:
false
,
});
return
{
...
parameter
,
hidden
:
false
,
linked
:
false
,
error
,
helperText
,
};
}
else
{
return
parameter
;
}
});
parametersChange
.
forEach
((
parameter
)
=>
{
if
(
getCustomTemplateParameterCheckResult
(
parameter
).
error
===
true
)
{
isCheck
=
false
;
}
});
return
{
...
task
,
isCheck
,
parameters
:
parametersChange
,
};
}
else
{
return
task
;
}
});
return
result
;
return
result
;
},
},
[
tasks
]
[
tasks
]
...
@@ -472,7 +511,7 @@ const Flow = (props: IProps) => {
...
@@ -472,7 +511,7 @@ const Flow = (props: IProps) => {
/** 连接校验并修改值 */
/** 连接校验并修改值 */
const
connectCheck
=
useCallback
(
const
connectCheck
=
useCallback
(
(
connection
:
Connection
)
=>
{
(
connection
:
Connection
)
=>
{
cons
t
newVal
=
le
t
newVal
=
(
tasks
?.
length
&&
(
tasks
?.
length
&&
tasks
?.
map
((
item
)
=>
{
tasks
?.
map
((
item
)
=>
{
if
(
item
.
id
===
connection
.
source
)
{
if
(
item
.
id
===
connection
.
source
)
{
...
@@ -499,6 +538,46 @@ const Flow = (props: IProps) => {
...
@@ -499,6 +538,46 @@ const Flow = (props: IProps) => {
}
}
}))
||
}))
||
[];
[];
// 更新批节点下对应流节点的hidden和错误提示
newVal
=
newVal
.
map
((
task
)
=>
{
if
(
task
.
parentNode
===
connection
.
target
)
{
let
isCheck
=
true
;
// 红点校验
let
parametersChange
=
task
.
parameters
.
map
((
parameter
)
=>
{
if
(
parameter
.
name
===
connection
.
targetHandle
)
{
const
{
error
,
helperText
}
=
getCustomTemplateParameterCheckResult
({
...
parameter
,
linked
:
true
,
hidden
:
true
,
});
return
{
...
parameter
,
hidden
:
true
,
linked
:
true
,
error
,
helperText
,
};
}
else
{
return
parameter
;
}
});
parametersChange
.
forEach
((
parameter
)
=>
{
if
(
getCustomTemplateParameterCheckResult
(
parameter
).
error
===
true
)
{
isCheck
=
false
;
}
});
return
{
...
task
,
isCheck
,
parameters
:
parametersChange
,
};
}
else
{
return
task
;
}
});
return
newVal
;
return
newVal
;
},
},
[
connectModifyParameters
,
tasks
]
[
connectModifyParameters
,
tasks
]
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
04ddd5cd
...
@@ -67,6 +67,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -67,6 +67,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/** 通过parameter.name删除与之相关联的线 */
/** 通过parameter.name删除与之相关联的线 */
const
handleHiddenDeleteEdge
=
useCallback
(
const
handleHiddenDeleteEdge
=
useCallback
(
(
val
:
ITask
[],
parameterName
:
string
)
=>
{
(
val
:
ITask
[],
parameterName
:
string
)
=>
{
let
taskParentNode
=
""
;
val
.
forEach
((
task
)
=>
{
if
(
task
.
id
===
taskId
)
{
taskParentNode
=
task
.
parentNode
||
""
;
}
});
return
(
return
(
val
?.
length
&&
val
?.
length
&&
val
?.
map
((
item
)
=>
{
val
?.
map
((
item
)
=>
{
...
@@ -92,7 +98,11 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -92,7 +98,11 @@ const ParameterSetting = (props: IParameterSettingProps) => {
const
newEdges
=
const
newEdges
=
(
item
?.
edges
?.
length
&&
(
item
?.
edges
?.
length
&&
item
?.
edges
?.
filter
((
every
)
=>
{
item
?.
edges
?.
filter
((
every
)
=>
{
return
every
.
targetHandle
!==
parameterName
;
// 因为存在同名的parameterName 所以增加every.source === taskParentNode判断
return
(
every
.
targetHandle
!==
parameterName
||
every
.
source
===
taskParentNode
);
}))
||
}))
||
[];
[];
return
{
return
{
...
...
src/views/WorkFlowEdit/index.tsx
View file @
04ddd5cd
...
@@ -143,8 +143,9 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -143,8 +143,9 @@ const WorkFlowEdit = observer((props: IProps) => {
return
;
return
;
}
}
let
templateConfigInfoClone
:
ITask
[]
=
_
.
cloneDeep
(
templateConfigInfo
);
let
templateConfigInfoClone
:
ITask
[]
=
_
.
cloneDeep
(
templateConfigInfo
);
let
check
=
true
;
let
tasksIsCheck
=
true
;
// 整体校验
templateConfigInfoClone
.
forEach
((
task
)
=>
{
templateConfigInfoClone
.
forEach
((
task
)
=>
{
let
taskIsCheck
=
true
;
// 单个task校验
task
.
parameters
.
forEach
((
parameter
)
=>
{
task
.
parameters
.
forEach
((
parameter
)
=>
{
if
(
task
.
type
===
"BATCH"
&&
parameter
.
thrown
)
{
if
(
task
.
type
===
"BATCH"
&&
parameter
.
thrown
)
{
return
;
return
;
...
@@ -153,12 +154,14 @@ const WorkFlowEdit = observer((props: IProps) => {
...
@@ -153,12 +154,14 @@ const WorkFlowEdit = observer((props: IProps) => {
parameter
.
error
=
checkResult
.
error
;
parameter
.
error
=
checkResult
.
error
;
parameter
.
helperText
=
checkResult
.
helperText
;
parameter
.
helperText
=
checkResult
.
helperText
;
if
(
checkResult
.
error
)
{
if
(
checkResult
.
error
)
{
check
=
false
;
taskIsCheck
=
false
;
tasksIsCheck
=
false
;
}
}
});
});
task
.
isCheck
=
taskIsCheck
;
});
});
setTemplateConfigInfo
(
templateConfigInfoClone
);
setTemplateConfigInfo
(
templateConfigInfoClone
);
if
(
!
c
heck
)
{
if
(
!
tasksIsC
heck
)
{
Message
.
error
(
"工作流校验未通过,请检查!"
);
Message
.
error
(
"工作流校验未通过,请检查!"
);
}
else
{
}
else
{
setSaveFormDialog
(
true
);
setSaveFormDialog
(
true
);
...
...
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