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 { ROLE_DETAIL } from '../../../actions/role';
import styles from '../../../layouts/Sword.less';
const FormItem = Form.Item;
@connect(({ role }) => ({
role,
}))
@Form.create()
class RoleView extends PureComponent {
componentWillMount() {
const {
dispatch,
match: {
params: { id },
},
} = this.props;
dispatch(ROLE_DETAIL(id));
}
handleEdit = () => {
const {
match: {
params: { id },
},
} = this.props;
router.push(`/authority/role/edit/${id}`);
};
render() {
const {
role: { detail },
} = this.props;
const formItemLayout = {
labelCol: {
span: 8,
},
wrapperCol: {
span: 16,
},
};
const formAllItemLayout = {
labelCol: {
span: 4,
},
wrapperCol: {
span: 20,
},
};
const action = (
);
return (
);
}
}
export default RoleView;