|
@@ -60,7 +60,7 @@ class ChronicInfo extends React.Component{
|
|
|
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.getAddBtnState = this.getAddBtnState.bind(this);
|
|
|
this.slideToggle = this.slideToggle.bind(this);
|
|
|
}
|
|
|
|
|
@@ -176,6 +176,10 @@ class ChronicInfo extends React.Component{
|
|
|
const {addAssessItem} = this.props;
|
|
|
addAssessItem(v,pIndex,i);
|
|
|
}
|
|
|
+ addFormula(it,v,pIndex,i){
|
|
|
+ this.closeFormula(it);
|
|
|
+ this.handleAddAssessItem(v,pIndex,i);
|
|
|
+ }
|
|
|
handleReg(e){ //只能输入数字
|
|
|
const hasDot = e.target.value.indexOf('.')!=-1;
|
|
|
const key = e.key;
|
|
@@ -222,7 +226,7 @@ class ChronicInfo extends React.Component{
|
|
|
radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
|
|
|
})
|
|
|
}
|
|
|
- confirmOption(parent,pIndex){//可能结果确定
|
|
|
+ confirmOption(parent,pIndex,i){//可能结果确定
|
|
|
const {radioVal,possible} = this.state;
|
|
|
const {savePossibleResult} = this.props;
|
|
|
this.setState({
|
|
@@ -231,6 +235,8 @@ class ChronicInfo extends React.Component{
|
|
|
optionId:null,
|
|
|
});
|
|
|
savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
|
|
|
+ this.handleAddAssessItem(parent,pIndex,i);
|
|
|
+
|
|
|
}
|
|
|
handleSaveCalcu(obj){
|
|
|
this.setState({
|
|
@@ -276,7 +282,7 @@ class ChronicInfo extends React.Component{
|
|
|
Notify.info('请填写计算公式内容')
|
|
|
}
|
|
|
}
|
|
|
- getAddBtnState(flag,v,i,j){
|
|
|
+ /*getAddBtnState(flag,v,i,j){
|
|
|
const {indexs,wholeScaleItems,addScaleItems,chronicMagItem,chronicDesease,addedScaleIds} = this.props;
|
|
|
let btn = '',reCheck=false;
|
|
|
let show = chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name;
|
|
@@ -312,7 +318,7 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
|
|
|
return btn;
|
|
|
- }
|
|
|
+ }*/
|
|
|
handleMouseEnterDrug(index) {
|
|
|
this.setState({
|
|
|
currentIndex: index,
|
|
@@ -358,12 +364,6 @@ class ChronicInfo extends React.Component{
|
|
|
|
|
|
:
|
|
|
</p>:''}
|
|
|
- {/*<MiniToast title='静态知识'
|
|
|
- icon={allTableIcon}
|
|
|
- show={infoId&&infoId==v.id?true:false}
|
|
|
- close={this.closeInfo}>
|
|
|
- {pureText}
|
|
|
- </MiniToast>*/}
|
|
|
{v.details&&v.details.map((it,j)=>{
|
|
|
if(it.type==1){
|
|
|
return <p>
|
|
@@ -371,9 +371,9 @@ class ChronicInfo extends React.Component{
|
|
|
<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>
|
|
|
- {
|
|
|
+ {/*{
|
|
|
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,16 +385,16 @@ 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='关闭'
|
|
|
+ confirmText='加入病例记录'
|
|
|
show={formulaId&&formulaId==v.conceptId?true:false}
|
|
|
close={this.closeFormula.bind(this,it)}
|
|
|
- confirm={this.closeFormula.bind(this,it)}
|
|
|
- footer="true">
|
|
|
+ confirm={this.addFormula.bind(this,it,v,i,j)}
|
|
|
+ footer={result?true:false}>
|
|
|
<table>
|
|
|
{details.map((item,idd)=>{
|
|
|
if(item.controlType==0){//单选
|
|
@@ -452,15 +452,19 @@ 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='加入病例记录'
|
|
|
show={optionId&&optionId==v.conceptId?true:false}
|
|
|
close={this.closeOption}
|
|
|
- confirm={this.confirmOption.bind(this,v,i)}
|
|
|
- footer="true">
|
|
|
+ confirm={this.confirmOption.bind(this,v,i,j)}
|
|
|
+ footer={radioVal[v.conceptId]?true:false}>
|
|
|
<div className={style["infoOption"]}>
|
|
|
<span>{it.content.name?it.content.name+':':''}</span>
|
|
|
{it.content.details&&it.content.details.map((lis,ind)=>{
|
|
@@ -523,21 +527,6 @@ class ChronicInfo extends React.Component{
|
|
|
<div className={style["content"]} ref={this.$content}>
|
|
|
{this.getDetail()}
|
|
|
</div>
|
|
|
- {/*<ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={450} width={450}>
|
|
|
- <ul className={style['toast-cont']}>
|
|
|
- {tableList&&tableList.map((v,i)=>{
|
|
|
- return <li>
|
|
|
- <span className={style["scaleName"]}>
|
|
|
- <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</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.conceptId],v,i)
|
|
|
- }
|
|
|
- </li>
|
|
|
- })}
|
|
|
- </ul>
|
|
|
- </ConfirmModal>*/}
|
|
|
{showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
|
|
|
title={showHide.name}
|
|
|
icon={tableIcon}
|