From 61d4bef11bb712be61323bef47515436e62292bb Mon Sep 17 00:00:00 2001
From: liuwh <hugeinfo123>
Date: Wed, 27 May 2020 17:45:23 +0800
Subject: [PATCH] 2

---
 SunshineIns/src/page/CriminalExecution.jsx |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/SunshineIns/src/page/CriminalExecution.jsx b/SunshineIns/src/page/CriminalExecution.jsx
index dead32e..0e31241 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();
     }
 
@@ -180,8 +186,24 @@
         }, '*');
     }
 
+    //确认提交按钮
+    handleOk = () => {
+        this.setState({
+            zIndex: '-1',
+            fingerCode: "",
+        })
+    }
+
+    //取消按钮
+    handleCancel = () => {
+        this.setState({
+            fingerCode: "",
+            zIndex: '-1',
+        });
+    }
+
     render() {
-        const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex, display } = this.state;
+        const { data, resetKey, visible, loading, savedate, closeKey, formData, zIndex, display, fingerCode } = this.state;
         return (
             <div className="app-page">
                 <HeadView history={this.props.history} />
@@ -214,7 +236,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%'}
@@ -222,8 +245,8 @@
                 >
                     <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>} />

--
Gitblit v1.8.0