index.jsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. return <tr className={style['patInfoFst']}>
  6. <td className={style['patInfoSec']}>化验:</td>
  7. <td className={style['patInfoSec']}>
  8. {
  9. dataJson.lis.getExcelDataList && dataJson.lis.getExcelDataList.map((items) => {
  10. return items.lisExcelRes && items.lisExcelRes.map((item) => {
  11. return <table style={style.assistTable}>
  12. <tr style={style.assistTableTrFst}><td><span>{item.menus}</span></td></tr>
  13. {
  14. item.lisExcelItem && item.lisExcelItem.map((value) => {
  15. return <tr className={style.assistTableTrSec}>
  16. <td className={style.assistTableTdFst}>{value.itemName}</td>
  17. <td className={style.assistTableTdSec}>
  18. {getStatusImg(value.type,value.value,1)}
  19. {value.unit}
  20. </td>
  21. <td className={style.assistTableTdTrd}>
  22. {normalVal(value.min, value.max)}
  23. </td>
  24. <td className={style.assistTableTdFor}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + toTime(value.time)
  25. }</td>
  26. </tr>
  27. })
  28. }
  29. </table>
  30. })
  31. })
  32. }
  33. {
  34. dataJson.lis.labelList && dataJson.lis.labelList.map((item, idx) => {
  35. return <table style={{ margin: '8px 0', width: '100%' }}>
  36. {
  37. item.show?<tr className={style.assistTableTrFst}><td><span> {item.name} </span></td></tr>:
  38. <tr className={style.assistTableTrFstExcel}><td><span>「{item.name}」</span></td></tr>
  39. }
  40. {
  41. item.details.map((val) => {
  42. if (val.value && val.value != '') {
  43. return <tr className={style.assistTableTrSecExcel}>
  44. <td className={style.assistTableTdFst}>{val.name}</td>
  45. {showDetails(val)}
  46. <td className={style.assistTableTdTrd}>
  47. {normalVal(val.minValue, val.maxValue)}
  48. </td>
  49. <td className={style.assistTableTdFor}>{'化验时间:' + item.time}</td>
  50. </tr>
  51. }
  52. })
  53. }
  54. </table>
  55. })
  56. }
  57. </td>
  58. </tr>
  59. }
  60. export default PreviewInspect;