|
@@ -70,10 +70,10 @@ class ChronicInfo extends React.Component{
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- showTableList(id){//量表按钮
|
|
|
+ showTableList(name){//量表按钮
|
|
|
const {getTableList} = this.props;
|
|
|
- if(id){
|
|
|
- getTableList(id);
|
|
|
+ if(name){
|
|
|
+ getTableList(name);
|
|
|
}
|
|
|
}
|
|
|
close(){//关闭量表列表
|
|
@@ -124,11 +124,11 @@ class ChronicInfo extends React.Component{
|
|
|
const {scaleInfo} = this.props;
|
|
|
// 密西根糖尿病周围神经病评分(MDNS), id:40744
|
|
|
const item = {
|
|
|
- id:it.id,
|
|
|
+ id:it.conceptId,
|
|
|
name:it.name
|
|
|
};
|
|
|
// 判断:store里已经有该量表就无需重新调接口
|
|
|
- if(scaleInfo&&scaleInfo[it.id]){
|
|
|
+ if(scaleInfo&&scaleInfo[it.conceptId]){
|
|
|
this.props.hideList({name:'showTable',value:true},it);
|
|
|
}else{
|
|
|
this.props.getScaleInfo(item);
|
|
@@ -344,7 +344,7 @@ class ChronicInfo extends React.Component{
|
|
|
src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
|
|
|
onMouseEnter={this.handleMouseEnterImg.bind(this)}
|
|
|
onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
|
|
|
- onClick={this.showInfo.bind(this,v.id)}/>}
|
|
|
+ onClick={this.showInfo.bind(this,v.conceptId)}/>}
|
|
|
|
|
|
</span>
|
|
|
{/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}
|
|
@@ -361,8 +361,8 @@ class ChronicInfo extends React.Component{
|
|
|
if(it.type==1){
|
|
|
return <p>
|
|
|
<span className={style["listName"]}>
|
|
|
- <i onClick={this.showTable.bind(this,it.content,v.id,i)}>{'【'+it.content.name+'】'}</i>
|
|
|
- {formulaResult&&formulaResult[it.content.id]?<i>{'结果:'}{formulaResult[it.content.id].calcalculate&&formulaResult[it.content.id].calcalculate.result.value +' '+ formulaResult[it.content.id].calcalculate.result.text}</i>:''}
|
|
|
+ <i onClick={this.showTable.bind(this,it.content,v.conceptId,i)}>{'【'+it.content.name+'】'}</i>
|
|
|
+ {formulaResult&&formulaResult[it.content.conceptId]?<i>{'结果:'}{formulaResult[it.content.conceptId].calcalculate&&formulaResult[it.content.conceptId].calcalculate.result.value +' '+ formulaResult[it.content.conceptId].calcalculate.result.text}</i>:''}
|
|
|
</span>
|
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
|
<img src={added} />
|
|
@@ -374,22 +374,22 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
</p>
|
|
|
}else if(it.type==2){
|
|
|
- const cres = calcuResult&&calcuResult[v.id]||it.content.result;
|
|
|
+ const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
|
|
|
const result = cres&&cres[1]&&cres[1].text;
|
|
|
- const details = calcuValues&&calcuValues[v.id]||it.content.details;
|
|
|
+ const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
|
|
|
return <div className={style["marTop"]}>
|
|
|
<span className={style["limit"]}>
|
|
|
计算公式结果:
|
|
|
- <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>{result?result:'请选择'}</i>
|
|
|
+ <i className={style["blue"]} onClick={this.showFormula.bind(this,v.conceptId)}>{result?result:'请选择'}</i>
|
|
|
<img src={level1} />
|
|
|
</span>
|
|
|
{
|
|
|
this.getAddBtnState(result,v,i,j)
|
|
|
}
|
|
|
- {formulaId&&formulaId==v.id&&<MiniToast title={it.content.name}
|
|
|
+ {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
|
|
|
icon={allTableIcon}
|
|
|
confirmText='关闭'
|
|
|
- show={formulaId&&formulaId==v.id?true:false}
|
|
|
+ show={formulaId&&formulaId==v.conceptId?true:false}
|
|
|
close={this.closeFormula.bind(this,it)}
|
|
|
confirm={this.closeFormula.bind(this,it)}
|
|
|
footer="true">
|
|
@@ -405,7 +405,7 @@ class ChronicInfo extends React.Component{
|
|
|
return <div className={style["chooseItem"]}>
|
|
|
<Radio label={ii.detailName}
|
|
|
isSelect={ii.state == 1}
|
|
|
- handleClick={this.handleForRadio.bind(this,v.id,details,idd,ind)}>
|
|
|
+ handleClick={this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
|
|
|
</Radio>
|
|
|
</div>
|
|
|
})}
|
|
@@ -417,7 +417,7 @@ class ChronicInfo extends React.Component{
|
|
|
<span>{'请输入'+item.name+':'}</span>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input type="text" placeholder="请输入" value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.id,details,idd)}/>
|
|
|
+ <input type="text" placeholder="请输入" value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>
|
|
|
</td>
|
|
|
<td>
|
|
|
<span>{item.uint}</span>
|
|
@@ -427,7 +427,7 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
})}
|
|
|
</table>
|
|
|
- <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.id,it)}>计算</div>
|
|
|
+ <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.conceptId,it)}>计算</div>
|
|
|
<table>
|
|
|
{cres && Array.isArray(cres) &&cres.map((itemResult, resultIndex) => {
|
|
|
return <tr>
|
|
@@ -447,15 +447,15 @@ class ChronicInfo extends React.Component{
|
|
|
return <div className={style["marTop"]}>
|
|
|
<span className={style["limit"]}>
|
|
|
可能结果:
|
|
|
- <i onClick={this.showOption.bind(this,v.id)} className={style["blue"]}>{possible[v.id]?possible[v.id]:'请选择'}</i>
|
|
|
+ <i onClick={this.showOption.bind(this,v.conceptId)} className={style["blue"]}>{possible[v.conceptId]?possible[v.conceptId]:'请选择'}</i>
|
|
|
<img src={level1} />
|
|
|
</span>
|
|
|
{
|
|
|
- this.getAddBtnState(possible[v.id],v,i,j)
|
|
|
+ this.getAddBtnState(possible[v.conceptId],v,i,j)
|
|
|
}
|
|
|
<MiniToast title='结果选择'
|
|
|
icon={checkIcon}
|
|
|
- show={optionId&&optionId==v.id?true:false}
|
|
|
+ show={optionId&&optionId==v.conceptId?true:false}
|
|
|
close={this.closeOption}
|
|
|
confirm={this.confirmOption.bind(this,v,i)}
|
|
|
footer="true">
|
|
@@ -464,7 +464,7 @@ class ChronicInfo extends React.Component{
|
|
|
{it.content.details&&it.content.details.map((lis,ind)=>{
|
|
|
return <div className={style["chooseItem"]}>
|
|
|
<Radio label={lis.detailName}
|
|
|
- isSelect={radioVal[v.id]==lis.detailName}
|
|
|
+ isSelect={radioVal[v.conceptId]==lis.detailName}
|
|
|
handleClick={this.handleRadio.bind(this,lis,v)}>
|
|
|
</Radio>
|
|
|
{lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
|
|
@@ -500,7 +500,7 @@ class ChronicInfo extends React.Component{
|
|
|
<span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span>
|
|
|
</div>
|
|
|
<div className={style["tips-btn"]} style={{display:chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name?'block':'none'}}>
|
|
|
- <span className={style["tipsDetails"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.id||chronicMagItem&&chronicMagItem.id)}>量表
|
|
|
+ <span className={style["tipsDetails"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.name||chronicMagItem&&chronicMagItem.name)}>量表
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -513,10 +513,10 @@ class ChronicInfo extends React.Component{
|
|
|
return <li>
|
|
|
<span className={style["scaleName"]}>
|
|
|
<i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
|
|
|
- {formulaResult&&formulaResult[v.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
|
|
|
+ {formulaResult&&formulaResult[v.conceptId]?<i className={style['res']}>{'结果:'}{formulaResult[v.conceptId].calcalculate&&formulaResult[v.conceptId].calcalculate.result.value+' '+ (formulaResult[v.conceptId].calcalculate.result.text?formulaResult[v.conceptId].calcalculate.result.text:'')}</i>:''}
|
|
|
</span>
|
|
|
{
|
|
|
- this.getAddBtnState(formulaResult&&formulaResult[v.id],v,i)
|
|
|
+ this.getAddBtnState(formulaResult&&formulaResult[v.conceptId],v,i)
|
|
|
}
|
|
|
</li>
|
|
|
})}
|