import React, { PureComponent } from 'react'; import { Form, Card, Button, Row, Col } from 'antd'; import router from 'umi/router'; import { connect } from 'dva'; import Panel from '../../../components/Panel'; import { USER_DETAIL } from '../../../actions/user'; import styles from '../../../layouts/Sword.less'; import { tenantMode } from '../../../defaultSettings'; const FormItem = Form.Item; @connect(({ user }) => ({ user, })) @Form.create() class UserView extends PureComponent { componentWillMount() { const { dispatch, match: { params: { id }, }, } = this.props; dispatch(USER_DETAIL(id)); } handleEdit = () => { const { match: { params: { id }, }, } = this.props; router.push(`/system/user/edit/${id}`); }; render() { const { user: { detail }, } = this.props; const formItemLayout = { labelCol: { span: 8, }, wrapperCol: { span: 16, }, }; const formAllItemLayout = { labelCol: { span: 4, }, wrapperCol: { span: 20, }, }; const action = ( ); return (
{detail.account} {tenantMode ? ( {detail.tenantCode} ) : null} {detail.name} {detail.realName} {detail.roleName} {detail.deptName} {detail.phone} {detail.email} {detail.sexName} {detail.birthday}
); } } export default UserView;