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(() => {
return
(
<
Box
className=
{
style
.
container
}
>
<
Box
className=
{
style
.
aside
}
>
<
CurrentProject
/>
{
pathname
.
indexOf
(
'userCenter'
)
<
0
&&
<
CurrentProject
/>
}
<
List
sx=
{
{
paddingTop
:
0
,
...
...
src/views/Project/ProjectSetting/BaseInfo/index.tsx
View file @
ed810906
...
...
@@ -349,8 +349,8 @@ const BaseInfo = observer(() => {
[
style
.
projectInfoTextarea
]:
true
,
})
}
onChange=
{
descChange
}
placeholder=
"项目描述限制
1
00字以内"
maxLength=
{
1
00
}
placeholder=
"项目描述限制
3
00字以内"
maxLength=
{
3
00
}
></
textarea
>
{
/* <MyInput
value={projectInfo.desc}
...
...
src/views/Project/ProjectSubmitWork/ConfigForm/index.tsx
View file @
ed810906
...
...
@@ -100,7 +100,7 @@ const ConfigForm = (props: ConfigFormProps) => {
};
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
)
{
setNameHelp
({
error
:
true
,
...
...
@@ -117,7 +117,7 @@ const ConfigForm = (props: ConfigFormProps) => {
setNameHelp
({
error
:
true
,
helperText
:
"请输入正确任务名称(3~
3
0字符,可包含大小写字母、数字、中文、特殊符号“-”、“_”)"
,
"请输入正确任务名称(3~
5
0字符,可包含大小写字母、数字、中文、特殊符号“-”、“_”)"
,
});
return
true
;
}
...
...
src/views/Project/ProjectWorkbench/workbenchList/index.tsx
View file @
ed810906
...
...
@@ -69,6 +69,7 @@ const currencies = [
let
timer
:
string
|
number
|
NodeJS
.
Timeout
|
null
|
undefined
=
null
;
const
ProjectMembers
=
observer
(()
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
isPass
=
usePass
();
const
[
jobName
,
setJobName
]
=
useState
(
""
);
...
...
@@ -125,7 +126,7 @@ const ProjectMembers = observer(() => {
},
});
//
删除
作业
//
中止
作业
const
{
run
:
cancelWorkflowJobInfo
}
=
useMyRequest
(
cancelWorkflowJob
,
{
onSuccess
:
(
result
:
any
)
=>
{
setOpenDialog
(
false
);
...
...
@@ -428,21 +429,22 @@ const ProjectMembers = observer(() => {
{
item
.
state
===
"RUNNING"
&&
isPass
(
"PROJECT_WORKBENCH_JOBS_STOP"
,
"USER"
)
&&
(
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
<
img
alt=
""
src=
{
jobStop
}
style=
{
{
cursor
:
"pointer"
}
}
onClick=
{
(
event
)
=>
{
event
.
stopPropagation
();
event
.
nativeEvent
.
stopImmediatePropagation
();
setJobData
(
item
.
id
);
setOpenDialog
(
true
);
setDialogType
(
"stop"
);
}
}
/>
{
currentProjectStore
.
currentProjectInfo
.
projectRole
===
"USER"
&&
(
item
.
creator
!==
JSON
.
parse
(
localStorage
.
getItem
(
"userInfo"
)
||
"{}"
)?.
name
)
?
""
:
<
img
alt=
""
src=
{
jobStop
}
style=
{
{
cursor
:
"pointer"
}
}
onClick=
{
(
event
)
=>
{
event
.
stopPropagation
();
event
.
nativeEvent
.
stopImmediatePropagation
();
setJobData
(
item
.
id
);
setOpenDialog
(
true
);
setDialogType
(
"stop"
);
}
}
/>
}
</
Box
>
)
}
{
item
.
state
!==
"RUNNING"
&&
isPass
(
"PROJECT_WORKBENCH_JOBS_DELETE"
,
"MANAGER"
)
&&
(
<
Box
className=
{
styles
.
tabBoxJobOperate
}
>
...
...
src/views/Project/components/AddProject/index.tsx
View file @
ed810906
import
{
MenuItem
}
from
"@mui/material"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
{
useNavigate
}
from
"react-router-dom"
;
import
MyInput
from
"@/components/mui/MyInput"
;
import
MyDialog
from
"@/components/mui/MyDialog"
;
...
...
@@ -29,6 +30,7 @@ type IAddProjectProps = {
const
AddProject
=
(
props
:
IAddProjectProps
)
=>
{
const
{
addOpen
,
setAddOpen
}
=
props
;
const
{
currentProjectStore
}
=
useStores
();
const
navigate
=
useNavigate
();
const
message
=
useMessage
();
const
[
name
,
setName
]
=
useState
(
""
);
const
[
nameCheck
,
setNameCheck
]
=
useState
({
...
...
@@ -74,6 +76,7 @@ const AddProject = (props: IAddProjectProps) => {
project
.
filetoken
=
res
;
currentProjectStore
.
changeProject
(
project
);
});
navigate
(
`/product/cadd/projectOverview`
)
}
},
onError
:
()
=>
{
...
...
@@ -134,11 +137,11 @@ const AddProject = (props: IAddProjectProps) => {
const
handleDescChange
=
(
e
:
any
)
=>
{
const
desc
=
e
.
target
.
value
;
setDesc
(
desc
.
slice
(
0
,
1
00
));
// if (desc.length >
1
00) {
setDesc
(
desc
.
slice
(
0
,
3
00
));
// if (desc.length >
3
00) {
// setDescCheck({
// error: true,
// help: "格式不正确,必须在
1
00字符以内",
// help: "格式不正确,必须在
3
00字符以内",
// });
// } else {
// setDescCheck({
...
...
@@ -224,7 +227,7 @@ const AddProject = (props: IAddProjectProps) => {
color
:
desc
.
length
>=
100
?
"#d32f2f"
:
"#C2C6CC"
}
}
>
{
desc
.
length
}
/
1
00
{
desc
.
length
}
/
3
00
</
span
>
</
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