Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
6c464d43
Commit
6c464d43
authored
Jan 11, 2021
by
陈前坚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/ReactWeb5/maintenance
parents
fe894532
07452cc4
Pipeline
#22165
skipped with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
44 deletions
+62
-44
AvatarDropdown.js
src/components/GlobalHeader/AvatarDropdown.js
+3
-3
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+51
-41
SiteManage.less
src/pages/userCenter/siteManage/SiteManage.less
+8
-0
No files found.
src/components/GlobalHeader/AvatarDropdown.js
View file @
6c464d43
...
...
@@ -61,7 +61,6 @@ class AvatarDropdown extends React.Component {
<
/Menu.Item
>
<
/Menu
>
);
let
role
=
JSON
.
parse
(
localStorage
.
getItem
(
'panda-oms-authority'
))[
1
];
return
currentUser
?
(
<
HeaderDropdown
overlay
=
{
menuHeaderDropdown
}
>
<
span
className
=
{
`
${
styles
.
action
}
${
styles
.
account
}
`
}
>
...
...
@@ -72,8 +71,9 @@ class AvatarDropdown extends React.Component {
alt
=
"avatar"
/>
<
span
className
=
{
`
${
styles
.
name
}
anticon`
}
>
{
roleName
[
role
]}
{
/* {currentUser.name || loginName || '管理员'} */
}
{
currentUser
.
name
||
loginName
===
'omsa'
?
'超级管理员'
:
'管理员'
||
'管理员'
}
<
/span
>
<
/span
>
<
/HeaderDropdown
>
...
...
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
6c464d43
...
...
@@ -12,6 +12,7 @@ import {
Space
,
Checkbox
,
Pagination
,
Empty
,
}
from
'antd'
;
import
lodash
,
{
clone
}
from
'lodash'
;
import
{
...
...
@@ -80,15 +81,19 @@ const SiteManage = props => {
arr
.
push
(
res
.
find
(
item
=>
item
.
id
===
'Web4StationRoot'
));
}
if
(
arr
[
0
])
{
const
stations
=
arr
[
0
].
children
;
const
stations
=
arr
[
0
].
children
||
[]
;
setTreeData
(
stations
);
if
(
!
currentStation
.
stationID
)
{
setCurrentStation
(
stations
[
0
]);
if
(
stations
.
length
>
0
)
{
if
(
!
currentStation
.
stationID
)
{
setCurrentStation
(
stations
[
0
]);
}
else
{
setCurrentStation
(
stations
.
find
(
s
=>
s
.
stationID
===
currentStation
.
stationID
)
||
stations
[
0
],
);
}
}
else
{
setCurrentStation
(
stations
.
find
(
s
=>
s
.
stationID
===
currentStation
.
stationID
)
||
stations
[
0
],
);
setdataList
([]);
}
}
})
...
...
@@ -109,7 +114,7 @@ const SiteManage = props => {
},
[
page
.
pageNum
]);
const
getList
=
name
=>
{
let
params
=
{
stationId
:
+
currentStation
.
stationID
,
stationId
:
+
currentStation
.
stationID
||
''
,
PageIndex
:
+
page
.
pageNum
,
PageSize
:
+
page
.
pageSize
,
};
...
...
@@ -328,12 +333,12 @@ const SiteManage = props => {
if
(
res
.
success
)
{
setSelectList
([]);
getList
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'设置成功'
,
});
getList
();
}
else
{
notification
.
error
({
message
:
'提示'
,
...
...
@@ -508,39 +513,44 @@ const SiteManage = props => {
/>
))
}
</
Spin
>
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Pagination
size=
"small"
total=
{
total
}
current=
{
page
.
pageNum
}
defaultPageSize=
"5"
onChange=
{
handleChangePage
}
pageSizeOptions=
{
[
'5'
]
}
/>
</
div
>
<
p
>
已选择列表:
</
p
>
<
div
className=
{
styles
.
siteSelectList
}
>
<
ul
className=
{
styles
.
siteSelectUl
}
>
{
selectList
.
map
((
item
,
index
)
=>
(
<
li
key=
{
`${item.userName}${item.GroupId}`
}
onClick=
{
()
=>
handleDel
(
index
)
}
{
dataList
.
length
>
0
?
(
<>
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Pagination
size=
"small"
total=
{
total
}
current=
{
page
.
pageNum
}
defaultPageSize=
"5"
onChange=
{
handleChangePage
}
pageSizeOptions=
{
[
'5'
]
}
/>
</
div
>
<
p
>
已选择列表:
</
p
>
<
div
className=
{
styles
.
siteSelectList
}
>
<
ul
className=
{
styles
.
siteSelectUl
}
>
{
selectList
.
map
((
item
,
index
)
=>
(
<
li
key=
{
`${item.userName}${item.GroupId}`
}
onClick=
{
()
=>
handleDel
(
index
)
}
>
{
`${item.userName}(${item.GroupName})`
}
</
li
>
))
}
</
ul
>
</
div
>
<
div
className=
{
styles
.
siteBtn
}
>
<
Button
type=
"primary"
className=
{
styles
.
siteCommit
}
onClick=
{
handleCommitBtn
}
>
{
`${item.userName}(${item.GroupName})`
}
</
li
>
))
}
</
ul
>
</
div
>
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
type=
"primary"
className=
{
styles
.
siteCommit
}
onClick=
{
handleCommitBtn
}
>
提交
</
Button
>
</
div
>
提交
</
Button
>
</
div
>
</>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
</
Card
>
</
div
>
</
div
>
...
...
src/pages/userCenter/siteManage/SiteManage.less
View file @
6c464d43
...
...
@@ -145,6 +145,7 @@
border:1px solid #f5f5f5;
height: 200px;
overflow: auto;
margin-bottom: 50px;
.siteSelectUl{
margin: 0;
padding: 15px;
...
...
@@ -165,4 +166,10 @@
padding: 0 20px 0 10px;
}
}
}
.siteBtn{
width:70.5vw;
text-align: right;
position: fixed;
bottom: 20px;
}
\ No newline at end of file
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