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
5cf52638
Commit
5cf52638
authored
Jul 27, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220718' of
http://120.77.149.83/root/bkunyun
into feat-20220718
parents
cce400c0
e6b5cda5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
125 additions
and
130 deletions
+125
-130
index.tsx
src/components/BusinessComponents/SearchInput/index.tsx
+1
-1
index.tsx
src/views/Project/ProjectData/index.tsx
+7
-25
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+19
-10
index.tsx
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
+37
-36
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+50
-42
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+11
-16
No files found.
src/components/BusinessComponents/SearchInput/index.tsx
View file @
5cf52638
...
@@ -51,7 +51,7 @@ const SearchInput = (props: SearchInputProps) => {
...
@@ -51,7 +51,7 @@ const SearchInput = (props: SearchInputProps) => {
size=
{
size
}
size=
{
size
}
placeholder=
{
placeholder
}
placeholder=
{
placeholder
}
fullWidth=
{
fullWidth
}
fullWidth=
{
fullWidth
}
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#
999
"
}
}
/>
}
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#
8A9099"
,
fontSize
:
"22px
"
}
}
/>
}
{
...
other
}
{
...
other
}
/>
/>
</
ThemeProvider
>
</
ThemeProvider
>
...
...
src/views/Project/ProjectData/index.tsx
View file @
5cf52638
...
@@ -28,6 +28,7 @@ import SeeDataset from "./SeeDataset";
...
@@ -28,6 +28,7 @@ import SeeDataset from "./SeeDataset";
import
{
getDataFind
,
getDataFileSearch
}
from
"@/api/project_api"
;
import
{
getDataFind
,
getDataFileSearch
}
from
"@/api/project_api"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
const
ProjectData
=
observer
(()
=>
{
const
ProjectData
=
observer
(()
=>
{
const
isPass
=
usePass
();
const
isPass
=
usePass
();
...
@@ -490,10 +491,10 @@ const ProjectData = observer(() => {
...
@@ -490,10 +491,10 @@ const ProjectData = observer(() => {
{
index
===
0
{
index
===
0
?
"ProjectData"
?
"ProjectData"
:
index
>
pathArr
.
length
-
4
:
index
>
pathArr
.
length
-
4
?
item
?
item
:
""
}
:
""
}
{
index
===
pathArr
.
length
-
1
||
{
index
===
pathArr
.
length
-
1
||
(
index
<=
pathArr
.
length
-
4
&&
index
>
0
)
?
null
:
(
(
index
<=
pathArr
.
length
-
4
&&
index
>
0
)
?
null
:
(
<
i
className=
{
style
.
showPathI
}
>
{
">"
}
</
i
>
<
i
className=
{
style
.
showPathI
}
>
{
">"
}
</
i
>
)
}
)
}
{
index
===
1
&&
"..."
}
{
index
===
1
&&
"..."
}
...
@@ -534,31 +535,12 @@ const ProjectData = observer(() => {
...
@@ -534,31 +535,12 @@ const ProjectData = observer(() => {
projectId=
{
projectId
as
string
}
projectId=
{
projectId
as
string
}
></
AddFolder
>
></
AddFolder
>
</
div
>
</
div
>
<
MyInput
<
SearchInput
sx=
{
{
width
:
"340px"
,
}
}
value=
{
keyWord
}
value=
{
keyWord
}
required
size=
"small"
// size="medium"
placeholder=
"输入关键词搜索"
onChange=
{
handleKeyWordChange
}
onChange=
{
handleKeyWordChange
}
onKeyUp=
{
handleKeyWordChangeKeyUp
}
onKeyUp=
{
handleKeyWordChangeKeyUp
}
InputProps=
{
{
sx=
{
{
width
:
340
}
}
endAdornment
:
(
/>
<
SearchIcon
className=
{
style
.
searchIcon
}
style=
{
{
color
:
"rgba(153, 153, 153, 1)"
,
fontSize
:
"22px"
,
position
:
"relative"
,
left
:
"4px"
,
}
}
/>
),
}
}
></
MyInput
>
</
div
>
</
div
>
<
div
className=
{
style
.
projectDataPathAndTabs
}
>
<
div
className=
{
style
.
projectDataPathAndTabs
}
>
<
div
className=
{
style
.
projectDataPath
}
>
{
showPath
}
</
div
>
<
div
className=
{
style
.
projectDataPath
}
>
{
showPath
}
</
div
>
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
5cf52638
...
@@ -21,7 +21,7 @@ import { toJS } from "mobx";
...
@@ -21,7 +21,7 @@ import { toJS } from "mobx";
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
InformationDisplay
from
"@/components/CommonComponents/InformationDisplay"
;
import
InformationDisplay
from
"@/components/CommonComponents/InformationDisplay"
;
import
classnames
from
"classnames"
;
import
classnames
from
"classnames"
;
import
{
TextField
}
from
"@mui/material"
;
import
{
TextField
}
from
"@mui/material"
;
import
LoadingButton
from
"@mui/lab/LoadingButton"
;
import
LoadingButton
from
"@mui/lab/LoadingButton"
;
import
InputAdornment
from
'@mui/material/InputAdornment'
;
import
InputAdornment
from
'@mui/material/InputAdornment'
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
...
@@ -34,6 +34,7 @@ import {
...
@@ -34,6 +34,7 @@ import {
getFiletokenAccordingToId
,
getFiletokenAccordingToId
,
}
from
"@/views/Project/project"
;
}
from
"@/views/Project/project"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyInput
from
"@/components/mui/MyInput"
;
type
zoneIdOption
=
{
type
zoneIdOption
=
{
id
:
string
;
id
:
string
;
...
@@ -311,8 +312,8 @@ const BaseInfo = observer(() => {
...
@@ -311,8 +312,8 @@ const BaseInfo = observer(() => {
size=
"small"
size=
"small"
sx=
{
{
sx=
{
{
width
:
"560px"
,
width
:
"560px"
,
'& .MuiOutlinedInput-root'
:{
'& .MuiOutlinedInput-root'
:
{
height
:
'36px'
height
:
'36px'
}
}
}
}
}
}
/>
/>
...
@@ -368,6 +369,14 @@ const BaseInfo = observer(() => {
...
@@ -368,6 +369,14 @@ const BaseInfo = observer(() => {
</
div
>
</
div
>
<
div
className=
{
style
.
projectInfoListLi
}
>
<
div
className=
{
style
.
projectInfoListLi
}
>
<
div
className=
{
style
.
projectInfoListLiLabel
}
>
项目预算
</
div
>
<
div
className=
{
style
.
projectInfoListLiLabel
}
>
项目预算
</
div
>
{
/* <MyInput
sx={{
width: "560px",
'& .MuiOutlinedInput-root': {
height: '36px'
}
}}
/> */
}
<
TextField
<
TextField
required
required
error=
{
budgetCheck
.
error
}
error=
{
budgetCheck
.
error
}
...
@@ -381,8 +390,8 @@ const BaseInfo = observer(() => {
...
@@ -381,8 +390,8 @@ const BaseInfo = observer(() => {
size=
"small"
size=
"small"
sx=
{
{
sx=
{
{
width
:
"560px"
,
width
:
"560px"
,
'& .MuiOutlinedInput-root'
:{
'& .MuiOutlinedInput-root'
:
{
height
:
'36px'
height
:
'36px'
}
}
}
}
}
}
InputProps=
{
{
InputProps=
{
{
...
@@ -421,11 +430,11 @@ const BaseInfo = observer(() => {
...
@@ -421,11 +430,11 @@ const BaseInfo = observer(() => {
variant=
"contained"
variant=
"contained"
onClick=
{
()
=>
setDialogOpen
(
true
)
}
onClick=
{
()
=>
setDialogOpen
(
true
)
}
color=
'error'
color=
'error'
// style={{
// style={{
// backgroundColor: "#fff",
// backgroundColor: "#fff",
// color: "#FF4E4E",
// color: "#FF4E4E",
// border: "1px solid #FF4E4E",
// border: "1px solid #FF4E4E",
// }}
// }}
/>
/>
</
div
>
</
div
>
<
MyDialog
<
MyDialog
...
...
src/views/Project/ProjectSetting/ProjectMembers/index.tsx
View file @
5cf52638
...
@@ -23,6 +23,7 @@ import AddMember from "./components/AddMember";
...
@@ -23,6 +23,7 @@ import AddMember from "./components/AddMember";
import
{
IDialogInfo
}
from
"./interface"
;
import
{
IDialogInfo
}
from
"./interface"
;
import
{
useStores
}
from
"@/store"
;
import
{
useStores
}
from
"@/store"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -60,34 +61,34 @@ const ProjectMembers = observer(() => {
...
@@ -60,34 +61,34 @@ const ProjectMembers = observer(() => {
...(
projectRole
!==
"OWNER"
...(
projectRole
!==
"OWNER"
?
[]
?
[]
:
[
:
[
{
{
id
:
"operation"
,
id
:
"operation"
,
label
:
"操作"
,
label
:
"操作"
,
width
:
160
,
width
:
160
,
render
:
(
item
:
any
,
row
:
any
)
=>
{
render
:
(
item
:
any
,
row
:
any
)
=>
{
return
row
?.
projectRole
===
"OWNER"
?
null
:
(
return
row
?.
projectRole
===
"OWNER"
?
null
:
(
<>
<>
<
span
<
span
style=
{
{
color
:
"#1370FF"
,
cursor
:
"pointer"
}
}
style=
{
{
color
:
"#1370FF"
,
cursor
:
"pointer"
}
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
onPermissionBtn
(
row
);
onPermissionBtn
(
row
);
}
}
}
}
>
>
更改权限
更改权限
</
span
>
</
span
>
<
span
<
span
className=
{
styles
.
removeItemBox
}
className=
{
styles
.
removeItemBox
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
onRemoveItemBtn
(
row
.
username
);
onRemoveItemBtn
(
row
.
username
);
}
}
}
}
>
>
移出项目
移出项目
</
span
>
</
span
>
</>
</>
);
);
},
},
},
]),
},
]),
];
];
return
val
;
return
val
;
},
[
projectRole
]);
},
[
projectRole
]);
...
@@ -141,20 +142,20 @@ const ProjectMembers = observer(() => {
...
@@ -141,20 +142,20 @@ const ProjectMembers = observer(() => {
projectRole
:
row
?.
projectRole
||
""
,
projectRole
:
row
?.
projectRole
||
""
,
});
});
}
;
}
;
// 回车搜索
const handleKeyWordChangeKeyUp = (e: any) =
>
{
if
(
e
.
keyCode
===
13
)
{
setProjectMember
(
e
.
target
.
value
);
}
}
return (
return (
<>
<>
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
headerBox
}
>
<
OutlinedInput
<
SearchInput
onChange=
{
(
e
:
any
)
=>
{
onKeyUp=
{
handleKeyWordChangeKeyUp
}
_
.
debounce
(()
=>
{
setProjectMember
(
e
.
target
.
value
);
},
200
)();
}
}
placeholder=
"搜索项目成员"
placeholder=
"搜索项目成员"
size=
"small"
sx=
{
{
width
:
340
}
}
sx=
{
{
width
:
340
,
height
:
32
}
}
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#8A9099"
}
}
/>
}
/>
/>
{
currentProjectStore
?.
currentProjectInfo
?.
projectRole
===
"OWNER"
?
(
{
currentProjectStore
?.
currentProjectInfo
?.
projectRole
===
"OWNER"
?
(
<
MyButton
<
MyButton
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
5cf52638
...
@@ -39,6 +39,7 @@ import { toJS } from "mobx";
...
@@ -39,6 +39,7 @@ import { toJS } from "mobx";
import
{
observer
}
from
"mobx-react-lite"
;
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
styles
from
"./index.module.css"
;
import
styles
from
"./index.module.css"
;
...
@@ -100,6 +101,13 @@ const ProjectMembers = observer(() => {
...
@@ -100,6 +101,13 @@ const ProjectMembers = observer(() => {
},
60000
);
},
60000
);
},
},
});
});
useEffect
(()
=>
{
return
()
=>
{
clearTimeout
(
timer
as
number
)
}
},
[])
const
navigate
=
useNavigate
()
const
navigate
=
useNavigate
()
// 删除作业
// 删除作业
...
@@ -231,37 +239,37 @@ const ProjectMembers = observer(() => {
...
@@ -231,37 +239,37 @@ const ProjectMembers = observer(() => {
}
}
}
}
/** 渲染字体颜色 */
/** 渲染字体颜色 */
const
renderTextColor
=
(
data
:
any
)
=>
{
const
renderTextColor
=
(
data
:
any
)
=>
{
switch
(
data
)
{
switch
(
data
)
{
case
"RUNNING"
:
case
"RUNNING"
:
return
"#1370FF"
;
return
"#1370FF"
;
case
"ABORTED"
:
case
"ABORTED"
:
return
"#C2C6CC"
;
return
"#C2C6CC"
;
case
"FAILED"
:
case
"FAILED"
:
return
"#FF4E4E"
;
return
"#FF4E4E"
;
case
"SUCCEEDED"
:
case
"SUCCEEDED"
:
return
"#0DD09B"
;
return
"#0DD09B"
;
default
:
default
:
return
"#C2C6CC"
;
return
"#C2C6CC"
;
}
}
};
};
/** 渲染进度条颜色 */
/** 渲染进度条颜色 */
const
renderProgressColor
=
useCallback
((
data
:
any
)
=>
{
const
renderProgressColor
=
useCallback
((
data
:
any
)
=>
{
switch
(
data
)
{
switch
(
data
)
{
case
"RUNNING"
:
case
"RUNNING"
:
return
"info"
;
return
"info"
;
case
"ABORTED"
:
case
"ABORTED"
:
return
"disable"
;
return
"disable"
;
case
"FAILED"
:
case
"FAILED"
:
return
"error"
;
return
"error"
;
case
"SUCCEEDED"
:
case
"SUCCEEDED"
:
return
"success"
;
return
"success"
;
default
:
default
:
return
"disable"
;
return
"disable"
;
}
}
},
[]);
},
[]);
/** 点击每一行 */
/** 点击每一行 */
const
rowClick
=
useCallback
(
const
rowClick
=
useCallback
(
...
@@ -273,23 +281,23 @@ const ProjectMembers = observer(() => {
...
@@ -273,23 +281,23 @@ const ProjectMembers = observer(() => {
[
navigate
],
[
navigate
],
);
);
// 回车搜索
const
handleKeyWordChangeKeyUp
=
(
e
:
any
)
=>
{
if
(
e
.
keyCode
===
13
)
{
setJobName
(
e
.
target
.
value
);
}
}
return
(
return
(
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
tabHeader
}
>
<
Box
className=
{
styles
.
tabHeader
}
>
<
Box
sx=
{
{
display
:
'flex'
}
}
>
<
Box
sx=
{
{
display
:
'flex'
}
}
>
<
OutlinedInput
<
SearchInput
onChange=
{
(
e
:
any
)
=>
{
onKeyUp=
{
handleKeyWordChangeKeyUp
}
searchChange
(
e
.
target
.
value
)
sx=
{
{
width
:
340
}
}
}
}
value=
{
jobName
}
placeholder=
"输入关键词搜索"
size=
"small"
sx=
{
{
width
:
340
,
height
:
32
}
}
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#8A9099"
}
}
/>
}
/>
/>
<
Box
className=
{
styles
.
tabHeaderSelect
}
>
<
Box
className=
{
styles
.
tabHeaderSelect
}
>
<
TextField
<
TextField
select
select
...
@@ -367,7 +375,7 @@ const ProjectMembers = observer(() => {
...
@@ -367,7 +375,7 @@ const ProjectMembers = observer(() => {
<
img
alt=
""
src=
{
renderStatusIcon
(
item
.
state
)
}
/>
<
img
alt=
""
src=
{
renderStatusIcon
(
item
.
state
)
}
/>
<
div
className=
{
styles
.
tabBoxStatusText
}
>
{
renderStatusText
(
item
.
state
)
}
</
div
>
<
div
className=
{
styles
.
tabBoxStatusText
}
>
{
renderStatusText
(
item
.
state
)
}
</
div
>
<
Box
sx=
{
{
width
:
'100%'
}
}
>
<
Box
sx=
{
{
width
:
'100%'
}
}
>
<
MyProgress
color=
{
renderProgressColor
(
item
.
data
)
}
value=
{
(
item
.
completeNum
/
item
.
totalNum
)
*
100
}
<
MyProgress
color=
{
renderProgressColor
(
item
.
state
)
}
value=
{
(
item
.
completeNum
/
item
.
totalNum
)
*
100
}
sx=
{
{
sx=
{
{
marginRight
:
'16px'
,
marginRight
:
'16px'
,
}
}
}
}
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
5cf52638
...
@@ -8,13 +8,12 @@
...
@@ -8,13 +8,12 @@
*/
*/
import
{
memo
,
useEffect
,
useState
}
from
"react"
;
import
{
memo
,
useEffect
,
useState
}
from
"react"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
{
toJS
}
from
"mobx"
;
import
{
toJS
}
from
"mobx"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
Add
from
"@mui/icons-material/Add"
;
import
Add
from
"@mui/icons-material/Add"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
SearchInput
from
"@/components/BusinessComponents/SearchInput"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
TemplateBox
from
"./components/templateBox"
;
import
TemplateBox
from
"./components/templateBox"
;
import
SimpleDialog
from
"./components/simpleDialog"
;
import
SimpleDialog
from
"./components/simpleDialog"
;
...
@@ -93,10 +92,6 @@ const ProjectMembers = observer(() => {
...
@@ -93,10 +92,6 @@ const ProjectMembers = observer(() => {
setShowAddTemplate
(
true
);
setShowAddTemplate
(
true
);
};
};
const
searchChange
=
(
data
:
any
)
=>
{
setTemplateName
(
data
.
length
>
30
?
data
.
slice
(
0
,
30
)
:
data
);
};
useEffect
(()
=>
{
useEffect
(()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
getTemplateInfo
({
getTemplateInfo
({
...
@@ -106,20 +101,20 @@ const ProjectMembers = observer(() => {
...
@@ -106,20 +101,20 @@ const ProjectMembers = observer(() => {
},
300
);
},
300
);
},
[
templateName
,
getTemplateInfo
,
projectIdData
]);
},
[
templateName
,
getTemplateInfo
,
projectIdData
]);
// 回车搜索
const
handleKeyWordChangeKeyUp
=
(
e
:
any
)
=>
{
if
(
e
.
keyCode
===
13
)
{
setTemplateName
(
e
.
target
.
value
);
}
}
return
(
return
(
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
headerBox
}
>
<
Box
className=
{
styles
.
tabBox
}
>
<
Box
className=
{
styles
.
tabBox
}
>
<
OutlinedInput
<
SearchInput
onChange=
{
(
e
:
any
)
=>
{
onKeyUp=
{
handleKeyWordChangeKeyUp
}
searchChange
(
e
.
target
.
value
);
sx=
{
{
width
:
340
}
}
}
}
value=
{
templateName
}
placeholder=
"输入关键词搜索"
size=
"small"
sx=
{
{
width
:
340
,
height
:
32
}
}
endAdornment=
{
<
SearchIcon
style=
{
{
color
:
"#8A9099"
}
}
/>
}
/>
/>
{
templateList
.
length
>
0
&&
{
templateList
.
length
>
0
&&
isPass
(
"PROJECT_WORKBENCH_FLOES_ADD"
,
"MANAGER"
)
&&
(
isPass
(
"PROJECT_WORKBENCH_FLOES_ADD"
,
"MANAGER"
)
&&
(
<
MyButton
<
MyButton
...
...
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