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
ed810906
Commit
ed810906
authored
Aug 04, 2022
by
rocosen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:bug
parent
fcdfe186
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
23 deletions
+30
-23
index.tsx
src/views/MenuLayout/index.tsx
+3
-1
index.tsx
src/views/Project/ProjectSetting/BaseInfo/index.tsx
+2
-2
index.tsx
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
+2
-2
index.tsx
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
+16
-14
index.tsx
src/views/Project/components/AddProject/index.tsx
+7
-4
No files found.
src/views/MenuLayout/index.tsx
View file @
ed810906
...
@@ -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/ProjectSetting/BaseInfo/index.tsx
View file @
ed810906
...
@@ -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 @
ed810906
...
@@ -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 @
ed810906
...
@@ -69,6 +69,7 @@ const currencies = [
...
@@ -69,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
(
""
);
...
@@ -125,7 +126,7 @@ const ProjectMembers = observer(() => {
...
@@ -125,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
);
...
@@ -428,21 +429,22 @@ const ProjectMembers = observer(() => {
...
@@ -428,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/components/AddProject/index.tsx
View file @
ed810906
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({
...
@@ -224,7 +227,7 @@ const AddProject = (props: IAddProjectProps) => {
...
@@ -224,7 +227,7 @@ const AddProject = (props: IAddProjectProps) => {
color
:
desc
.
length
>=
100
?
"#d32f2f"
:
"#C2C6CC"
color
:
desc
.
length
>=
100
?
"#d32f2f"
:
"#C2C6CC"
}
}
}
}
>
>
{
desc
.
length
}
/
1
00
{
desc
.
length
}
/
3
00
</
span
>
</
span
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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