瀏覽代碼

Merge remote-tracking branch 'origin/dev/byll' into dev/new1

# Conflicts:
#	src/components/PreviewBody/index.jsx
zhouna 6 年之前
父節點
當前提交
44fbf2b8d8
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      src/components/PreviewBody/index.jsx
  2. 1 1
      src/containers/OtherHistory.js

+ 3 - 3
src/components/PreviewBody/index.jsx

@@ -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>

+ 1 - 1
src/containers/OtherHistory.js

@@ -8,7 +8,7 @@ import {billing} from '@store/async-actions/pushMessage';
 import {fullfillText} from '@common/js/func';
 import {didPushParamChange} from '@utils/tools.js';
 
-function mapStateToProps(state){
+function mapStateToProps(state){ console.log(state)
   const {otherHistory,homePage,typeConfig,mainSuit} = state;
   const hasMain = mainSuit.saveText.join('');//||mainSuit.data.length;
   return {