| | |
| | | size: 10, |
| | | }, |
| | | resetKey: Date.now(), |
| | | loading: false |
| | | loading: false, |
| | | zIndex: '-1' |
| | | }; |
| | | } |
| | | |
| | | componentDidMount() { |
| | | document.title = '社会观护管理'; |
| | | window.addEventListener('message', function (e) { |
| | | |
| | | console.log('反馈',e) |
| | | }, false); |
| | | console.log('this', this); |
| | | // this.iframeAddEventListener(); |
| | | this.iframeAddEventListener(); |
| | | } |
| | | |
| | | setFormData = data => { |
| | |
| | | showModal = (id) => { |
| | | this.setState({ |
| | | visible: true, |
| | | zIndex: 1000 |
| | | }); |
| | | this.sendMsg() |
| | | // Fetch.socialCompanyDetail(id) |
| | | // .then(res => { |
| | | // this.setState({ savedate: res }) |
| | |
| | | |
| | | iframeAddEventListener = () => { |
| | | let _this = this; |
| | | this.iframeWin = this.refs.iframe.contentWindow; |
| | | this.iframeWin = this.refs.iframe && this.refs.iframe.contentWindow; |
| | | this.refs.iframe && this.refs.iframe.addEventListener("load", function () { |
| | | //代码能执行到这里说明已经载入成功完毕了 |
| | | //这里是回调函数 |
| | | console.log('menu', window.localStorage.getItem('menu')); |
| | | _this.iframeWin.postMessage({ |
| | | fgData: false |
| | | }, '*'); |
| | | }, false); |
| | | } |
| | | |
| | | sendMsg = () => { |
| | | this.iframeWin = this.refs.iframe && this.refs.iframe.contentWindow; |
| | | this.iframeWin.postMessage({ |
| | | fgData: false |
| | | }, '*'); |
| | | } |
| | | |
| | | render() { |
| | | const { data, resetKey, visible, loading, savedate, closeKey, formData } = this.state; |
| | | const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex } = this.state; |
| | | return ( |
| | | <div className="app-page"> |
| | | <HeadView history={this.props.history} /> |
| | |
| | | ]} /> |
| | | <TableView columns={this.renderColumns()} data={data} pageSize='10' size='default' loading={loading} /> |
| | | </div> |
| | | {/* <div style={{ display: 'block' }}> */} |
| | | {/* <iframe |
| | | style={{ width: '100%', height: '100%' }} |
| | | onLoad={() => { }} |
| | | ref="iframe" |
| | | src='./fingerprint/指纹登记.html' |
| | | width="100%" |
| | | scrolling="no" |
| | | frameBorder="0" |
| | | /> */} |
| | | <Modal |
| | | zIndex={zIndex} |
| | | key={closeKey} |
| | | confirmLoading={loading} |
| | | visible={visible} |
| | | title="公司信息" |
| | | onCancel={() => { this.setState({ visible: false }) }} |
| | | visible={true} |
| | | title="指纹录入" |
| | | onCancel={() => { this.setState({ visible: false, zIndex: '-1', }) }} |
| | | bodyStyle={{ lineHeight: 4 }} |
| | | footer={null} |
| | | width={'80%'} |
| | |
| | | frameBorder="0" |
| | | /> |
| | | </Modal> |
| | | |
| | | {/* </div> */} |
| | | </div> |
| | | ) |