orgDesc.jsx 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. handleOk(e) {
  24. this.setState({
  25. visible: false,
  26. });
  27. this.props.closeDesc(false,true);
  28. },
  29. componentWillReceiveProps(nextProps) {
  30. this.state.visible = nextProps.showDesc;
  31. },
  32. render() {
  33. if (this.props.data) {
  34. return (
  35. <div className="patent-desc">
  36. <Spin spinning={this.state.loading} className='spin-box'>
  37. <Modal title="用户详情" visible={this.state.visible}
  38. onCancel={this.handleCancel}
  39. width='600px'
  40. footer=''
  41. className="admin-desc-content">
  42. <OrgCertify
  43. visible={this.state.visible}
  44. uid={this.props.data.id}
  45. closeDesc={this.handleCancel}
  46. handleOk={this.handleOk} />
  47. </Modal>
  48. </Spin>
  49. </div>
  50. );
  51. } else {
  52. return <div></div>
  53. }
  54. },
  55. });
  56. export default OrgDesc;