|
@@ -16,7 +16,7 @@ class PreviewBody extends Component {
|
|
|
this.getCurrentDate();
|
|
|
}
|
|
|
componentWillReceiveProps(){
|
|
|
- // this.$content.current.scrollTo(0,0)
|
|
|
+ $(this.$content.current)[0].scrollIntoView(true);
|
|
|
}
|
|
|
getCurrentDate(){
|
|
|
let myDate = new Date();
|
|
@@ -55,8 +55,8 @@ class PreviewBody extends Component {
|
|
|
render() {
|
|
|
const { show, preInfo, dataJson, dataStr,baseObj } = this.props;
|
|
|
|
|
|
- return <div className={style['content']} ref={this.$content}>
|
|
|
- <div style={{ clear: 'both', fontSize: '24px', margin: '0px 0px 30px 0px',textAlign:'center' }}>{preInfo.hospitalName}</div>
|
|
|
+ return <div className={style['content']}>
|
|
|
+ <div ref={this.$content} style={{ clear: 'both', fontSize: '24px', margin: '0px 0px 30px 0px',textAlign:'center' }}>{preInfo.hospitalName}</div>
|
|
|
<table className={style['patInfo']} style={{ margin: '0px 15px 30px 0px', borderCollapse: 'collapse', width: "100%",fontSize:'12px' }}>
|
|
|
<tr>
|
|
|
<td style={{ border: '1px solid #aaa', padding: '8px 10px', width: '25%' }}>卡号:{baseObj?baseObj.patientIdNo:JSON.stringify(preInfo) == '{}'?'':preInfo.patientIdNo}</td>
|