|
@@ -43,7 +43,8 @@ class ChronicInfo extends React.Component{
|
|
|
isCalculated:false, //是否刚计算过,关闭时值与结果对应
|
|
|
calcuValues:deepClone(props.calcuValues), //计算公式填的值
|
|
|
hasEnterImg: false, //是否移入info
|
|
|
- currentIndex: -1 //当前index
|
|
|
+ currentIndex: -1, //当前index
|
|
|
+ scaleParam:{}, //加入病例需要的参数
|
|
|
};
|
|
|
|
|
|
this.$content = React.createRef();
|
|
@@ -53,14 +54,11 @@ class ChronicInfo extends React.Component{
|
|
|
this.closeOption = this.closeOption.bind(this);
|
|
|
this.showTable = this.showTable.bind(this);//显示量表弹窗
|
|
|
this.closeTable = this.closeTable.bind(this);//关闭量表弹窗
|
|
|
- this.close = this.close.bind(this); //关闭量表列表
|
|
|
this.showFormula = this.showFormula.bind(this); //打开计算公式
|
|
|
- //this.closeFormula = this.closeFormula.bind(this); //关闭计算公式
|
|
|
this.handleAddAssessItem = this.handleAddAssessItem.bind(this); //加入病例记录
|
|
|
this.onPrint = this.onPrint.bind(this);
|
|
|
this.handleForRadio = this.handleForRadio.bind(this);
|
|
|
this.handleSaveCalcu = this.handleSaveCalcu.bind(this); //保存评估修改的计算和可能结果
|
|
|
- //this.getAddBtnState = this.getAddBtnState.bind(this);
|
|
|
this.slideToggle = this.slideToggle.bind(this);
|
|
|
}
|
|
|
|
|
@@ -74,22 +72,6 @@ class ChronicInfo extends React.Component{
|
|
|
operaSupport: false,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- showTableList(name){//量表按钮
|
|
|
- const {getTableList} = this.props;
|
|
|
- if(name){
|
|
|
- getTableList(name);
|
|
|
- }
|
|
|
- }
|
|
|
- close(){//关闭量表列表
|
|
|
- const {hideList} = this.props;
|
|
|
- hideList&&hideList({name:'showList',value:false});
|
|
|
- }
|
|
|
- handleListClick(item){//量表列表单项点击
|
|
|
- this.showTable(item,null);
|
|
|
- //this.close()
|
|
|
- }
|
|
|
-
|
|
|
showInfo(item){
|
|
|
// 静态知识显示在提示信息里(4-18)
|
|
|
const {getInfomation} = this.props;
|
|
@@ -127,7 +109,7 @@ class ChronicInfo extends React.Component{
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- showTable(it){
|
|
|
+ showTable(it,v,i,j){
|
|
|
const {scaleInfo} = this.props;
|
|
|
// 密西根糖尿病周围神经病评分(MDNS), id:40744
|
|
|
const item = {
|
|
@@ -143,11 +125,19 @@ class ChronicInfo extends React.Component{
|
|
|
|
|
|
this.setState({
|
|
|
formulaId:null, //关闭计算公式和可能结果弹窗
|
|
|
- optionId:null
|
|
|
+ optionId:null,
|
|
|
+ scaleParam:{
|
|
|
+ v,i,j
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
closeTable(){
|
|
|
+ const {scaleParam} = this.state;
|
|
|
+ const {showHide} = this.props;
|
|
|
this.props.hideList({name:'showTable',value:false});
|
|
|
+ if(!showHide.isPop){
|
|
|
+ this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
|
|
|
+ }
|
|
|
}
|
|
|
showFormula(id){//计算公式
|
|
|
this.setState({
|
|
@@ -173,7 +163,11 @@ class ChronicInfo extends React.Component{
|
|
|
});
|
|
|
}
|
|
|
handleAddAssessItem(v,pIndex,i){
|
|
|
- const {addAssessItem} = this.props;
|
|
|
+ const {addAssessItem,showHide,addScaleItems,scaleInfo} = this.props;
|
|
|
+ if(!v){
|
|
|
+ addScaleItems(scaleInfo[showHide.id],showHide.id);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
addAssessItem(v,pIndex,i);
|
|
|
}
|
|
|
addFormula(it,v,pIndex,i){
|
|
@@ -368,12 +362,9 @@ class ChronicInfo extends React.Component{
|
|
|
if(it.type==1){
|
|
|
return <p>
|
|
|
<span className={style["listName"]}>
|
|
|
- <i onClick={this.showTable.bind(this,it.content,v.conceptId,i)}>{'【'+it.content.name+'】'}</i>
|
|
|
+ <i onClick={this.showTable.bind(this,it.content,v,i,j)}>{'【'+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>
|
|
|
- {/*{
|
|
|
- this.getAddBtnState(formulaResult&&formulaResult[it.content.conceptId],v,i,j)
|
|
|
- }*/}
|
|
|
</p>
|
|
|
}else if(it.type==2){
|
|
|
const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
|
|
@@ -385,9 +376,6 @@ class ChronicInfo extends React.Component{
|
|
|
<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.conceptId&&<MiniToast title={it.content.name}
|
|
|
icon={allTableIcon}
|
|
|
confirmText='加入病例记录'
|
|
@@ -452,12 +440,6 @@ class ChronicInfo extends React.Component{
|
|
|
<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.conceptId],v,i,j)
|
|
|
- }*/}
|
|
|
- {
|
|
|
- console.log(this.props)
|
|
|
- }
|
|
|
<MiniToast title='结果选择'
|
|
|
icon={checkIcon}
|
|
|
confirmText='加入病例记录'
|
|
@@ -504,11 +486,11 @@ class ChronicInfo extends React.Component{
|
|
|
toggleSlide&&toggleSlide(!slideUp);
|
|
|
}
|
|
|
render(){
|
|
|
+ const {chronicMagItem,chronicDesease,showHide,slideUp} = this.props;
|
|
|
const scaleFooter = <Footer print={true}
|
|
|
- footText="确定"
|
|
|
+ footText={showHide.isPop?"确定":"加入病例记录"}
|
|
|
handlePrint={this.onPrint}
|
|
|
handleConfirm={this.closeTable}/>;
|
|
|
- const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide,slideUp} = this.props;
|
|
|
return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
|
<div className={`${style["tips-title"]} ${style["chronic"]}`}>
|
|
|
<div className={style["tips-name"]}>
|
|
@@ -519,10 +501,6 @@ class ChronicInfo extends React.Component{
|
|
|
<div className={style['toggle-btn']}>
|
|
|
<img src={slideUp?down:up} alt="展开/收起" onClick={this.slideToggle}/>
|
|
|
</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.name||chronicMagItem&&chronicMagItem.name)}>量表
|
|
|
- </span>
|
|
|
- </div>*/}
|
|
|
</div>
|
|
|
<div className={style["content"]} ref={this.$content}>
|
|
|
{this.getDetail()}
|