orgDesc.jsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. <Tabs defaultActiveKey="1" onChange={callback}>
  43. <Tabs.TabPane tab="Tab 1" key="1">Content of Tab Pane 1</Tabs.TabPane>
  44. <Tabs.TabPane tab="Tab 2" key="2">Content of Tab Pane 2</Tabs.TabPane>
  45. </Tabs>
  46. <OrgCertify
  47. visible={this.state.visible}
  48. uid={this.props.data.id}
  49. closeDesc={this.handleCancel}
  50. handleOk={this.handleOk} />
  51. </Modal>
  52. </Spin>
  53. </div>
  54. );
  55. } else {
  56. return <div></div>
  57. }
  58. },
  59. });
  60. export default OrgDesc;