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