index.jsx 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. import React, { Component } from 'react';
  2. import Diagnosis from '@containers/Diagnosis';
  3. import Inspect from '@containers/Inspect';
  4. import AssistCheck from '@containers/AssistCheck';
  5. import Guage from '@containers/Guage';
  6. import OperationContainer from '../../containers/OperationContainer'
  7. import style from './index.less';
  8. import AdviceContainer from '../../containers/AdviceContainer';
  9. import InfoTitle from '@components/InfoTitle'
  10. import ScrollArea from 'react-scrollbar';
  11. import MainSuit from './MainSuit';
  12. import CurrentIll from './CurrentIll';
  13. import PastHistory from './PastHistory'
  14. import PersonalHistory from './PersonalHistory'
  15. import FamilyHistory from './FamilyHistory'
  16. import MarriageHistory from './marriageHistory'
  17. import NewAdvice from '@containers/NewAdvice';
  18. import PushDataContainer from '@containers/PushDataContainer'
  19. import MenstruationHistory from './MenstruationHistory'
  20. // import OtherHistory from './OtherHistory';
  21. import CheckBody from './CheckBody';
  22. import {getWindowInnerHeight,getWindowInnerWidth,windowEventHandler} from '@utils/tools';
  23. import store from '@store';
  24. class BlockEMRCont extends Component {
  25. constructor(props){
  26. super(props);
  27. this.state = {
  28. isShowSexInput : true,
  29. historyId : -1
  30. }
  31. this.$cont = React.createRef();
  32. this.$div = React.createRef();
  33. this.setHighter = this.setHighter.bind(this);
  34. }
  35. componentDidMount(){
  36. setTimeout(() => {
  37. // document.body.scrollIntoView()
  38. document.body.scrollTop = document.documentElement.scrollTop = 0
  39. }, 300);
  40. // const height = getWindowInnerHeight() - 175;
  41. // const width = getWindowInnerWidth() - 20;
  42. // this.$cont.current.style.height = height+"px";
  43. // this.$cont.current.style.minWidth = width + "px";
  44. // windowEventHandler('resize', ()=>{
  45. // const height = getWindowInnerHeight() - 175;
  46. // const width = getWindowInnerWidth() - 20;
  47. // if(this.$cont.current){
  48. // this.$cont.current.style.height = height + "px";
  49. // this.$cont.current.style.minWidth = width + "px";
  50. // }
  51. // });
  52. }
  53. // componentWillReceiveProps(nextProps) {
  54. // console.log(nextProps,'nextProps');
  55. // if (nextProps.historyId !== this.state.historyId){
  56. // this.setState({
  57. // historyId : nextProps.historyId
  58. // })
  59. // }
  60. // }
  61. setHighter(ht){
  62. // console.log(ht, '-=-=-ht=-------');
  63. // console.log(this.$div.current.scrollHeight,'-=-this.$div.current.scrollHeight=-=-------');
  64. if (this.$div.current) {
  65. this.$div.current.style.paddingBottom = ht + 'px';
  66. }
  67. // 低分辨率屏幕 处理 高度,暂时定为检验 + 48px 检查 +96px,可解决bug但是需要后期优化 2020/08/21
  68. // if (this.$div.current && ht === 48){
  69. // this.$div.current.style.paddingBottom = ht+'px';
  70. // }
  71. // if (this.$div.current && ht === 96) {
  72. // this.$div.current.style.paddingBottom = ht + 'px';
  73. // }
  74. }
  75. render() {
  76. const { isShowSexInput} = this.state
  77. const contStyle={
  78. opacity:'0.4',
  79. top:'1px',
  80. right:'0px',
  81. zIndex:'15',
  82. width:'14px',
  83. background:'#f1f1f1'};
  84. const barStyle={background:'#777',width:'100%',marginLeft:'0'};
  85. return <div className={style['EMR-container']}
  86. ref={this.$cont} id="addBlockScrollEvent">
  87. <InfoTitle hideHistory={true}></InfoTitle>
  88. {/* <ScrollArea speed={1}
  89. horizontal={false}
  90. className={style["area"]}
  91. verticalContainerStyle={contStyle}
  92. verticalScrollbarStyle={barStyle}
  93. contentClassName="content"> */}
  94. <div className={style['inner']} id="EmrBlockContainer" ref={this.$div}>
  95. <MainSuit></MainSuit>
  96. <CurrentIll></CurrentIll>
  97. {/* 既往史 */}
  98. <PastHistory></PastHistory>
  99. {/* 个人史 */}
  100. <PersonalHistory></PersonalHistory>
  101. {/* 家族史 */}
  102. <FamilyHistory></FamilyHistory>
  103. {/* 婚育史 */}
  104. <MarriageHistory></MarriageHistory>
  105. {/* 月经史 */}
  106. {isShowSexInput && <MenstruationHistory></MenstruationHistory>}
  107. {/* <OtherHistory></OtherHistory> */}
  108. <CheckBody setHighter={this.setHighter}></CheckBody>
  109. {/* 检验 */}
  110. <Inspect setHighter={this.setHighter}></Inspect>
  111. {/* 检查 */}
  112. <AssistCheck setHighter={this.setHighter}></AssistCheck>
  113. {/* 量表 */}
  114. <Guage setHighter={this.setHighter}></Guage>
  115. {/* 诊断 */}
  116. <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
  117. {/* 诊断 */}
  118. <Diagnosis setHighter={this.setHighter} isTcm={true} hideChronic={true}></Diagnosis>
  119. {/* 医嘱 */}
  120. <NewAdvice setHighter={this.setHighter}></NewAdvice>
  121. {/* <AdviceContainer></AdviceContainer> */}
  122. </div>
  123. {/* </ScrollArea> */}
  124. <PushDataContainer></PushDataContainer>
  125. <OperationContainer hideLabel={true}></OperationContainer>
  126. </div>
  127. }
  128. }
  129. export default BlockEMRCont;