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
c45f3976
Commit
c45f3976
authored
Sep 14, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色管理界面优化
parent
d280daa4
Pipeline
#59967
waiting for manual action with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
CardCheck.jsx
src/pages/userCenter/roleManage/SelectUser/CardCheck.jsx
+2
-1
NewSelectUser.jsx
src/pages/userCenter/roleManage/SelectUser/NewSelectUser.jsx
+5
-1
SelectUser.jsx
src/pages/userCenter/roleManage/SelectUser/SelectUser.jsx
+12
-7
No files found.
src/pages/userCenter/roleManage/SelectUser/CardCheck.jsx
View file @
c45f3976
...
...
@@ -20,6 +20,7 @@ const CardCheck = props => {
}
},
[
delFlag
]);
useEffect
(()
=>
{
console
.
log
(
cardMsg
);
setPlainOptions
(
cardMsg
.
plainOptions
);
setCheckedList
(
cardMsg
.
checkedList
);
setIndeterminate
(
cardMsg
.
indeterminate
);
...
...
@@ -83,7 +84,7 @@ const CardCheck = props => {
onChange=
{
e
=>
onCheckAllChange
(
e
)
}
checked=
{
checkAll
}
>
{
cardMsg
.
groupName
}
{
cardMsg
.
level
}
</
Checkbox
>
</
div
>
<
div
className=
{
styles
.
bottomCheckbox
}
>
...
...
src/pages/userCenter/roleManage/SelectUser/NewSelectUser.jsx
View file @
c45f3976
...
...
@@ -75,6 +75,7 @@ const NewSelectUser = props => {
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
groupName
,
level
:
item
.
level
,
};
});
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
...
...
@@ -85,6 +86,7 @@ const NewSelectUser = props => {
}
return
{
groupName
:
item
.
groupName
,
level
:
item
.
level
,
groupId
:
item
.
groupId
,
indeterminate
,
checkAll
,
...
...
@@ -160,6 +162,7 @@ const NewSelectUser = props => {
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
groupName
,
level
:
item
.
level
,
};
});
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
...
...
@@ -170,6 +173,7 @@ const NewSelectUser = props => {
}
return
{
groupName
:
item
.
groupName
,
level
:
item
.
level
,
groupId
:
item
.
groupId
,
indeterminate
,
checkAll
,
...
...
@@ -230,7 +234,6 @@ const NewSelectUser = props => {
),
},
];
console
.
log
(
allList
,
'allList'
);
return
(
<>
{
/* <Modal
...
...
@@ -297,6 +300,7 @@ const NewSelectUser = props => {
total=
{
total
}
showTotal=
{
(
totals
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${totals} 条`
}
defaultPageSize=
{
pageSize
}
pageSizeOptions=
{
[
10
,
20
]
}
defaultCurrent=
{
1
}
current=
{
currentPage
}
onChange=
{
paginationChange
}
...
...
src/pages/userCenter/roleManage/SelectUser/SelectUser.jsx
View file @
c45f3976
...
...
@@ -17,6 +17,7 @@ const SelectUser = props => {
const
[
searchName
,
setSearchName
]
=
useState
();
const
[
deleKey
,
setDeleKey
]
=
useState
();
// 删除用户的key值
const
[
delFlag
,
setDelFlag
]
=
useState
(
0
);
// 删除标识每次删除后加一
useEffect
(()
=>
{
if
(
visible
)
{
setCurrentPage
(
1
);
...
...
@@ -52,7 +53,6 @@ const SelectUser = props => {
});
setLoading
(
true
);
Promise
.
all
([
p1
,
p2
]).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
[
0
].
code
===
0
&&
res
[
1
].
code
===
0
)
{
setTotal
(
res
[
1
].
data
.
count
);
let
listCheck
=
res
[
0
].
data
.
map
(
item
=>
({
...
...
@@ -76,7 +76,7 @@ const SelectUser = props => {
return
{
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
groupName
,
groupName
:
item
.
level
,
};
});
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
...
...
@@ -85,8 +85,9 @@ const SelectUser = props => {
if
(
checkedList
.
length
<
options
.
length
&&
checkedList
.
length
>
0
)
{
indeterminate
=
true
;
}
console
.
log
(
item
.
level
);
return
{
groupName
:
item
.
groupName
,
groupName
:
item
.
level
,
groupId
:
item
.
groupId
,
indeterminate
,
checkAll
,
...
...
@@ -94,7 +95,9 @@ const SelectUser = props => {
plainOptions
:
options
,
};
});
console
.
log
(
list
);
setAllist
(
list
);
setLoading
(
false
);
}
else
if
(
res
[
0
].
code
!==
0
)
{
message
.
error
(
res
[
0
].
msg
);
}
else
{
...
...
@@ -161,7 +164,7 @@ const SelectUser = props => {
return
{
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
groupName
,
groupName
:
item
.
level
,
};
});
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
...
...
@@ -170,8 +173,9 @@ const SelectUser = props => {
if
(
checkedList
.
length
<
options
.
length
&&
checkedList
.
length
>
0
)
{
indeterminate
=
true
;
}
console
.
log
(
item
.
level
);
return
{
groupName
:
item
.
groupName
,
groupName
:
item
.
level
,
groupId
:
item
.
groupId
,
indeterminate
,
checkAll
,
...
...
@@ -179,6 +183,7 @@ const SelectUser = props => {
plainOptions
:
options
,
};
});
console
.
log
(
list
);
setAllist
(
list
);
}
else
{
message
.
error
(
res
.
msg
);
...
...
@@ -207,8 +212,8 @@ const SelectUser = props => {
},
render
:
(
text
,
record
)
=>
(
<
span
>
<
Tooltip
placement=
"topLeft"
title=
{
`${record.label}(${record.
groupName
})`
}
>
{
record
.
label
}
(
{
record
.
groupName
}
)
<
Tooltip
placement=
"topLeft"
title=
{
`${record.label}(${record.
level
})`
}
>
{
record
.
label
}
(
{
record
.
level
}
)
</
Tooltip
>
</
span
>
),
...
...
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