|
@@ -4,14 +4,12 @@ import infoPic from "../../common/images/info-pic.png";
|
|
|
import chronicPic from "../../common/images/chronic.png";
|
|
|
import level1 from "../../common/images/级别1.png";
|
|
|
import printIcon from '@common/images/team.png';
|
|
|
-import manageIcon from '@common/images/manage.png';
|
|
|
import tableIcon from '@common/images/table.png';
|
|
|
import allTableIcon from '@common/images/all-table.png';
|
|
|
import add from '@common/images/add-result.png';
|
|
|
import added from '@common/images/first.png';
|
|
|
import checkIcon from '@common/images/check.png';
|
|
|
import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn} from '@commonComp';
|
|
|
-import AssessResult from '@containers/AssessResult';
|
|
|
import ScaleTable from '@containers/ScaleTable';
|
|
|
import Notify from '@commonComp/Notify';
|
|
|
import {deepClone} from '@utils/tools';
|
|
@@ -44,8 +42,6 @@ class ChronicInfo extends React.Component{
|
|
|
radioVal:{}, //可能结果选择内容
|
|
|
possible:{}, //可能结果
|
|
|
formulaParam: {}, //量表计算公式计算入参
|
|
|
- showRecommend:false, //显示推荐结果弹窗
|
|
|
- isRecommendConfirm:false, //推荐结果确定
|
|
|
isCalculated:false, //是否刚计算过,关闭时值与结果对应
|
|
|
calcuValues:deepClone(props.calcuValues), //计算公式填的值
|
|
|
};
|
|
@@ -56,14 +52,12 @@ class ChronicInfo extends React.Component{
|
|
|
this.closeOption = this.closeOption.bind(this);
|
|
|
this.showTable = this.showTable.bind(this);//显示量表弹窗
|
|
|
this.closeTable = this.closeTable.bind(this);//关闭量表弹窗
|
|
|
- this.showAssessFn = this.showAssessFn.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.showRecommendFn = this.showRecommendFn.bind(this);
|
|
|
this.handleSaveCalcu = this.handleSaveCalcu.bind(this); //保存评估修改的计算和可能结果
|
|
|
this.getAddBtnState = this.getAddBtnState.bind(this);
|
|
|
}
|
|
@@ -160,18 +154,6 @@ class ChronicInfo extends React.Component{
|
|
|
})
|
|
|
this.props.hideList({name:'showTable',value:false});
|
|
|
}
|
|
|
- showAssessFn(){
|
|
|
- this.setState({
|
|
|
- showAssess:!this.state.showAssess,
|
|
|
- isAssessConfirm:false
|
|
|
- });
|
|
|
- }
|
|
|
- showRecommendFn(){
|
|
|
- this.setState({
|
|
|
- isRecommendConfirm:false,
|
|
|
- showRecommend:!this.state.showRecommend,
|
|
|
- });
|
|
|
- }
|
|
|
showFormula(id){//计算公式
|
|
|
this.setState({
|
|
|
formulaId:id,
|
|
@@ -194,15 +176,6 @@ class ChronicInfo extends React.Component{
|
|
|
const {addAssessItem} = this.props;
|
|
|
addAssessItem(v,pIndex,i);
|
|
|
}
|
|
|
- handleSaveRecommend(){
|
|
|
- this.setState({
|
|
|
- isRecommendConfirm:true
|
|
|
- });
|
|
|
- const that=this;
|
|
|
- setTimeout(()=>{
|
|
|
- that.showRecommendFn();
|
|
|
- });
|
|
|
- }
|
|
|
handleInputformula(id,calcuContent,i,e) {
|
|
|
const {calcuValues} = this.state;
|
|
|
let obj = deepClone(calcuValues);
|
|
@@ -293,8 +266,12 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
}
|
|
|
getAddBtnState(flag,v,i,j){
|
|
|
- const {indexs,wholeScaleItems,addScaleItems} = this.props;
|
|
|
+ const {indexs,wholeScaleItems,addScaleItems,chronicMagItem,chronicDesease} = this.props;
|
|
|
let btn = '';
|
|
|
+ let show = chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name;
|
|
|
+ if(!show){
|
|
|
+ return '';
|
|
|
+ }
|
|
|
if(flag){ //有结果
|
|
|
if(j!==undefined){
|
|
|
btn = indexs[i]&&indexs[i].includes(j)?<span className={style["add-record"]}>
|
|
@@ -458,15 +435,12 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
}
|
|
|
render(){
|
|
|
- const recFooter =<div className={style['footer']}>
|
|
|
- <span className={style['okBtn']} onClick={()=>this.handleSaveRecommend()}>确定</span>
|
|
|
- </div>;
|
|
|
const scaleFooter = <div className={style['footer']}>
|
|
|
<span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
|
|
|
<span className={style['okBtn']} onClick={()=>this.closeTable()}>确定</span>
|
|
|
</div>;
|
|
|
- const {chronicMagItem,tableList,saveAssessInfos,chronicDesease,formulaResult,showHide} = this.props;
|
|
|
- const {showAssess,isAssessConfirm,tableName,tableId,parentId,parentIndex,isRecommendConfirm,showRecommend,radioVal,possible} = this.state;
|
|
|
+ const {chronicMagItem,tableList,chronicDesease,formulaResult,showHide} = this.props;
|
|
|
+ const {tableName,tableId,parentId,parentIndex} = this.state;
|
|
|
return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
|
<div className={`${style["tips-title"]} ${style["chronic"]}`}>
|
|
|
<div className={style["tips-name"]}>
|
|
@@ -475,25 +449,9 @@ 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"]}
|
|
|
- style={{width:'70px'}}
|
|
|
- onClick={this.showAssessFn}
|
|
|
- >
|
|
|
- 管理和评估
|
|
|
- </span>
|
|
|
<span className={style["tipsDetails"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.id||chronicMagItem&&chronicMagItem.id)}>量表
|
|
|
</span>
|
|
|
</div>
|
|
|
- <div className={style["tips-btn"]} style={{display:chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name?'none':'block'}}>
|
|
|
- <span
|
|
|
- className={style["tipsDetails"]}
|
|
|
- style={{width:'70px'}}
|
|
|
- onClick={this.showRecommendFn}
|
|
|
- >
|
|
|
- 推荐结果
|
|
|
- </span>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div className={style["content"]}>
|
|
|
{this.getDetail()}
|
|
@@ -521,21 +479,6 @@ class ChronicInfo extends React.Component{
|
|
|
width={820}>
|
|
|
<ScaleTable title={tableName} tableId={tableId} parentId={parentId} parentIndex={parentIndex}></ScaleTable>
|
|
|
</ComplexModal>:''}
|
|
|
- {showRecommend?<ComplexModal onclose={this.showRecommendFn} footer={recFooter}
|
|
|
- title='推荐结果'
|
|
|
- icon={manageIcon}
|
|
|
- top={20}
|
|
|
- bottom={20}
|
|
|
- width={820}>
|
|
|
- <AssessResult handleSave={saveAssessInfos}
|
|
|
- handleSaveCalcu={this.handleSaveCalcu}
|
|
|
- closeAssess={this.showRecommendFn}
|
|
|
- isRecommend={true}
|
|
|
- showScaleFn={this.showTable.bind(this)}
|
|
|
- radioVal={radioVal}
|
|
|
- possible={possible}
|
|
|
- isAssessConfirm={isRecommendConfirm}></AssessResult>
|
|
|
- </ComplexModal>:''}
|
|
|
</div>
|
|
|
}
|
|
|
}
|