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
2f2e8e21
Commit
2f2e8e21
authored
Jul 27, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI: 样式优化
parent
2a73807b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
42 deletions
+13
-42
index.module.css
...workbenchTemplate/components/AddTemplate/index.module.css
+0
-18
index.tsx
...kbench/workbenchTemplate/components/AddTemplate/index.tsx
+9
-22
index.tsx
...iews/Project/ProjectWorkbench/workbenchTemplate/index.tsx
+4
-2
No files found.
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.module.css
View file @
2f2e8e21
.addTemplateBox
{
width
:
100vw
;
height
:
100vh
;
position
:
fixed
;
top
:
0
;
left
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.78
);
z-index
:
100
;
display
:
flex
;
flex-direction
:
column
;
}
.closeBox
{
display
:
flex
;
justify-content
:
flex-end
;
height
:
40px
;
align-items
:
center
;
/* background-color: ; */
}
.content
{
flex
:
1
;
background-color
:
#fff
;
...
...
src/views/Project/ProjectWorkbench/workbenchTemplate/components/AddTemplate/index.tsx
View file @
2f2e8e21
import
{
useEffect
,
useState
,
useMemo
,
useCallback
}
from
"react"
;
import
style
from
"./index.module.css"
;
import
classNames
from
"classnames"
;
import
CloseOutlinedIcon
from
"@mui/icons-material/CloseOutlined"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
RadioGroupOfButtonStyle
from
"@/components/CommonComponents/RadioGroupOfButtonStyle"
;
import
SearchIcon
from
"@mui/icons-material/Search"
;
import
MyButton
from
"@/components/mui/MyButton"
;
import
OutlinedInput
from
"@mui/material/OutlinedInput"
;
import
FullScreenDrawer
from
"@/components/CommonComponents/FullScreenDrawer"
;
import
Checkbox
from
"@mui/material/Checkbox"
;
import
useMyRequest
from
"@/hooks/useMyRequest"
;
import
AddIcon
from
"@mui/icons-material/Add"
;
import
{
useStores
}
from
"@/store"
;
import
WorkFlowEdit
from
"@/views/WorkFlowEdit"
;
import
_
from
"lodash"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
noData
from
"../../../../../../assets/project/noTemplate.svg"
;
import
{
ICustomTemplate
}
from
"../../interface"
;
import
{
useMessage
}
from
"@/components/MySnackbar"
;
...
...
@@ -21,11 +19,12 @@ import {
getAddWorkbenchTemplate
,
addWorkbenchTemplate
,
}
from
"@/api/workbench_api"
;
import
{
toJS
}
from
"mobx"
;
type
IAddTemplateProps
=
{
setShowAddTemplate
:
any
;
getTemplateInfo
:
any
;
projectId
:
string
;
productId
:
string
;
};
const
radioOptions
=
[
...
...
@@ -39,12 +38,9 @@ const radioOptions = [
},
];
const
AddTemplate
=
observer
((
props
:
IAddTemplateProps
)
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
AddTemplate
=
(
props
:
IAddTemplateProps
)
=>
{
const
Message
=
useMessage
();
const
projectId
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
productId
=
toJS
(
currentProjectStore
.
currentProductInfo
.
id
);
const
{
setShowAddTemplate
,
getTemplateInfo
}
=
props
;
const
{
setShowAddTemplate
,
getTemplateInfo
,
projectId
,
productId
}
=
props
;
const
[
title
,
setTitle
]
=
useState
(
""
);
/** 可增加模板列表 */
...
...
@@ -75,7 +71,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
onSuccess
:
(
result
:
any
)
=>
{
Message
.
success
(
"添加成功"
);
setSelectTemplateData
([]);
setShowAddTemplate
(
false
);
setShowAddTemplate
();
getTemplateInfo
({
projectId
:
projectId
as
string
,
});
...
...
@@ -151,7 +147,6 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
templateType
,
title
,
]);
// title,
useEffect
(()
=>
{
getAddTemplateListFun
();
...
...
@@ -168,15 +163,7 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
},
[
addTemplateList
,
templateType
]);
return
(
<
div
className=
{
style
.
addTemplateBox
}
>
<
div
className=
{
style
.
closeBox
}
>
<
CloseOutlinedIcon
sx=
{
{
color
:
"#ffffff"
,
marginRight
:
"10px"
,
cursor
:
"pointer"
}
}
onClick=
{
()
=>
{
setShowAddTemplate
(
false
);
}
}
/>
</
div
>
<
FullScreenDrawer
handleClose=
{
setShowAddTemplate
}
>
<
div
className=
{
style
.
content
}
>
<
Typography
sx=
{
{
fontSize
:
"18px"
,
fontWeight
:
"600"
,
color
:
"#1E2633"
}
}
...
...
@@ -336,8 +323,8 @@ const AddTemplate = observer((props: IAddTemplateProps) => {
}
}
/>
)
:
null
}
</
div
>
</
FullScreenDrawer
>
);
}
)
;
};
export
default
AddTemplate
;
src/views/Project/ProjectWorkbench/workbenchTemplate/index.tsx
View file @
2f2e8e21
...
...
@@ -32,7 +32,7 @@ import styles from "./index.module.css";
const
ProjectMembers
=
observer
(()
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
projectIdData
=
toJS
(
currentProjectStore
.
currentProjectInfo
.
id
);
const
productId
=
toJS
(
currentProjectStore
.
currentProductInfo
.
id
);
const
isPass
=
usePass
();
/** 搜索模板名称 */
...
...
@@ -187,8 +187,10 @@ const ProjectMembers = observer(() => {
{
showAddTemplate
&&
(
<
AddTemplate
setShowAddTemplate=
{
setShowAddTemplate
}
setShowAddTemplate=
{
()
=>
setShowAddTemplate
(
false
)
}
getTemplateInfo=
{
getTemplateInfo
}
productId=
{
productId
as
string
}
projectId=
{
projectIdData
as
string
}
/>
)
}
...
...
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