orgDesc.jsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. <OrgCertify
  37. visible={this.state.visible}
  38. uid={this.props.data.id}
  39. closeDesc={this.handleCancel} />
  40. </Modal>
  41. </Spin>
  42. </div>
  43. );
  44. } else {
  45. return <div></div>
  46. }
  47. },
  48. });
  49. export default OrgDesc;