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
1b79d21b
Commit
1b79d21b
authored
Sep 01, 2022
by
wuyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'feat-20220801' into 'master'"
This reverts merge request
!78
parent
52c8279d
Hide whitespace changes
Inline
Side-by-side
Showing
67 changed files
with
740 additions
and
890 deletions
+740
-890
api_prefix.ts
src/api/api_prefix.ts
+3
-3
refresh.svg
src/assets/project/refresh.svg
+0
-11
workbenchList.svg
src/assets/project/workbenchList.svg
+18
-7
workbenchList_hover.svg
src/assets/project/workbenchList_hover.svg
+0
-15
workbenchList_select.svg
src/assets/project/workbenchList_select.svg
+18
-7
workbenchTemplate.svg
src/assets/project/workbenchTemplate.svg
+20
-9
workbenchTemplate_hover.svg
src/assets/project/workbenchTemplate_hover.svg
+0
-16
workbenchTemplate_select.svg
src/assets/project/workbenchTemplate_select.svg
+20
-9
index.module.css
...components/BusinessComponents/FileSelect/index.module.css
+1
-1
index.tsx
src/components/BusinessComponents/FileSelect/index.tsx
+0
-1
index.module.css
...CommonComponents/RadioGroupOfButtonStyle/index.module.css
+0
-8
index.tsx
...onents/CommonComponents/RadioGroupOfButtonStyle/index.tsx
+12
-35
MySnackbarProvider.tsx
src/components/MySnackbar/MySnackbarProvider.tsx
+20
-39
useMySnackbar.ts
src/components/MySnackbar/useMySnackbar.ts
+0
-1
MyButton.tsx
src/components/mui/MyButton.tsx
+4
-2
MyDialog.tsx
src/components/mui/MyDialog.tsx
+1
-1
MyInput.tsx
src/components/mui/MyInput.tsx
+1
-5
MyPopconfirm.tsx
src/components/mui/MyPopconfirm.tsx
+1
-8
MySelect.tsx
src/components/mui/MySelect.tsx
+0
-8
index.tsx
src/components/mui/MyTable/index.tsx
+1
-2
MyTooltip.tsx
src/components/mui/MyTooltip.tsx
+3
-3
Tabs.tsx
src/components/mui/Tabs.tsx
+10
-30
index.tsx
src/index.tsx
+3
-1
currentProject.ts
src/store/modules/currentProject.ts
+12
-28
util.ts
src/utils/util.ts
+3
-3
index.tsx
src/views/CustomOperator/components/OperatorList/index.tsx
+1
-8
index.tsx
src/views/CustomOperator/components/SaveOperator/index.tsx
+2
-2
index.tsx
src/views/CustomOperator/index.tsx
+2
-5
index.module.css
src/views/MenuLayout/index.module.css
+2
-2
index.tsx
src/views/Project/ProjectData/AddFolder/index.tsx
+1
-1
index.tsx
src/views/Project/ProjectData/SeeDataset/index.tsx
+13
-35
index.tsx
src/views/Project/ProjectData/UpLoaderFile/index.tsx
+4
-0
index.module.css
src/views/Project/ProjectData/index.module.css
+0
-5
index.tsx
src/views/Project/ProjectData/index.tsx
+6
-12
index.module.css
src/views/Project/ProjectJobDetail/index.module.css
+0
-7
index.tsx
src/views/Project/ProjectJobDetail/index.tsx
+18
-8
utils.ts
src/views/Project/ProjectJobDetail/utils.ts
+7
-6
index.tsx
src/views/Project/ProjectOverview/TaskCard/index.tsx
+13
-12
index.module.css
src/views/Project/ProjectOverview/index.module.css
+1
-1
index.module.css
src/views/Project/ProjectSetting/BaseInfo/index.module.css
+59
-56
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+11
-27
AddMember.tsx
...ct/ProjectSetting/ProjectMembers/components/AddMember.tsx
+10
-3
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+23
-26
index.tsx
src/views/Project/ProjectSubmitWork/WorkFlow/index.tsx
+5
-5
index.tsx
src/views/Project/ProjectSubmitWork/index.tsx
+11
-29
interface.ts
src/views/Project/ProjectSubmitWork/interface.ts
+1
-3
index.tsx
src/views/Project/ProjectWorkbench/index.tsx
+23
-10
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+29
-45
index.tsx
...kbench/workbenchTemplate/components/AddTemplate/index.tsx
+5
-13
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+2
-2
index.tsx
src/views/Project/components/AddProject/index.tsx
+2
-2
index.tsx
src/views/Project/components/CurrentProject/index.tsx
+12
-9
index.module.css
...ect/components/Flow/components/BatchNode/index.module.css
+2
-7
index.tsx
...ws/Project/components/Flow/components/BatchNode/index.tsx
+5
-6
index.tsx
...ct/components/Flow/components/BatchOperatorFlow/index.tsx
+3
-13
index.tsx
...ews/Project/components/Flow/components/FlowNode/index.tsx
+3
-5
index.tsx
src/views/Project/components/Flow/index.tsx
+33
-150
index.tsx
src/views/Project/components/ProjectListPopper/index.tsx
+4
-11
index.tsx
src/views/WorkFlowEdit/components/OperatorList/index.tsx
+0
-2
index.module.css
...WorkFlowEdit/components/ParameterSetting/index.module.css
+0
-6
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+22
-47
index.tsx
...iews/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
+3
-3
index.module.css
src/views/WorkFlowEdit/index.module.css
+2
-16
index.tsx
src/views/WorkFlowEdit/index.tsx
+8
-36
util.ts
src/views/WorkFlowEdit/util.ts
+1
-1
button.tsx
src/views/mui_demo/button.tsx
+178
-0
input.tsx
src/views/mui_demo/input.tsx
+62
-0
No files found.
src/api/api_prefix.ts
View file @
1b79d21b
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:17:48
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-0
8-30 16:22:1
5
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditTime: 2022-0
7-18 15:44:3
5
* @FilePath: /bkunyun/src/api/api_prefix.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -36,7 +36,7 @@ switch (process.env.REACT_APP_ENV) {
BACKEND_API_URI_PREFIX
=
"https://www.cloudam.cn"
;
}
else
{
BACKEND_API_URI_PREFIX
=
"http://47.
75.104.171
"
;
BACKEND_API_URI_PREFIX
=
"http://47.
57.4.97
"
;
}
break
;
}
...
...
src/assets/project/refresh.svg
deleted
100644 → 0
View file @
52c8279d
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
刷新备份
</title>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"刷新备份"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<path
d=
"M14.1034483,5.0750097 L12.3103448,6.87501758 C11.862069,4.9250128 10.0689767,3.42499873 7.97701897,3.42499873 C5.51150172,3.42499873 3.49426034,5.45000759 3.49426034,7.92501842 C3.49426034,10.3999842 5.51150172,12.4249931 7.97701897,12.4249931 C10.3678534,12.4249931 12.3850948,10.5500599 12.4597328,8.15001941 L13.8045603,6.8000135 C13.8793103,7.17501139 13.9540603,7.55002053 13.9540603,8.0000225 C13.9540603,11.2999882 11.2644052,14 7.97701897,14 C4.68965517,14 2,11.2999882 2,8.0000225 C2,4.70001181 4.68965517,2 7.97701897,2 C9.91954397,2 11.712681,2.97499677 12.7586207,4.40000675 L12.9080086,4.17500577 L15,4.17500577 L14.1034483,5.0750097 Z"
id=
"路径"
fill=
"#8A9099"
></path>
</g>
</g>
</svg>
\ No newline at end of file
src/assets/project/workbenchList.svg
View file @
1b79d21b
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/任务列表备份
</title>
<title>
1.Base基础/Icon图标/任务列表
</title>
<defs>
<filter
color-interpolation-filters=
"auto"
id=
"filter-1"
>
<feColorMatrix
in=
"SourceGraphic"
type=
"matrix"
values=
"0 0 0 0 0.760000 0 0 0 0 0.776000 0 0 0 0 0.800000 0 0 0 1.000000 0"
></feColorMatrix>
</filter>
</defs>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"1.Base基础/Icon图标/任务列表备份"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(0.500000, 0.000000)"
stroke=
"#C2C6CC"
stroke-width=
"1.5"
>
<path
d=
"M7.38809691,0.889939751 L14.1102244,4.08516037 L14.2499569,11.9840447 L7.60081331,15.1318104 L0.897545722,12.2122049 L0.75,4.30940599 L7.38809691,0.889939751 Z"
id=
"路径-15"
></path>
<polyline
id=
"路径-20"
points=
"1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"
></polyline>
<line
x1=
"7.47016174"
y1=
"7.39513959"
x2=
"7.47016174"
y2=
"14.8580198"
id=
"路径-21"
></line>
<g
id=
"工作台(管理员)空"
transform=
"translate(-370.000000, -245.000000)"
>
<g
id=
"编组-5"
transform=
"translate(370.000000, 242.000000)"
>
<g
id=
"1.Base基础/Icon图标/任务列表"
transform=
"translate(0.000000, 3.000000)"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
filter=
"url(#filter-1)"
id=
"编组-4"
>
<g
transform=
"translate(0.500000, 0.000000)"
>
<path
d=
"M7.38809691,0.889939751 C7.45764437,0.855744844 7.53911808,0.85573765 7.60867158,0.889920274 L7.60867158,0.889920274 L14.1102244,4.08516037 C14.1529938,4.10617975 14.187927,4.13844408 14.2121677,4.17736742 C14.2364085,4.21629077 14.2499569,4.26187312 14.2499569,4.30952854 L14.2499569,4.30952854 L14.2499569,11.9840447 C14.2499569,12.0332683 14.2355127,12.0802004 14.2098426,12.119868 C14.1841726,12.1595356 14.1472766,12.1919385 14.1023731,12.2121037 L14.1023731,12.2121037 L7.60081331,15.1318104 C7.53565621,15.161071 7.46109499,15.1610648 7.39594277,15.1317934 L7.39594277,15.1317934 L0.897545722,12.2122049 C0.852652465,12.1920353 0.815766035,12.1596329 0.790102919,12.1199688 C0.764439802,12.0803047 0.75,12.033379 0.75,11.984163 L0.75,11.984163 L0.75,4.30940599 C0.75,4.26175853 0.763543923,4.21618307 0.78777749,4.17726362 L0.78777749,4.17726362 Z"
id=
"路径-15"
stroke=
"#979797"
stroke-width=
"1.5"
></path>
<polyline
id=
"路径-20"
stroke=
"#979797"
stroke-width=
"1.5"
points=
"1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"
></polyline>
<line
x1=
"7.47016174"
y1=
"7.39513959"
x2=
"7.47016174"
y2=
"14.8580198"
id=
"路径-21"
stroke=
"#979797"
stroke-width=
"1.5"
></line>
</g>
</g>
</g>
</g>
</g>
</g>
...
...
src/assets/project/workbenchList_hover.svg
deleted
100644 → 0
View file @
52c8279d
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/任务列表备份 3
</title>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"1.Base基础/Icon图标/任务列表备份"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(0.500000, 0.000000)"
stroke=
"#1E2633"
stroke-width=
"1.5"
>
<path
d=
"M7.38809691,0.889939751 L14.1102244,4.08516037 L14.2499569,11.9840447 L7.60081331,15.1318104 L0.897545722,12.2122049 L0.75,4.30940599 L7.38809691,0.889939751 Z"
id=
"路径-15"
></path>
<polyline
id=
"路径-20"
points=
"1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"
></polyline>
<line
x1=
"7.47016174"
y1=
"7.39513959"
x2=
"7.47016174"
y2=
"14.8580198"
id=
"路径-21"
></line>
</g>
</g>
</g>
</svg>
\ No newline at end of file
src/assets/project/workbenchList_select.svg
View file @
1b79d21b
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/任务列表备份 2
</title>
<title>
1.Base基础/Icon图标/任务列表
</title>
<defs>
<filter
color-interpolation-filters=
"auto"
id=
"filter-1"
>
<feColorMatrix
in=
"SourceGraphic"
type=
"matrix"
values=
"0 0 0 0 0.076000 0 0 0 0 0.440000 0 0 0 0 1.000000 0 0 0 1.000000 0"
></feColorMatrix>
</filter>
</defs>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"1.Base基础/Icon图标/任务列表备份-2"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(0.500000, 0.000000)"
stroke=
"#1370FF"
stroke-width=
"1.5"
>
<path
d=
"M7.38809691,0.889939751 L14.1102244,4.08516037 L14.2499569,11.9840447 L7.60081331,15.1318104 L0.897545722,12.2122049 L0.75,4.30940599 L7.38809691,0.889939751 Z"
id=
"路径-15"
></path>
<polyline
id=
"路径-20"
points=
"1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"
></polyline>
<line
x1=
"7.47016174"
y1=
"7.39513959"
x2=
"7.47016174"
y2=
"14.8580198"
id=
"路径-21"
></line>
<g
id=
"任务列表"
transform=
"translate(-370.000000, -245.000000)"
>
<g
id=
"编组-5"
transform=
"translate(370.000000, 242.000000)"
>
<g
id=
"1.Base基础/Icon图标/任务列表"
transform=
"translate(0.000000, 3.000000)"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
filter=
"url(#filter-1)"
id=
"编组-4"
>
<g
transform=
"translate(0.500000, 0.000000)"
>
<path
d=
"M7.38809691,0.889939751 C7.45764437,0.855744844 7.53911808,0.85573765 7.60867158,0.889920274 L7.60867158,0.889920274 L14.1102244,4.08516037 C14.1529938,4.10617975 14.187927,4.13844408 14.2121677,4.17736742 C14.2364085,4.21629077 14.2499569,4.26187312 14.2499569,4.30952854 L14.2499569,4.30952854 L14.2499569,11.9840447 C14.2499569,12.0332683 14.2355127,12.0802004 14.2098426,12.119868 C14.1841726,12.1595356 14.1472766,12.1919385 14.1023731,12.2121037 L14.1023731,12.2121037 L7.60081331,15.1318104 C7.53565621,15.161071 7.46109499,15.1610648 7.39594277,15.1317934 L7.39594277,15.1317934 L0.897545722,12.2122049 C0.852652465,12.1920353 0.815766035,12.1596329 0.790102919,12.1199688 C0.764439802,12.0803047 0.75,12.033379 0.75,11.984163 L0.75,11.984163 L0.75,4.30940599 C0.75,4.26175853 0.763543923,4.21618307 0.78777749,4.17726362 L0.78777749,4.17726362 Z"
id=
"路径-15"
stroke=
"#979797"
stroke-width=
"1.5"
></path>
<polyline
id=
"路径-20"
stroke=
"#979797"
stroke-width=
"1.5"
points=
"1.29720478 4.56847209 7.47016174 7.45 13.6431187 4.56847209"
></polyline>
<line
x1=
"7.47016174"
y1=
"7.39513959"
x2=
"7.47016174"
y2=
"14.8580198"
id=
"路径-21"
stroke=
"#979797"
stroke-width=
"1.5"
></line>
</g>
</g>
</g>
</g>
</g>
</g>
...
...
src/assets/project/workbenchTemplate.svg
View file @
1b79d21b
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/工作流模版备份 3
</title>
<svg
width=
"14px"
height=
"14px"
viewBox=
"0 0 14 14"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/工作流模版
</title>
<defs>
<filter
color-interpolation-filters=
"auto"
id=
"filter-1"
>
<feColorMatrix
in=
"SourceGraphic"
type=
"matrix"
values=
"0 0 0 0 0.760000 0 0 0 0 0.776000 0 0 0 0 0.800000 0 0 0 1.000000 0"
></feColorMatrix>
</filter>
</defs>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"编组-5"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(1.000000, 1.000000)"
stroke=
"#C2C6CC"
stroke-width=
"1.5"
>
<rect
id=
"矩形"
x=
"0.75"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-2"
x=
"0.75"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份"
x=
"8.5"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-3"
x=
"8.5"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<g
id=
"任务列表"
transform=
"translate(-245.000000, -246.000000)"
>
<g
id=
"编组-4"
transform=
"translate(244.000000, 242.000000)"
>
<g
id=
"编组-5"
transform=
"translate(0.000000, 3.000000)"
filter=
"url(#filter-1)"
>
<g>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(1.000000, 1.000000)"
stroke=
"#979797"
stroke-width=
"1.5"
>
<rect
id=
"矩形"
x=
"0.75"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-2"
x=
"0.75"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份"
x=
"8.5"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-3"
x=
"8.5"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
</g>
</g>
</g>
</g>
</g>
</g>
...
...
src/assets/project/workbenchTemplate_hover.svg
deleted
100644 → 0
View file @
52c8279d
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/工作流模版备份 2
</title>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"编组-5"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(1.000000, 1.000000)"
stroke=
"#1E2633"
stroke-width=
"1.5"
>
<rect
id=
"矩形"
x=
"0.75"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-2"
x=
"0.75"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份"
x=
"8.5"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-3"
x=
"8.5"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
src/assets/project/workbenchTemplate_select.svg
View file @
1b79d21b
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"16px"
height=
"16px"
viewBox=
"0 0 16 16"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/工作流模版备份
</title>
<svg
width=
"14px"
height=
"14px"
viewBox=
"0 0 14 14"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<title>
1.Base基础/Icon图标/工作流模版
</title>
<defs>
<filter
color-interpolation-filters=
"auto"
id=
"filter-1"
>
<feColorMatrix
in=
"SourceGraphic"
type=
"matrix"
values=
"0 0 0 0 0.076000 0 0 0 0 0.440000 0 0 0 0 1.000000 0 0 0 1.000000 0"
></feColorMatrix>
</filter>
</defs>
<g
id=
"上线UI"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"编组-5"
>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(1.000000, 1.000000)"
stroke=
"#1370FF"
stroke-width=
"1.5"
>
<rect
id=
"矩形"
x=
"0.75"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-2"
x=
"0.75"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份"
x=
"8.5"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-3"
x=
"8.5"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<g
id=
"工作台(管理员)空"
transform=
"translate(-245.000000, -246.000000)"
>
<g
id=
"编组-4"
transform=
"translate(244.000000, 242.000000)"
>
<g
id=
"编组-5"
transform=
"translate(0.000000, 3.000000)"
filter=
"url(#filter-1)"
>
<g>
<rect
id=
"矩形"
x=
"0"
y=
"0"
width=
"16"
height=
"16"
></rect>
<g
id=
"编组-4"
transform=
"translate(1.000000, 1.000000)"
stroke=
"#979797"
stroke-width=
"1.5"
>
<rect
id=
"矩形"
x=
"0.75"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-2"
x=
"0.75"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份"
x=
"8.5"
y=
"0.75"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
<rect
id=
"矩形备份-3"
x=
"8.5"
y=
"8.5"
width=
"4.75"
height=
"4.75"
rx=
"1"
></rect>
</g>
</g>
</g>
</g>
</g>
</g>
...
...
src/components/BusinessComponents/FileSelect/index.module.css
View file @
1b79d21b
.FSBox
{
width
:
900px
;
max-height
:
5
50px
;
height
:
6
50px
;
position
:
relative
;
}
...
...
src/components/BusinessComponents/FileSelect/index.tsx
View file @
1b79d21b
...
...
@@ -447,7 +447,6 @@ const FileSelect = observer((props: FileSelectProps) => {
)
}
</
div
>
<
Table
tableContainerStyle=
{
{
height
:
470
}
}
footer=
{
false
}
rowHover=
{
true
}
nopadding=
{
true
}
...
...
src/components/CommonComponents/RadioGroupOfButtonStyle/index.module.css
View file @
1b79d21b
...
...
@@ -33,11 +33,3 @@
background-color
:
#fff
;
box-shadow
:
2px
4px
12px
0px
rgba
(
0
,
27
,
63
,
0.06
);
}
.border
{
width
:
1px
;
height
:
16px
;
background-color
:
rgba
(
209
,
214
,
222
,
1
);
}
.borderHidden
{
visibility
:
hidden
;
}
src/components/CommonComponents/RadioGroupOfButtonStyle/index.tsx
View file @
1b79d21b
...
...
@@ -8,7 +8,6 @@
*/
// 按钮样式的单选组
import
classnames
from
"classnames"
;
import
{
useMemo
}
from
"react"
;
import
style
from
"./index.module.css"
;
type
radioOption
=
{
...
...
@@ -28,43 +27,21 @@ const RadioGroupOfButtonStyle = (props: IRadioGroupOfButtonStyleProps) => {
const
{
radioOptions
,
value
,
handleRadio
,
RadiosBoxStyle
,
radioStyle
}
=
props
;
const
activeIndex
:
any
=
useMemo
(()
=>
{
let
res
=
0
;
radioOptions
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
value
===
value
)
{
res
=
index
;
}
});
return
res
;
},
[
value
,
radioOptions
]);
return
(
<
div
className=
{
style
.
RadiosBox
}
style=
{
RadiosBoxStyle
}
>
{
radioOptions
.
map
((
options
,
index
)
=>
{
{
radioOptions
.
map
((
options
)
=>
{
return
(
<>
<
div
key=
{
options
.
value
}
className=
{
classnames
({
[
style
.
radio
]:
true
,
[
style
.
radioActive
]:
value
===
options
.
value
,
})
}
onClick=
{
()
=>
handleRadio
(
options
.
value
)
}
style=
{
radioStyle
}
>
{
options
.
label
}
</
div
>
<
div
className=
{
classnames
({
[
style
.
border
]:
true
,
[
style
.
borderHidden
]:
!
(
index
!==
radioOptions
.
length
-
1
&&
index
!==
activeIndex
&&
index
!==
activeIndex
-
1
),
})
}
></
div
>
</>
<
div
key=
{
options
.
value
}
className=
{
classnames
({
[
style
.
radio
]:
true
,
[
style
.
radioActive
]:
value
===
options
.
value
,
})
}
onClick=
{
()
=>
handleRadio
(
options
.
value
)
}
style=
{
radioStyle
}
>
{
options
.
label
}
</
div
>
);
})
}
</
div
>
...
...
src/components/MySnackbar/MySnackbarProvider.tsx
View file @
1b79d21b
...
...
@@ -66,7 +66,6 @@ const MySnackbarProvider = ({
}:
MySnackbarProviderProp
)
=>
{
const
{
open
,
setOpen
,
messageInfo
,
handleExited
,
success
,
...
...
@@ -75,46 +74,31 @@ const MySnackbarProvider = ({
info
,
close
,
}
=
useMySnackbar
();
// .MuiAlert-filledInfo
const
getColorStyle
=
useMemo
(()
=>
{
if
(
messageInfo
.
severity
===
"success"
)
{
return
"#02AB83"
;
}
if
(
messageInfo
.
severity
===
"info"
)
{
return
"#1370FF"
;
}
if
(
messageInfo
.
severity
===
"warning"
)
{
return
"#FFB919"
;
}
if
(
messageInfo
.
severity
===
"error"
)
{
return
"#FF4E4E"
;
}
},
[
messageInfo
.
severity
]);
const
theme
=
createTheme
({
components
:
{
MuiAlert
:
{
styleOverrides
:
{
root
:
{
minWidth
:
"360px"
,
maxWidth
:
"542px"
,
minHeight
:
"38px"
,
boxShadow
:
"none"
,
"& .MuiAlert-action"
:
{
paddingLeft
:
"60px"
,
},
"&.MuiAlert-standardError"
:
{
color
:
"#FF4E4E"
,
background
:
"rgba(255, 237, 237, 1)"
,
"& .MuiAlert-icon"
:
{
color
:
"#FF4E4E"
,
},
},
"&.MuiAlert-standardInfo"
:
{
color
:
"rgba(19, 112, 255, 1)"
,
background
:
"rgba(235, 243, 255, 1)"
,
"& .MuiAlert-icon"
:
{
color
:
"rgba(19, 112, 255, 1)"
,
},
},
"&.MuiAlert-standardSuccess"
:
{
color
:
"rgba(2, 171, 131, 1)"
,
background
:
"rgba(217, 255, 238, 1)"
,
"& .MuiAlert-icon"
:
{
color
:
"rgba(2, 171, 131, 1)"
,
},
},
"&.MuiAlert-standardWarning"
:
{
color
:
"rgba(255, 185, 25, 1)"
,
background
:
"rgba(255, 246, 226, 1)"
,
"& .MuiAlert-icon"
:
{
color
:
"rgba(255, 185, 25, 1)"
,
},
color
:
getColorStyle
,
"& .MuiAlert-icon"
:
{
color
:
getColorStyle
,
},
},
},
...
...
@@ -153,10 +137,7 @@ const MySnackbarProvider = ({
severity=
{
messageInfo
?.
severity
}
variant=
{
variant
}
elevation=
{
elevation
}
sx=
{
{
...
alertSx
}
}
onClose=
{
()
=>
{
setOpen
(
false
);
}
}
sx=
{
{
boxShadow
:
"unset"
,
...
alertSx
}
}
>
{
messageInfo
?.
content
}
</
Alert
>
...
...
src/components/MySnackbar/useMySnackbar.ts
View file @
1b79d21b
...
...
@@ -69,7 +69,6 @@ const useMySnackbar = () => {
return
{
open
,
setOpen
,
messageInfo
,
handleExited
,
success
,
...
...
src/components/mui/MyButton.tsx
View file @
1b79d21b
...
...
@@ -47,14 +47,12 @@ const theme = createTheme({
styleOverrides
:
{
root
:
{
minWidth
:
"48px"
,
boxShadow
:
"none !important"
,
"&.MuiButton-textError"
:
{
color
:
"rgba(255, 78, 78, 1)"
,
},
"&.MuiButton-outlinedError"
:
{
color
:
"rgba(255, 78, 78, 1)"
,
border
:
"1px solid rgba(255, 78, 78, 1)"
,
"&:hover"
:
{
backgroundColor
:
'transparent'
},
},
"& .MuiLoadingButton-loadingIndicator"
:
{
color
:
"#fff"
,
...
...
@@ -69,6 +67,7 @@ const theme = createTheme({
outlined
:
{
backgroundColor
:
"#FFFFFF"
,
border
:
"1px solid #1370FF"
,
boxShadow
:
"none !important"
,
color
:
"#1370FF"
,
"&:hover"
:
{
backgroundColor
:
"#ECF4FF "
},
"&.MuiButton-textError"
:
{
...
...
@@ -77,6 +76,7 @@ const theme = createTheme({
},
text
:
{
backgroundColor
:
"transparent"
,
boxShadow
:
"none !important"
,
color
:
"#1370FF"
,
"&:hover"
:
{
backgroundColor
:
"#ECF4FF "
},
},
...
...
@@ -95,6 +95,7 @@ const theme = createTheme({
},
outlinedSecondary
:
{
border
:
"1px solid rgba(221, 225, 230, 1)"
,
boxShadow
:
"none !important"
,
color
:
"rgba(30, 38, 51, 1)"
,
"&:hover"
:
{
backgroundColor
:
"rgba(240, 242, 245, 1) "
,
...
...
@@ -103,6 +104,7 @@ const theme = createTheme({
},
textSecondary
:
{
backgroundColor
:
"transparent"
,
boxShadow
:
"none !important"
,
color
:
"#FF4E4E"
,
"&:hover"
:
{
backgroundColor
:
"#FFEDED "
},
},
...
...
src/components/mui/MyDialog.tsx
View file @
1b79d21b
...
...
@@ -103,7 +103,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabled=
{
disabledConfirm
}
isLoadingButton=
{
true
}
loading=
{
loading
}
style=
{
{
marginLeft
:
'12px'
,
...
okSx
}
}
style=
{
{
...
okSx
}
}
/>
)
:
null
}
</
DialogActions
>
...
...
src/components/mui/MyInput.tsx
View file @
1b79d21b
...
...
@@ -35,13 +35,9 @@ const MyInput = (props: MyInputProps) => {
root
:
{
height
:
"36px"
,
fontSize
:
"14px"
,
border
:
"rgba(221, 225, 230, 1)"
,
"&.MuiInputBase-sizeSmall"
:
{
height
:
"32px"
,
},
"& .Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
},
},
multiline
:
{
height
:
"auto"
,
...
...
@@ -72,7 +68,7 @@ const MyInput = (props: MyInputProps) => {
borderWidth
:
"1px"
,
},
"& .MuiOutlinedInput-notchedOutline"
:
{
borderColor
:
"#DDE1E6"
,
borderColor
:
'#DDE1E6'
,
},
":hover"
:
{
"& .MuiOutlinedInput-notchedOutline"
:
error
...
...
src/components/mui/MyPopconfirm.tsx
View file @
1b79d21b
...
...
@@ -30,7 +30,6 @@ interface IMyPopconfirmProps {
showCancel
?:
boolean
;
onCancel
?:
any
;
onConfirm
?:
any
;
loading
?:
boolean
;
}
const
MyPopconfirm
=
(
props
:
IMyPopconfirmProps
)
=>
{
...
...
@@ -43,7 +42,6 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
showCancel
=
true
,
onCancel
,
onConfirm
,
loading
=
false
,
}
=
props
;
const
open
=
useMemo
(()
=>
{
...
...
@@ -99,12 +97,7 @@ const MyPopconfirm = (props: IMyPopconfirmProps) => {
style=
{
{
marginRight
:
"12px"
}
}
/>
)
}
<
MyButton
text=
{
okText
}
onClick=
{
handleOk
}
loading=
{
loading
}
isLoadingButton=
{
true
}
/>
<
MyButton
text=
{
okText
}
onClick=
{
handleOk
}
/>
</
Box
>
</
Popper
>
);
...
...
src/components/mui/MySelect.tsx
View file @
1b79d21b
...
...
@@ -71,14 +71,6 @@ export default function MySelect(props: IProps) {
styleOverrides
:
{
root
:
{
height
:
"36px"
,
"& .Mui-disabled"
:
{
background
:
"rgba(247, 248, 250, 1)"
,
},
"& .MuiSelect-icon"
:
{
"&.Mui-disabled"
:
{
display
:
"none"
,
},
},
},
},
},
...
...
src/components/mui/MyTable/index.tsx
View file @
1b79d21b
...
...
@@ -138,8 +138,7 @@ export default function EnhancedTable(props: ITableProps) {
(
rows
.
length
===
0
&&
!
load
)
&&
<
TableRow
>
<
TableCell
sx=
{
{
borderBottom
:
'1px solid #F0F2F5'
,
textAlign
:
'center'
borderBottom
:
'1px solid #F0F2F5'
}
}
colSpan=
{
headCells
?.
filter
((
k
:
any
)
=>
k
.
id
===
"checkbox"
)?.
length
===
0
?
headCells
?.
length
:
headCells
?.
length
+
1
}
className=
{
classes
.
TypographyStyle
}
...
...
src/components/mui/MyTooltip.tsx
View file @
1b79d21b
...
...
@@ -9,8 +9,8 @@
import
{
Tooltip
,
TooltipProps
}
from
"@mui/material"
;
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles"
;
interface
IMyTooltipProps
extends
Omit
<
TooltipProps
,
"title"
>
{
title
?:
string
|
boolean
;
interface
IMyTooltipProps
extends
TooltipProps
{
title
:
string
;
}
const
theme
=
createTheme
({
...
...
@@ -33,7 +33,7 @@ const theme = createTheme({
});
const
MyTooltip
=
(
props
:
IMyTooltipProps
)
=>
{
const
{
title
=
false
,
children
,
placement
=
"top"
,
...
other
}
=
props
;
const
{
title
,
children
,
placement
=
"top"
,
...
other
}
=
props
;
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
Tooltip
...
...
src/components/mui/Tabs.tsx
View file @
1b79d21b
...
...
@@ -2,11 +2,11 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
31 20:25:56
* @LastEditTime: 2022-08-
10 11:06:12
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
memo
,
useCallback
}
from
"react"
;
import
{
memo
}
from
"react"
;
import
{
isEqual
}
from
"lodash"
;
import
{
useState
}
from
"react"
;
import
{
Box
}
from
"@mui/system"
;
...
...
@@ -21,14 +21,11 @@ interface ITabList {
component
:
JSX
.
Element
|
React
.
ReactNode
;
icon
?:
string
;
iconed
?:
string
;
iconHover
?:
string
;
hide
?:
boolean
;
disabled
?:
boolean
;
}
interface
IProps
{
value
?:
string
;
onChange
?:
(
val
:
string
)
=>
void
;
tabList
:
ITabList
[];
defaultValue
?:
string
;
tabPanelSx
?:
any
;
...
...
@@ -73,14 +70,11 @@ const theme = createTheme({
const
Tabs
=
(
props
:
IProps
)
=>
{
const
{
tabList
,
value
,
defaultValue
,
onChange
,
allowNullValue
=
false
,
tabPanelSx
=
{
padding
:
"24px 0 0 0"
},
}
=
props
;
const
[
tabValue
,
setTabValue
]
=
useState
(
const
[
value
,
setValue
]
=
useState
(
defaultValue
?
defaultValue
:
allowNullValue
...
...
@@ -88,31 +82,17 @@ const Tabs = (props: IProps) => {
:
tabList
.
filter
((
e
)
=>
!
e
.
hide
)[
0
].
value
);
const
[
hoverValue
,
setHoverValue
]
=
useState
(
''
)
const
onTabChange
=
(
val
:
string
)
=>
{
setTabValue
(
val
)
onChange
&&
onChange
(
val
);
const
onChange
=
(
val
:
string
)
=>
{
setValue
(
val
);
};
const
getImgSrc
=
useCallback
((
item
:
ITabList
)
=>
{
let
result
=
item
.
icon
if
(
value
===
item
.
value
){
result
=
item
.
iconed
}
if
(
hoverValue
===
item
.
value
){
result
=
item
.
iconHover
}
return
result
},[
hoverValue
,
value
])
const
labelRender
=
(
item
:
ITabList
,
key
:
number
)
=>
{
return
(
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
onMouseOver=
{
()
=>
setHoverValue
(
item
.
value
)
}
onMouseOut=
{
()
=>
setHoverValue
(
''
)
}
>
<
Box
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
{
item
.
icon
?
(
<
img
style=
{
{
width
:
"16px"
,
marginRight
:
"8px"
}
}
src=
{
getImgSrc
(
item
)
}
src=
{
value
===
item
.
value
?
item
.
iconed
:
item
.
icon
}
alt=
""
/>
)
:
(
...
...
@@ -128,17 +108,17 @@ const Tabs = (props: IProps) => {
>
{
item
.
label
}
</
Typography
>
</
div
>
</
Box
>
);
};
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
TabContext
value=
{
value
||
tabValue
}
>
<
TabContext
value=
{
value
}
>
<
Box
sx=
{
{
borderBottom
:
1
,
borderColor
:
"#EDEFF2"
}
}
>
<
TabList
onChange=
{
(
e
:
any
,
val
:
string
)
=>
{
on
Tab
Change
(
val
);
onChange
(
val
);
}
}
>
{
tabList
...
...
src/index.tsx
View file @
1b79d21b
...
...
@@ -41,7 +41,9 @@ root.render(
<
React
.
StrictMode
>
<
ThemeProvider
theme=
{
theme
}
>
<
Provider
{
...
stores
}
>
<
MySnackbarProvider
>
<
MySnackbarProvider
alertSx=
{
{
boxShadow
:
"0px 2px 4px 0px rgb(0 0 0 / 8%)"
}
}
>
<
MyRouter
></
MyRouter
>
</
MySnackbarProvider
>
</
Provider
>
...
...
src/store/modules/currentProject.ts
View file @
1b79d21b
/*
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-07-11 11:49:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-23 16:46:45
* @FilePath: /bkunyun/src/store/modules/currentProject.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
makeAutoObservable
}
from
"mobx"
;
type
projectInfo
=
{
id
?:
string
;
...
...
@@ -20,22 +12,14 @@ type productInfo = {
name
?:
string
;
};
/** 用户信息 */
let
userInfo
:
any
;
try
{
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
);
}
catch
{
console
.
error
(
"获取用户信息 出错"
);
}
const
localStorageCurrentProjectInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
`currentProjectInfo_
${
userInfo
.
name
}
`
)
||
"{}"
const
sessionStorageCurrentProjectInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"currentProjectInfo"
)
||
"{}"
);
const
local
StorageCurrentProductInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
`currentProductInfo_
${
userInfo
.
name
}
`
)
||
"{}"
const
session
StorageCurrentProductInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"currentProductInfo"
)
||
"{}"
);
const
local
StorageProjectList
=
JSON
.
parse
(
localStorage
.
getItem
(
`projectList_
${
userInfo
.
name
}
`
)
||
"[]"
const
session
StorageProjectList
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"projectList"
)
||
"[]"
);
class
currentProject
{
...
...
@@ -44,22 +28,22 @@ class currentProject {
}
// 选中的项目
currentProjectInfo
:
projectInfo
=
local
StorageCurrentProjectInfo
;
currentProjectInfo
:
projectInfo
=
session
StorageCurrentProjectInfo
;
// 选中的产品下的项目列表
projectList
:
Array
<
projectInfo
>
=
local
StorageProjectList
;
projectList
:
Array
<
projectInfo
>
=
session
StorageProjectList
;
// 选中的产品
currentProductInfo
:
productInfo
=
local
StorageCurrentProductInfo
;
currentProductInfo
:
productInfo
=
session
StorageCurrentProductInfo
;
setProjectList
=
(
list
:
Array
<
projectInfo
>
)
=>
{
this
.
projectList
=
list
;
localStorage
.
setItem
(
`projectList_
${
userInfo
.
name
}
`
,
JSON
.
stringify
(
list
));
sessionStorage
.
setItem
(
"projectList"
,
JSON
.
stringify
(
list
));
};
changeProject
=
(
project
:
projectInfo
)
=>
{
this
.
currentProjectInfo
=
project
;
localStorage
.
setItem
(
`currentProjectInfo_
${
userInfo
.
name
}
`
,
JSON
.
stringify
(
project
));
sessionStorage
.
setItem
(
"currentProjectInfo"
,
JSON
.
stringify
(
project
));
};
changeProductInfo
=
(
productInfo
:
productInfo
)
=>
{
this
.
currentProductInfo
=
productInfo
;
localStorage
.
setItem
(
`currentProductInfo_
${
userInfo
.
name
}
`
,
JSON
.
stringify
(
productInfo
));
sessionStorage
.
setItem
(
"currentProductInfo"
,
JSON
.
stringify
(
productInfo
));
};
}
...
...
src/utils/util.ts
View file @
1b79d21b
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-07 18:37:53
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-0
8-23 11:19:11
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditTime: 2022-0
6-15 17:49:27
* @FilePath: /bkunyun/src/utils/util.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -67,7 +67,7 @@ export const getTokenInfo = () => {
return
val
;
};
const
IsNumberLetterChineseReg
=
new
RegExp
(
"^[A-Za-z0-9
\
u4e00-
\
u9fa5]
{1,50}
$"
);
const
IsNumberLetterChineseReg
=
new
RegExp
(
"^[A-Za-z0-9
\
u4e00-
\
u9fa5]
+
$"
);
export
const
checkIsNumberLetterChinese
=
(
string
:
string
)
=>
{
return
IsNumberLetterChineseReg
.
test
(
string
);
...
...
src/views/CustomOperator/components/OperatorList/index.tsx
View file @
1b79d21b
...
...
@@ -14,11 +14,10 @@ import { ITask } from "@/views/Project/ProjectSubmitWork/interface";
type
IProps
=
{
operatorList
:
ITask
[];
setOperatorList
:
any
;
setInputActive
:
any
;
};
const
OperatorList
=
(
props
:
IProps
)
=>
{
const
{
operatorList
,
setOperatorList
,
setInputActive
}
=
props
;
// 流程图中流算子列表
const
{
operatorList
,
setOperatorList
}
=
props
;
// 流程图中流算子列表
const
{
currentProjectStore
}
=
useStores
();
const
[
list
,
setList
]
=
useState
<
ITask
[]
>
([]);
// 算子列表
const
productId
=
toJS
(
currentProjectStore
.
currentProductInfo
.
id
);
// 产品ID
...
...
@@ -206,12 +205,6 @@ const OperatorList = (props: IProps) => {
value=
{
keyword
}
onChange=
{
keywordChange
}
onKeyUp=
{
handleKeywordKeyUp
}
onFocus=
{
()
=>
{
setInputActive
(
true
);
}
}
onBlur=
{
()
=>
{
setInputActive
(
false
);
}
}
sx=
{
{
fontSize
:
"14px"
}
}
/>
</
div
>
...
...
src/views/CustomOperator/components/SaveOperator/index.tsx
View file @
1b79d21b
...
...
@@ -193,8 +193,8 @@ const SaveOperator = (props: IProps) => {
<
MyInput
value=
{
description
}
id=
"desc"
label=
"
算子
描述"
placeholder=
"
算子
描述"
label=
"
模板
描述"
placeholder=
"
模板
描述"
onChange=
{
handleDescriptionChange
}
multiline
rows=
{
4
}
...
...
src/views/CustomOperator/index.tsx
View file @
1b79d21b
...
...
@@ -21,7 +21,6 @@ const CustomOperator = observer((props: IProps) => {
const
Message
=
useMessage
();
const
[
operatorList
,
setOperatorList
]
=
useState
<
ITask
[]
>
(
initOperatorList
);
const
[
saveFormDialog
,
setSaveFormDialog
]
=
useState
(
false
);
const
[
inputActive
,
setInputActive
]
=
useState
(
false
);
// const [showCustomOperator, setShowCustomOperator] = useState(false);
/** 设置选中唯一标识符 */
...
...
@@ -101,8 +100,7 @@ const CustomOperator = observer((props: IProps) => {
return
(
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"dataset"
||
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"file"
||
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"path"
||
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"input"
(
outItem
.
domType
||
""
).
toLowerCase
()
===
"path"
);
})
)
{
...
...
@@ -177,7 +175,6 @@ const CustomOperator = observer((props: IProps) => {
<
OperatorList
operatorList=
{
operatorList
}
setOperatorList=
{
setOperatorList
}
setInputActive=
{
setInputActive
}
/>
<
BatchOperatorFlow
tasks=
{
operatorList
}
...
...
@@ -185,7 +182,7 @@ const CustomOperator = observer((props: IProps) => {
type=
"edit"
onFlowNodeClick=
{
handleNodeClick
}
flowNodeDraggable=
{
true
}
ListenState=
{
!
saveFormDialog
&&
!
inputActive
}
ListenState=
{
!
saveFormDialog
}
showVersion=
{
true
}
showControls=
{
false
}
/>
...
...
src/views/MenuLayout/index.module.css
View file @
1b79d21b
...
...
@@ -23,7 +23,7 @@
color
:
#565c66
;
font-size
:
14px
;
line-height
:
22px
;
border-left
:
3px
solid
#f
7f8fa
;
border-left
:
3px
solid
#f
ff
;
}
.listItem
:hover
{
background-color
:
#eef1f5
;
...
...
@@ -37,5 +37,5 @@
.active
{
border-left
:
3px
solid
#1370ff
;
color
:
#1370ff
;
background-color
:
#e
6ea
f0
;
background-color
:
#e
bed
f0
;
}
src/views/Project/ProjectData/AddFolder/index.tsx
View file @
1b79d21b
...
...
@@ -54,7 +54,7 @@ const AddFolder = (props: IAddFolderProps) => {
refresh
();
});
}
else
{
Message
.
error
(
fileNameCheck
.
help
||
"请输入文件夹名称"
);
Message
.
info
(
fileNameCheck
.
help
||
"请输入文件夹名称"
);
}
};
...
...
src/views/Project/ProjectData/SeeDataset/index.tsx
View file @
1b79d21b
...
...
@@ -19,7 +19,6 @@ import classNames from "classnames";
import
Save
from
"./save"
;
import
NoData
from
"@/components/BusinessComponents/NoData"
;
import
Download
from
"./download"
;
import
MyTooltip
from
"@/components/mui/MyTooltip"
;
import
style
from
"./index.module.css"
;
type
ISeeDatasetProps
=
{
...
...
@@ -49,7 +48,6 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
const
[
saveOpen
,
setSaveOpen
]
=
useState
(
false
);
// 另存为弹窗显示控制
const
[
downloadOpen
,
setDownloadOpen
]
=
useState
(
false
);
// 下载弹窗显示控制
const
[
showAnimation
,
setShowAnimation
]
=
useState
(
true
);
// 弹窗动画变化中
const
[
firstGetList
,
setFirstGetList
]
=
useState
(
true
);
// 第一次请求列表
// 解决图像渲染造成弹窗卡顿的问题
useEffect
(()
=>
{
...
...
@@ -105,7 +103,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
name
:
name
,
page
:
paramsPage
,
size
,
index
:
searchDataType
?
`
${
searchDataType
}
`
:
""
,
index
:
searchDataType
?
`
meta.
${
searchDataType
}
`
:
""
,
sort
:
sort
===
"null"
?
""
:
sort
,
query
:
keyword
,
})
...
...
@@ -113,31 +111,13 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
setList
(
res
.
data
.
list
);
setCount
(
res
.
data
.
totalPage
-
1
);
if
(
res
.
data
.
list
&&
res
.
data
.
list
.
length
>
0
)
{
if
(
res
.
data
.
list
[
0
])
{
let
arr
:
any
=
[];
Object
.
keys
(
res
.
data
.
list
[
0
]).
forEach
((
item
)
=>
{
if
(
!
[
"meta"
,
"id"
,
// "canonical_smiles",
// "mol",
// "mol2",
// "pdb",
// "sdf",
// "sdf2d",
// "sdf3d",
// "smiles",
].
includes
(
item
)
)
{
arr
.
push
({
label
:
item
,
value
:
item
});
}
if
(
res
.
data
.
list
[
0
].
meta
)
{
const
meta
=
res
.
data
.
list
[
0
].
meta
;
const
arr
=
Object
.
keys
(
meta
).
map
((
item
)
=>
{
return
{
label
:
item
,
value
:
item
};
});
if
(
firstGetList
)
{
setdataTypes
(
arr
);
setSearchDataType
(
arr
[
0
].
value
);
}
setFirstGetList
(
false
);
setdataTypes
(
arr
);
setSearchDataType
(
arr
[
0
].
value
);
}
}
})
...
...
@@ -315,7 +295,7 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
</
div
>
{
showData
.
length
!==
0
&&
(
<
div
className=
{
style
.
datasetLiDataList
}
>
{
Object
.
keys
(
item
)
{
Object
.
keys
(
item
.
meta
)
.
filter
((
key
)
=>
showData
.
indexOf
(
key
)
!==
-
1
)
.
map
((
key
,
index
)
=>
{
return
(
...
...
@@ -328,13 +308,11 @@ const SeeDataset = observer((props: ISeeDatasetProps) => {
>
{
key
}
</
span
>
<
MyTooltip
title=
{
item
[
key
]
}
>
<
span
className=
{
style
.
datasetLiDataLiValue
}
>
{
item
[
key
]
}
</
span
>
</
MyTooltip
>
<
span
className=
{
style
.
datasetLiDataLiValue
}
>
{
item
.
meta
[
key
]
}
</
span
>
</
div
>
);
})
}
...
...
src/views/Project/ProjectData/UpLoaderFile/index.tsx
View file @
1b79d21b
...
...
@@ -239,6 +239,10 @@ const UpLoaderFile = observer((props: IMoveFileProps) => {
// lineHeight: "20px",
// color: "#8A9099",
// }}
tableBodySx={{
backgroundColor:
fileList.length >= 10 ? "rgba(255, 0, 0, 0.6)" : "",
}}
tableContainerStyle={{
maxHeight: "300px",
}}
...
...
src/views/Project/ProjectData/index.module.css
View file @
1b79d21b
...
...
@@ -40,11 +40,6 @@
align-items
:
center
;
}
.refreshIcon
{
width
:
16px
;
height
:
16px
;
}
.folderIconBox
{
display
:
flex
;
justify-content
:
flex-start
;
...
...
src/views/Project/ProjectData/index.tsx
View file @
1b79d21b
...
...
@@ -2,9 +2,9 @@ import React, { useState, useCallback, useEffect, useMemo } from "react";
import
style
from
"./index.module.css"
;
import
classnames
from
"classnames"
;
import
{
IconButton
}
from
"@mui/material"
;
import
RefreshIcon
from
"@mui/icons-material/Refresh"
;
import
MyTable
from
"@/components/mui/MyTable"
;
import
dataSetIcon
from
"@/assets/project/dataSetIcon.svg"
;
import
refresh
from
"@/assets/project/refresh.svg"
;
import
fileIcon
from
"@/assets/project/fileIcon.svg"
;
import
folderIcon
from
"@/assets/project/folderIcon.svg"
;
import
noFile
from
"@/assets/project/noFile.svg"
;
...
...
@@ -68,7 +68,6 @@ const ProjectData = observer(() => {
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
setActiveTab
(
locationInfo
?.
dataType
||
"file"
);
setPath
(
locationInfo
?.
pathName
||
"/"
);
},
[
location
]);
...
...
@@ -557,17 +556,12 @@ const ProjectData = observer(() => {
size=
"small"
onClick=
{
handleRefresh
}
disabled=
{
!
isPass
(
"PROJECT_DATA_REFRESH"
,
"USER"
)
}
sx=
{
{
marginLeft
:
"12px"
,
width
:
"32px"
,
height
:
"32px"
,
":hover"
:
{
backgroundColor
:
"rgba(240, 242, 245, 1)"
,
borderRadius
:
"4px"
,
},
}
}
sx=
{
{
marginLeft
:
"17px"
,
width
:
'32px'
,
height
:
'32px'
,
":hover"
:
{
backgroundColor
:
"#F0F2F5 "
,
borderRadius
:
2
}
}
}
>
<
img
className=
{
style
.
refreshIcon
}
src=
{
refresh
}
alt=
""
/>
<
RefreshIcon
sx=
{
{
fontSize
:
"18px"
}
}
/>
</
IconButton
>
</
div
>
</
div
>
...
...
src/views/Project/ProjectJobDetail/index.module.css
View file @
1b79d21b
...
...
@@ -74,13 +74,6 @@
color
:
rgba
(
19
,
112
,
255
,
1
);
font-size
:
14px
;
}
.outputItemName
{
max-width
:
172px
;
white-space
:
nowrap
;
display
:
block
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.outputLiLeftImg
{
margin-right
:
12px
;
}
...
...
src/views/Project/ProjectJobDetail/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
23 19:27:18
* @LastEditTime: 2022-08-
15 17:18:49
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -47,7 +47,6 @@ import { getConnectionArr, getDatasetName, getDatasetPath, getSameBatch } from "
import
styles
from
"./index.module.css"
;
const
stateMap
=
{
SUBMITTED
:
"正在启动"
,
RUNNING
:
"正在运行"
,
ABORTED
:
"运行终止"
,
FAILED
:
"运行失败"
,
...
...
@@ -349,7 +348,18 @@ const ProjectSubmitWork = observer(() => {
setOverviewActive
(
false
);
setShowOptions
(
!
showOptions
);
};
const
handleDownLoad
=
(
path
:
string
)
=>
{
if
(
path
.
indexOf
(
"/ProjectData"
)
!==
-
1
)
{
path
=
path
.
slice
(
12
);
}
CloudEController
.
JobFileDownload
(
path
,
fileToken
as
string
,
projectId
as
string
);
};
/** 终止任务 */
const
onStopJob
=
useCallback
(()
=>
{
cancelWorkJob
({
...
...
@@ -365,7 +375,7 @@ const ProjectSubmitWork = observer(() => {
},
[
deleteWorkJob
,
workFlowJobInfo
?.
id
]);
const
returnPermission
=
useMemo
(()
=>
{
if
(
[
'SUBMITTED'
,
'RUNNING'
].
includes
(
state
||
''
)
)
{
if
(
state
===
"RUNNING"
)
{
return
isPass
(
"PROJECT_WORKBENCH_JOBS_STOP"
,
"USER"
);
}
else
{
return
isPass
(
"PROJECT_WORKBENCH_JOBS_DELETE"
,
"MANAGER"
);
...
...
@@ -436,13 +446,13 @@ const ProjectSubmitWork = observer(() => {
}}
> */
}
<
MyButton
text=
{
[
'SUBMITTED'
,
'RUNNING'
].
includes
(
state
||
''
)
?
"终止"
:
"删除"
}
text=
{
state
===
"RUNNING"
?
"终止"
:
"删除"
}
variant=
"outlined"
color=
"secondary"
onClick=
{
(
e
:
any
)
=>
handleShowPopper
(
e
,
[
'SUBMITTED'
,
'RUNNING'
].
includes
(
state
||
''
)
state
===
"RUNNING"
?
"正在运行的任务终止后将无法重新运行,确认继续吗?"
:
"任务被删除后将无法恢复,确认继续吗?"
)
...
...
@@ -480,7 +490,7 @@ const ProjectSubmitWork = observer(() => {
}
alt=
""
/>
<
span
className=
{
styles
.
outputItemName
}
>
{
item
.
name
}
</
span
>
{
item
.
name
}
</
div
>
{
/* </MyPopconfirm> */
}
<
span
className=
{
styles
.
outputLiRight
}
>
...
...
@@ -541,7 +551,7 @@ const ProjectSubmitWork = observer(() => {
alt=
""
/>
)
}
{
[
'SUBMITTED'
,
'RUNNING'
].
includes
(
state
||
''
)
&&
(
{
state
===
"RUNNING"
&&
(
<
img
className=
{
styles
.
taskInfoValueIcon
}
src=
{
jobRun
}
...
...
src/views/Project/ProjectJobDetail/utils.ts
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-15 15:03:10
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
23 19:39:21
* @LastEditTime: 2022-08-
15 15:43:16
* @FilePath: /bkunyun/src/views/Project/ProjectJobDetail/utils.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -26,12 +26,13 @@ export const getDatasetPath = (path: string) => {
// 根据outputs的路径获取数据集的名称
export
const
getDatasetName
=
(
path
:
string
)
=>
{
let
name
=
''
;
const
arr
=
path
.
split
(
'/.dataset/'
);
if
(
arr
.
length
===
2
)
{
name
=
arr
[
1
]
let
name
=
""
;
let
nameIndex
=
path
.
indexOf
(
"/.dataset/"
)
+
10
;
const
lastIndex
=
path
.
lastIndexOf
(
"/"
);
if
(
nameIndex
!==
-
1
&&
lastIndex
!==
-
1
)
{
name
=
path
.
slice
(
nameIndex
,
lastIndex
);
}
return
name
return
name
;
};
/** 根据批节点 判断是否在同一个批 */
...
...
src/views/Project/ProjectOverview/TaskCard/index.tsx
View file @
1b79d21b
...
...
@@ -47,18 +47,21 @@ const TaskCard = (props: TaskCardProps) => {
}
},
[
outputs
])
// 结果文件跳转
const
goToProjectData
=
(
info
:
any
)
=>
{
let
{
path
=
''
,
type
=
''
}
=
info
const
goToProjectData
=
(
path
:
string
)
=>
{
const
lastIndex
=
path
.
lastIndexOf
(
"/"
);
// /projectData
// dataType
if
(
lastIndex
!==
-
1
)
{
path
=
path
.
slice
(
0
,
lastIndex
);
}
path
=
path
.
slice
(
12
);
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
path
||
'/'
,
dataType
:
type
},
});
if
(
path
)
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
path
},
});
}
else
{
navigate
(
`/product/cadd/projectData`
,
{
state
:
{
pathName
:
"/"
},
});
}
}
// 跳转详情页
const
gotoDetail
=
(
id
:
string
)
=>
{
...
...
@@ -84,8 +87,6 @@ const TaskCard = (props: TaskCardProps) => {
// 渲染状态
const
renderStatusText
=
(
data
:
string
)
=>
{
switch
(
data
)
{
case
"SUBMITTED"
:
return
"正在启动"
;
case
"RUNNING"
:
return
'正在运行'
case
"ABORTED"
:
...
...
@@ -174,15 +175,15 @@ const TaskCard = (props: TaskCardProps) => {
{
randerOutputs
.
length
===
0
?
<
div
className=
{
style
.
noResult
}
>
暂无结果文件
</
div
>
:
<
div
className=
{
style
.
resultBox
}
>
{
randerOutputs
.
map
((
item
,
index
)
=>
{
return
<
div
key=
{
index
}
className=
{
style
.
result
}
onClick=
{
()
=>
goToProjectData
(
item
)
}
>
return
<
div
key=
{
index
}
className=
{
style
.
result
}
onClick=
{
()
=>
goToProjectData
(
item
.
path
)
}
>
<
img
className=
{
style
.
outputLeftImg
}
src=
{
item
?
.
type
===
"file"
?
fileIcon
:
dataSetIcon
item
.
type
===
"file"
?
fileIcon
:
dataSetIcon
}
alt=
""
/>
{
item
?
.
name
}
</
div
>
{
item
.
name
}
</
div
>
})
}
</
div
>
}
...
...
src/views/Project/ProjectOverview/index.module.css
View file @
1b79d21b
...
...
@@ -3,7 +3,7 @@
justify-content
:
space-between
;
margin
:
24px
24px
0
24px
;
padding-bottom
:
20px
;
border-bottom
:
1px
solid
#
EDEFF2
;
border-bottom
:
1px
solid
#
F0F2F5
;
}
.basicInformationRight
{
...
...
src/views/Project/ProjectSetting/BaseInfo/index.module.css
View file @
1b79d21b
.loadingBox
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
300px
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
300px
;
}
.projectInfoList
{
background-color
:
#fff
;
position
:
relative
;
background-color
:
#fff
;
position
:
relative
;
}
.projectInfoListLi
{
margin-bottom
:
24px
;
margin-bottom
:
24px
;
}
.projectInfoListLiLabel
{
color
:
#1e2633
;
line-height
:
22px
;
font-size
:
14px
;
font-weight
:
550
;
margin-bottom
:
8px
;
color
:
#1e2633
;
line-height
:
22px
;
font-size
:
14px
;
font-weight
:
550
;
margin-bottom
:
8px
;
}
.projectInfoName
::after
{
content
:
"*"
;
color
:
red
;
content
:
"*"
;
color
:
red
;
}
.projectInfoListLiValue
{
width
:
560px
;
height
:
36px
;
border
:
1px
solid
#e6e8eb
;
border-radius
:
4px
;
color
:
#565c66
;
padding
:
0
12px
;
box-sizing
:
border-box
;
outline
:
none
;
width
:
560px
;
height
:
36px
;
border
:
1px
solid
#e6e8eb
;
border-radius
:
4px
;
color
:
#565c66
;
padding
:
0
12px
;
box-sizing
:
border-box
;
outline
:
none
;
}
.projectInfoListLiValue
:focus
{
border
:
2px
solid
#136efa
;
border
:
2px
solid
#136efa
;
}
.projectInfoTextarea
{
position
:
relative
;
width
:
560px
;
line-height
:
22px
;
height
:
82px
;
padding
:
7px
12px
;
resize
:
none
;
font-size
:
14px
;
}
.projectInfoSelect
{
width
:
560px
;
padding
:
0
12px
;
width
:
560px
;
padding
:
0
12px
;
}
.disable
{
background
:
#f7f8fa
;
background
:
#f7f8fa
;
}
.projectInfoListLiText
{
margin-bottom
:
16px
;
color
:
#8a9099
;
font-size
:
12px
;
line-height
:
20px
;
margin-bottom
:
16px
;
color
:
#8a9099
;
font-size
:
12px
;
line-height
:
20px
;
}
.deleteBox
{
width
:
380px
;
width
:
380px
;
}
.deleteText1
{
font-size
:
14px
;
line-height
:
22px
;
color
:
#ff4e4e
;
margin-bottom
:
20px
;
font-size
:
14px
;
line-height
:
22px
;
color
:
#ff4e4e
;
margin-bottom
:
20px
;
}
.deleteText2
{
color
:
#1e2633
;
font-size
:
14px
;
line-height
:
22px
;
margin-bottom
:
8px
;
color
:
#1e2633
;
font-size
:
14px
;
line-height
:
22px
;
margin-bottom
:
8px
;
}
.deleteText3
{
color
:
#1e2633
;
font-size
:
14px
;
line-height
:
22px
;
margin-bottom
:
20px
;
color
:
#1e2633
;
font-size
:
14px
;
line-height
:
22px
;
margin-bottom
:
20px
;
}
.deleteProjectName
{
color
:
#1370ff
;
color
:
#1370ff
;
}
.deleteProjectInput
{
width
:
100%
;
height
:
36px
;
border
:
1px
solid
#e6e8eb
;
border-radius
:
4px
;
color
:
#565c66
;
padding
:
0
12px
;
box-sizing
:
border-box
;
outline
:
none
;
width
:
100%
;
height
:
36px
;
border
:
1px
solid
#e6e8eb
;
border-radius
:
4px
;
color
:
#565c66
;
padding
:
0
12px
;
box-sizing
:
border-box
;
outline
:
none
;
}
.deleteProjectInput
:focus
{
border
:
1px
solid
#136efa
;
border
:
1px
solid
#136efa
;
}
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
1b79d21b
...
...
@@ -184,12 +184,10 @@ const BaseInfo = observer(() => {
};
const
descChange
=
(
e
:
any
)
=>
{
if
(
e
.
target
.
value
.
length
<=
100
)
{
setProjectInfo
({
...
projectInfo
,
desc
:
e
.
target
.
value
,
});
}
setProjectInfo
({
...
projectInfo
,
desc
:
e
.
target
.
value
,
});
};
const
checkBudget
=
(
budget
:
string
,
showMessage
=
false
)
=>
{
...
...
@@ -339,30 +337,16 @@ const BaseInfo = observer(() => {
</
div
>
<
div
className=
{
style
.
projectInfoListLi
}
>
<
div
className=
{
style
.
projectInfoListLiLabel
}
>
项目描述
</
div
>
<
div
<
textarea
value=
{
projectInfo
.
desc
}
className=
{
classnames
({
[
style
.
projectInfoListLiValue
]:
true
,
[
style
.
projectInfoTextarea
]:
true
,
})
}
>
<
MyInput
value=
{
projectInfo
.
desc
}
id=
"desc"
placeholder=
"项目描述限制100字以内"
onChange=
{
descChange
}
multiline
rows=
{
4
}
/>
<
span
style=
{
{
position
:
"absolute"
,
bottom
:
"7px"
,
right
:
"12px"
,
color
:
projectInfo
.
desc
.
length
>=
100
?
"#d32f2f"
:
"#C2C6CC"
,
}
}
>
{
projectInfo
.
desc
.
length
}
/100
</
span
>
</
div
>
onChange=
{
descChange
}
placeholder=
"项目描述限制300字以内"
maxLength=
{
300
}
></
textarea
>
</
div
>
<
div
className=
{
style
.
projectInfoListLi
}
>
<
div
className=
{
style
.
projectInfoListLiLabel
}
>
计算区
</
div
>
...
...
src/views/Project/ProjectSetting/ProjectMembers/components/AddMember.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
31 18:27:26
* @LastEditTime: 2022-08-
03 14:29:19
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -79,7 +79,15 @@ const AddMember = observer((props: IProps) => {
useEffect
(()
=>
{
if
(
addMemberDialog
)
{
http
.
get
<
IResponse
<
any
>
>
("/cpp/project/listroles").then((res) =
>
{
setSelectOptions
(
res
.
data
);
const
arr
=
[];
const
{
data
}
=
res
;
for
(
const
key
in
data
)
{
arr
.
push
({
label
:
String
(
data
[
key
]),
value
:
key
,
});
}
setSelectOptions
(
arr
);
}
);
}
}, [addMemberDialog, http]);
...
...
@@ -162,7 +170,6 @@ const AddMember = observer((props: IProps) => {
/>
<
div
style=
{
{
overflowY
:
"scroll"
,
maxHeight
:
400
}
}
>
<
MyTable
tableContainerStyle=
{
{
height
:
346
}
}
checkboxData=
{
(
val
:
string
[])
=>
setCheckData
(
val
)
}
param=
"username"
disabledParam=
{
"enabled"
}
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
1b79d21b
...
...
@@ -23,11 +23,11 @@ type ConfigFormProps = {
templateConfigInfo
?:
ITemplateConfig
;
setParameter
:
any
;
onRef
?:
React
.
Ref
<
any
>
;
set
ExternalSelected
NodeId
:
(
val
:
string
)
=>
void
;
set
SelectedBatch
NodeId
:
(
val
:
string
)
=>
void
;
};
const
ConfigForm
=
(
props
:
ConfigFormProps
)
=>
{
const
{
templateConfigInfo
,
setParameter
,
set
ExternalSelected
NodeId
}
=
props
;
const
{
templateConfigInfo
,
setParameter
,
set
SelectedBatch
NodeId
}
=
props
;
const
[
name
,
setName
]
=
useState
<
string
>
(
""
);
// 任务名称
const
[
fileSelectType
,
setFileSelectType
]
=
useState
<
FileSelectType
>
(
"path"
);
...
...
@@ -192,6 +192,7 @@ const ConfigForm = (props: ConfigFormProps) => {
const
randerParameters
=
(
parameters
:
Array
<
IParameter
>
,
taskId
:
string
,
batchId
?:
string
)
=>
{
return
parameters
.
filter
((
parameter
)
=>
parameter
.
hidden
===
false
)
...
...
@@ -207,20 +208,17 @@ const ConfigForm = (props: ConfigFormProps) => {
[
styles
.
required
]:
parameter
.
required
,
})
}
>
{
parameter
.
titl
e
}
{
parameter
.
nam
e
}
<
span
className=
{
styles
.
parameterDataType
}
>
{
parameter
.
classTypeName
}
</
span
>
</
div
>
<
MyTooltip
title=
{
parameter
.
description
||
parameter
.
name
}
placement=
"right"
>
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"right"
>
<
div
className=
{
styles
.
parameterContent
}
>
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"file"
&&
(
<
MyInput
onClick=
{
()
=>
{
set
ExternalSelectedNodeId
(
task
Id
||
""
);
set
SelectedBatchNodeId
(
batch
Id
||
""
);
setFileSelectType
(
"file"
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
}
}
...
...
@@ -243,7 +241,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"path"
&&
(
<
MyInput
onClick=
{
()
=>
{
set
ExternalSelectedNodeId
(
task
Id
||
""
);
set
SelectedBatchNodeId
(
batch
Id
||
""
);
setFileSelectType
(
"path"
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
}
}
...
...
@@ -266,7 +264,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"dataset"
&&
(
<
MyInput
onClick=
{
()
=>
{
set
ExternalSelected
NodeId
(
taskId
);
set
SelectedBatch
NodeId
(
taskId
);
setFileSelectType
(
"dataset"
);
handleOpenFileSelect
(
taskId
,
parameter
.
name
);
}
}
...
...
@@ -289,9 +287,10 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
&&
(
<
MyInput
onFocus=
{
()
=>
{
setExternalSelectedNodeId
(
taskId
||
""
);
setSelectedBatchNodeId
(
batchId
||
""
);
console
.
log
(
batchId
,
"111"
);
}
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
value=
{
parameter
.
value
||
""
}
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
e
,
taskId
,
parameter
.
name
||
""
)
...
...
@@ -304,8 +303,8 @@ const ConfigForm = (props: ConfigFormProps) => {
)
}
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"select"
&&
(
<
MySelect
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
value=
{
parameter
.
value
}
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
...
...
@@ -327,8 +326,8 @@ const ConfigForm = (props: ConfigFormProps) => {
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"multipleselect"
&&
(
<
MySelect
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
value=
{
parameter
.
value
}
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
...
...
@@ -354,8 +353,8 @@ const ConfigForm = (props: ConfigFormProps) => {
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
e
,
taskId
,
parameter
.
name
||
""
)
}
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
options=
{
parameter
?.
choices
||
[]
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
...
...
@@ -376,8 +375,8 @@ const ConfigForm = (props: ConfigFormProps) => {
)
}
options=
{
parameter
?.
choices
||
[]
}
onFocus=
{
()
=>
set
ExternalSelectedNodeId
(
task
Id
||
""
)
}
onBlur=
{
()
=>
set
ExternalSelected
NodeId
(
""
)
}
onFocus=
{
()
=>
set
SelectedBatchNodeId
(
batch
Id
||
""
)
}
onBlur=
{
()
=>
set
SelectedBatch
NodeId
(
""
)
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
/>
...
...
@@ -446,7 +445,7 @@ const ConfigForm = (props: ConfigFormProps) => {
<
MyInput
value=
{
outputPath
||
""
}
onClick=
{
()
=>
{
set
ExternalSelected
NodeId
(
""
);
set
SelectedBatch
NodeId
(
""
);
setFileSelectType
(
"path"
);
handleOpenFileSelect
();
}
}
...
...
@@ -495,10 +494,7 @@ const ConfigForm = (props: ConfigFormProps) => {
/>
</
div
>
<
div
className=
{
styles
.
taskConfigBox
}
>
{
randerParameters
(
task
.
parameters
.
filter
((
parameter
)
=>
!
parameter
?.
thrown
),
task
.
id
,
)
}
{
randerParameters
(
task
.
parameters
,
task
.
id
,
task
.
id
)
}
{
task
.
flows
.
map
((
flow
)
=>
{
if
(
flow
.
parameters
.
filter
(
...
...
@@ -508,7 +504,7 @@ const ConfigForm = (props: ConfigFormProps) => {
return
null
;
}
return
(
<
div
className=
{
styles
.
flowConfigBox
}
key=
{
flow
.
id
}
id=
{
`point${flow.id}`
}
>
<
div
className=
{
styles
.
flowConfigBox
}
key=
{
flow
.
id
}
>
<
div
className=
{
styles
.
flowTitle
}
>
{
flow
.
title
}
{
flow
.
description
&&
(
...
...
@@ -524,6 +520,7 @@ const ConfigForm = (props: ConfigFormProps) => {
{
randerParameters
(
flow
.
parameters
,
flow
.
id
,
flow
.
parentNode
?
flow
.
parentNode
:
flow
.
id
)
}
</
div
>
);
...
...
src/views/Project/ProjectSubmitWork/WorkFlow/index.tsx
View file @
1b79d21b
...
...
@@ -12,11 +12,11 @@ import { ITemplateConfig } from "../interface";
interface
IProps
{
templateConfigInfo
?:
ITemplateConfig
;
set
ExternalSelected
NodeId
?:
(
val
:
string
)
=>
void
;
externalSelected
NodeId
?:
string
;
set
SelectedBatch
NodeId
?:
(
val
:
string
)
=>
void
;
selectedBatch
NodeId
?:
string
;
}
const
WorkFlow
=
(
props
:
IProps
)
=>
{
const
{
templateConfigInfo
,
set
ExternalSelectedNodeId
,
externalSelected
NodeId
}
=
const
{
templateConfigInfo
,
set
SelectedBatchNodeId
,
selectedBatch
NodeId
}
=
props
;
/** 页面刷新提醒 */
...
...
@@ -36,8 +36,8 @@ const WorkFlow = (props: IProps) => {
return
(
<
Flow
tasks=
{
templateConfigInfo
?.
tasks
}
set
ExternalSelectedNodeId=
{
setExternalSelected
NodeId
}
externalSelectedNodeId=
{
externalSelected
NodeId
}
set
SelectedBatchNodeId=
{
setSelectedBatch
NodeId
}
selectedBatchNodeId=
{
selectedBatch
NodeId
}
/>
);
};
...
...
src/views/Project/ProjectSubmitWork/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-06-21 20:03:56
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
17 10:58:02
* @LastEditTime: 2022-08-
08 16:41:20
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -42,8 +42,7 @@ const ProjectSubmitWork = observer(() => {
let
configFormRef
:
any
=
React
.
createRef
();
/** 是否全屏 */
const
[
fullScreenShow
,
setFullScreenShow
]
=
useState
<
boolean
>
(
false
);
const
[
externalSelectedNodeId
,
setExternalSelectedNodeId
]
=
useState
<
string
>
(
""
);
const
[
selectedBatchNodeId
,
setSelectedBatchNodeId
]
=
useState
<
string
>
(
""
);
// 前往工作台
const
goToWorkbench
=
(
toWorkbenchList
=
false
)
=>
{
...
...
@@ -75,8 +74,6 @@ const ProjectSubmitWork = observer(() => {
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"checkbox"
)
{
value
=
parameter
.
defaultValue
.
split
(
","
);
}
else
if
((
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
)
{
value
=
String
(
parameter
.
defaultValue
);
}
else
{
value
=
parameter
.
defaultValue
;
}
...
...
@@ -85,13 +82,6 @@ const ProjectSubmitWork = observer(() => {
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"checkbox"
)
{
value
=
[];
}
else
if
((
parameter
.
domType
||
""
).
toLowerCase
()
===
"input"
)
{
value
=
String
(
parameter
.
defaultValue
)
===
"null"
?
""
:
String
(
parameter
.
defaultValue
);
}
else
if
((
parameter
.
domType
||
""
).
toLowerCase
()
===
"radio"
)
{
value
=
false
;
}
else
{
value
=
""
;
}
...
...
@@ -116,7 +106,7 @@ const ProjectSubmitWork = observer(() => {
},
});
const
{
run
:
submitWorkFlowRun
,
loading
}
=
useMyRequest
(
submitWorkFlow
,
{
const
{
run
:
submitWorkFlowRun
}
=
useMyRequest
(
submitWorkFlow
,
{
onSuccess
:
(
res
)
=>
{
Message
.
success
(
"提交成功"
);
goToWorkbench
(
true
);
...
...
@@ -167,9 +157,6 @@ const ProjectSubmitWork = observer(() => {
tack
.
parameters
.
filter
((
parameter
)
=>
parameter
.
hidden
===
false
)
.
forEach
((
parameter
)
=>
{
if
(
tack
.
type
===
"BATCH"
&&
parameter
?.
thrown
)
{
return
;
}
const
checkResult
=
getCheckResult
(
parameter
,
parameter
.
value
);
parameter
.
error
=
checkResult
.
error
;
parameter
.
helperText
=
checkResult
.
helperText
;
...
...
@@ -199,16 +186,12 @@ const ProjectSubmitWork = observer(() => {
value
=
`/
${
value
}
`
;
}
if
(
tack
.
type
===
"BATCH"
)
{
if
(
!
parameter
?.
thrown
)
{
promotedParameters
[
`
${
tack
.
id
}
_
${
parameter
.
name
}
`
]
=
{
[
parameter
.
classTypeName
]:
value
,
};
}
promotedParameters
[
`
${
tack
.
id
}
_
${
parameter
.
name
}
`
]
=
{
[
parameter
.
classTypeName
]:
value
,
};
}
else
{
promotedParameters
[
`
${
tack
.
parentNode
}${
parameter
.
thrown
?
""
:
"_"
+
tack
.
prefix
}
_
${
parameter
.
name
}
`
`
${
tack
.
parentNode
}
_
${
tack
.
prefix
}
_
${
parameter
.
name
}
`
]
=
{
[
parameter
.
classTypeName
]:
value
,
};
...
...
@@ -223,7 +206,7 @@ const ProjectSubmitWork = observer(() => {
promotedParameters
,
});
}
else
{
Message
.
error
(
"请完善
算子信息后提交任务
"
);
Message
.
error
(
"请完善
左侧表单再提交
"
);
}
};
...
...
@@ -314,7 +297,7 @@ const ProjectSubmitWork = observer(() => {
onRef=
{
configFormRef
}
templateConfigInfo=
{
templateConfigInfo
}
setParameter=
{
setParameter
}
set
ExternalSelectedNodeId=
{
setExternalSelected
NodeId
}
set
SelectedBatchNodeId=
{
setSelectedBatch
NodeId
}
/>
</
div
>
)
}
...
...
@@ -324,8 +307,8 @@ const ProjectSubmitWork = observer(() => {
>
<
WorkFlow
templateConfigInfo=
{
templateConfigInfo
}
set
ExternalSelectedNodeId=
{
setExternalSelected
NodeId
}
externalSelectedNodeId=
{
externalSelected
NodeId
}
set
SelectedBatchNodeId=
{
setSelectedBatch
NodeId
}
selectedBatchNodeId=
{
selectedBatch
NodeId
}
/>
</
div
>
</
div
>
...
...
@@ -340,7 +323,6 @@ const ProjectSubmitWork = observer(() => {
anchorEl=
{
anchorEl
}
onCancel=
{
handleCancel
}
onConfirm=
{
handleConfirm
}
loading=
{
loading
}
/>
</
div
>
);
...
...
src/views/Project/ProjectSubmitWork/interface.ts
View file @
1b79d21b
...
...
@@ -11,7 +11,6 @@ export interface IParameter {
hidden
:
boolean
;
// 使用模板时是否展示 true 不展示 用户不需要填写
id
?:
string
;
name
:
string
;
// 参数名称
title
:
string
;
// 参数名称
required
:
boolean
;
// 是否必填
defaultValue
:
any
;
// 默认值
domType
:
IDomType
;
// 前端组件类型
...
...
@@ -30,8 +29,7 @@ export interface IParameter {
choices
:
Array
<
IChoice
>
;
// 提供给用户选择的选项组
error
?:
boolean
;
// 表单校验是否通过
helperText
?:
string
;
// 表单校验提示文案
parameterGroup
?:
string
;
//
thrown
:
boolean
;
// 保存批算子时 是否是 批算子输入输出相关的parameters
parameterGroup
?:
string
;
//
}
export
type
IExecutionStatus
=
"Pending"
|
"Running"
|
"Done"
|
"Failed"
;
...
...
src/views/Project/ProjectWorkbench/index.tsx
View file @
1b79d21b
/*
* @Author: rocosen
* @Date: 2022-06-12 10:05:13
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-0
8-30 18:21:04
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditTime: 2022-0
7-20 15:04:19
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -11,16 +11,17 @@ import { Box } from "@mui/system";
import
{
observer
}
from
"mobx-react-lite"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
projectImg
from
"@/assets/project/projectIconSmall.svg"
;
import
WorkbenchTemplate
from
"./workbenchTemplate"
;
import
WorkbenchList
from
"./workbenchList"
;
import
Tabs
from
"@/components/mui/Tabs"
;
import
usePass
from
"@/hooks/usePass"
;
import
Template
from
"@/assets/project/workbenchTemplate.svg"
;
import
TemplateSelect
from
"@/assets/project/workbenchTemplate_select.svg"
;
import
TemplateHover
from
"@/assets/project/workbenchTemplate_hover.svg"
;
import
Template_select
from
"@/assets/project/workbenchTemplate_select.svg"
;
import
List
from
"@/assets/project/workbenchList.svg"
;
import
ListHover
from
"@/assets/project/workbenchList_hover.svg"
;
import
ListSelect
from
"@/assets/project/workbenchList_select.svg"
;
import
List_select
from
"@/assets/project/workbenchList_select.svg"
;
import
ButtonDemo
from
"@/views/mui_demo/button"
;
import
InputDemo
from
"@/views/mui_demo/input"
;
const
ProjectWorkbench
=
observer
(()
=>
{
const
isPass
=
usePass
();
...
...
@@ -34,8 +35,7 @@ const ProjectWorkbench = observer(() => {
component
:
<
WorkbenchTemplate
/>,
hide
:
!
isPass
(
"PROJECT_WORKBENCH_FLOES"
),
icon
:
Template
,
iconed
:
TemplateSelect
,
iconHover
:
TemplateHover
iconed
:
Template_select
,
},
{
label
:
"任务列表"
,
...
...
@@ -43,8 +43,21 @@ const ProjectWorkbench = observer(() => {
component
:
<
WorkbenchList
/>,
hide
:
!
isPass
(
"PROJECT_WORKBENCH_JOBS"
),
icon
:
List
,
iconed
:
ListSelect
,
iconHover
:
ListHover
,
iconed
:
List_select
,
},
{
label
:
"按钮组件"
,
value
:
"MUI_BUTTON"
,
component
:
<
ButtonDemo
/>,
icon
:
List
,
iconed
:
List_select
,
},
{
label
:
"输入框组件"
,
value
:
"MUI_INPUT"
,
component
:
<
InputDemo
/>,
icon
:
List
,
iconed
:
List_select
,
},
];
},
[
isPass
]);
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-0
8-22 15:33:02
* @LastEditTime: 2022-0
7-28 19:02:19
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -48,10 +48,6 @@ const currencies = [
value
:
"ALL"
,
label
:
"全部"
,
},
{
value
:
"SUBMITTED"
,
label
:
"正在启动"
,
},
{
value
:
"RUNNING"
,
label
:
"正在运行"
,
...
...
@@ -83,31 +79,30 @@ const ProjectMembers = observer(() => {
const
[
size
,
setSize
]
=
useState
(
10
);
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
10
);
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
loading
,
setLoading
]
=
useState
(
false
)
/** 简单弹窗 */
const
[
jobData
,
setJobData
]
=
useState
(
""
);
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
const
[
dialogType
,
setDialogType
]
=
useState
(
"del"
);
// 获取作业列表
const
{
run
:
getWorkflowJobInfo
,
loading
}
=
useMyRequest
(
getWorkflowJobList
,
{
onSuccess
:
(
result
:
any
)
=>
{
setJobList
(
result
.
data
.
content
);
setCount
(
result
.
data
.
totalElements
);
timer
&&
clearTimeout
(
timer
as
number
);
timer
=
null
;
timer
=
setTimeout
(()
=>
{
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
page
:
page
,
size
:
size
,
name
:
jobName
,
state
:
currency
===
"ALL"
?
""
:
currency
,
});
},
60000
);
},
}
);
const
{
run
:
getWorkflowJobInfo
}
=
useMyRequest
(
getWorkflowJobList
,
{
onSuccess
:
(
result
:
any
)
=>
{
setJobList
(
result
.
data
.
content
);
setCount
(
result
.
data
.
totalElements
);
setLoading
(
false
);
timer
&&
clearTimeout
(
timer
as
number
);
timer
=
null
;
timer
=
setTimeout
(()
=>
{
getWorkflowJobInfo
({
projectId
:
currentProjectStore
.
currentProjectInfo
.
id
as
string
,
page
:
page
,
size
:
size
,
name
:
jobName
,
state
:
currency
===
"ALL"
?
""
:
currency
,
});
},
60000
);
},
});
useEffect
(()
=>
{
return
()
=>
{
...
...
@@ -286,7 +281,7 @@ const ProjectMembers = observer(() => {
const
rowClick
=
useCallback
(
(
id
:
string
)
=>
{
navigate
(
`/product/cadd/projectJobDetail`
,
{
state
:
{
taskId
:
id
,
from
:
"workbenchList"
},
state
:
{
taskId
:
id
,
from
:
'workbenchList'
},
});
},
[
navigate
]
...
...
@@ -364,6 +359,7 @@ const ProjectMembers = observer(() => {
name
:
jobName
,
state
:
currency
===
"ALL"
?
""
:
currency
,
});
setLoading
(
true
)
}
}
>
<
img
alt=
""
src=
{
onload
}
/>
...
...
@@ -372,7 +368,7 @@ const ProjectMembers = observer(() => {
<
Box
className=
{
styles
.
body
}
style=
{
{
position
:
"relative"
}
}
>
<
MyCircularProgress
loading=
{
loading
}
/>
{
jobList
.
length
===
0
&&
!
loading
&&
(
{
jobList
.
length
===
0
&&
(
<
Box
sx=
{
{
display
:
"flex"
,
...
...
@@ -414,9 +410,7 @@ const ProjectMembers = observer(() => {
</
Box
>
<
Box
className=
{
styles
.
tabBoxMiddle
}
>
<
img
alt=
""
src=
{
jobCost
}
/>
<
div
className=
{
styles
.
tabBoxTime
}
>
{
item
.
jobCost
?
item
.
jobCost
.
toFixed
(
2
)
:
"--"
}
</
div
>
<
div
className=
{
styles
.
tabBoxTime
}
>
{
item
.
jobCost
.
toFixed
(
2
)
}
元
</
div
>
</
Box
>
<
Box
className=
{
styles
.
tabBoxJobStatus
}
>
<
img
alt=
""
src=
{
renderStatusIcon
(
item
.
state
)
}
/>
...
...
@@ -433,27 +427,18 @@ const ProjectMembers = observer(() => {
/>
</
Box
>
<
div
style=
{
{
color
:
renderTextColor
(
item
.
state
),
margin
:
"0px"
,
}
}
style=
{
{
color
:
renderTextColor
(
item
.
state
),
margin
:
'0px'
}
}
className=
{
styles
.
tabBoxStatusText
}
>
{
item
.
completeNum
+
"/"
+
item
.
totalNum
}
</
div
>
</
Box
>
{
(
item
.
state
===
"RUNNING"
||
item
.
state
===
"SUBMITTED"
)
&&
{
item
.
state
===
"RUNNING"
&&
isPass
(
"PROJECT_WORKBENCH_JOBS_STOP"
,
"USER"
)
&&
(
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
{
currentProjectStore
.
currentProjectInfo
.
projectRole
===
"USER"
&&
item
.
creator
!==
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
)
?.
name
?
(
""
)
:
(
<
img
{
currentProjectStore
.
currentProjectInfo
.
projectRole
===
"USER"
&&
(
item
.
creator
!==
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
)?.
name
)
?
""
:
<
img
alt=
""
src=
{
jobStop
}
style=
{
{
cursor
:
"pointer"
}
}
...
...
@@ -465,11 +450,10 @@ const ProjectMembers = observer(() => {
setDialogType
(
"stop"
);
}
}
/>
)
}
}
</
Box
>
)
}
{
item
.
state
!==
"RUNNING"
&&
item
.
state
!==
"SUBMITTED"
&&
isPass
(
"PROJECT_WORKBENCH_JOBS_DELETE"
,
"MANAGER"
)
&&
(
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
img
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.tsx
View file @
1b79d21b
...
...
@@ -144,7 +144,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
};
// 获取模板列表
const
getAddTemplateListFun
=
useCallback
((
newTitle
?:
string
)
=>
{
const
getAddTemplateListFun
=
useCallback
(()
=>
{
const
userName
=
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
)?.
name
;
setSelectTemplateData
([]);
setAddTemplateList
([]);
...
...
@@ -153,14 +153,14 @@ const AddTemplate = (props: IAddTemplateProps) => {
projectId
:
projectId
as
string
,
productId
:
productId
as
string
,
creator
:
"root"
,
keyword
:
newT
itle
,
keyword
:
t
itle
,
});
}
else
{
getAddTemplateList
({
projectId
:
projectId
as
string
,
productId
:
productId
as
string
,
creator
:
userName
,
keyword
:
newT
itle
,
keyword
:
t
itle
,
});
}
},
[
...
...
@@ -169,7 +169,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
productId
,
projectId
,
templateType
,
//
title,
title
,
]);
//模板启用切换
...
...
@@ -193,13 +193,6 @@ const AddTemplate = (props: IAddTemplateProps) => {
getAddTemplateListFun
();
},
[
getAddTemplateListFun
]);
// 按回车搜索
const
handleKeyWordChangeKeyUp
=
(
e
:
any
)
=>
{
if
(
e
.
keyCode
===
13
)
{
getAddTemplateListFun
(
e
.
target
.
value
);
}
};
const
hiddenBoxArr
=
useMemo
(()
=>
{
const
length
=
templateType
===
"public"
...
...
@@ -222,7 +215,7 @@ const AddTemplate = (props: IAddTemplateProps) => {
<
Typography
sx=
{
{
fontSize
:
"18px"
,
fontWeight
:
"600"
,
color
:
"#1E2633"
}
}
>
管理工作流模板
添加工作流模版
</
Typography
>
<
Box
sx=
{
{
...
...
@@ -238,7 +231,6 @@ const AddTemplate = (props: IAddTemplateProps) => {
onChange=
{
(
e
:
any
)
=>
{
setTitle
(
e
.
target
.
value
);
}
}
onKeyUp=
{
handleKeyWordChangeKeyUp
}
placeholder=
"输入关键词搜索"
size=
"small"
sx=
{
{
width
:
340
,
height
:
32
}
}
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
18 10:01:36
* @LastEditTime: 2022-08-
09 16:32:42
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -114,7 +114,7 @@ const ProjectMembers = observer(() => {
<
SearchInput
onKeyUp=
{
handleKeyWordChangeKeyUp
}
sx=
{
{
width
:
340
}
}
/>
{
isPass
(
"PROJECT_WORKBENCH_FLOES_ADD"
,
"MANAGER"
)
&&
(
<
MyButton
text=
{
"
管理工作流模板
"
}
text=
{
"
添加工作流模版
"
}
img=
{
<
Add
/>
}
onClick=
{
addTemplateBlock
}
size=
{
"medium"
}
...
...
src/views/Project/components/AddProject/index.tsx
View file @
1b79d21b
...
...
@@ -177,13 +177,13 @@ const AddProject = (props: IAddProjectProps) => {
title=
"新建项目"
loading=
{
loading
}
>
<
div
className=
{
style
.
formBox
}
onClick=
{
handleFromBox
}
>
<
MyInput
required
error=
{
nameCheck
.
error
}
//
id="name"
id=
"name"
label=
"项目名称"
variant=
"outlined"
value=
{
name
}
onChange=
{
handleNameChange
}
helperText=
{
nameCheck
.
help
}
...
...
src/views/Project/components/CurrentProject/index.tsx
View file @
1b79d21b
/*
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-26 19:13:55
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-30 19:26:16
* @FilePath: /bkunyun/src/views/Project/components/CurrentProject/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
logo
from
"@/assets/project/projectIcon.svg"
;
import
style
from
"./index.module.css"
;
import
ArrowForwardIosIcon
from
"@mui/icons-material/ArrowForwardIos"
;
import
{
Popper
,
Fade
}
from
"@mui/material"
;
import
{
useStores
}
from
"@/store/index"
;
import
ProjectListPopper
from
"../ProjectListPopper"
;
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
use
Effect
,
use
State
}
from
"react"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
AddProject
from
"../AddProject"
;
import
{
...
...
@@ -25,6 +17,17 @@ const CurrentProject = observer(() => {
const
[
projectListOpen
,
setProjectListOpen
]
=
useState
(
false
);
const
[
anchorEl
,
setAnchorEl
]
=
useState
<
null
|
HTMLElement
>
(
null
);
useEffect
(()
=>
{
document
.
addEventListener
(
"click"
,
(
e
)
=>
{
setProjectListOpen
(
false
);
});
return
()
=>
{
document
.
removeEventListener
(
"click"
,
(
e
)
=>
{
setProjectListOpen
(
false
);
});
};
},
[]);
const
handleShowProjectList
=
(
event
:
React
.
MouseEvent
<
HTMLElement
>
)
=>
{
event
.
nativeEvent
.
stopImmediatePropagation
();
setAnchorEl
(
event
.
currentTarget
);
...
...
src/views/Project/components/Flow/components/BatchNode/index.module.css
View file @
1b79d21b
...
...
@@ -4,7 +4,7 @@
/* padding: 12px 20px; */
border
:
1px
solid
#e6e8eb
;
border-left
:
4px
solid
#e6e8eb
;
/* display: flex; */
display
:
flex
;
align-items
:
center
;
}
...
...
@@ -37,12 +37,7 @@
}
.batchRotate
{
margin-bottom
:
20px
;
line-height
:
22px
;
font-size
:
14px
;
font-weight
:
900
;
/* text-align: center; */
/* transform: translateX(-50%) rotate(-90deg); */
transform
:
translateX
(
-50%
)
rotate
(
-90deg
);
}
.handleBox
::before
{
...
...
src/views/Project/components/Flow/components/BatchNode/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:20:29
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
31 17:09:26
* @LastEditTime: 2022-08-
09 11:24:38
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/BatchNode.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -68,12 +68,11 @@ const BatchNode = (props: IBatchNode) => {
className=
{
styles
.
handleBox
}
id=
{
item
.
name
}
style=
{
{
background
Color
:
"rgba(19, 112, 255, 1)
"
,
background
:
"#fff
"
,
border
:
item
.
error
?
"1px solid #FF4E4E"
:
"1px solid #
fff
"
,
:
"1px solid #
D1D6DE
"
,
left
:
index
*
24
+
20
,
top
:
'-47px'
,
}
}
type=
"target"
position=
{
Position
.
Top
}
...
...
@@ -100,8 +99,8 @@ const BatchNode = (props: IBatchNode) => {
className=
{
styles
.
handleBox
}
id=
{
item
.
name
}
style=
{
{
background
Color
:
"rgba(19, 112, 255, 1)
"
,
border
:
"1px solid #
FFF
"
,
background
:
"#fff
"
,
border
:
"1px solid #
D1D6DE
"
,
left
:
index
*
24
+
20
,
}
}
type=
"source"
...
...
src/views/Project/components/Flow/components/BatchOperatorFlow/index.tsx
View file @
1b79d21b
...
...
@@ -50,6 +50,7 @@ const BatchOperatorFlow = (props: IProps) => {
showVersion
=
false
,
...
other
}
=
props
;
console
.
log
(
tasks
);
/** 自定义的节点类型 */
const
nodeTypes
=
useMemo
(()
=>
{
return
{
batchNode
:
BatchNode
,
flowNode
:
FlowNode
};
...
...
@@ -146,17 +147,16 @@ const BatchOperatorFlow = (props: IProps) => {
flowNodeStyle
:
{
backgroundColor
:
"#fff"
,
borderRadius
:
"4px"
,
boxShadow
:
"0px 3px 10px 0px rgba(0,24,57,0.14)"
,
},
inStyle
:
{
backgroundColor
:
"rgba(19, 112, 255, 1)"
,
border
:
"
1px solid #FFF
"
,
border
:
"
none
"
,
left
:
12
,
top
:
"-2px"
,
},
outStyle
:
{
backgroundColor
:
"rgba(19, 112, 255, 1)"
,
border
:
"
1px solid #FFF
"
,
border
:
"
none
"
,
left
:
12
,
bottom
:
"-2px"
,
},
...
...
@@ -367,16 +367,6 @@ const BatchOperatorFlow = (props: IProps) => {
setInSideFlowNodeId
(
""
);
},
[]);
// const onNodesChange = (val: any)=>{
// // 自定义change事件 不允许react flow组件本身删除事件
// return
// }
// const onEdgesChange = (val: any) =>{
// // 自定义change事件 不允许react flow组件本身删除事件
// return;
// }
const
reactFlowParams
=
flowType
===
"edit"
?
{
...
...
src/views/Project/components/Flow/components/FlowNode/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-12 11:29:46
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
31 17:09:31
* @LastEditTime: 2022-08-
09 19:06:43
* @FilePath: /bkunyun/src/views/Project/components/Flow/components/FlowNode/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -52,7 +52,6 @@ const FlowNode = (props: any) => {
(
parameters
?.
length
&&
parameters
?.
filter
((
item
:
any
)
=>
{
return
item
.
parameterGroup
===
"in"
;
// return item.parameterGroup === "in" && !item?.thrown;
}))
||
[]
);
...
...
@@ -64,7 +63,6 @@ const FlowNode = (props: any) => {
(
parameters
?.
length
&&
parameters
?.
filter
((
item
:
any
)
=>
{
return
item
.
parameterGroup
===
"out"
;
// return item.parameterGroup === "out" && !item?.thrown;
}))
||
[]
);
...
...
@@ -98,8 +96,8 @@ const FlowNode = (props: any) => {
);
})
:
null
}
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
span
style=
{
{
fontSize
:
'12px'
,
lineHeight
:
'24px'
}
}
>
{
title
||
""
}
{
showVersion
&&
version
}
</
span
>
<
div
>
{
title
||
""
}
{
showVersion
&&
version
}
{
flowType
!==
"edit"
&&
isCheck
?
(
<
span
className=
{
styles
.
successDot
}
></
span
>
)
:
null
}
...
...
src/views/Project/components/Flow/index.tsx
View file @
1b79d21b
...
...
@@ -11,7 +11,7 @@ import ReactFlow, {
import
{
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
uuid
}
from
"@/utils/util"
;
import
{
IParameter
,
ITask
}
from
"../../ProjectSubmitWork/interface"
;
import
{
IEdge
,
IParameter
,
ITask
}
from
"../../ProjectSubmitWork/interface"
;
import
{
ILine
}
from
"./interface"
;
import
BatchNode
from
"./components/BatchNode"
;
import
FlowNode
from
"./components/FlowNode"
;
...
...
@@ -33,9 +33,9 @@ interface IProps extends ReactFlowProps {
/** 点击batch事件 */
onBatchClick
?:
(
val
:
string
)
=>
void
;
/** 设置选中的batch节点id */
set
ExternalSelected
NodeId
?:
(
val
:
string
)
=>
void
;
set
SelectedBatch
NodeId
?:
(
val
:
string
)
=>
void
;
/** 选中的batch节点id */
externalSelected
NodeId
?:
string
;
selectedBatch
NodeId
?:
string
;
/** 类型, edit为编辑类型 */
type
?:
"edit"
|
"default"
;
/** 设置组件数据 组件为编辑状态使用 */
...
...
@@ -52,8 +52,8 @@ const Flow = (props: IProps) => {
const
{
tasks
,
onBatchClick
,
set
ExternalSelected
NodeId
,
externalSelected
NodeId
,
set
SelectedBatch
NodeId
,
selectedBatch
NodeId
,
type
:
flowType
=
"default"
,
setTasks
,
onFlowNodeClick
,
...
...
@@ -61,7 +61,7 @@ const Flow = (props: IProps) => {
showControls
=
true
,
...
other
}
=
props
;
console
.
log
(
tasks
);
/** 自定义的节点类型 */
const
nodeTypes
=
useMemo
(()
=>
{
return
{
batchNode
:
BatchNode
,
flowNode
:
FlowNode
};
...
...
@@ -77,7 +77,7 @@ const Flow = (props: IProps) => {
/** 原始数据删除线 */
const
tasksDeleteLine
=
useCallback
(
(
connection
:
Connection
|
Edge
|
any
)
=>
{
le
t
result
=
cons
t
result
=
(
tasks
?.
length
&&
tasks
.
map
((
item
)
=>
{
/** 删除batch起始的edges中的一项 === 等于删除了一根连线 */
...
...
@@ -123,45 +123,6 @@ 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
;
},
[
tasks
]
...
...
@@ -221,7 +182,7 @@ const Flow = (props: IProps) => {
// const nodesInputAndOutputStatus = useCallback(
// (id: string) => {
// /** 所有的连线 */
// const lineArr: ] = [];
// const lineArr:
IEdge[
] = [];
// tasks?.length &&
// tasks.forEach((item) => {
// item.edges?.length && lineArr.push(...item.edges);
...
...
@@ -270,14 +231,14 @@ const Flow = (props: IProps) => {
return
a
-
b
;
});
let
width
=
176
,
height
=
66
;
height
=
22
;
if
(
positionXArr
?.
length
)
{
const
val
=
positionXArr
[
positionXArr
.
length
-
1
]
+
1
44
;
const
val
=
positionXArr
[
positionXArr
.
length
-
1
]
+
1
50
;
width
=
val
>
176
?
val
:
width
;
}
if
(
positionYArr
?.
length
)
{
const
val
=
positionYArr
[
positionYArr
.
length
-
1
]
+
74
;
height
=
val
>
66
?
val
:
height
;
const
val
=
positionYArr
[
positionYArr
.
length
-
1
]
+
6
;
height
=
val
>
22
?
val
:
height
;
}
return
{
width
,
...
...
@@ -305,23 +266,20 @@ const Flow = (props: IProps) => {
/** 是否有流节点 */
isFlowNode
:
isFlowNode
(
item
.
id
),
/** 选中状态 */
selectedStatus
:
externalSelected
NodeId
?
externalSelectedNodeId
.
includes
(
item
.
id
)
selectedStatus
:
selectedBatch
NodeId
?
selectedBatchNodeId
===
item
.
id
:
inSideBatchNodeId
===
item
.
id
,
/** tasks 数据 */
tasks
:
tasks
,
}
:
{
selectedStatus
:
externalSelectedNodeId
?
externalSelectedNodeId
.
includes
(
item
.
id
)
:
inSideFlowNodeId
===
item
.
id
,}),
:
{
selectedStatus
:
inSideFlowNodeId
===
item
.
id
}),
/** 输入输出圆点状态 */
// dotStatus: nodesInputAndOutputStatus(item.id),
/** 样式 */
style
:
{
...
getBatchStyle
(
item
),
marginTop
:
'-44px'
,
padding
:
"12px 20px"
,
padding
:
isFlowNode
(
item
.
id
)
?
"20px"
:
"12px 20px"
,
},
},
/** 坐标 */
...
...
@@ -345,7 +303,7 @@ const Flow = (props: IProps) => {
tasks
,
flowType
,
isFlowNode
,
externalSelected
NodeId
,
selectedBatch
NodeId
,
inSideBatchNodeId
,
inSideFlowNodeId
,
// nodesInputAndOutputStatus,
...
...
@@ -367,8 +325,8 @@ const Flow = (props: IProps) => {
},
[]);
});
return
val
.
map
((
item
:
ILine
)
=>
{
const
newSelectId
=
externalSelected
NodeId
?
externalSelected
NodeId
const
newSelectId
=
selectedBatch
NodeId
?
selectedBatch
NodeId
:
inSideBatchNodeId
;
return
{
...
item
,
...
...
@@ -389,18 +347,19 @@ const Flow = (props: IProps) => {
label
:
item
.
label
?
`(
${
item
.
label
}
)`
:
""
,
};
});
},
[
inSideBatchNodeId
,
externalSelected
NodeId
,
selectedEdge
?.
id
,
tasks
]);
},
[
inSideBatchNodeId
,
selectedBatch
NodeId
,
selectedEdge
?.
id
,
tasks
]);
/** 设置nodeId方法 */
const
setNodeIdFun
=
useCallback
(
(
id
:
string
)
=>
{
set
ExternalSelected
NodeId
?
set
ExternalSelected
NodeId
(
id
)
set
SelectedBatch
NodeId
?
set
SelectedBatch
NodeId
(
id
)
:
setInSideBatchNodeId
(
id
);
onBatchClick
&&
onBatchClick
(
id
);
setInSideFlowNodeId
(
""
);
document
.
getElementById
(
`point
${
id
}
`
)?.
scrollIntoView
(
true
);
},
[
onBatchClick
,
set
ExternalSelected
NodeId
]
[
onBatchClick
,
set
SelectedBatch
NodeId
]
);
/** flowNode点击事件 */
...
...
@@ -412,9 +371,9 @@ const Flow = (props: IProps) => {
}
else
{
setInSideFlowNodeId
(
node
.
id
);
setInSideBatchNodeId
(
""
);
setExternalSelectedNodeId
&&
setExternalSelectedNodeId
(
""
);
setSelectedBatchNodeId
&&
setSelectedBatchNodeId
(
""
);
}
document
.
getElementById
(
`point
${
node
.
id
}
`
)?.
scrollIntoView
(
true
);
}
});
if
(
onFlowNodeClick
)
{
...
...
@@ -425,8 +384,8 @@ const Flow = (props: IProps) => {
};
const
handlePaneClick
=
()
=>
{
set
ExternalSelected
NodeId
?
set
ExternalSelected
NodeId
(
""
)
set
SelectedBatch
NodeId
?
set
SelectedBatch
NodeId
(
""
)
:
setInSideBatchNodeId
(
""
);
setInSideFlowNodeId
(
""
);
onBatchClick
&&
onBatchClick
(
""
);
...
...
@@ -513,7 +472,7 @@ const Flow = (props: IProps) => {
/** 连接校验并修改值 */
const
connectCheck
=
useCallback
(
(
connection
:
Connection
)
=>
{
le
t
newVal
=
cons
t
newVal
=
(
tasks
?.
length
&&
tasks
?.
map
((
item
)
=>
{
if
(
item
.
id
===
connection
.
source
)
{
...
...
@@ -540,76 +499,17 @@ 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
;
},
[
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
(
(
connection
:
Connection
)
=>
{
const
{
inputClassType
,
outClassType
}
=
getClassType
(
connection
);
let
result
:
ITask
[]
=
[];
if
(
getTaskType
(
connection
.
source
as
string
)
===
"FLOW"
||
getTaskType
(
connection
.
target
as
string
)
===
"FLOW"
)
{
return
;
}
else
if
(
inputClassType
===
outClassType
)
{
if
(
inputClassType
===
outClassType
)
{
result
=
connectCheck
(
connection
)
as
ITask
[];
}
else
{
Message
.
error
(
"端口数据类型不一致,无法连接!"
);
...
...
@@ -617,14 +517,7 @@ const Flow = (props: IProps) => {
}
setTasks
&&
setTasks
(
result
);
},
[
Message
,
connectCheck
,
getClassType
,
setTasks
,
tasksDeleteLine
,
getTaskType
,
]
[
Message
,
connectCheck
,
getClassType
,
setTasks
,
tasksDeleteLine
]
);
/** 点击连线 */
...
...
@@ -634,21 +527,11 @@ const Flow = (props: IProps) => {
/** 点击连线清除选中的node ID */
setInSideFlowNodeId
(
""
);
setInSideBatchNodeId
(
""
);
set
ExternalSelectedNodeId
&&
setExternalSelected
NodeId
(
""
);
set
SelectedBatchNodeId
&&
setSelectedBatch
NodeId
(
""
);
},
[
set
ExternalSelected
NodeId
]
[
set
SelectedBatch
NodeId
]
);
// const onNodesChange = (val: any)=>{
// // 自定义change事件 不允许react flow组件本身删除事件
// // return
// }
// const onEdgesChange = (val: any) =>{
// // 自定义change事件 不允许react flow组件本身删除事件
// // return;
// }
const
reactFlowParams
=
flowType
===
"edit"
?
{
...
...
src/views/Project/components/ProjectListPopper/index.tsx
View file @
1b79d21b
...
...
@@ -2,7 +2,7 @@
* @Author: 吴永生 15770852798@163.com
* @Date: 2022-08-02 11:43:28
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-
30 19:32:05
* @LastEditTime: 2022-08-
11 18:50:31
* @FilePath: /bkunyun/src/views/Project/components/ProjectListPopper/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -14,8 +14,7 @@ import AddIcon from "@mui/icons-material/Add";
import
classNames
from
"classnames"
;
import
{
useStores
}
from
"@/store/index"
;
import
moment
from
"moment"
;
import
React
,
{
useMemo
,
useState
}
from
"react"
;
import
{
useClickAway
}
from
'ahooks'
;
import
React
,
{
useMemo
,
useState
}
from
"react"
;
import
{
toJS
}
from
"mobx"
;
import
{
observer
}
from
"mobx-react-lite"
;
...
...
@@ -39,18 +38,12 @@ const ProjectListPopper = observer((props: any) => {
const
handleProjectBox
=
(
e
:
React
.
SyntheticEvent
)
=>
{
setProjectListOpen
(
false
);
e
.
nativeEvent
.
stopImmediatePropagation
();
};
useClickAway
(
()
=>
{
setProjectListOpen
(
false
);
},
()
=>
document
.
getElementById
(
'use-click-projectList-mainBox'
),
);
return
(
<
div
className=
{
style
.
projectBox
}
onClick=
{
handleProjectBox
}
>
<
div
className=
{
style
.
mainBox
}
id=
"use-click-projectList-mainBox"
onClick=
{
(
e
:
any
)
=>
e
.
stopPropagation
()
}
>
<
div
className=
{
style
.
mainBox
}
>
<
div
className=
{
style
.
searchBox
}
>
<
IconButton
type=
"submit"
...
...
src/views/WorkFlowEdit/components/OperatorList/index.tsx
View file @
1b79d21b
...
...
@@ -130,8 +130,6 @@ const OperatorItem = (props: IOperatorItemProps) => {
draggable=
{
true
}
onDragStart=
{
onDragStart
}
onDragEnd=
{
onDragEnd
}
onDragOver=
{
(
e
)
=>
e
.
preventDefault
()
}
// dragOver( e ){ e.preventDefault };
>
<
h2
className=
{
styles
.
operatorItemTitle
}
>
{
title
}
</
h2
>
<
div
className=
{
styles
.
operatorItemText
}
>
{
description
}
</
div
>
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.module.css
View file @
1b79d21b
...
...
@@ -129,12 +129,6 @@
line-height
:
20px
;
color
:
rgba
(
255
,
78
,
78
,
1
);
}
.noParameters
{
font-size
:
12px
;
text-align
:
center
;
color
:
#C2C6CC
;
line-height
:
84px
;
}
.noData
{
height
:
calc
(
100vh
-
140px
);
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
1b79d21b
import
_
from
"lodash"
;
import
{
useCallback
,
use
Memo
,
useRef
,
useState
}
from
"react"
;
import
{
useCallback
,
use
Effect
,
useMemo
,
useState
}
from
"react"
;
import
classNames
from
"classnames"
;
import
{
...
...
@@ -20,7 +20,6 @@ import MySwitch from "@/components/mui/MySwitch";
import
Tabs
from
"@/components/mui/Tabs"
;
import
{
getCustomTemplateParameterCheckResult
}
from
"../../util"
;
import
MyTooltip
from
"@/components/mui/MyTooltip"
;
import
{
useSize
}
from
"ahooks"
;
import
styles
from
"./index.module.css"
;
...
...
@@ -31,13 +30,18 @@ type IParameterSettingProps = {
};
const
ParameterSetting
=
(
props
:
IParameterSettingProps
)
=>
{
const
{
templateConfigInfo
,
setTemplateConfigInfo
,
taskId
}
=
props
;
// 算子大数组
const
[
descHeight
,
setDescHeight
]
=
useState
(
0
);
// 算子描述的高度 用来完成描述展开收起功能
const
[
isShowAllDese
,
setIsShowAllDese
]
=
useState
(
false
);
// 是否展示全部描述
const
[
fileSelectOpen
,
setFileSelectOpen
]
=
useState
(
false
);
// 选择输出路径的弹窗显示控制
const
[
fileSelectType
,
setFileSelectType
]
=
useState
<
FileSelectType
>
(
"path"
);
const
[
parameterName
,
setParameterName
]
=
useState
(
""
);
// 当前算子中的parameters中正在编辑饿parameter(参数)
const
resizeRef
=
useRef
<
HTMLDivElement
>
(
null
);
const
size
=
useSize
(
resizeRef
)
;
const
div
=
document
.
getElementById
(
"descHeight"
);
// 算子描述的元素(不限高)用来完成描述展开收起功能
useEffect
(()
=>
{
if
(
div
)
{
setDescHeight
(
div
.
offsetHeight
);
}
},
[
div
]);
// 文件夹路线选择器弹窗
const
handleFileSelectOnClose
=
()
=>
{
...
...
@@ -63,12 +67,6 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/** 通过parameter.name删除与之相关联的线 */
const
handleHiddenDeleteEdge
=
useCallback
(
(
val
:
ITask
[],
parameterName
:
string
)
=>
{
let
taskParentNode
=
""
;
val
.
forEach
((
task
)
=>
{
if
(
task
.
id
===
taskId
)
{
taskParentNode
=
task
.
parentNode
||
""
;
}
});
return
(
val
?.
length
&&
val
?.
map
((
item
)
=>
{
...
...
@@ -94,11 +92,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
const
newEdges
=
(
item
?.
edges
?.
length
&&
item
?.
edges
?.
filter
((
every
)
=>
{
// 因为存在同名的parameterName 所以增加every.source === taskParentNode判断
return
(
every
.
targetHandle
!==
parameterName
||
every
.
source
===
taskParentNode
);
return
every
.
targetHandle
!==
parameterName
;
}))
||
[];
return
{
...
...
@@ -188,10 +182,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
const
renderInput
=
useCallback
(
(
parameter
:
IParameter
)
=>
{
return
(
<
MyTooltip
title=
{
parameter
.
description
||
parameter
.
name
}
placement=
"right"
>
<
MyTooltip
title=
{
parameter
.
description
}
placement=
"right"
>
<
div
>
{
(
parameter
.
domType
||
""
).
toLowerCase
()
===
"file"
&&
(
<
MyInput
...
...
@@ -360,15 +351,9 @@ const ParameterSetting = (props: IParameterSettingProps) => {
if
(
!
taskInfo
)
{
return
[];
}
else
{
if
(
taskInfo
.
type
===
"BATCH"
)
{
return
taskInfo
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"in"
&&
!
parameter
.
thrown
);
}
else
{
return
taskInfo
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"in"
);
}
return
taskInfo
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"in"
);
}
},
[
taskInfo
]);
...
...
@@ -377,15 +362,9 @@ const ParameterSetting = (props: IParameterSettingProps) => {
if
(
!
taskInfo
)
{
return
[];
}
else
{
if
(
taskInfo
.
type
===
"BATCH"
)
{
return
taskInfo
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"out"
&&
!
parameter
.
thrown
);
}
else
{
return
taskInfo
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"out"
);
}
return
taskInfo
.
parameters
.
filter
(
(
parameter
)
=>
parameter
.
parameterGroup
===
"out"
);
}
},
[
taskInfo
]);
...
...
@@ -441,7 +420,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
[
styles
.
required
]:
parameter
.
required
,
})
}
>
{
parameter
.
titl
e
}
{
parameter
.
nam
e
}
</
div
>
<
div
className=
{
styles
.
parameterClassTypeName
}
>
{
parameter
.
classTypeName
}
...
...
@@ -521,14 +500,13 @@ const ParameterSetting = (props: IParameterSettingProps) => {
{
taskInfo
.
description
||
"-"
}
</
div
>
<
div
ref=
{
resizeRef
}
className=
{
classNames
({
[
styles
.
taskDescriptionAll
]:
isShowAllDese
,
[
styles
.
taskDescription
]:
!
isShowAllDese
,
})
}
>
{
taskInfo
.
description
||
"-"
}
{
size
&&
size
?.
height
>=
60
&&
(
{
descHeight
>
60
&&
(
<
span
className=
{
styles
.
descButton
}
onClick=
{
()
=>
setIsShowAllDese
(
!
isShowAllDese
)
}
...
...
@@ -569,7 +547,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
[
styles
.
required
]:
parameter
.
required
,
})
}
>
{
parameter
.
titl
e
}
{
parameter
.
nam
e
}
</
div
>
<
div
className=
{
styles
.
inOutParameterdataType
}
>
{
parameter
.
classTypeName
}
...
...
@@ -581,7 +559,6 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange=
{
(
e
:
any
)
=>
handleHiddenChange
(
e
,
parameter
.
name
||
""
)
}
disabled=
{
true
}
></
MySwitch
>
</
div
>
</
div
>
...
...
@@ -615,7 +592,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
[
styles
.
required
]:
parameter
.
required
,
})
}
>
{
parameter
.
titl
e
}
{
parameter
.
nam
e
}
</
div
>
<
div
className=
{
styles
.
inOutParameterdataType
}
>
{
parameter
.
classTypeName
}
...
...
@@ -647,12 +624,10 @@ const ParameterSetting = (props: IParameterSettingProps) => {
</
div
>
<
Tabs
tabList=
{
paramsTabList
}
value=
{
activeParamsTab
}
// defaultValue=
{
activeParamsTab
}
defaultValue=
{
activeParamsTab
}
allowNullValue=
{
true
}
tabPanelSx=
{
{
padding
:
"7px 0"
}
}
/>
{
basisParameters
.
length
===
0
&&
seniorParameters
.
length
===
0
&&
hardwareParameters
.
length
===
0
&&
(<
div
className=
{
styles
.
noParameters
}
>
暂无可设置参数
</
div
>)
}
</
div
>
)
}
{
!
taskInfo
&&
(
...
...
src/views/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
View file @
1b79d21b
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-15 15:47:16
* @LastEditors: 吴永生
15770852798@163
.com
* @LastEditTime: 2022-0
8-23 11:32:1
9
* @LastEditors: 吴永生
#A02208 yongsheng.wu@wholion
.com
* @LastEditTime: 2022-0
7-15 16:30:5
9
* @FilePath: /bkunyun/src/views/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -107,7 +107,7 @@ const SaveCustomTemplate = (props: IProps) => {
helperText
:
"必须输入模板名称"
,
});
return
false
;
}
else
if
(
title
.
length
>
50
)
{
}
else
if
(
title
.
length
>
15
)
{
setTitleHelper
({
error
:
true
,
helperText
:
"格式不正确,必须在15字符以内,仅限大小写字母、数字、中文"
,
...
...
src/views/WorkFlowEdit/index.module.css
View file @
1b79d21b
...
...
@@ -45,28 +45,14 @@
bottom
:
20px
;
width
:
36px
;
height
:
36px
;
border-radius
:
18px
;
border-radius
:
50%
;
box-shadow
:
0px
3px
10px
0px
rgba
(
0
,
24
,
57
,
0.14
);
font-size
:
30px
;
line-height
:
36px
;
text-align
:
start
;
text-align
:
center
;
color
:
RGBA
(
66
,
141
,
255
,
1
);
cursor
:
pointer
;
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
{
flex
:
1
;
...
...
src/views/WorkFlowEdit/index.tsx
View file @
1b79d21b
...
...
@@ -6,7 +6,7 @@
* @FilePath: /bkunyun/src/views/Project/ProjectSubmitWork/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
React
,
{
useCallback
,
useEffect
,
useState
,
useMemo
}
from
"react"
;
import
React
,
{
useCallback
,
useEffect
,
useState
}
from
"react"
;
import
ArrowBackIosNewIcon
from
"@mui/icons-material/ArrowBackIosNew"
;
import
IconButton
from
"@mui/material/IconButton"
;
import
_
from
"lodash"
;
...
...
@@ -25,7 +25,6 @@ import { getCustomTemplateParameterCheckResult } from "./util";
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
CustomOperator
from
"../CustomOperator"
;
import
SaveCustomTemplate
from
"./components/SaveCustomTemplate"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
styles
from
"./index.module.css"
;
...
...
@@ -56,7 +55,6 @@ const WorkFlowEdit = observer((props: IProps) => {
const
[
oldversion
,
setOldersion
]
=
useState
(
""
);
// 编辑是自定义模板的老版本
const
[
description
,
setDescription
]
=
useState
(
""
);
// 自定义模板描述
const
[
creator
,
setCreator
]
=
useState
(
""
);
// 自定义模板创建人
const
[
operatingArea
,
setOperatingArea
]
=
useState
<
"form"
|
"flow"
>
(
"form"
);
// 当前操作区域
const
[
leftContentType
,
setLeftContentType
]
=
useState
(
"list"
);
// 页面左侧展示的是算子列表还是参数设置
const
[
popperTitle
,
setPopperTitle
]
=
useState
(
...
...
@@ -64,14 +62,6 @@ const WorkFlowEdit = observer((props: IProps) => {
"返回后,当前页面已填写内容将不保存,确认返回吗?"
);
// 是否要监听删除时间
const
listenState
=
useMemo
(()
=>
{
if
(
operatingArea
===
"form"
)
{
return
false
;
}
return
!
saveFormDialog
&&
!
showCustomOperator
;
},
[
operatingArea
,
saveFormDialog
,
showCustomOperator
]);
// 编辑时获取模板详情的方法
const
{
run
:
fetchTemplateConfigInfoRun
}
=
useMyRequest
(
fetchTemplateConfigInfo
,
...
...
@@ -153,25 +143,19 @@ const WorkFlowEdit = observer((props: IProps) => {
return
;
}
let
templateConfigInfoClone
:
ITask
[]
=
_
.
cloneDeep
(
templateConfigInfo
);
let
tasksIsCheck
=
true
;
// 整体校验
let
check
=
true
;
templateConfigInfoClone
.
forEach
((
task
)
=>
{
let
taskIsCheck
=
true
;
// 单个task校验
task
.
parameters
.
forEach
((
parameter
)
=>
{
if
(
task
.
type
===
"BATCH"
&&
parameter
.
thrown
)
{
return
;
}
const
checkResult
=
getCustomTemplateParameterCheckResult
(
parameter
);
parameter
.
error
=
checkResult
.
error
;
parameter
.
helperText
=
checkResult
.
helperText
;
if
(
checkResult
.
error
)
{
taskIsCheck
=
false
;
tasksIsCheck
=
false
;
check
=
false
;
}
});
task
.
isCheck
=
taskIsCheck
;
});
setTemplateConfigInfo
(
templateConfigInfoClone
);
if
(
!
tasksIsC
heck
)
{
if
(
!
c
heck
)
{
Message
.
error
(
"工作流校验未通过,请检查!"
);
}
else
{
setSaveFormDialog
(
true
);
...
...
@@ -216,12 +200,7 @@ const WorkFlowEdit = observer((props: IProps) => {
</
div
>
</
div
>
<
div
className=
{
styles
.
swContent
}
>
<
div
className=
{
styles
.
swFormBox
}
onClick=
{
()
=>
{
setOperatingArea
(
"form"
);
}
}
>
<
div
className=
{
styles
.
swFormBox
}
>
<
div
className=
{
styles
.
radiosBox
}
>
<
RadioGroupOfButtonStyle
radioOptions=
{
radioOptions
}
...
...
@@ -255,23 +234,16 @@ const WorkFlowEdit = observer((props: IProps) => {
className=
{
styles
.
addOperator
}
onClick=
{
()
=>
setShowCustomOperator
(
true
)
}
>
<
AddIcon
sx=
{
{
padding
:
"6px"
}
}
/>
<
span
className=
{
styles
.
addText
}
>
添加算子
</
span
>
+
</
div
>
</
div
>
<
div
className=
{
styles
.
swFlowBox
}
id=
"workFlowEditRight"
onClick=
{
()
=>
{
setOperatingArea
(
"flow"
);
}
}
>
<
div
className=
{
styles
.
swFlowBox
}
id=
"workFlowEditRight"
>
<
Flow
tasks=
{
templateConfigInfo
}
setTasks=
{
setTemplateConfigInfo
}
type=
"edit"
onFlowNodeClick=
{
handleNodeClick
}
ListenState=
{
listenState
}
ListenState=
{
!
saveFormDialog
&&
!
showCustomOperator
}
/>
</
div
>
</
div
>
...
...
src/views/WorkFlowEdit/util.ts
View file @
1b79d21b
...
...
@@ -50,7 +50,7 @@ export const getCustomTemplateParameterCheckResult = (
}
else
if
(
parameter
.
hidden
&&
!
parameter
.
linked
)
{
return
{
error
:
true
,
helperText
:
'该输入为必填,需在右侧视图编辑区连接输入文件'
,
helperText
:
'该输入为必填,需在右侧视图编辑区连接输入文件
或重新改回“开启”状态
'
,
deleteLine
:
false
,
}
}
...
...
src/views/mui_demo/button.tsx
0 → 100644
View file @
1b79d21b
import
{
memo
}
from
"react"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
Button
from
"@/components/mui/MyButton"
;
const
ProjectMembers
=
()
=>
{
return
(
<>
<
Button
size=
{
"large"
}
text=
{
"确定"
}
/>
<
Button
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
text=
{
"确定"
}
disabled
/>
<
Button
text=
{
"确定"
}
disabled
/>
<
Button
size=
{
"small"
}
text=
{
"确定"
}
disabled
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
Button
text=
{
"确定"
}
size=
{
"large"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
size=
{
"small"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
br
/>
<
br
/>
outlined
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
text=
{
"确定"
}
/>
<
Button
variant=
{
"outlined"
}
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
disabled
text=
{
"确定"
}
/>
<
Button
variant=
{
"outlined"
}
disabled
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
disabled
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"outlined"
}
color=
{
"secondary"
}
text=
{
"确定"
}
/>
<
br
/>
<
br
/>
<
Button
text=
{
"确定"
}
size=
{
"large"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
Button
text=
{
"确定"
}
size=
{
"small"
}
variant=
{
"outlined"
}
style=
{
{
color
:
"aqua"
,
background
:
"burlywood"
}
}
/>
<
br
/>
<
br
/>
text
<
br
/>
<
Button
size=
{
"large"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
size=
{
"small"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
br
/>
<
Button
size=
{
"large"
}
disabled
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
variant=
{
"text"
}
disabled
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
size=
{
"small"
}
disabled
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
br
/>
<
Button
size=
{
"large"
}
color=
{
"secondary"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
variant=
{
"text"
}
color=
{
"secondary"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
Button
size=
{
"small"
}
color=
{
"secondary"
}
variant=
{
"text"
}
text=
{
"确定确定确定确定确定确定"
}
/>
<
br
/>
<
br
/>
img
<
br
/>
<
Button
text=
{
"确定确定确定确定确定确定"
}
img=
{
<
DeleteIcon
/>
}
/>
<
br
/>
<
br
/>
select
<
br
/>
<
Button
text=
{
"更多"
}
select=
{
[
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
,
color
:
"red"
},
]
}
/>
<
Button
text=
{
"更多"
}
color=
{
"secondary"
}
variant=
{
"text"
}
select=
{
[
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
},
{
name
:
"1111111"
,
color
:
"red"
},
]
}
/>
</>
);
};
export
default
memo
(
ProjectMembers
);
src/views/mui_demo/input.tsx
0 → 100644
View file @
1b79d21b
import
{
memo
}
from
"react"
;
import
{
InputAdornment
}
from
"@mui/material"
;
import
InputComponent
from
"@/components/mui/MyInput"
;
const
ProjectMembers
=
()
=>
{
return
(
<>
<
InputComponent
fullWidth=
{
false
}
label=
{
"test"
}
defaultValue=
{
"sssssssss"
}
/>
<
InputComponent
fullWidth=
{
false
}
defaultValue=
{
"sssssssss"
}
/>
<
InputComponent
fullWidth=
{
false
}
label=
{
"test"
}
error=
{
true
}
helperText=
{
"你还急急急靠靠靠靠靠靠靠靠靠靠靠靠靠靠"
}
/>
<
InputComponent
fullWidth=
{
false
}
label=
{
"test"
}
size=
{
"small"
}
disabled
/>
<
InputComponent
fullWidth=
{
false
}
label=
{
"xsmall"
}
/>
<
InputComponent
fullWidth=
{
false
}
placeholder=
{
"测试机哦"
}
/>
<
InputComponent
fullWidth=
{
false
}
size=
{
"small"
}
placeholder=
{
"nishuoshenm"
}
label=
{
"asdasfasf"
}
/>
<
br
/>
<
br
/>
<
InputComponent
fullWidth=
{
true
}
/>
<
br
/>
<
br
/>
{
/* <SelectComponent
option={json}
/>
<br /><br />
<SelectComponent
option={json}
size={"large"}
/>
<br /><br />
<SelectComponent
option={json}
size={"small"}
/> */
}
<
br
/>
<
br
/>
</>
);
};
export
default
memo
(
ProjectMembers
);
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