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
21e3651c
Commit
21e3651c
authored
Nov 24, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '用户管理优化'
parent
0e4623e3
Pipeline
#82234
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
UserManage.jsx
src/pages/userCenter/userManage/UserManage.jsx
+12
-3
No files found.
src/pages/userCenter/userManage/UserManage.jsx
View file @
21e3651c
...
...
@@ -178,6 +178,7 @@ const UserManage = () => {
const
[
searchWordOrg
,
setSearchWordOrg
]
=
useState
(
''
);
const
[
keepDataList
,
setKeepDataList
]
=
useState
([]);
const
[
siteList
,
setSiteList
]
=
useState
([]);
const
[
searchFlag
,
setSearchFlag
]
=
useState
(
0
);
const
setRowClassName
=
record
=>
record
.
userId
===
selectColor
.
userId
?
styles
.
clickRowStyle
:
''
;
...
...
@@ -188,6 +189,7 @@ const UserManage = () => {
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
);
const
[
treeDataTotal
,
setTreeDataTotal
]
=
useState
();
const
[
totalSearch
,
setTotalSearch
]
=
useState
(
0
);
// 用户表列名
const
columns
=
[
{
...
...
@@ -211,9 +213,9 @@ const UserManage = () => {
key
:
'groupName'
,
// width: 150,
ellipsis
:
true
,
filters
:
orgFilters
,
filteredValue
,
onFilter
:
(
value
,
record
)
=>
record
.
groupName
===
value
,
//
filters: orgFilters,
//
filteredValue,
//
onFilter: (value, record) => record.groupName === value,
},
{
title
:
'手机号码'
,
...
...
@@ -835,6 +837,7 @@ const UserManage = () => {
// 点击树节点,获取当前机构下所有用户
const
onSelect
=
(
props
,
e
,
size
,
index
)
=>
{
setSearchFlag
(
0
);
if
(
e
)
{
props
[
0
]
=
e
.
node
.
key
;
}
else
{
...
...
@@ -1200,6 +1203,7 @@ const UserManage = () => {
// 查找用户
const
submitSearchUser
=
()
=>
{
setCurrentPage
(
1
);
if
(
!
searchWord
||
searchWord
.
trim
(
' '
).
length
==
0
)
{
message
.
warning
(
'请输入搜索内容'
);
return
;
...
...
@@ -1208,8 +1212,10 @@ const UserManage = () => {
let
data
=
searchWord
!=
''
?
{
key
:
searchWord
}
:
''
;
GetUserByKeyNew
(
data
)
.
then
(
res
=>
{
setSearchFlag
(
1
);
setTableLoading
(
false
);
if
(
res
.
code
===
0
)
{
setTotalSearch
(
res
.
data
.
length
);
setSelectedRowKeys
([]);
// 重置选中用户数
setCurrentOrgOperate
(
true
);
// 禁止当前机构操作
setMultiOperate
(
true
);
// 禁用批量操作
...
...
@@ -1513,6 +1519,7 @@ const UserManage = () => {
if
(
newres
.
code
===
0
)
{
let
res
=
newres
.
data
.
list
;
setTreeLoading
(
false
);
setSearchFlag
(
0
);
setSearchWord
(
''
);
setFilteredValue
([]);
// 第一次加载,默认选择第一个组织
...
...
@@ -1879,6 +1886,7 @@ const UserManage = () => {
marginRight
:
'5px'
,
}
}
>
{
searchFlag
===
0
&&
(
<
Pagination
total=
{
total
}
showTotal=
{
(
totals
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${totals} 条`
}
...
...
@@ -1892,6 +1900,7 @@ const UserManage = () => {
size=
"small"
showQuickJumper
/>
)
}
</
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