update user settings ui
This commit is contained in:
parent
1e4d11349c
commit
b4622b3e83
|
@ -127,6 +127,86 @@ class General extends Component {
|
||||||
return (<Table columns={columns} dataSource={data} />);
|
return (<Table columns={columns} dataSource={data} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userSettings() {
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
dataIndex: 'key',
|
||||||
|
key: 'key',
|
||||||
|
render: text => <a>{text}</a>,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '用户名',
|
||||||
|
dataIndex: 'user_name',
|
||||||
|
key: 'user_name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '电子邮件地址',
|
||||||
|
dataIndex: 'email',
|
||||||
|
key: 'email',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '已激活',
|
||||||
|
key: 'enabled',
|
||||||
|
dataIndex: 'enabled',
|
||||||
|
render: text => <Icon type="check-square" />,
|
||||||
|
}, {
|
||||||
|
title: '管理员',
|
||||||
|
key: 'is_admin',
|
||||||
|
dataIndex: 'is_admin',
|
||||||
|
render: (text, record) => {
|
||||||
|
if (record.is_admin){
|
||||||
|
return <Icon type="check-square" />
|
||||||
|
}else{
|
||||||
|
return <Icon type="border" />
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
title: '创建时间',
|
||||||
|
key: 'create_time',
|
||||||
|
dataIndex: 'create_time',
|
||||||
|
},{
|
||||||
|
title: '上次登录',
|
||||||
|
key: 'last_login_time',
|
||||||
|
dataIndex: 'last_login_time',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
key: 'action',
|
||||||
|
render: (text, record) => (
|
||||||
|
<span>
|
||||||
|
<a>修改</a>
|
||||||
|
<Divider type="vertical" />
|
||||||
|
<a>删除</a>
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
key: '1',
|
||||||
|
user_name: 'admin',
|
||||||
|
email: "admin@infini.ltd",
|
||||||
|
enabled: true,
|
||||||
|
is_admin: true,
|
||||||
|
create_time: "Oct 19, 2019",
|
||||||
|
last_login_time: "Mar 01, 2020",
|
||||||
|
|
||||||
|
}, {
|
||||||
|
key: '2',
|
||||||
|
user_name: 'user',
|
||||||
|
email: "user@infini.ltd",
|
||||||
|
enabled: true,
|
||||||
|
is_admin: false,
|
||||||
|
create_time: "Oct 19, 2019",
|
||||||
|
last_login_time: "Mar 01, 2020",
|
||||||
|
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return (<Table columns={columns} dataSource={data} />);
|
||||||
|
}
|
||||||
|
|
||||||
generalSettings = () => {
|
generalSettings = () => {
|
||||||
const {
|
const {
|
||||||
form: {getFieldDecorator},
|
form: {getFieldDecorator},
|
||||||
|
@ -202,7 +282,7 @@ class General extends Component {
|
||||||
tab1: ( < div > {this.generalSettings()} < /div>),
|
tab1: ( < div > {this.generalSettings()} < /div>),
|
||||||
tab2: ( < div > {this.ssoSettings()}< /div>),
|
tab2: ( < div > {this.ssoSettings()}< /div>),
|
||||||
tab3: ( < div > 角色管理 < /div>),
|
tab3: ( < div > 角色管理 < /div>),
|
||||||
tab4: ( < div > 用户管理 < /div>),
|
tab4: ( < div > {this.userSettings()} < /div>),
|
||||||
tab5: ( < div > 证书管理 < /div>),
|
tab5: ( < div > 证书管理 < /div>),
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue