1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import React from 'react';
- import { Icon, Modal, message, Spin, Button, Tabs } from 'antd';
- import './userList.less';
- import OrgCertify from './orgCertify.jsx';
- const OrgDesc = React.createClass({
- getInitialState() {
- return {
- visible: false,
- loading: false
- };
- },
- showModal() {
- this.setState({
- visible: true,
- });
- },
- handleCancel(e) {
- this.setState({
- visible: false,
- });
- this.props.closeDesc(false);
- },
- handleOk(e) {
- this.setState({
- visible: false,
- });
- this.props.closeDesc(false, true);
- },
- componentWillReceiveProps(nextProps) {
- this.state.visible = nextProps.showDesc;
- },
- render() {
- if (this.props.data) {
- return (
- <div className="patent-desc">
- <Spin spinning={this.state.loading} className='spin-box'>
- <Modal title="用户详情" visible={this.state.visible}
- onCancel={this.handleCancel}
- width='600px'
- footer=''
- className="admin-desc-content">
- <Tabs defaultActiveKey="1" onChange={callback}>
- <Tabs.TabPane tab="Tab 1" key="1">Content of Tab Pane 1</Tabs.TabPane>
- <Tabs.TabPane tab="Tab 2" key="2">Content of Tab Pane 2</Tabs.TabPane>
- </Tabs>
- <OrgCertify
- visible={this.state.visible}
- uid={this.props.data.id}
- closeDesc={this.handleCancel}
- handleOk={this.handleOk} />
- </Modal>
- </Spin>
- </div>
- );
- } else {
- return <div></div>
- }
- },
- });
- export default OrgDesc;
|