demandDesc.jsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import React from 'react';
  2. import { Modal, Spin } from 'antd';
  3. import DemandForm from '@/adminDemand/demandForm';
  4. import DemandDetaiel from '@/adminDemand/demandDetaiel';
  5. class DemandDesc extends React.Component {
  6. constructor(props) {
  7. super(props);
  8. this.state = {
  9. loading: false,
  10. pictureUrl: [],
  11. showState:false
  12. };
  13. }
  14. handleCancel() {
  15. this.setState({
  16. visible: false,
  17. });
  18. this.props.closeDesc(false, false);
  19. }
  20. handOk() {
  21. this.setState({
  22. visible: false,
  23. });
  24. this.props.closeDesc(false, true);
  25. }
  26. componentWillReceiveProps(nextProps) {
  27. this.state.visible = nextProps.showDesc;
  28. }
  29. render() {
  30. let data = this.props.data || {releaseStatus:0};
  31. return (
  32. <div className="patent-desc">
  33. <Modal
  34. maskClosable={false}
  35. visible={this.state.visible}
  36. onOk={this.handOk.bind(this)}
  37. onCancel={this.handleCancel.bind(this)}
  38. width="1000px"
  39. title='需求详情'
  40. footer=""
  41. className="admin-desc-content"
  42. >
  43. <div>
  44. <div>
  45. <DemandDetaiel
  46. examineState={this.props.examineState}
  47. closeDesc={this.handleCancel.bind(this)}
  48. data={this.props.data}
  49. demandTypeOption={this.props.demandTypeOption}
  50. visible={this.state.visible}
  51. handOk={this.handOk.bind(this)}
  52. />
  53. </div>
  54. </div>
  55. </Modal>
  56. </div>
  57. );
  58. }
  59. }
  60. export default DemandDesc;