index.jsx 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 OperationContainer from '../../containers/OperationContainer'
  6. import style from './index.less';
  7. import AdviceContainer from '../../containers/AdviceContainer';
  8. import InfoTitle from '@components/InfoTitle'
  9. import ScrollArea from 'react-scrollbar';
  10. import MainSuit from './MainSuit';
  11. import CurrentIll from './CurrentIll';
  12. import PastHistory from './PastHistory'
  13. import PersonalHistory from './PersonalHistory'
  14. import FamilyHistory from './FamilyHistory'
  15. import MarriageHistory from './marriageHistory'
  16. import NewAdvice from '@containers/NewAdvice';
  17. import MenstruationHistory from './MenstruationHistory'
  18. // import OtherHistory from './OtherHistory';
  19. import CheckBody from './CheckBody';
  20. import {getWindowInnerHeight,getWindowInnerWidth,windowEventHandler} from '@utils/tools';
  21. import store from '@store';
  22. class BlockEMRCont extends Component {
  23. constructor(props){
  24. super(props);
  25. this.$cont = React.createRef();
  26. this.$div = React.createRef();
  27. this.setHighter = this.setHighter.bind(this);
  28. }
  29. componentDidMount(){
  30. const height = getWindowInnerHeight() - 175;
  31. const width = getWindowInnerWidth() - 20;
  32. this.$cont.current.style.height = height+"px";
  33. this.$cont.current.style.minWidth = width + "px";
  34. windowEventHandler('resize', ()=>{
  35. const height = getWindowInnerHeight() - 175;
  36. const width = getWindowInnerWidth() - 20;
  37. if(this.$cont.current){
  38. this.$cont.current.style.height = height + "px";
  39. this.$cont.current.style.minWidth = width + "px";
  40. }
  41. });
  42. }
  43. setHighter(ht){
  44. // console.log(this.$div.current.scrollHeight,ht,'-=-=-=-------');
  45. if(this.$div.current){
  46. this.$div.current.style.paddingBottom = ht+'px';
  47. }
  48. }
  49. render() {
  50. const contStyle={
  51. opacity:'0.4',
  52. top:'1px',
  53. right:'0px',
  54. zIndex:'15',
  55. width:'14px',
  56. background:'#f1f1f1'};
  57. const barStyle={background:'#777',width:'100%',marginLeft:'0'};
  58. return <div className={style['EMR-container']}
  59. ref={this.$cont} id="addBlockScrollEvent">
  60. <InfoTitle hideHistory={true}></InfoTitle>
  61. <ScrollArea speed={1}
  62. horizontal={false}
  63. className={style["area"]}
  64. verticalContainerStyle={contStyle}
  65. verticalScrollbarStyle={barStyle}
  66. contentClassName="content">
  67. <div className={style['inner']} id="EmrBlockContainer" ref={this.$div}>
  68. <MainSuit></MainSuit>
  69. <CurrentIll></CurrentIll>
  70. {/* 既往史 */}
  71. <PastHistory></PastHistory>
  72. {/* 个人史 */}
  73. <PersonalHistory></PersonalHistory>
  74. {/* 家族史 */}
  75. <FamilyHistory></FamilyHistory>
  76. {/* 婚育史 */}
  77. <MarriageHistory></MarriageHistory>
  78. {/* 月经史 */}
  79. <MenstruationHistory></MenstruationHistory>
  80. {/* <OtherHistory></OtherHistory> */}
  81. <CheckBody></CheckBody>
  82. {/* 检验 */}
  83. <Inspect setHighter={this.setHighter}></Inspect>
  84. {/* 检查 */}
  85. <AssistCheck setHighter={this.setHighter}></AssistCheck>
  86. {/* 诊断 */}
  87. <Diagnosis setHighter={this.setHighter} hideChronic={true}></Diagnosis>
  88. {/* 医嘱 */}
  89. <NewAdvice setHighter={this.setHighter}></NewAdvice>
  90. {/* <AdviceContainer></AdviceContainer> */}
  91. </div>
  92. </ScrollArea>
  93. <OperationContainer hideLabel={true}></OperationContainer>
  94. </div>
  95. }
  96. }
  97. export default BlockEMRCont;