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
21df7ddd
Commit
21df7ddd
authored
Sep 05, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' into 'release'
Feat 20220801 See merge request
!87
parents
d3378119
055c291e
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
128 additions
and
100 deletions
+128
-100
MySelect.tsx
src/components/mui/MySelect.tsx
+0
-8
MySwitch.tsx
src/components/mui/MySwitch.tsx
+62
-38
index.tsx
src/views/Project/ProjectData/SeeDataset/index.tsx
+4
-2
index.module.css
src/views/Project/ProjectJobDetail/index.module.css
+7
-1
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+50
-46
index.module.css
...s/Project/ProjectWorkbench/workbenchList/index.module.css
+4
-0
index.tsx
src/views/Project/components/AddProject/index.tsx
+0
-1
index.tsx
src/views/Project/components/CurrentProject/index.tsx
+0
-1
index.tsx
src/views/Project/components/Flow/index.tsx
+1
-1
index.module.css
...ews/WorkFlowEdit/components/OperatorList/index.module.css
+0
-1
index.module.css
src/views/WorkFlowEdit/index.module.css
+0
-1
No files found.
src/components/mui/MySelect.tsx
View file @
21df7ddd
...
...
@@ -180,14 +180,6 @@ export default function MySelect(props: IProps) {
},
},
},
MuiFormControl
:
{
styleOverrides
:
{
root
:
{
width
:
"100%"
,
},
},
},
},
});
...
...
src/components/mui/MySwitch.tsx
View file @
21df7ddd
...
...
@@ -6,7 +6,7 @@
* @FilePath: /bkunyun/src/components/mui/MySwitch.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
*
as
React
from
"react"
;
import
React
,
{
useMemo
}
from
"react"
;
import
Switch
,
{
SwitchProps
}
from
"@mui/material/Switch"
;
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles"
;
...
...
@@ -17,43 +17,67 @@ interface IMySwitchProps extends SwitchProps {
disabled
?:
boolean
;
}
const
theme
=
createTheme
({
components
:
{
MuiSwitch
:
{
styleOverrides
:
{
root
:
{
boxSizing
:
"border-box"
,
padding
:
"0"
,
},
switchBase
:
{
top
:
"4px"
,
left
:
"4px"
,
padding
:
0
,
"&.Mui-checked"
:
{
left
:
"2px"
,
"& + .MuiSwitch-track"
:
{
backgroundColor
:
"#1370ff"
,
opacity
:
1
,
const
MySwitch
=
(
props
:
IMySwitchProps
)
=>
{
const
{
value
,
defaultChecked
,
onChange
,
disabled
=
false
,
size
,
...
other
}
=
props
;
const
bgColor
=
useMemo
(()
=>
{
if
(
disabled
)
{
if
(
value
)
{
return
"rgba(166, 211, 255, 1)"
;
}
else
{
return
"rgba(221, 225, 230, 1)"
;
}
}
else
{
if
(
value
)
{
return
"rgba(19, 112, 255, 1)"
;
}
else
{
return
"rgba(221, 225, 230, 1)"
;
}
}
},
[
disabled
,
value
]);
const
theme
=
createTheme
({
components
:
{
MuiSwitch
:
{
styleOverrides
:
{
root
:
{
boxSizing
:
"border-box"
,
padding
:
"0"
,
},
switchBase
:
{
top
:
"4px"
,
left
:
"4px"
,
padding
:
0
,
"&.Mui-checked"
:
{
left
:
"2px"
,
"& + .MuiSwitch-track"
:
{
backgroundColor
:
bgColor
,
opacity
:
1
,
},
},
},
},
thumb
:
{
width
:
"14px"
,
height
:
"14px
"
,
color
:
"#fff"
,
},
track
:
{
borderRadius
:
"11px
"
,
backgroundColor
:
"#E6E8EB"
,
opacity
:
1
,
thumb
:
{
width
:
"14px"
,
height
:
"14px"
,
color
:
"#fff
"
,
}
,
track
:
{
borderRadius
:
"11px"
,
backgroundColor
:
"rgba(221, 225, 230, 1)
"
,
opacity
:
1
,
}
,
},
},
},
},
});
});
const
MySwitch
=
(
props
:
IMySwitchProps
)
=>
{
const
{
value
,
defaultChecked
,
onChange
,
disabled
=
false
,
size
,
...
other
}
=
props
;
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
Switch
...
...
@@ -64,13 +88,13 @@ const MySwitch = (props: IMySwitchProps) => {
sx=
{
size
===
"medium"
?
{
width
:
44
,
height
:
24
,
}
width
:
44
,
height
:
24
,
}
:
{
width
:
40
,
height
:
22
,
}
width
:
40
,
height
:
22
,
}
}
{
...
other
}
/>
...
...
src/views/Project/ProjectData/SeeDataset/index.tsx
View file @
21df7ddd
...
...
@@ -158,6 +158,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
searchDataType
,
sort
,
keyword
,
firstGetList
,
// Message,
]
);
...
...
@@ -221,11 +222,12 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
<
div
className=
{
style
.
screensRight
}
>
<
MySelect
options=
{
dataTypes
}
title=
"选择属性"
title=
{
dataTypes
.
length
===
0
?
"暂无属性"
:
"选择属性"
}
isTitle=
{
true
}
value=
{
searchDataType
}
onChange=
{
handleSearchDataTypeChange
}
fullWidth=
{
false
}
disabled=
{
dataTypes
.
length
===
0
}
sx=
{
{
width
:
"160px"
,
marginRight
:
"16px"
,
...
...
@@ -269,8 +271,8 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
sx=
{
{
width
:
"340px"
,
marginRight
:
"16px"
,
height
:
"32px"
,
}
}
size=
"small"
></
MyInput
>
<
MyButton
text=
"确认"
...
...
src/views/Project/ProjectJobDetail/index.module.css
View file @
21df7ddd
...
...
@@ -110,8 +110,14 @@
color
:
rgba
(
138
,
144
,
153
,
1
);
font-size
:
14px
;
line-height
:
22px
;
width
:
72
px
;
width
:
80
px
;
margin-right
:
44px
;
overflow
:
hidden
;
word-wrap
:
break-word
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.taskInfoValue
{
color
:
rgba
(
30
,
38
,
51
,
1
);
...
...
src/views/Project/ProjectJobDetail/index.tsx
View file @
21df7ddd
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-0
1 09:39:20
* @LastEditTime: 2022-09-0
5 17:33:58
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -75,10 +75,12 @@ const ProjectSubmitWork = observer(() => {
const
productId
=
toJS
(
currentProjectStore
.
currentProductInfo
.
id
);
const
[
workFlowJobInfo
,
setWorkFlowJobInfo
]
=
useState
<
ITaskInfo
>
();
const
[
patchInfo
,
setPatchInfo
]
=
useState
<
any
>
();
const
[
activePatchId
,
setActivePatchId
]
=
useState
<
string
>
(
""
);
const
[
overviewActive
,
setOverviewActive
]
=
useState
(
true
);
const
[
activeFlowIndex
,
setActiveFlowIndex
]
=
useState
<
number
>
(
0
);
const
[
showOptions
,
setShowOptions
]
=
useState
<
boolean
>
(
false
);
/** 选中的node Id */
const
[
activeFlowIndex
,
setActiveFlowIndex
]
=
useState
<
string
>
(
""
);
/** 选中的flow Title */
const
[
selectNodeTitle
,
setSelectNodeTitle
]
=
useState
(
'参数'
)
// const [showOptions, setShowOptions] = useState<boolean>(false);
const
[
randerOutputs1
,
setRanderOutputs
]
=
useState
<
Array
<
any
>>
([]);
const
locationInfo
:
any
=
useLocation
()?.
state
;
// const locationInfo: any = location?.state;
...
...
@@ -338,32 +340,51 @@ const ProjectSubmitWork = observer(() => {
},
});
const
handleBatch
=
(
id
:
string
)
=>
{
setActivePatchId
(
id
);
if
(
id
)
{
setActiveFlowIndex
(
0
);
getworkFlowTaskInfoRun
({
jobId
:
workFlowJobInfo
?.
id
as
string
,
taskId
:
id
,
const
setExternalSelectedNodeId
=
(
id
:
string
)
=>
{
setActiveFlowIndex
(
id
);
workFlowJobInfo
?.
tasks
&&
workFlowJobInfo
?.
tasks
?.
forEach
((
item
)
=>
{
if
(
item
.
id
===
id
)
{
getworkFlowTaskInfoRun
({
jobId
:
workFlowJobInfo
?.
id
as
string
,
taskId
:
item
.
parentNode
||
item
.
id
});
}
});
}
};
const
randerParameters
=
useMemo
(()
=>
{
if
(
patchInfo
?.
children
)
{
if
(
patchInfo
.
children
.
length
>
0
)
{
return
patchInfo
.
children
[
activeFlowIndex
].
parameters
;
const
selectedParameter
=
useCallback
(
(
list
:
any
)
=>
{
let
result
:
any
=
[];
if
(
patchInfo
?.
id
===
activeFlowIndex
)
{
setSelectNodeTitle
(
list
[
0
].
title
||
''
)
result
=
list
[
0
].
parameters
}
else
{
return
patchInfo
?.
parameters
;
list
?.
length
&&
list
?.
forEach
((
item
:
any
)
=>
{
if
(
item
.
id
===
activeFlowIndex
)
{
console
.
log
(
1111
)
setSelectNodeTitle
(
item
?.
title
||
''
)
result
=
item
.
parameters
;
}
});
}
return
result
;
},
[
activeFlowIndex
,
patchInfo
]
);
const
randerParameters
=
useMemo
(()
=>
{
if
(
patchInfo
?.
children
?.
length
)
{
return
selectedParameter
(
patchInfo
?.
children
);
}
else
{
return
patchInfo
?.
parameters
;
return
selectedParameter
(
patchInfo
?.
parameters
)
;
}
},
[
activeFlowIndex
,
patchInfo
]);
},
[
patchInfo
,
selectedParameter
]);
const
handleParams
=
()
=>
{
setOverviewActive
(
false
);
setShowOptions
(
!
showOptions
);
};
/** 终止任务 */
...
...
@@ -456,7 +477,7 @@ const ProjectSubmitWork = observer(() => {
<
div
className=
{
styles
.
swContent
}
>
{
fullScreenShow
?
null
:
(
<
div
className=
{
styles
.
swFormBox
}
>
{
!
active
PatchId
&&
(
{
!
active
FlowIndex
&&
(
<
div
className=
{
styles
.
taskInfo
}
>
<
div
className=
{
styles
.
title
}
>
任务结果
</
div
>
{
workFlowJobInfo
?.
outputs
&&
...
...
@@ -626,7 +647,7 @@ const ProjectSubmitWork = observer(() => {
</
div
>
</
div
>
)
}
{
active
PatchId
&&
(
{
active
FlowIndex
&&
(
<
div
className=
{
styles
.
suanziInfo
}
>
<
div
className=
{
styles
.
title
}
>
{
patchInfo
?.
title
}
</
div
>
<
div
className=
{
styles
.
tabs
}
>
...
...
@@ -647,28 +668,7 @@ const ProjectSubmitWork = observer(() => {
// onClick=
{()
=
>
setOverviewActive(false)}
onClick=
{
()
=>
handleParams
()
}
>
{
patchInfo
?.
children
.
length
>
0
?
patchInfo
?.
children
[
activeFlowIndex
].
title
:
patchInfo
?.
title
}
{
showOptions
&&
patchInfo
?.
children
.
length
>
0
&&
(
<
div
className=
{
styles
.
options
}
>
{
patchInfo
?.
children
.
map
((
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
key=
{
index
}
className=
{
classNames
({
[
styles
.
option
]:
true
,
[
styles
.
optionActive
]:
activeFlowIndex
===
index
,
})
}
onClick=
{
()
=>
setActiveFlowIndex
(
index
)
}
>
{
item
.
title
}
</
div
>
);
})
}
</
div
>
)
}
{
selectNodeTitle
}
</
div
>
</
div
>
{
overviewActive
&&
(
...
...
@@ -721,7 +721,7 @@ const ProjectSubmitWork = observer(() => {
)
}
{
!
overviewActive
&&
(
<
div
className=
{
styles
.
params
}
>
{
randerParameters
.
map
((
parameter
:
any
)
=>
{
{
randerParameters
?
.
map
((
parameter
:
any
)
=>
{
return
(
<
div
className=
{
styles
.
taskInfoLi
}
key=
{
parameter
.
name
}
>
<
div
className=
{
styles
.
taskInfoParams
}
>
...
...
@@ -743,7 +743,11 @@ const ProjectSubmitWork = observer(() => {
className=
{
styles
.
swFlowBox
}
style=
{
fullScreenShow
?
{
height
:
"100vh"
}
:
undefined
}
>
<
Flow
tasks=
{
workFlowJobInfo
?.
tasks
}
onBatchClick=
{
handleBatch
}
/>
<
Flow
externalSelectedNodeId=
{
activeFlowIndex
}
tasks=
{
workFlowJobInfo
?.
tasks
}
setExternalSelectedNodeId=
{
setExternalSelectedNodeId
}
/>
</
div
>
</
div
>
<
img
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.module.css
View file @
21df7ddd
...
...
@@ -48,6 +48,10 @@
font-weight
:
600
;
color
:
#1e2633
;
margin-bottom
:
8px
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
overflow
:
hidden
;
padding-right
:
20px
;
}
.tabBoxDesc
{
...
...
src/views/Project/components/AddProject/index.tsx
View file @
21df7ddd
...
...
@@ -70,7 +70,6 @@ const AddProject = (props: IAddProjectProps) => {
project
=
{
...
item
};
}
});
currentProjectStore
.
changeProject
(
project
);
setFileServerEndPointLocalStorage
(
project
.
zoneId
);
getFiletokenAccordingToId
(
project
.
id
).
then
((
res
)
=>
{
project
.
filetoken
=
res
;
...
...
src/views/Project/components/CurrentProject/index.tsx
View file @
21df7ddd
...
...
@@ -33,7 +33,6 @@ const CurrentProject = observer(() => {
const
canBeOpen
=
projectListOpen
&&
Boolean
(
anchorEl
);
const
id
=
canBeOpen
?
"spring-popper"
:
undefined
;
const
handleChangeCurrentProject
=
(
project
:
any
)
=>
{
currentProjectStore
.
changeProject
(
project
);
setFileServerEndPointLocalStorage
(
project
.
zoneId
);
getFiletokenAccordingToId
(
project
.
id
).
then
((
res
)
=>
{
project
.
filetoken
=
res
;
...
...
src/views/Project/components/Flow/index.tsx
View file @
21df7ddd
...
...
@@ -415,7 +415,7 @@ const Flow = (props: IProps) => {
}
else
{
setInSideFlowNodeId
(
node
.
id
);
setInSideBatchNodeId
(
""
);
setExternalSelectedNodeId
&&
setExternalSelectedNodeId
(
""
);
setExternalSelectedNodeId
&&
setExternalSelectedNodeId
(
node
.
id
);
}
document
.
getElementById
(
`point
${
node
.
id
}
`
)?.
scrollIntoView
(
true
);
}
...
...
src/views/WorkFlowEdit/components/OperatorList/index.module.css
View file @
21df7ddd
...
...
@@ -71,7 +71,6 @@
overflow-y
:
overlay
;
height
:
calc
(
100%
-
48px
);
position
:
relative
;
overflow
:
visible
;
}
.noData
{
display
:
flex
;
...
...
src/views/WorkFlowEdit/index.module.css
View file @
21df7ddd
...
...
@@ -47,7 +47,6 @@
border-right
:
1px
solid
rgba
(
235
,
237
,
240
,
1
);
width
:
360px
;
height
:
100%
;
overflow-y
:
auto
;
box-sizing
:
border-box
;
position
:
relative
;
}
...
...
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