|
@@ -352,21 +352,31 @@ class ChronicInfo extends React.Component{
|
|
|
hasEnterImg: false
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ getCritical(v) {
|
|
|
+ let hasCritical = false;
|
|
|
+ if(v.details) {
|
|
|
+ for (let i = 0; i < v.details.length; i++) {
|
|
|
+ if(v.details[i].type == 4) {
|
|
|
+ hasCritical = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return hasCritical
|
|
|
+ }
|
|
|
getDetail(){
|
|
|
const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
|
|
|
const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
|
|
|
let list = data&&data.map((v,i)=>{
|
|
|
return <div className={style["list"]}>
|
|
|
{v.name?<p>
|
|
|
- <span>患者可能有</span>
|
|
|
+ {this.getCritical(v) ? '':<span>患者可能有</span>}
|
|
|
<span
|
|
|
- className={style['dis-name']}
|
|
|
+ className={this.getCritical(v)?style['dis-name-no-line']: style['dis-name']}
|
|
|
onMouseEnter={this.handleMouseEnterDrug.bind(this, i)}
|
|
|
onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
|
>
|
|
|
{v.name}
|
|
|
- {<img className={style['info-img']}
|
|
|
+ {this.getCritical(v)?'':<img className={style['info-img']}
|
|
|
style ={currentIndex === i ? {display: "inline-block"} : {display: "none"}}
|
|
|
src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
|
|
|
onMouseEnter={this.handleMouseEnterImg.bind(this)}
|
|
@@ -376,7 +386,7 @@ class ChronicInfo extends React.Component{
|
|
|
</span>
|
|
|
{/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}
|
|
|
|
|
|
- :
|
|
|
+ {this.getCritical(v)?'':':'}
|
|
|
</p>:''}
|
|
|
{v.details&&v.details.map((it,j)=>{
|
|
|
if(it.type==1){
|