orgDesc.jsx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import React from 'react';
  2. import { Icon, Modal, message, Spin, Button,Tabs } from 'antd';
  3. import './userList.less';
  4. import OrgCertify from './orgCertify.jsx';
  5. const OrgDesc = React.createClass({
  6. getInitialState() {
  7. return {
  8. visible: false,
  9. loading: false
  10. };
  11. },
  12. showModal() {
  13. this.setState({
  14. visible: true,
  15. });
  16. },
  17. handleCancel(e) {
  18. this.setState({
  19. visible: false,
  20. });
  21. this.props.closeDesc(false);
  22. },
  23. componentWillReceiveProps(nextProps) {
  24. this.state.visible = nextProps.showDesc;
  25. },
  26. render() {
  27. if (this.props.data) {
  28. return (
  29. <div className="patent-desc">
  30. <Spin spinning={this.state.loading} className='spin-box'>
  31. <Modal title="用户详情" visible={this.state.visible}
  32. onCancel={this.handleCancel}
  33. width='800px'
  34. footer={[]}
  35. className="admin-desc-content">
  36. <Tabs defaultActiveKey="1">
  37. <Tabs.TabPane tab="认证资料" key="1">
  38. <OrgCertify uid={this.props.data.id} closeDesc={this.handleCancel} />
  39. </Tabs.TabPane>
  40. <Tabs.TabPane tab="Tab 2" key="2">Content of Tab Pane 2</Tabs.TabPane>
  41. <Tabs.TabPane tab="Tab 3" key="3">Content of Tab Pane 3</Tabs.TabPane>
  42. </Tabs>
  43. </Modal>
  44. </Spin>
  45. </div>
  46. );
  47. } else {
  48. return <div></div>
  49. }
  50. },
  51. });
  52. export default OrgDesc;