From 942cb64adf9f3f8113549ffc9f64e6861d556064 Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Wed, 27 May 2020 17:41:57 +0800 Subject: [PATCH] 加入iframeKey值 --- SunshineIns/src/page/CriminalExecution.jsx | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SunshineIns/src/page/CriminalExecution.jsx b/SunshineIns/src/page/CriminalExecution.jsx index d6a946e..560de49 100644 --- a/SunshineIns/src/page/CriminalExecution.jsx +++ b/SunshineIns/src/page/CriminalExecution.jsx @@ -77,7 +77,7 @@ let _this = this; window.addEventListener('message', function (e) { console.log('反馈', e) - if(e.data) { + if (e.data) { _this.setState({ ...e.data }) @@ -113,9 +113,11 @@ showModal = (id) => { this.setState({ visible: true, - zIndex: 1000 + zIndex: 1000, + iframeKey: id, + display: 'none' }); - this.sendMsg() + this.sendMsg(); // Fetch.socialCompanyDetail(id) // .then(res => { // this.setState({ savedate: res }) @@ -187,7 +189,7 @@ } render() { - const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex, display, fingerCode } = this.state; + const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex, display, fingerCode, iframeKey } = this.state; return ( <div className="app-page"> <HeadView history={this.props.history} /> @@ -229,12 +231,13 @@ <Input addonBefore="姓名" name='name' onChange={this.saveInputChange} value={savedate.name || ''} /> <Input addonBefore="牢房号" name='lnumber' onChange={this.saveInputChange} value={savedate.lnumber || ''} /> <Input addonBefore="指纹唯一标识" name='fingerCode' onChange={this.saveInputChange} value={fingerCode || ''} addonAfter={<Row type="flex" style={{ flexWrap: 'nowrap' }}> - <Col style={{ cursor: 'pointer' }} onClick={() => this.setState({ display: 'block'})}> + <Col style={{ cursor: 'pointer' }} onClick={() => this.setState({ display: 'block' })}> 录入指纹 </Col> </Row>} /> <Divider style={{ margin: '2px 0' }} /> <iframe + key={iframeKey} style={{ width: '100%', height: '550px', display: display }} onLoad={() => { }} ref="iframe" -- Gitblit v1.8.0