|
@@ -44,7 +44,8 @@ class ChronicInfo extends React.Component{
|
|
|
possible:{}, //可能结果
|
|
|
formulaParam: {}, //量表计算公式计算入参
|
|
|
showRecommend:false, //显示推荐结果弹窗
|
|
|
- isRecommendConfirm:false,
|
|
|
+ isRecommendConfirm:false, //推荐结果确定
|
|
|
+ isFormulaConfirm:false, //计算公式确定
|
|
|
};
|
|
|
|
|
|
this.showInfo = this.showInfo.bind(this);
|
|
@@ -220,7 +221,10 @@ class ChronicInfo extends React.Component{
|
|
|
setChronicPush(data1)
|
|
|
}
|
|
|
confirmFormula(){//计算公式确定
|
|
|
-
|
|
|
+ this.setState({
|
|
|
+ isFormulaConfirm:true,
|
|
|
+ formulaId:null
|
|
|
+ });
|
|
|
}
|
|
|
handleRadio(item,parent,pIndex){//可能结果
|
|
|
let {radioVal} = this.props;
|
|
@@ -274,7 +278,7 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
getDetail(){
|
|
|
const {data,indexs,scaleInfo,formulaResult} = this.props;
|
|
|
- const {showInfo,showOption,infoId,formulaId,optionId,possible,radioVal} = this.state;
|
|
|
+ const {showInfo,showOption,infoId,formulaId,optionId,possible,radioVal,isFormulaConfirm} = this.state;
|
|
|
let list = data&&data.map((v,i)=>{
|
|
|
return <div className={style["list"]}>
|
|
|
{v.name?<p>
|
|
@@ -306,10 +310,11 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
</p>
|
|
|
}else if(it.type==2){
|
|
|
+ const result = it.content.result&&it.content.result[1]&&it.content.result[1].text;
|
|
|
return <div className={style["marTop"]}>
|
|
|
<span className={style["limit"]}>
|
|
|
计算公式结果:
|
|
|
- <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>请选择</i>
|
|
|
+ <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>{isFormulaConfirm&&result?result:'请选择'}</i>
|
|
|
<img src={level1} />
|
|
|
</span>
|
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|