Commit dfaf32e5 authored by 皮倩雯's avatar 皮倩雯

修改用户管理用户鉴权功能

parent 92907699
Pipeline #32458 skipped with stages
......@@ -35,16 +35,15 @@ const AddUserModal = props => {
message: '提交失败',
description: '登录名不支持中文!',
});
} else if (password.length < 6) {
}else if (password === '') {
notification.error({
message: '提交失败',
description: '密码至少为6位,且包含数字和字母!',
description: '密码不能为空!',
});
}
else if (password === '') {
}else if (password.length < 6) {
notification.error({
message: '提交失败',
description: '密码不能为空!',
description: '密码至少为6位,且包含数字和字母!',
});
}else if (userName === '') {
notification.error({
......
......@@ -339,7 +339,7 @@ const UserManage = () => {
<Form form={form}>
<Item>
<Radio.Group
defaultValue={selectValue}
value={selectValue}
onChange={onTypeChange}
>
<Space direction="vertical">
......@@ -763,19 +763,21 @@ const UserManage = () => {
}).then(res => {
if (res.code == 0) {
setSelctValue(res.data);
console.log(selectValue);
console.log(res.data);
}
});
};
const onTypeChange = value => {
console.log(value);
setSelctValue(value);
setSelctValue(value.target.value);
};
const authUser = record => {
const authUser = (record) => {
setCurrentUser(record);
AddUserAuthSetting({ userId: currentUser.userID }).then(res => {
if (res.code == 0) {
console.log(selectValue)
AddUserAuthSetting({
userId: record.userID,
userLevel: selectValue
}).then(res => {
if (res.code === 0) {
message.info('提交成功');
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment