import React, { Component } from "react"; import style from "./index.less"; import store from "@store"; import $ from "jquery"; class Information extends Component { constructor(props) { super(props) this.$content = React.createRef(); } componentWillReceiveProps() { $(this.$content.current)[0].scrollIntoView(true); } render() { const { baseObj } = this.props; let baseData = store.getState() let preInfo = baseData.patInfo.message; const noData = JSON.stringify(preInfo) == '{}'; return
姓名:{baseObj ? baseObj.patientName : noData ? '' : preInfo.patientName} | 门诊号:{baseObj ? baseObj.inquiryCode : (noData ? '' : preInfo.recordId)} |
年龄:{baseObj ? baseObj.patientAge : noData ? '' : preInfo.patientAge} | 医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)} |
性别:{baseObj ? baseObj.patientSex : noData ? '' : preInfo.patientSex} | 科室:{baseObj ? baseObj.hospitalDeptName : (noData ? '' : preInfo.hospitalDeptName)} |
卡号:{baseObj ? baseObj.patientIdNo : noData ? '' : preInfo.patientIdNo} | 就诊时间:{baseObj ? baseObj.inquiryDate : (noData ? '' : preInfo.systemTime.split(' ')[0])} |