import React from "react";
import style from "../index.less";
import {getStatusImg} from "@utils/tools";

const WrapModalRight = (props) => {
  const {selectGroupList,height,showInIcss} = props;
  return <div className={style['modalRight']}>
    <div className={`${style.modalRightT} clearfix`}>
      <span className={style.tip}>已选检验项</span>
      <span className={style.btnS} onClick={showInIcss}>确认选择</span>
    </div>
    <div className={style.modalRightB} style={{height:(height-106)+'px'}}>
      {
        selectGroupList&&selectGroupList.map((part)=>{
          return <div className={style['modalRightPart']}>
            <div className={style.title}>{part.groupName}</div>
            <ul className={style.partLis}>
              {part.lisExcelWrapper&&part.lisExcelWrapper.map((item)=>{
                return <li>
                  <p className={style.itemName}>{item.itemName}</p>
                  <p>
                    {
                      getStatusImg(item.type,item.value,1)
                    } 
                    <span style={{color: '#5D5D5D'}}>{item.unit} ( {item.min}-{item.max} )</span>
                  </p>
                </li>
              })}
            </ul>
        </div>
        })
      }
    </div>
  </div>
}

export default WrapModalRight;
