|
@@ -38,10 +38,10 @@ class ChronicInfo extends React.Component{
|
|
|
tableName:'' , //点击的量表名称
|
|
|
tableId:null ,//点击的量表id
|
|
|
parentId:null ,
|
|
|
+ parentIndex:null,
|
|
|
radioVal:{}, //可能结果选择内容
|
|
|
possible:{}, //可能结果
|
|
|
};
|
|
|
- this.$content = React.createRef();
|
|
|
|
|
|
this.showInfo = this.showInfo.bind(this);
|
|
|
this.closeInfo = this.closeInfo.bind(this);
|
|
@@ -68,13 +68,9 @@ class ChronicInfo extends React.Component{
|
|
|
operaSupport: false,
|
|
|
});
|
|
|
}
|
|
|
- componentWillReceiveProps() {
|
|
|
- $(this.$content.current)[0].scrollIntoView(true);
|
|
|
- }
|
|
|
|
|
|
showTableList(id){//量表按钮
|
|
|
- const {getTableList,questionId} = this.props;
|
|
|
- // getTableList(questionId&&questionId.id);
|
|
|
+ const {getTableList} = this.props;
|
|
|
if(id){
|
|
|
getTableList(id);
|
|
|
}
|
|
@@ -88,12 +84,12 @@ class ChronicInfo extends React.Component{
|
|
|
this.close()
|
|
|
}
|
|
|
|
|
|
- showInfo(id){//显示静态知识
|
|
|
+ showInfo(id){
|
|
|
// 静态知识显示在提示信息里(4-18)
|
|
|
const {getInfomation} = this.props;
|
|
|
const param = {
|
|
|
- // id:id,
|
|
|
- id:40738,
|
|
|
+ id:id,
|
|
|
+ // id:40738, //目前只有“肾功能不全”有数据
|
|
|
type:22,
|
|
|
}
|
|
|
getInfomation&&getInfomation(param);
|
|
@@ -108,7 +104,8 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
showOption(id){
|
|
|
this.setState({
|
|
|
- optionId:id
|
|
|
+ optionId:id,
|
|
|
+ formulaId:null //关闭计算公式
|
|
|
})
|
|
|
}
|
|
|
closeOption(){
|
|
@@ -116,9 +113,9 @@ class ChronicInfo extends React.Component{
|
|
|
optionId:null
|
|
|
})
|
|
|
}
|
|
|
- showTable(it,parentId){
|
|
|
+ showTable(it,parentId,parentIndex){
|
|
|
const {formulaResult,scaleInfo} = this.props;
|
|
|
- // 密西根糖尿病周围神经病评分(MDNS) 为例 id:40744
|
|
|
+ // 密西根糖尿病周围神经病评分(MDNS), id:40744
|
|
|
const item = {
|
|
|
id:it.id,
|
|
|
name:it.name
|
|
@@ -133,7 +130,10 @@ class ChronicInfo extends React.Component{
|
|
|
this.setState({
|
|
|
tableName:it.name,
|
|
|
tableId:it.id,
|
|
|
- parentId:parentId
|
|
|
+ parentId:parentId,
|
|
|
+ parentIndex:parentIndex,
|
|
|
+ formulaId:null, //关闭计算公式和可能结果弹窗
|
|
|
+ optionId:null
|
|
|
})
|
|
|
}
|
|
|
closeTable(){
|
|
@@ -153,7 +153,8 @@ class ChronicInfo extends React.Component{
|
|
|
|
|
|
showFormula(id){//计算公式
|
|
|
this.setState({
|
|
|
- formulaId:id
|
|
|
+ formulaId:id,
|
|
|
+ optionId:null //关闭可能结果
|
|
|
})
|
|
|
}
|
|
|
closeFormula(){
|
|
@@ -201,11 +202,11 @@ class ChronicInfo extends React.Component{
|
|
|
const {showInfo,showOption,infoId,formulaId,optionId,possible,radioVal} = this.state;
|
|
|
let list = data&&data.map((v,i)=>{
|
|
|
return <div className={style["list"]}>
|
|
|
- <p ref={this.$content}>
|
|
|
- <span>{'患者可能有'+v.name}</span>
|
|
|
- <img src={infoPic} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/>
|
|
|
- :
|
|
|
- </p>
|
|
|
+ {v.name?<p>
|
|
|
+ <span>{'患者可能有'+v.name}</span>
|
|
|
+ <img src={infoPic} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/>
|
|
|
+ :
|
|
|
+ </p>:''}
|
|
|
{/*<MiniToast title='静态知识'
|
|
|
icon={allTableIcon}
|
|
|
show={infoId&&infoId==v.id?true:false}
|
|
@@ -215,9 +216,9 @@ class ChronicInfo extends React.Component{
|
|
|
{v.details&&v.details.map((it,j)=>{
|
|
|
if(it.type==1){
|
|
|
return <p>
|
|
|
- <span className={style["listName"]} onClick={this.showTable.bind(this,it.content,v.id)}>
|
|
|
+ <span className={style["listName"]} onClick={this.showTable.bind(this,it.content,v.id,i)}>
|
|
|
{'【'+it.content.name+'】'}
|
|
|
- {formulaResult&&formulaResult[it.content.id]?<i>{'结果:'+ formulaResult[it.content.id].text}</i>:''}
|
|
|
+ {formulaResult&&formulaResult[it.content.id]&&formulaResult[it.content.id].pIndex==i?<i>{'结果:'}{formulaResult[it.content.id].calcalculate&&formulaResult[it.content.id].calcalculate.result.text}</i>:''}
|
|
|
|
|
|
</span>
|
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
@@ -357,7 +358,7 @@ class ChronicInfo extends React.Component{
|
|
|
<span className={style['okBtn']} onClick={()=>this.closeTable()}>确定</span>
|
|
|
</div>;
|
|
|
const {chronicMagItem,showList,tableList,scaleInfo,data,saveAssessInfos,chronicDesease,formulaResult,showHide} = this.props;
|
|
|
- const {showInfo,showOption,showAssess,isAssessConfirm,tableName,tableId,parentId,possible,radioVal} = this.state;
|
|
|
+ const {showInfo,showOption,showAssess,isAssessConfirm,tableName,tableId,parentId,possible,radioVal,parentIndex} = this.state;
|
|
|
return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
|
<div className={`${style["tips-title"]} ${style["chronic"]}`}>
|
|
|
<div className={style["tips-name"]}>
|
|
@@ -386,7 +387,8 @@ class ChronicInfo extends React.Component{
|
|
|
return <li onClick={this.handleListClick.bind(this,v)}>
|
|
|
<span>
|
|
|
{'【'+v.name+'】'}
|
|
|
- {formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}
|
|
|
+ {/*{formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}*/}
|
|
|
+ {formulaResult&&formulaResult[v.id]?<i>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.text}</i>:''}
|
|
|
</span>
|
|
|
</li>
|
|
|
})}
|
|
@@ -398,7 +400,7 @@ class ChronicInfo extends React.Component{
|
|
|
top={20}
|
|
|
bottom={20}
|
|
|
width={820}>
|
|
|
- <ScaleTable title={tableName} tableId={tableId} parentId={parentId}></ScaleTable>
|
|
|
+ <ScaleTable title={tableName} tableId={tableId} parentId={parentId} parentIndex={parentIndex}></ScaleTable>
|
|
|
</ComplexModal>:''}
|
|
|
{showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
|
|
|
title='管理和评估'
|