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
f581f0a1
Commit
f581f0a1
authored
Jan 12, 2021
by
陈前坚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 查找用户编辑修改
parent
57c4eeab
Pipeline
#22221
skipped with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
EditUserModal.jsx
src/pages/userCenter/userManage/EditUserModal.jsx
+8
-8
RelateRoleModal.jsx
src/pages/userCenter/userManage/RelateRoleModal.jsx
+2
-3
UserManage.js
src/pages/userCenter/userManage/UserManage.js
+5
-3
No files found.
src/pages/userCenter/userManage/EditUserModal.jsx
View file @
f581f0a1
...
...
@@ -17,16 +17,16 @@ const EditUserModal = props => {
editUserForm
.
setFieldsValue
({
loginName
:
voca
.
stripTags
(
currentUser
.
loginName
),
userName
:
voca
.
stripTags
(
currentUser
.
userName
),
phone
:
currentUser
.
phone
||
''
,
phone
:
voca
.
stripTags
(
currentUser
.
phone
)
||
''
,
email
:
currentUser
.
email
||
''
,
});
},
[
currentUser
]);
// 提交-编辑用户
const
submitEditUser
=
()
=>
{
const
loginName
=
editUserForm
.
getFieldValue
(
'loginName'
);
const
userName
=
editUserForm
.
getFieldValue
(
'userName'
);
const
phone
=
editUserForm
.
getFieldValue
(
'phone'
)
||
''
;
const
loginName
=
voca
.
stripTags
(
editUserForm
.
getFieldValue
(
'loginName'
)
);
const
userName
=
voca
.
stripTags
(
editUserForm
.
getFieldValue
(
'userName'
)
);
const
phone
=
voca
.
stripTags
(
editUserForm
.
getFieldValue
(
'phone'
)
)
||
''
;
const
email
=
editUserForm
.
getFieldValue
(
'email'
)
||
''
;
// 正则验证
if
(
loginName
===
''
)
{
...
...
@@ -83,8 +83,8 @@ const EditUserModal = props => {
editUserForm
.
setFieldsValue
({
loginName
:
voca
.
stripTags
(
currentUser
.
loginName
),
userName
:
voca
.
stripTags
(
currentUser
.
userName
),
phone
:
''
,
email
:
''
,
phone
:
voca
.
stripTags
(
currentUser
.
phone
)
||
''
,
email
:
currentUser
.
email
||
''
,
});
})
.
catch
(
err
=>
{
...
...
@@ -102,8 +102,8 @@ const EditUserModal = props => {
editUserForm
.
setFieldsValue
({
loginName
:
voca
.
stripTags
(
currentUser
.
loginName
),
userName
:
voca
.
stripTags
(
currentUser
.
userName
),
phone
:
''
,
email
:
''
,
phone
:
voca
.
stripTags
(
currentUser
.
phone
)
||
''
,
email
:
currentUser
.
email
||
''
,
});
}
}
okText=
"确认"
...
...
src/pages/userCenter/userManage/RelateRoleModal.jsx
View file @
f581f0a1
...
...
@@ -17,7 +17,6 @@ const RelateRoleModal = props => {
multiRelateRoles
,
onCancel
,
onSelect
,
submitSearchUser
,
loading
,
}
=
props
;
const
{
TabPane
}
=
Tabs
;
...
...
@@ -83,9 +82,9 @@ const RelateRoleModal = props => {
if
(
res
.
code
===
0
)
{
onCancel
();
// 跳转到组织重新请求改机构下用户数据,查找用户时currentSelectOrg为空数组,不需要重新请求
if
(
currentSelectOrg
.
length
!==
0
)
{
if
(
currentSelectOrg
.
length
!==
0
)
{
onSelect
([
currentSelectOrg
]);
}
;
}
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
...
...
src/pages/userCenter/userManage/UserManage.js
View file @
f581f0a1
...
...
@@ -230,7 +230,6 @@ const UserManage = () => {
style
=
{{
fontSize
:
'16px'
}}
/
>
<
/Tooltip
>
{(
record
.
state
===
'0'
||
record
.
state
===
null
)
&&
(
<>
<
Tooltip
title
=
"冻结用户"
>
...
...
@@ -669,8 +668,11 @@ const UserManage = () => {
message
:
'提交成功'
,
duration
:
2
,
});
// 重新获取用户表
onSelect
([
currentSelectOrg
]);
// 重新获取用户表,查找用户时currentSelectOrg为空数组,无需跳转
// eslint-disable-next-line no-unused-expressions
currentSelectOrg
.
length
===
0
?
submitSearchUser
()
:
onSelect
([
currentSelectOrg
]);
}
else
{
notification
.
error
({
message
:
'提交失败'
,
...
...
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