index.jsx 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. import React, { Component } from "react";
  2. import style from "./index.less";
  3. class PatInfo extends Component {
  4. constructor(props){
  5. super(props)
  6. }
  7. componentWillMount() {
  8. const { getMessage } = this.props;
  9. getMessage && getMessage()
  10. }
  11. render(){
  12. const {message} = this.props.patInfo;
  13. const {sizeFlag} = this.props;
  14. return <table className={sizeFlag?`${style["table"]} ${style["newSize"]}`:style["table"]}>
  15. <tr>
  16. <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`}>卡号:{message.patientIdNo && message.patientIdNo}</td>
  17. <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={sizeFlag&&message.patientName&&message.patientName.length>3?message.patientName:''}>姓名:{sizeFlag&&message.patientName && message.patientName.length>3?message.patientName.slice(0,3)+'...':message.patientName}</td>
  18. <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`}>年龄:{message.patientAge && message.patientAge}</td>
  19. <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`}>性别:{message.patientSex && message.patientSex}</td>
  20. </tr>
  21. <tr>
  22. <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
  23. <td key='6' className={`${style.tdBorderR}`}>科室:{message.hospitalDeptName && message.hospitalDeptName}</td>
  24. <td key='7' className={`${style.tdBorderR}`} title={sizeFlag&&message.doctorName&&message.doctorName.length>3?message.doctorName:''}>医生:{sizeFlag&&message.doctorName && message.doctorName.length>3?message.doctorName.slice(0,3)+'...':message.doctorName}</td>
  25. <td key='8' className={`${style.tdBorderR}`}>门诊号:{message.recordId && message.recordId}</td>
  26. </tr>
  27. </table>;
  28. }
  29. }
  30. export default PatInfo;