Commit 49c5a1dd authored by 涂伟's avatar 涂伟

fix: '用户权限设置新增是否加入白名单'

parent 02aff5cf
......@@ -28,6 +28,7 @@ import {
EditTwoTone,
DeleteOutlined,
IdcardOutlined,
SafetyOutlined,
UnlockOutlined,
ApartmentOutlined,
StopOutlined,
......@@ -70,6 +71,7 @@ import {
GetAllSite,
SetGroupManager,
ChangeSMSState,
AddUserAppBindWhiteList,
} from '@/services/userManage/api';
import { AddUserAuthSetting, GetUserAuthSet } from '@/services/database/api';
import TreeComponents from '@/components/ExpendableTree';
......@@ -238,7 +240,7 @@ const UserManage = () => {
{
title: '权限设置',
key: 'action',
width: 150,
width: 200,
align: 'center',
render: record => (
<Space size="middle">
......@@ -323,6 +325,49 @@ const UserManage = () => {
/>
</Popconfirm>
</Tooltip>
<Tooltip title={record.whitelist === 0 ? '加入终端白名单' : '取消终端白名单'}>
<Popconfirm
placement="bottomRight"
title={
record.whitelist === 0 ? (
<p>
确定用户
<span className={styles.redText}>{voca.stripTags(record.loginName)}</span>
加入终端白名单吗?
</p>
) : (
<p>
确定用户
<span className={styles.redText}>{voca.stripTags(record.loginName)}</span>
取消加入终端白名单吗?
</p>
)
}
okText="确认"
cancelText="取消"
onConfirm={() => {
AddUserAppBindWhiteList({ userId: record.userId, state: !record.whitelist ? 1 : 0 }).then(res => {
if (res.code === 0) {
currentSelectOrg === '-1' ? submitSearchUser() : onSelect([currentSelectOrg]);
notification.success({
message: '设置成功',
description: res.msg,
});
} else {
notification.error({
message: '设置失败',
description: res.msg,
});
}
});
}}
>
<SafetyOutlined
style={{ fontSize: '16px', color: record.whitelist === 0 ? '#e86060' : '#1890FF' }}
// style={{ fontSize: '16px', color: '#1890FF' }}
/>
</Popconfirm>
</Tooltip>
</Space>
),
},
......
......@@ -197,5 +197,9 @@ export const GetPasswordRegularization = params =>
export const SysConfiguration = params =>
get(`/PandaCore/GCK/Common/SysConfiguration?moduleName=登录加密`, params);
// 是否加入白名单
export const AddUserAppBindWhiteList = params =>
get(`/PandaOMS/OMS/AddUserAppBindWhiteList`, params);
// export const DeleteOUNew = params =>
// get(`${PUBLISH_SERVICE}/UserCenter/DeleteOU`, params)
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