index.jsx 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import React from "react";
  2. import style from "../index.less";
  3. import check_circle from '../img/check-circle.png';
  4. import check_right from '../img/check-right.png';
  5. class WrapModalTableSon extends React.Component {
  6. constructor(props) {
  7. super(props)
  8. this.getImgPath = this.getImgPath.bind(this)
  9. }
  10. getImgPath(name,checkItem,item,idx){
  11. const { checkedList,selectOneCheck } = this.props;
  12. let num = 0;
  13. for(let k = 0;k < checkedList.length;k++){
  14. let tmpLis = checkedList[k];
  15. if(tmpLis == name){
  16. return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item,idx)} src={check_right} alt="" />
  17. }else{
  18. ++num
  19. }
  20. }
  21. if(num == checkedList.length){
  22. return <img className={style.check} onClick={()=>selectOneCheck(name,checkItem,item,idx)} src={check_circle} alt="" />
  23. }
  24. }
  25. render() {
  26. const { hospitalSonInspect,allCheckImport,allCheck } = this.props;
  27. return <div className={style['modalTable']}>
  28. <div className={style.sonTitle}>
  29. <span>组名称 : {hospitalSonInspect.checkItem}</span>
  30. </div>
  31. <div className={`${style.SonTable}`}>
  32. <table>
  33. <tr className={style.head}>
  34. <td className={`${style.fst}`} onClick={allCheckImport}><img className={style.check} src={allCheck?check_right:check_circle} alt="" />全选</td>
  35. <td className={`${style.sec}`}>检查项目</td>
  36. <td className={`${style.trd}`}>影像所见</td>
  37. <td className={`${style.four}`}>影像诊断</td>
  38. <td className={`${style.sev}`} style={{display:(hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.length)>5?'':'none'}}></td>
  39. </tr>
  40. </table>
  41. </div>
  42. <div className={`${style.parentTables} ${style.SonTable}`}>
  43. <table>
  44. {/* {type-0正常1异常2上升3下降} */}
  45. {
  46. hospitalSonInspect && hospitalSonInspect.pacsResultDTO && hospitalSonInspect.pacsResultDTO.map((item, idx) => {
  47. return <tr>
  48. <td className={`${style.fst}`}>
  49. {
  50. this.getImgPath(item.checkItem,hospitalSonInspect.checkItem,item,idx)
  51. }
  52. </td>
  53. <td title={item.checkItem} className={`${style.sec}`}>{item.checkItem}</td>
  54. <td title={item.imagingDiagnose} className={`${style.trd}`}>{item.imagingDiagnose}</td>
  55. <td title={item.imagingResults} className={`${style.four}`}>{item.imagingResults}</td>
  56. </tr>
  57. })
  58. }
  59. </table>
  60. </div>
  61. </div>
  62. }
  63. }
  64. export default WrapModalTableSon;