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 | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/SunshineIns/src/page/CriminalExecution.jsx b/SunshineIns/src/page/CriminalExecution.jsx
index dead32e..560de49 100644
--- a/SunshineIns/src/page/CriminalExecution.jsx
+++ b/SunshineIns/src/page/CriminalExecution.jsx
@@ -67,16 +67,22 @@
loading: false,
zIndex: '-1',
savedate: {},
- display: 'none'
+ display: 'none',
+ fingerCode: ''
};
}
componentDidMount() {
document.title = '社会观护管理';
+ let _this = this;
window.addEventListener('message', function (e) {
console.log('反馈', e)
+ if (e.data) {
+ _this.setState({
+ ...e.data
+ })
+ }
}, false);
- console.log('this', this);
this.iframeAddEventListener();
}
@@ -107,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 })
@@ -181,7 +189,7 @@
}
render() {
- const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex, display } = 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} />
@@ -222,13 +230,14 @@
>
<Input addonBefore="姓名" name='name' onChange={this.saveInputChange} value={savedate.name || ''} />
<Input addonBefore="牢房号" name='lnumber' onChange={this.saveInputChange} value={savedate.lnumber || ''} />
- <Input addonBefore="指纹唯一标识" name='bianshi' onChange={this.saveInputChange} value={savedate.bianshi || ''} addonAfter={<Row type="flex" style={{ flexWrap: 'nowrap' }}>
- <Col style={{ cursor: 'pointer' }} onClick={() => this.setState({ display: 'block'})}>
+ <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>
</Row>} />
<Divider style={{ margin: '2px 0' }} />
<iframe
+ key={iframeKey}
style={{ width: '100%', height: '550px', display: display }}
onLoad={() => { }}
ref="iframe"
--
Gitblit v1.8.0