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.historyTemplates.HospitalInfo.name const noData = JSON.stringify(preInfo) == '{}'; return
姓名:{baseObj ? baseObj.patName : noData ? '' : preInfo.patientName} | 门诊号:{baseObj ? baseObj.inquiryCode : (noData ? '' : preInfo.recordId)} |
年龄:{baseObj ? baseObj.age : noData ? '' : preInfo.patientAge} | 医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)} |
性别:{baseObj.sex === 0 ? '女' : '男'} | 科室:{baseObj ? baseObj.deptName : (noData ? '' : preInfo.hospitalDeptName)} |
卡号:{baseObj ? baseObj.cardNo : noData ? '' : preInfo.patientIdNo} | 就诊时间:{baseObj ? baseObj.inquiryDate : (noData ? '' : preInfo.systemTime.split(' ')[0])} |