index.jsx 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. import style from "../index.less";
  2. import { normalVal,getStatusImg } from '@utils/tools';
  3. const PreviewInspect = (props) => {
  4. const { dataJson, toTime ,dateTime,showDetails } = props;
  5. // console.log(dateTime,'dateTime');
  6. return <tr className={style['patInfoFst']}>
  7. <td className={style['patInfoSec']}>检验:</td>
  8. <td className={style['patInfoSec']}>
  9. <table className={style.assistTable}>
  10. {
  11. (dataJson.labelListSmall.length !== 0 || dataJson.labelListBig.length !== 0) && ( <span style={{ lineHeight: '36px' }}>检验结果数据</span>)
  12. }
  13. {
  14. dataJson && dataJson.labelListSmall && dataJson.labelListSmall.map((item) => {
  15. // console.log(item, item,'=====');
  16. return (
  17. <tr className={style.assistTableTrSec}>
  18. <td className={style.assistTableTdFst}>{item.detailName}</td>
  19. <td className={style.assistTableTdSec}>
  20. {/* {getStatusImg(value.type, value.value, 1)}
  21. {value.unit} */}
  22. {getStatusImg(0, item.value, 1)}
  23. {item.units}
  24. {/* {getStatusImg(2, 9.8, 1)}
  25. {'mmol/L'} */}
  26. </td>
  27. {/* {showDetails(item)} */}
  28. <td className={style.assistTableTdTrd}>
  29. {normalVal(item.minValue, item.maxValue)}
  30. {/* {normalVal(3.9, 6.1)} */}
  31. </td>
  32. {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
  33. {/* <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : item.time}</td> */}
  34. <td className={style.assistTableTdFor}>{item.time }</td>
  35. </tr>
  36. // </table>
  37. )
  38. })
  39. }
  40. {
  41. dataJson && dataJson.labelListBig && dataJson.labelListBig.map((item) => {
  42. return (
  43. // <table style={style.assistTable}>
  44. <tr className={style.assistTableTrSec}>
  45. <td className={style.assistTableTdFst}>{item.name}</td>
  46. <td className={style.assistTableTdSec}></td>
  47. <td className={style.assistTableTdTrd}></td>
  48. {/* <td className={style.assistTableTdFor}>{item.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(item.time) */}
  49. {/* <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time) */}
  50. <td className={style.assistTableTdFor}>{item.time == '' ? dateTime : toTime(item.time)}</td>
  51. </tr>
  52. // </table>
  53. )
  54. })
  55. }
  56. </table>
  57. {/* {
  58. dataJson&&dataJson.getExcelDataList && dataJson.getExcelDataList.map((items) => {
  59. return items.lisExcelRes && items.lisExcelRes.map((item) => {
  60. return <table style={style.assistTable}>
  61. <tr style={style.assistTableTrFst}><td><span>{item.menus}</span></td></tr>
  62. {
  63. item.lisExcelItem && item.lisExcelItem.map((value) => {
  64. return <tr className={style.assistTableTrSec}>
  65. <td className={style.assistTableTdFst}>{value.itemName}</td>
  66. <td className={style.assistTableTdSec}>
  67. {getStatusImg(value.type,value.value,1)}
  68. {value.unit}
  69. </td>
  70. <td className={style.assistTableTdTrd}>
  71. {normalVal(value.min, value.max)}
  72. </td>
  73. <td className={style.assistTableTdFor}>{value.time == '' ? ('导入时间:' + dateTime) : '检验时间:' + toTime(value.time)
  74. }</td>
  75. </tr>
  76. })
  77. }
  78. </table>
  79. })
  80. })
  81. } */}
  82. {/* {
  83. dataJson&&dataJson.labelList && dataJson.labelList.map((item, idx) => {
  84. return <table style={{ margin: '8px 0', width: '100%' }}>
  85. {
  86. item.show?<tr className={style.assistTableTrFst}>
  87. <td colSpan='4'>
  88. <span> {item.name} </span>
  89. <p style={{display:item.inpValue?'inline-block':'none'}}>
  90. ({item.inpValue})
  91. <i></i>
  92. </p>
  93. </td>
  94. </tr>:
  95. <tr className={style.assistTableTrFstExcel}><td><span>「{item.name}」</span></td></tr>
  96. }
  97. {
  98. item.details.map((val) => {
  99. if (val.value && val.value != '') {
  100. return <tr className={style.assistTableTrSecExcel}>
  101. <td className={style.assistTableTdFst}>{val.name}</td>
  102. {showDetails(val)}
  103. <td className={style.assistTableTdTrd}>
  104. {normalVal(val.minValue, val.maxValue)}
  105. </td>
  106. <td className={style.assistTableTdFor}>{'检验时间:' + item.time}</td>
  107. </tr>
  108. }
  109. })
  110. }
  111. </table>
  112. })
  113. } */}
  114. </td>
  115. </tr>
  116. }
  117. export default PreviewInspect;