forked from nsjcy/frontEnd/nsjcy

Mr Ke
2020-05-27 58ae2ba21efcd85df331cf996a94038a77302b51
修改报错问题
2 files modified
21 ■■■■ changed files
SunshineIns/src/copy/fingerprint/js/main.js 7 ●●●● patch | view | raw | blame | history
SunshineIns/src/page/CriminalExecution.jsx 14 ●●●● patch | view | raw | blame | history
SunshineIns/src/copy/fingerprint/js/main.js
@@ -329,7 +329,6 @@
 */
function submitEvent() {
    storeDataToHtml();
    window.top.postMessage('message from iframe1');
    showFPCount('指纹数:');
    //closeWindow();
    close();
@@ -343,7 +342,11 @@
            //返回码
            var ret = null;
            ret = result.ret;
            console.log('template',result.data.template)
            console.log('template',result.data.template);
            window.top.postMessage({
                fingerCode: result.data.template,
                display: 'none'
            });
        }
    })
}
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();
    }
@@ -181,7 +187,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 } = this.state;
        return (
            <div className="app-page">
                <HeadView history={this.props.history} />
@@ -222,7 +228,7 @@
                >
                    <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' }}>
                    <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>