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
7213e1ef
Commit
7213e1ef
authored
4 years ago
by
张烨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/test/maintenance
parents
d23620ce
0639e6ec
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
29 deletions
+47
-29
index.jsx
src/components/CheckGroup/index.jsx
+28
-1
index.js
src/pages/user/login/index.js
+7
-4
UserManage.js
src/pages/userCenter/UserManage.js
+9
-10
UserManage.less
src/pages/userCenter/UserManage.less
+1
-0
api.js
src/services/userCenter/userManage/api.js
+2
-14
No files found.
src/components/CheckGroup/index.jsx
View file @
7213e1ef
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Spin
,
Button
,
Empty
}
from
'antd'
;
import
{
Spin
,
Checkbox
,
Button
,
Empty
}
from
'antd'
;
import
_
from
'lodash'
;
import
ListCardItem
from
'./ItemCard'
;
import
styles
from
'./ItemCard.less'
;
...
...
@@ -60,6 +60,32 @@ const ListCard = props => {
// console.timeEnd('updateValueList:');
};
const
checkAll
=
e
=>
{
if
(
e
.
target
.
checked
)
{
const
result
=
dataList
.
map
(
item
=>
getAllID
(
item
)).
flat
(
Infinity
);
setValueList
(
result
);
// eslint-disable-next-line no-unused-expressions
onChange
&&
onChange
(
result
);
}
else
{
setValueList
([]);
// eslint-disable-next-line no-unused-expressions
onChange
&&
onChange
([]);
}
};
const
getAllID
=
item
=>
{
let
result
=
[];
const
haveChildren
=
Array
.
isArray
(
item
.
children
)
&&
item
.
children
.
length
>
0
;
// 统一使用 getId
result
.
push
(
getId
(
item
));
if
(
haveChildren
)
{
// 每次递归result被置空,所以要另外保存
result
=
[...
item
.
children
.
map
(
i
=>
getAllID
(
i
)),
...
result
];
}
return
result
;
};
return
(
<
div
>
{
loading
?
(
...
...
@@ -77,6 +103,7 @@ const ListCard = props => {
/>
)
:
(
<>
<
Checkbox
onChange=
{
checkAll
}
>
全选/全不选
</
Checkbox
>
{
dataList
&&
dataList
.
length
>
0
?
(
dataList
.
filter
(
d
=>
d
.
type
===
'widgetGroup'
||
'widget'
)
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/index.js
View file @
7213e1ef
...
...
@@ -59,10 +59,13 @@ const Login = props => {
}
}
if
(
userMode
===
USER_MODE
.
COMMON
)
{
const
authority
=
[
AUTHORITY
.
LOGIN
,
AUTHORITY
.
COMMON
];
setAuthority
(
authority
);
setAuth
(
authority
);
history
.
push
(
`/userCenter/UserManage`
);
// const authority = [AUTHORITY.LOGIN, AUTHORITY.COMMON];
// setAuthority(authority);
// setAuth(authority);
// history.push(`/userCenter/UserManage`);
notification
.
warning
({
message
:
msg
||
'没有权限!'
,
});
}
}
else
{
notification
.
warning
({
...
...
This diff is collapsed.
Click to expand it.
src/pages/userCenter/UserManage.js
View file @
7213e1ef
...
...
@@ -496,7 +496,7 @@ const UserManage = () => {
const
changePassword
=
record
=>
{
setPasswordVisible
(
true
);
passwordForm
.
setFieldsValue
({
old
p
assword
:
record
.
password
,
old
P
assword
:
record
.
password
,
newPassword
:
''
,
passwordConfirm
:
''
,
});
...
...
@@ -867,7 +867,7 @@ const UserManage = () => {
});
// 提交-修改密码
const
submitChangePassword
=
()
=>
{
const
password
=
passwordForm
.
getFieldValue
(
'p
assword'
);
const
oldPassword
=
passwordForm
.
getFieldValue
(
'oldP
assword'
);
const
newPassword
=
passwordForm
.
getFieldValue
(
'newPassword'
);
const
passwordConfirm
=
passwordForm
.
getFieldValue
(
'passwordConfirm'
);
if
(
...
...
@@ -877,14 +877,13 @@ const UserManage = () => {
newPassword
.
length
>=
6
&&
newPassword
===
passwordConfirm
)
{
updateUserPassword
(
currentUser
.
userID
,
password
,
newPassword
,
passwordConfirm
,
)
updateUserPassword
({
UserId
:
+
currentUser
.
userID
,
OldPassWord
:
oldPassword
,
NewPassWord
:
newPassword
,
})
.
then
(
res
=>
{
if
(
res
.
success
)
{
if
(
res
.
code
===
0
)
{
setPasswordVisible
(
false
);
notification
.
success
({
message
:
'提交成功'
,
...
...
@@ -1404,7 +1403,7 @@ const UserManage = () => {
cancelText
=
"取消"
>
<
Form
form
=
{
passwordForm
}
labelCol
=
{{
span
:
4
}}
>
<
Form
.
Item
name
=
"old
p
assword"
label
=
"原始密码"
>
<
Form
.
Item
name
=
"old
P
assword"
label
=
"原始密码"
>
<
Input
disabled
/>
<
/Form.Item
>
<
Form
.
Item
...
...
This diff is collapsed.
Click to expand it.
src/pages/userCenter/UserManage.less
View file @
7213e1ef
...
...
@@ -185,6 +185,7 @@
.ant-tree-switcher{
line-height: 1;
color:#1890FF;
margin-right: 0px !important;
}
.ant-checkbox-group .ant-checkbox-group-item {
margin-right: 0px !important;
...
...
This diff is collapsed.
Click to expand it.
src/services/userCenter/userManage/api.js
View file @
7213e1ef
...
...
@@ -110,20 +110,8 @@ export const addToOrgs = (userIDs, orgIDs, newOrgID) =>
newGroupId
:
newOrgID
,
});
export
const
updateUserPassword
=
(
userID
,
oldpassword
,
newPassword
,
passwordConfirm
,
)
=>
get
(
`/Cityinterface/rest/services/OMS.svc/U_UpdatePassword`
,
{
_version
:
9999
,
_dc
:
Date
.
now
(),
userID
,
oldpassword
,
newPassword
,
passwordConfirm
,
});
export
const
updateUserPassword
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/UserCenter/UpdateUserPassword`
,
params
);
export
const
editUser
=
(
userID
,
loginName
,
userName
,
phone
,
email
)
=>
get
(
`/Cityinterface/rest/services/OMS.svc/U_EditUser`
,
{
...
...
This diff is collapsed.
Click to expand it.
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