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
385cda55
Commit
385cda55
authored
Dec 12, 2022
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改用户管理样式问题及保存交互优化
parent
f4a9dc56
Pipeline
#65373
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
16 deletions
+33
-16
EditUserModal.jsx
src/pages/userCenter/userManage/EditUserModal.jsx
+25
-12
UserManage.jsx
src/pages/userCenter/userManage/UserManage.jsx
+7
-2
UserManage.less
src/pages/userCenter/userManage/UserManage.less
+1
-2
No files found.
src/pages/userCenter/userManage/EditUserModal.jsx
View file @
385cda55
/* eslint-disable import/no-unresolved */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
}
from
'antd'
;
import
{
Modal
,
Form
,
Input
,
notification
,
message
,
Divider
}
from
'antd'
;
import
voca
from
'voca'
;
import
classNames
from
'classnames'
;
import
{
editUser
,
updateUserPassword
}
from
'@/services/userManage/api'
;
...
...
@@ -86,13 +86,13 @@ const EditUserModal = props => {
});
return
;
}
if
(
newPassword
===
''
||
passwordConfirm
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'带*号为必填项,不能为空
'
,
});
return
;
}
// if ((newPassword && passwordConfirm === '') || (passwordConfirm && newPassword === '')
) {
//
notification.error({
//
message: '提交失败',
// description: '请填写密码
',
//
});
//
return;
//
}
if
((
newPassword
&&
newPassword
.
length
<
6
)
||
(
passwordConfirm
&&
passwordConfirm
<
6
))
{
notification
.
error
({
message
:
'提交失败'
,
...
...
@@ -120,8 +120,11 @@ const EditUserModal = props => {
if
(
res
.
msg
===
''
)
{
onCancel
();
// 重新获取用户表
// eslint-disable-next-line no-unused-expressions
// currentSelectOrg === '-1' ? submitSearchUser() : onSelect([currentSelectOrg]);
if
(
!
newPassword
)
{
// eslint-disable-next-line no-unused-expressions
currentSelectOrg
===
'-1'
?
submitSearchUser
()
:
onSelect
([
currentSelectOrg
]);
}
notification
.
success
({
message
:
'提交成功'
,
duration
:
2
,
...
...
@@ -313,6 +316,16 @@ const EditUserModal = props => {
<
Input
placeholder=
"请输入电子邮箱"
autoComplete=
"off"
/>
</
Form
.
Item
>
</
Form
>
<
Divider
orientation=
"left"
style=
{
{
borderTopColor
:
'#99bbe8'
,
color
:
'#15428b'
,
fontWeight
:
700
,
}
}
>
重置密码
</
Divider
>
<
div
className=
{
styles
.
modalContent
}
>
<
Form
form=
{
passwordForm
}
labelCol=
{
{
span
:
4
}
}
onFieldsChange=
{
changeValue
}
>
<
Form
.
Item
name=
"oldPassword"
label=
"原始密码"
>
...
...
@@ -327,7 +340,7 @@ const EditUserModal = props => {
pattern
:
/^
[
a-zA-Z0-9_
]
{6,16}$/
,
message
:
'长度6-16位,支持字母与数字,允许下划线'
,
},
{
required
:
true
},
//
{
required
:
true
},
]
}
>
<
Input
.
Password
...
...
@@ -362,7 +375,7 @@ const EditUserModal = props => {
pattern
:
/^
[
a-zA-Z0-9_
]
{6,16}$/
,
message
:
'长度6-16位,支持字母与数字,允许下划线'
,
},
{
required
:
true
},
//
{
required
:
true
},
]
}
>
<
Input
.
Password
...
...
src/pages/userCenter/userManage/UserManage.jsx
View file @
385cda55
...
...
@@ -1069,6 +1069,11 @@ const UserManage = () => {
// 查找用户
const
submitSearchUser
=
()
=>
{
if
(
!
searchWord
||
searchWord
.
trim
(
' '
).
length
==
0
)
{
message
.
warning
(
'请输入搜索内容'
);
return
;
}
GetUserByKeyNew
({
key
:
searchWord
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -1644,7 +1649,7 @@ const UserManage = () => {
</
span
>
<
span
style=
{
{
float
:
'right'
,
margin
:
'10px'
}
}
>
<
Search
style=
{
{
width
:
260
}
}
style=
{
{
width
:
260
,
marginRight
:
'15px'
}
}
placeholder=
"搜索登录名/用户姓名/手机号"
onSearch=
{
submitSearchUser
}
onChange=
{
e
=>
handleSearch
(
e
)
}
...
...
@@ -1652,7 +1657,7 @@ const UserManage = () => {
value=
{
searchWord
}
/>
<
Button
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
>
<
Button
style=
{
{
marginRight
:
'15px'
}
}
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
>
重置
</
Button
>
...
...
src/pages/userCenter/userManage/UserManage.less
View file @
385cda55
...
...
@@ -290,8 +290,7 @@
}
.ant-btn {
margin: 0px 10px;
// margin: 0px 10px;
.ant-btn-primary {
background: #50aefc;
}
...
...
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