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
9af2fac8
Commit
9af2fac8
authored
Aug 05, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' of
http://120.77.149.83/root/bkunyun
into feat-20220801
parents
754128e9
6d5033b9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
157 additions
and
77 deletions
+157
-77
NoProject.tsx
src/components/BusinessComponents/NoProject/NoProject.tsx
+11
-7
MySwitch.tsx
src/components/mui/MySwitch.tsx
+10
-8
index.tsx
src/views/MenuLayout/index.tsx
+3
-1
index.tsx
src/views/Project/ProjectData/AddFolder/index.tsx
+4
-2
index.module.css
src/views/Project/ProjectData/index.module.css
+4
-3
index.module.css
src/views/Project/ProjectOverview/TaskCard/index.module.css
+5
-0
index.tsx
src/views/Project/ProjectOverview/index.tsx
+6
-0
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+16
-16
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+2
-2
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+22
-15
index.module.css
...workbenchTemplate/components/AddTemplate/index.module.css
+33
-6
index.tsx
...kbench/workbenchTemplate/components/AddTemplate/index.tsx
+0
-0
templateBox.tsx
...ectWorkbench/workbenchTemplate/components/templateBox.tsx
+1
-1
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+9
-1
index.tsx
src/views/Project/components/AddProject/index.tsx
+9
-6
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+1
-1
index.tsx
...iews/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
+21
-8
No files found.
src/components/BusinessComponents/NoProject/NoProject.tsx
View file @
9af2fac8
...
@@ -12,16 +12,20 @@ import AddIcon from "@mui/icons-material/Add";
...
@@ -12,16 +12,20 @@ import AddIcon from "@mui/icons-material/Add";
import
AddProject
from
"@/views/Project/components/AddProject"
;
import
AddProject
from
"@/views/Project/components/AddProject"
;
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
useState
}
from
"react"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
{
toJS
}
from
"mobx"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
useStores
}
from
"@/store/index"
;
const
NoProject
=
(
)
=>
{
const
NoProject
=
observer
((
props
:
any
)
=>
{
// 新建弹窗显示控制
// 新建弹窗显示控制
const
[
addOpen
,
setAddOpen
]
=
useState
(
false
);
const
[
addOpen
,
setAddOpen
]
=
useState
(
false
);
const
{
currentProjectStore
}
=
useStores
();
let
projectList
=
toJS
(
currentProjectStore
.
projectList
)
return
(
return
(
<
div
className=
{
style
.
noProject
}
>
<
div
className=
{
style
.
noProject
}
>
<
img
src=
{
noData
}
alt=
""
className=
{
style
.
noDataImg
}
/>
<
img
src=
{
noData
}
alt=
""
className=
{
style
.
noDataImg
}
/>
<
div
className=
{
style
.
text1
}
>
当前产品暂无项目
</
div
>
<
div
className=
{
style
.
text1
}
>
{
projectList
.
length
>
0
?
"当前未选中任何项目"
:
"当前产品暂无项目"
}
</
div
>
<
div
className=
{
style
.
text2
}
>
请先创建项目
</
div
>
<
div
className=
{
style
.
text2
}
>
{
projectList
.
length
>
0
?
"或创建新项目"
:
"请先创建项目"
}
</
div
>
<
MyButton
<
MyButton
text=
'创建项目'
text=
'创建项目'
variant=
"contained"
variant=
"contained"
...
@@ -30,11 +34,11 @@ const NoProject = () => {
...
@@ -30,11 +34,11 @@ const NoProject = () => {
onClick=
{
()
=>
setAddOpen
(
true
)
}
onClick=
{
()
=>
setAddOpen
(
true
)
}
style=
{
{
backgroundColor
:
"#1370ff"
,
color
:
"#fff"
}
}
style=
{
{
backgroundColor
:
"#1370ff"
,
color
:
"#fff"
}
}
/>
/>
<
AddProject
addOpen=
{
addOpen
}
setAddOpen=
{
setAddOpen
}
/>
<
AddProject
addOpen=
{
addOpen
}
setAddOpen=
{
setAddOpen
}
/>
</
div
>
</
div
>
);
);
};
}
)
;
export
default
NoProject
;
export
default
NoProject
;
src/components/mui/MySwitch.tsx
View file @
9af2fac8
...
@@ -11,7 +11,8 @@ import Switch, { SwitchProps } from "@mui/material/Switch";
...
@@ -11,7 +11,8 @@ import Switch, { SwitchProps } from "@mui/material/Switch";
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles"
;
import
{
ThemeProvider
,
createTheme
}
from
"@mui/material/styles"
;
interface
IMySwitchProps
extends
SwitchProps
{
interface
IMySwitchProps
extends
SwitchProps
{
value
:
boolean
;
value
?:
boolean
;
defaultChecked
?:
boolean
;
onChange
?:
any
;
onChange
?:
any
;
disabled
?:
boolean
;
disabled
?:
boolean
;
}
}
...
@@ -52,23 +53,24 @@ const theme = createTheme({
...
@@ -52,23 +53,24 @@ const theme = createTheme({
});
});
const
MySwitch
=
(
props
:
IMySwitchProps
)
=>
{
const
MySwitch
=
(
props
:
IMySwitchProps
)
=>
{
const
{
value
,
onChange
,
disabled
=
false
,
size
,
...
other
}
=
props
;
const
{
value
,
defaultChecked
,
onChange
,
disabled
=
false
,
size
,
...
other
}
=
props
;
return
(
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
ThemeProvider
theme=
{
theme
}
>
<
Switch
<
Switch
checked=
{
value
}
checked=
{
value
}
disabled=
{
disabled
}
disabled=
{
disabled
}
defaultChecked=
{
defaultChecked
}
onChange=
{
onChange
}
onChange=
{
onChange
}
sx=
{
sx=
{
size
===
"medium"
size
===
"medium"
?
{
?
{
width
:
44
,
width
:
44
,
height
:
24
,
height
:
24
,
}
}
:
{
:
{
width
:
40
,
width
:
40
,
height
:
22
,
height
:
22
,
}
}
}
}
{
...
other
}
{
...
other
}
/>
/>
...
...
src/views/MenuLayout/index.tsx
View file @
9af2fac8
...
@@ -41,7 +41,9 @@ const MenuLayout = observer(() => {
...
@@ -41,7 +41,9 @@ const MenuLayout = observer(() => {
return
(
return
(
<
Box
className=
{
style
.
container
}
>
<
Box
className=
{
style
.
container
}
>
<
Box
className=
{
style
.
aside
}
>
<
Box
className=
{
style
.
aside
}
>
<
CurrentProject
/>
{
pathname
.
indexOf
(
'userCenter'
)
<
0
&&
<
CurrentProject
/>
}
<
List
<
List
sx=
{
{
sx=
{
{
paddingTop
:
0
,
paddingTop
:
0
,
...
...
src/views/Project/ProjectData/AddFolder/index.tsx
View file @
9af2fac8
...
@@ -60,7 +60,9 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -60,7 +60,9 @@ const AddFolder = (props: IAddFolderProps) => {
const
handleFileNameChange
=
(
e
:
any
)
=>
{
const
handleFileNameChange
=
(
e
:
any
)
=>
{
const
fileName
=
e
.
target
.
value
;
const
fileName
=
e
.
target
.
value
;
setFileName
(
fileName
);
if
(
fileName
.
length
<=
30
)
{
setFileName
(
fileName
);
}
if
(
!
fileName
)
{
if
(
!
fileName
)
{
setFileNameCheck
({
setFileNameCheck
({
error
:
true
,
error
:
true
,
...
@@ -123,7 +125,7 @@ const AddFolder = (props: IAddFolderProps) => {
...
@@ -123,7 +125,7 @@ const AddFolder = (props: IAddFolderProps) => {
helperText=
{
fileNameCheck
.
help
}
helperText=
{
fileNameCheck
.
help
}
InputProps=
{
{
InputProps=
{
{
endAdornment
:
(
endAdornment
:
(
<
InputAdornment
position=
"end"
>
<
InputAdornment
position=
"end"
style=
{
{
color
:
fileName
.
length
>=
30
?
"#d32f2f"
:
"#C2C6CC"
}
}
>
{
fileName
.
length
}
/30
{
fileName
.
length
}
/30
</
InputAdornment
>
</
InputAdornment
>
),
),
...
...
src/views/Project/ProjectData/index.module.css
View file @
9af2fac8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
position
:
relative
;
position
:
relative
;
}
}
.projectDataStickyTop
{
.projectDataStickyTop
{
padding
:
28px
24px
;
padding
:
28px
24px
64px
;
position
:
relative
;
position
:
relative
;
}
}
.projectDataTitle
{
.projectDataTitle
{
...
@@ -56,8 +56,9 @@
...
@@ -56,8 +56,9 @@
.projectDataStickyBox
{
.projectDataStickyBox
{
height
:
64px
;
height
:
64px
;
position
:
sticky
;
width
:
calc
(
100vw
-
220px
);
bottom
:
-1px
;
position
:
fixed
;
bottom
:
0px
;
border
:
1px
solid
#ebedf0
;
border
:
1px
solid
#ebedf0
;
z-index
:
100
;
z-index
:
100
;
background-color
:
#fff
;
background-color
:
#fff
;
...
...
src/views/Project/ProjectOverview/TaskCard/index.module.css
View file @
9af2fac8
...
@@ -36,12 +36,17 @@
...
@@ -36,12 +36,17 @@
}
}
.taskName
{
.taskName
{
min-width
:
100px
;
font-size
:
14px
;
font-size
:
14px
;
line-height
:
22px
;
line-height
:
22px
;
font-weight
:
500
;
font-weight
:
500
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.taskName
:hover
{
color
:
#1370FF
;
}
.taskStatus
{
.taskStatus
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/Project/ProjectOverview/index.tsx
View file @
9af2fac8
...
@@ -43,6 +43,7 @@ const ProjectOverview = observer(() => {
...
@@ -43,6 +43,7 @@ const ProjectOverview = observer(() => {
setTaskList
(
result
.
data
.
content
);
setTaskList
(
result
.
data
.
content
);
},
},
});
});
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
currentProjectStore
.
currentProjectInfo
.
id
)
{
if
(
currentProjectStore
.
currentProjectInfo
.
id
)
{
getOverview
({
getOverview
({
...
@@ -69,6 +70,10 @@ const ProjectOverview = observer(() => {
...
@@ -69,6 +70,10 @@ const ProjectOverview = observer(() => {
}
}
}
}
const
handleKeyWordChangeBlur
=
(
e
:
any
)
=>
{
setJobName
(
e
.
target
.
value
);
}
const
storageUnitFromB
=
(
b
:
number
)
=>
{
const
storageUnitFromB
=
(
b
:
number
)
=>
{
if
(
b
<=
0
)
{
if
(
b
<=
0
)
{
return
{
data
:
'0.00'
,
unit
:
'KB'
};
return
{
data
:
'0.00'
,
unit
:
'KB'
};
...
@@ -142,6 +147,7 @@ const ProjectOverview = observer(() => {
...
@@ -142,6 +147,7 @@ const ProjectOverview = observer(() => {
</
div
>
</
div
>
<
SearchInput
<
SearchInput
onKeyUp=
{
handleKeyWordChangeKeyUp
}
onKeyUp=
{
handleKeyWordChangeKeyUp
}
onBlur=
{
handleKeyWordChangeBlur
}
sx=
{
{
width
:
340
}
}
sx=
{
{
width
:
340
}
}
/>
/>
</
div
>
</
div
>
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
9af2fac8
...
@@ -276,20 +276,20 @@ const BaseInfo = observer(() => {
...
@@ -276,20 +276,20 @@ const BaseInfo = observer(() => {
const
projectList
=
await
getProjectList
();
const
projectList
=
await
getProjectList
();
currentProjectStore
.
setProjectList
(
projectList
);
currentProjectStore
.
setProjectList
(
projectList
);
// 项目删完了
// 项目删完了
if
(
projectList
.
length
===
0
)
{
//
if (projectList.length === 0) {
currentProjectStore
.
changeProject
({});
currentProjectStore
.
changeProject
({});
localStorage
.
setItem
(
"fileServerEndPoint"
,
""
);
localStorage
.
setItem
(
"fileServerEndPoint"
,
""
);
setProjectInfo
({});
setProjectInfo
({});
}
else
{
//
} else {
projectList
[
0
].
filetoken
=
getFiletokenAccordingToId
(
projectList
[
0
].
id
);
//
projectList[0].filetoken = getFiletokenAccordingToId(projectList[0].id);
currentProjectStore
.
changeProject
(
projectList
[
0
]);
//
currentProjectStore.changeProject(projectList[0]);
setFileServerEndPointLocalStorage
(
projectList
[
0
].
zoneId
);
//
setFileServerEndPointLocalStorage(projectList[0].zoneId);
getFiletokenAccordingToId
(
projectList
[
0
].
id
).
then
((
res
)
=>
{
//
getFiletokenAccordingToId(projectList[0].id).then((res) => {
projectList
[
0
].
filetoken
=
res
;
//
projectList[0].filetoken = res;
currentProjectStore
.
changeProject
(
projectList
[
0
]);
//
currentProjectStore.changeProject(projectList[0]);
});
//
});
setProjectInfo
(
projectList
[
0
]);
//
setProjectInfo(projectList[0]);
}
//
}
},
},
});
});
...
@@ -349,8 +349,8 @@ const BaseInfo = observer(() => {
...
@@ -349,8 +349,8 @@ const BaseInfo = observer(() => {
[
style
.
projectInfoTextarea
]:
true
,
[
style
.
projectInfoTextarea
]:
true
,
})
}
})
}
onChange=
{
descChange
}
onChange=
{
descChange
}
placeholder=
"项目描述限制
1
00字以内"
placeholder=
"项目描述限制
3
00字以内"
maxLength=
{
1
00
}
maxLength=
{
3
00
}
></
textarea
>
></
textarea
>
{
/* <MyInput
{
/* <MyInput
value={projectInfo.desc}
value={projectInfo.desc}
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
9af2fac8
...
@@ -100,7 +100,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -100,7 +100,7 @@ const ConfigForm = (props: ConfigFormProps) => {
};
};
const
checkName
=
(
name
:
string
=
""
)
=>
{
const
checkName
=
(
name
:
string
=
""
)
=>
{
const
reg
=
new
RegExp
(
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5-_
]{3,
3
0}
$/
);
const
reg
=
new
RegExp
(
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5-_
]{3,
5
0}
$/
);
if
(
!
name
)
{
if
(
!
name
)
{
setNameHelp
({
setNameHelp
({
error
:
true
,
error
:
true
,
...
@@ -117,7 +117,7 @@ const ConfigForm = (props: ConfigFormProps) => {
...
@@ -117,7 +117,7 @@ const ConfigForm = (props: ConfigFormProps) => {
setNameHelp
({
setNameHelp
({
error
:
true
,
error
:
true
,
helperText
:
helperText
:
"请输入正确任务名称(3~
3
0字符,可包含大小写字母、数字、中文、特殊符号“-”、“_”)"
,
"请输入正确任务名称(3~
5
0字符,可包含大小写字母、数字、中文、特殊符号“-”、“_”)"
,
});
});
return
true
;
return
true
;
}
}
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
9af2fac8
...
@@ -38,6 +38,7 @@ import { observer } from "mobx-react-lite";
...
@@ -38,6 +38,7 @@ import { observer } from "mobx-react-lite";
import
usePass
from
"@/hooks/usePass"
;
import
usePass
from
"@/hooks/usePass"
;
import
MyProgress
from
"@/components/mui/MyProgress"
;
import
MyProgress
from
"@/components/mui/MyProgress"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
MyCircularProgress
from
"@/components/mui/MyCircularProgress"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -68,6 +69,7 @@ const currencies = [
...
@@ -68,6 +69,7 @@ const currencies = [
let
timer
:
string
|
number
|
NodeJS
.
Timeout
|
null
|
undefined
=
null
;
let
timer
:
string
|
number
|
NodeJS
.
Timeout
|
null
|
undefined
=
null
;
const
ProjectMembers
=
observer
(()
=>
{
const
ProjectMembers
=
observer
(()
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
{
currentProjectStore
}
=
useStores
();
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
isPass
=
usePass
();
const
isPass
=
usePass
();
const
[
jobName
,
setJobName
]
=
useState
(
""
);
const
[
jobName
,
setJobName
]
=
useState
(
""
);
...
@@ -77,6 +79,7 @@ const ProjectMembers = observer(() => {
...
@@ -77,6 +79,7 @@ const ProjectMembers = observer(() => {
const
[
size
,
setSize
]
=
useState
(
10
);
const
[
size
,
setSize
]
=
useState
(
10
);
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
10
);
const
[
rowsPerPage
,
setRowsPerPage
]
=
useState
(
10
);
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
loading
,
setLoading
]
=
useState
(
false
)
/** 简单弹窗 */
/** 简单弹窗 */
const
[
jobData
,
setJobData
]
=
useState
(
""
);
const
[
jobData
,
setJobData
]
=
useState
(
""
);
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
const
[
openDialog
,
setOpenDialog
]
=
useState
(
false
);
...
@@ -86,6 +89,7 @@ const ProjectMembers = observer(() => {
...
@@ -86,6 +89,7 @@ const ProjectMembers = observer(() => {
onSuccess
:
(
result
:
any
)
=>
{
onSuccess
:
(
result
:
any
)
=>
{
setJobList
(
result
.
data
.
content
);
setJobList
(
result
.
data
.
content
);
setCount
(
result
.
data
.
totalElements
);
setCount
(
result
.
data
.
totalElements
);
setLoading
(
false
);
timer
&&
clearTimeout
(
timer
as
number
);
timer
&&
clearTimeout
(
timer
as
number
);
timer
=
null
;
timer
=
null
;
timer
=
setTimeout
(()
=>
{
timer
=
setTimeout
(()
=>
{
...
@@ -122,7 +126,7 @@ const ProjectMembers = observer(() => {
...
@@ -122,7 +126,7 @@ const ProjectMembers = observer(() => {
},
},
});
});
//
删除
作业
//
中止
作业
const
{
run
:
cancelWorkflowJobInfo
}
=
useMyRequest
(
cancelWorkflowJob
,
{
const
{
run
:
cancelWorkflowJobInfo
}
=
useMyRequest
(
cancelWorkflowJob
,
{
onSuccess
:
(
result
:
any
)
=>
{
onSuccess
:
(
result
:
any
)
=>
{
setOpenDialog
(
false
);
setOpenDialog
(
false
);
...
@@ -347,13 +351,15 @@ const ProjectMembers = observer(() => {
...
@@ -347,13 +351,15 @@ const ProjectMembers = observer(() => {
name
:
jobName
,
name
:
jobName
,
state
:
currency
===
"ALL"
?
""
:
currency
,
state
:
currency
===
"ALL"
?
""
:
currency
,
});
});
setLoading
(
true
)
}
}
}
}
>
>
<
img
alt=
""
src=
{
onload
}
/>
<
img
alt=
""
src=
{
onload
}
/>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
<
Box
className=
{
styles
.
body
}
>
<
Box
className=
{
styles
.
body
}
style=
{
{
position
:
"relative"
}
}
>
<
MyCircularProgress
loading=
{
loading
}
/>
{
jobList
.
length
===
0
&&
(
{
jobList
.
length
===
0
&&
(
<
Box
<
Box
sx=
{
{
sx=
{
{
...
@@ -423,21 +429,22 @@ const ProjectMembers = observer(() => {
...
@@ -423,21 +429,22 @@ const ProjectMembers = observer(() => {
{
item
.
state
===
"RUNNING"
&&
{
item
.
state
===
"RUNNING"
&&
isPass
(
"PROJECT_WORKBENCH_JOBS_STOP"
,
"USER"
)
&&
(
isPass
(
"PROJECT_WORKBENCH_JOBS_STOP"
,
"USER"
)
&&
(
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
img
{
alt=
""
currentProjectStore
.
currentProjectInfo
.
projectRole
===
"USER"
&&
(
item
.
creator
!==
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
)?.
name
)
?
""
:
<
img
src=
{
jobStop
}
alt=
""
style=
{
{
cursor
:
"pointer"
}
}
src=
{
jobStop
}
onClick=
{
(
event
)
=>
{
style=
{
{
cursor
:
"pointer"
}
}
event
.
stopPropagation
();
onClick=
{
(
event
)
=>
{
event
.
nativeEvent
.
stopImmediatePropagation
();
event
.
stopPropagation
();
setJobData
(
item
.
id
);
event
.
nativeEvent
.
stopImmediatePropagation
();
setOpenDialog
(
true
);
setJobData
(
item
.
id
);
setDialogType
(
"stop"
);
setOpenDialog
(
true
);
}
}
setDialogType
(
"stop"
);
/>
}
}
/>
}
</
Box
>
</
Box
>
)
}
)
}
{
item
.
state
!==
"RUNNING"
&&
{
item
.
state
!==
"RUNNING"
&&
isPass
(
"PROJECT_WORKBENCH_JOBS_DELETE"
,
"MANAGER"
)
&&
(
isPass
(
"PROJECT_WORKBENCH_JOBS_DELETE"
,
"MANAGER"
)
&&
(
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.module.css
View file @
9af2fac8
...
@@ -2,21 +2,36 @@
...
@@ -2,21 +2,36 @@
flex
:
1
;
flex
:
1
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
16px
0
0
0
;
border-radius
:
16px
0
0
0
;
padding
:
24px
32
px
;
padding
-top
:
24
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
.headerBox
{
padding
:
0
32px
;
}
.headerBoxShadow
{
box-shadow
:
0
5px
4px
-4px
rgb
(
0
,
0
,
0
,
.15
);
}
.templateBox
{
padding
:
0
32px
;
height
:
calc
(
100vh
-
168px
);
overflow
:
auto
;
overflow
:
auto
;
}
}
.templateList
{
.templateList
{
/* height: 2000px; */
/* height: 2000px; */
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
}
}
.templateLi
{
.templateLi
{
height
:
1
46
px
;
height
:
1
70
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
16px
20px
;
padding
:
16px
20px
;
cursor
:
pointer
;
/* cursor: pointer; */
border
:
1px
solid
rgba
(
235
,
237
,
240
,
1
);
border
:
1px
solid
rgba
(
235
,
237
,
240
,
1
);
border-radius
:
4px
;
border-radius
:
4px
;
min-width
:
20%
;
min-width
:
20%
;
...
@@ -24,37 +39,45 @@
...
@@ -24,37 +39,45 @@
margin-right
:
16px
;
margin-right
:
16px
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
}
}
.templateLiCustom
{
.templateLiCustom
{
height
:
1
94
px
;
height
:
1
70
px
;
}
}
.templateLiHidden
{
.templateLiHidden
{
visibility
:
hidden
;
visibility
:
hidden
;
}
}
.addCustomTemplate
{
.addCustomTemplate
{
height
:
1
94
px
;
height
:
1
70
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
flex-direction
:
column
;
flex-direction
:
column
;
}
}
.addCustomTemplateText
{
.addCustomTemplateText
{
margin-top
:
12px
;
margin-top
:
12px
;
line-height
:
22px
;
line-height
:
22px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
rgba
(
138
,
144
,
153
,
1
);
color
:
rgba
(
138
,
144
,
153
,
1
);
}
}
.templateLi
:hover
{
.templateLi
:hover
{
box-shadow
:
6px
8px
22px
0px
rgba
(
0
,
24
,
57
,
0.08
);
box-shadow
:
6px
8px
22px
0px
rgba
(
0
,
24
,
57
,
0.08
);
}
}
.templateLi
:nth-child
(
4n
)
{
.templateLi
:nth-child
(
4n
)
{
margin-right
:
0
;
margin-right
:
0
;
}
}
.templateLiTop
{
.templateLiTop
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
}
}
.templateTitle
{
.templateTitle
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
600
;
font-weight
:
600
;
...
@@ -64,14 +87,17 @@
...
@@ -64,14 +87,17 @@
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
line-height
:
22px
;
line-height
:
22px
;
}
}
.templateLiInfo
{
.templateLiInfo
{
margin-bottom
:
8px
;
margin-bottom
:
8px
;
}
}
.templateLiInfoText
{
.templateLiInfoText
{
line-height
:
20px
;
line-height
:
20px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
rgba
(
19
,
112
,
255
,
1
);
color
:
rgba
(
19
,
112
,
255
,
1
);
}
}
.templateLiDesc
{
.templateLiDesc
{
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
...
@@ -82,8 +108,9 @@
...
@@ -82,8 +108,9 @@
font-size
:
12px
;
font-size
:
12px
;
color
:
rgba
(
138
,
144
,
153
,
1
);
color
:
rgba
(
138
,
144
,
153
,
1
);
}
}
.templateLiEditBox
{
.templateLiEditBox
{
display
:
flex
;
display
:
flex
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
margin-top
:
16px
;
/* margin-top: 16px; */
}
}
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.tsx
View file @
9af2fac8
This diff is collapsed.
Click to expand it.
src/views/Project/ProjectWorkbench/workbenchTemplate/components/templateBox.tsx
View file @
9af2fac8
...
@@ -81,7 +81,7 @@ const TemplateBox = (props: any) => {
...
@@ -81,7 +81,7 @@ const TemplateBox = (props: any) => {
</
Typography
>
</
Typography
>
</
Box
>
</
Box
>
<
Typography
className=
{
styles
.
templateDescText
}
>
<
Typography
className=
{
styles
.
templateDescText
}
>
{
info
.
description
}
{
info
.
description
?
info
.
description
:
"此模板暂无描述。"
}
</
Typography
>
</
Typography
>
</
Box
>
</
Box
>
<
Box
<
Box
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
9af2fac8
...
@@ -182,7 +182,15 @@ const ProjectMembers = observer(() => {
...
@@ -182,7 +182,15 @@ const ProjectMembers = observer(() => {
{
showAddTemplate
&&
(
{
showAddTemplate
&&
(
<
AddTemplate
<
AddTemplate
setShowAddTemplate=
{
()
=>
setShowAddTemplate
(
false
)
}
setShowAddTemplate=
{
()
=>
{
setShowAddTemplate
(
false
)
getTemplateInfo
({
projectId
:
projectIdData
as
string
,
title
:
templateName
,
});
}
}
getTemplateInfo=
{
getTemplateInfo
}
getTemplateInfo=
{
getTemplateInfo
}
productId=
{
productId
as
string
}
productId=
{
productId
as
string
}
projectId=
{
projectIdData
as
string
}
projectId=
{
projectIdData
as
string
}
...
...
src/views/Project/components/AddProject/index.tsx
View file @
9af2fac8
import
{
MenuItem
}
from
"@mui/material"
;
import
{
MenuItem
}
from
"@mui/material"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
...
@@ -29,6 +30,7 @@ type IAddProjectProps = {
...
@@ -29,6 +30,7 @@ type IAddProjectProps = {
const
AddProject
=
(
props
:
IAddProjectProps
)
=>
{
const
AddProject
=
(
props
:
IAddProjectProps
)
=>
{
const
{
addOpen
,
setAddOpen
}
=
props
;
const
{
addOpen
,
setAddOpen
}
=
props
;
const
{
currentProjectStore
}
=
useStores
();
const
{
currentProjectStore
}
=
useStores
();
const
navigate
=
useNavigate
();
const
message
=
useMessage
();
const
message
=
useMessage
();
const
[
name
,
setName
]
=
useState
(
""
);
const
[
name
,
setName
]
=
useState
(
""
);
const
[
nameCheck
,
setNameCheck
]
=
useState
({
const
[
nameCheck
,
setNameCheck
]
=
useState
({
...
@@ -74,6 +76,7 @@ const AddProject = (props: IAddProjectProps) => {
...
@@ -74,6 +76,7 @@ const AddProject = (props: IAddProjectProps) => {
project
.
filetoken
=
res
;
project
.
filetoken
=
res
;
currentProjectStore
.
changeProject
(
project
);
currentProjectStore
.
changeProject
(
project
);
});
});
navigate
(
`/product/cadd/projectOverview`
)
}
}
},
},
onError
:
()
=>
{
onError
:
()
=>
{
...
@@ -134,11 +137,11 @@ const AddProject = (props: IAddProjectProps) => {
...
@@ -134,11 +137,11 @@ const AddProject = (props: IAddProjectProps) => {
const
handleDescChange
=
(
e
:
any
)
=>
{
const
handleDescChange
=
(
e
:
any
)
=>
{
const
desc
=
e
.
target
.
value
;
const
desc
=
e
.
target
.
value
;
setDesc
(
desc
.
slice
(
0
,
1
00
));
setDesc
(
desc
.
slice
(
0
,
3
00
));
// if (desc.length >
1
00) {
// if (desc.length >
3
00) {
// setDescCheck({
// setDescCheck({
// error: true,
// error: true,
// help: "格式不正确,必须在
1
00字符以内",
// help: "格式不正确,必须在
3
00字符以内",
// });
// });
// } else {
// } else {
// setDescCheck({
// setDescCheck({
...
@@ -211,7 +214,7 @@ const AddProject = (props: IAddProjectProps) => {
...
@@ -211,7 +214,7 @@ const AddProject = (props: IAddProjectProps) => {
id=
"desc"
id=
"desc"
label=
"项目描述"
label=
"项目描述"
multiline
multiline
rows=
{
5
}
rows=
{
4
}
placeholder=
"请输入项目描述"
placeholder=
"请输入项目描述"
onChange=
{
handleDescChange
}
onChange=
{
handleDescChange
}
helperText=
{
descCheck
.
help
}
helperText=
{
descCheck
.
help
}
...
@@ -221,10 +224,10 @@ const AddProject = (props: IAddProjectProps) => {
...
@@ -221,10 +224,10 @@ const AddProject = (props: IAddProjectProps) => {
position
:
"absolute"
,
position
:
"absolute"
,
bottom
:
"7px"
,
bottom
:
"7px"
,
right
:
"12px"
,
right
:
"12px"
,
color
:
"rgba(194, 198, 204, 1)"
,
color
:
desc
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
}
}
}
}
>
>
{
desc
.
length
}
/
1
00
{
desc
.
length
}
/
3
00
</
span
>
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
9af2fac8
...
@@ -478,7 +478,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -478,7 +478,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange=
{
(
e
:
any
)
=>
onChange=
{
(
e
:
any
)
=>
handleParameterChange
(
e
,
parameter
.
name
||
""
)
handleParameterChange
(
e
,
parameter
.
name
||
""
)
}
}
placeholder=
"
请输入
"
placeholder=
"
可输入默认值
"
error=
{
parameter
.
error
||
false
}
error=
{
parameter
.
error
||
false
}
helperText=
{
parameter
.
helperText
}
helperText=
{
parameter
.
helperText
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
disabled=
{
parameter
.
parameterGroup
===
"out"
}
...
...
src/views/WorkFlowEdit/components/SaveCustomTemplate/index.tsx
View file @
9af2fac8
...
@@ -240,14 +240,27 @@ const SaveCustomTemplate = (props: IProps) => {
...
@@ -240,14 +240,27 @@ const SaveCustomTemplate = (props: IProps) => {
helperText=
{
versionHelper
.
helperText
}
helperText=
{
versionHelper
.
helperText
}
style=
{
{
marginBottom
:
"20px"
}
}
style=
{
{
marginBottom
:
"20px"
}
}
></
MyInput
>
></
MyInput
>
<
MyInput
<
div
style=
{
{
position
:
"relative"
}
}
>
value=
{
description
}
<
MyInput
label=
"模板描述"
value=
{
description
}
placeholder=
"模板描述"
id=
"desc"
onChange=
{
handleDescriptionChange
}
label=
"模板描述"
multiline
placeholder=
"模板描述"
rows=
{
4
}
onChange=
{
handleDescriptionChange
}
></
MyInput
>
multiline
rows=
{
4
}
/>
<
span
style=
{
{
position
:
"absolute"
,
bottom
:
"7px"
,
right
:
"12px"
,
color
:
description
.
length
>=
300
?
"#d32f2f"
:
"#C2C6CC"
}
}
>
{
description
.
length
}
/300
</
span
>
</
div
>
</
div
>
</
div
>
</
MyDialog
>
</
MyDialog
>
);
);
...
...
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