/*
 * Creator:     ML
 * CreatDate:   2019-12-01
 * descripts：  检查报告 弹第三方
 * */
import React from 'react';
import { Modal,  } from 'antd';
import { $http } from 'containers/config/https';
  class ViewInsReportTarget extends React.Component {
    constructor(props) {
      super(props)
      this.state = {
      
      }
    }
    componentDidMount() {
      this.props.Onres(this);
    }
    componentWillUnmount() {
    }
    //点击弹窗确认按钮
    handleOk = (e) => {
      setTimeout(() => {
        this.setState({ loading: false, visible: false });
      }, 300);
    }
    //展示弹窗
    showModals = (url) => {
      this.setState({
        visible: true,
        url,
      });
    }
    //关闭弹窗
    handleCancel = () => {
      this.setState({
        visible: false,
      })
    }
    render() {
      const { url } = this.state
      return (
        <div
        >
          <Modal
            width='1250px'
            // height="659"
            visible={this.state.visible}
            title="检查报告"
            onOk={this.handleOk}
            onCancel={this.handleCancel}
            pagination='false'
            footer={null}
          >
            <iframe
                        style={{ width: '100%', height: "69vh", overflow: 'auto' }}
                        // onLoad={() => {
                        //     const obj = ReactDOM.findDOMNode(this);
                        //     this.setState({
                        //         "iFrameHeight":  obj.contentWindow.document.body.scrollHeight + 'px'
                        //     });
                        // }} 
                        ref="iframe"
                        src={url}
                        width="100%"
                        height="69vh"
                        scrolling="no "
                        frameBorder="0"
                    />
          </Modal>
        </div>
      )
    }
  }
export default ViewInsReportTarget    