From 57cd6df84e4fb388b159d201f585520c40ba0b26 Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Wed, 27 May 2020 17:45:33 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/nsjcy/frontEnd/nsjcy

---
 SunshineIns/src/page/CriminalExecution.jsx |   54 ++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/SunshineIns/src/page/CriminalExecution.jsx b/SunshineIns/src/page/CriminalExecution.jsx
index d6a946e..222b641 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 })
@@ -186,8 +188,24 @@
         }, '*');
     }
 
+    //确认提交按钮
+    handleOk = () => {
+        this.setState({
+            zIndex: '-1',
+            fingerCode: "",
+        })
+    }
+
+    //取消按钮
+    handleCancel = () => {
+        this.setState({
+            fingerCode: "",
+            zIndex: '-1',
+        });
+    }
+
     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} />
@@ -220,7 +238,8 @@
                     confirmLoading={loading}
                     visible={true}
                     title="指纹录入"
-                    onCancel={() => { this.setState({ visible: false, zIndex: '-1', }) }}
+                    onOk={this.handleOk}
+                    onCancel={this.handleCancel}
                     bodyStyle={{ lineHeight: 4 }}
                     // footer={null}
                     width={'60%'}
@@ -229,20 +248,23 @@
                     <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
-                        style={{ width: '100%', height: '550px', display: display }}
-                        onLoad={() => { }}
-                        ref="iframe"
-                        src='./fingerprint/指纹登记.html'
-                        width="100%"
-                        scrolling="no"
-                        frameBorder="0"
-                    />
+                    <div style={{ display: display }}>
+                        <Divider style={{ margin: '2px 0' }} />
+                        <iframe
+                            key={iframeKey}
+                            style={{ width: '100%', height: '550px' }}
+                            onLoad={() => { }}
+                            ref="iframe"
+                            src='./fingerprint/指纹登记.html'
+                            width="100%"
+                            scrolling="no"
+                            frameBorder="0"
+                        />
+                    </div>
                 </Modal>
 
                 {/* </div> */}

--
Gitblit v1.8.0