完善资源隔离和授权管理
This commit is contained in:
@ -298,9 +298,8 @@ class OfflineSession extends Component {
|
||||
<div>
|
||||
<Button type="link" size='small'
|
||||
disabled={disabled}
|
||||
icon={<PlaySquareTwoTone twoToneColor={color}/>}
|
||||
onClick={() => this.showPlayback(record.id)}>回放</Button>
|
||||
<Button type="link" size='small' icon={<DeleteTwoTone/>} onClick={() => {
|
||||
<Button type="link" size='small' onClick={() => {
|
||||
confirm({
|
||||
title: '您确定要删除此会话吗?',
|
||||
content: '',
|
||||
|
@ -264,21 +264,21 @@ class User extends Component {
|
||||
dataIndex: 'nickname',
|
||||
key: 'nickname',
|
||||
}, {
|
||||
title: '用户角色',
|
||||
dataIndex: 'role',
|
||||
key: 'role',
|
||||
render: (role, record) => {
|
||||
title: '用户类型',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
render: (text, record) => {
|
||||
|
||||
if (role === 'user') {
|
||||
if (text === 'user') {
|
||||
return (
|
||||
<Tag>普通用户</Tag>
|
||||
);
|
||||
} else if (role === 'admin') {
|
||||
} else if (text === 'admin') {
|
||||
return (
|
||||
<Tag color="blue">管理用户</Tag>
|
||||
);
|
||||
} else {
|
||||
return role;
|
||||
return text;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ const UserModal = ({title, visible, handleOk, handleCancel, confirmLoading, mode
|
||||
form
|
||||
.validateFields()
|
||||
.then(values => {
|
||||
form.resetFields();
|
||||
// form.resetFields();
|
||||
handleOk(values);
|
||||
})
|
||||
.catch(info => {
|
||||
@ -44,7 +44,7 @@ const UserModal = ({title, visible, handleOk, handleCancel, confirmLoading, mode
|
||||
<Input placeholder="请输入用户昵称"/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item label="用户角色" name='role' rules={[{required: true, message: '请选择用户角色'}]}>
|
||||
<Form.Item label="用户类型" name='type' rules={[{required: true, message: '请选择用户角色'}]}>
|
||||
<Radio.Group >
|
||||
<Radio value={'user'}>普通用户</Radio>
|
||||
<Radio value={'admin'}>管理用户</Radio>
|
||||
|
Reference in New Issue
Block a user