|
@@ -1,21 +1,19 @@
|
|
|
import React from 'react';
|
|
|
import style from './index.less';
|
|
|
-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 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 up from '@common/images/slide-up.png';
|
|
|
+import down from '@common/images/slide-down.png';
|
|
|
+import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn,Footer,Notify} from '@commonComp';
|
|
|
import infoShow from '@common/images/info-show.png';
|
|
|
import infoMove from '@common/images/info-move.png';
|
|
|
-import {ComplexModal,ConfirmModal,MiniToast, Radio,CheckBtn} from '@commonComp';
|
|
|
import ScaleTable from '@containers/ScaleTable';
|
|
|
-import Notify from '@commonComp/Notify';
|
|
|
import {deepClone} from '@utils/tools';
|
|
|
import $ from 'jquery';
|
|
|
+import config from '@config/index';
|
|
|
|
|
|
/***
|
|
|
慢病右侧推送模块规则:
|
|
@@ -43,23 +41,31 @@ class ChronicInfo extends React.Component{
|
|
|
isCalculated:false, //是否刚计算过,关闭时值与结果对应
|
|
|
calcuValues:deepClone(props.calcuValues), //计算公式填的值
|
|
|
hasEnterImg: false, //是否移入info
|
|
|
- currentIndex: -1 //当前index
|
|
|
+ currentIndex: -1, //当前index
|
|
|
+ comfirnFlag:false,
|
|
|
+ flag:true,
|
|
|
+ ff:false,
|
|
|
+ timer:null,
|
|
|
+ scaleParam:{}, //加入病例需要的参数
|
|
|
};
|
|
|
-
|
|
|
+ this.$result = React.createRef();
|
|
|
+ this.$content = React.createRef();
|
|
|
this.showInfo = this.showInfo.bind(this);
|
|
|
this.closeInfo = this.closeInfo.bind(this);
|
|
|
this.showOption = this.showOption.bind(this);
|
|
|
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);
|
|
|
+ this.resetComfirnFlag = this.resetComfirnFlag.bind(this);
|
|
|
+ this.slideToggle = this.slideToggle.bind(this);
|
|
|
+ this.comfirnTable = this.comfirnTable.bind(this);
|
|
|
+ this.unscroeClose = this.unscroeClose.bind(this);
|
|
|
}
|
|
|
|
|
|
onPrint() {
|
|
@@ -72,29 +78,15 @@ class ChronicInfo extends React.Component{
|
|
|
operaSupport: false,
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
- showTableList(id){//量表按钮
|
|
|
- const {getTableList} = this.props;
|
|
|
- if(id){
|
|
|
- getTableList(id);
|
|
|
- }
|
|
|
- }
|
|
|
- close(){//关闭量表列表
|
|
|
- const {hideList} = this.props;
|
|
|
- hideList&&hideList({name:'showList',value:false});
|
|
|
- }
|
|
|
- handleListClick(item){//量表列表单项点击
|
|
|
- this.showTable(item,null);
|
|
|
- //this.close()
|
|
|
- }
|
|
|
-
|
|
|
- showInfo(id){
|
|
|
+ showInfo(item){
|
|
|
// 静态知识显示在提示信息里(4-18)
|
|
|
const {getInfomation} = this.props;
|
|
|
const param = {
|
|
|
- id:id,
|
|
|
+ id:item.id,
|
|
|
+ name: item.name,
|
|
|
// id:40738, //目前只有“肾功能不全”有数据
|
|
|
type:22,
|
|
|
+ position: 1
|
|
|
}
|
|
|
getInfomation&&getInfomation(param);
|
|
|
}
|
|
@@ -107,6 +99,11 @@ class ChronicInfo extends React.Component{
|
|
|
this.setState({
|
|
|
optionId:id,
|
|
|
formulaId:null //关闭计算公式
|
|
|
+ });
|
|
|
+ const {patDom} = this.props;
|
|
|
+ const ht = $(patDom.current).height();
|
|
|
+ setTimeout(function(){
|
|
|
+ $(patDom.current).scrollTop(ht+200);
|
|
|
})
|
|
|
}
|
|
|
closeOption(){
|
|
@@ -121,17 +118,17 @@ class ChronicInfo extends React.Component{
|
|
|
radioVal:Object.assign({},radioVal,possible),
|
|
|
optionId:null,
|
|
|
});
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
- showTable(it){
|
|
|
+ showTable(it,v,i,j){
|
|
|
const {scaleInfo} = this.props;
|
|
|
// 密西根糖尿病周围神经病评分(MDNS), id:40744
|
|
|
const item = {
|
|
|
- id:it.id,
|
|
|
+ conceptId:it.conceptId,
|
|
|
name:it.name
|
|
|
};
|
|
|
// 判断:store里已经有该量表就无需重新调接口
|
|
|
- if(scaleInfo&&scaleInfo[it.id]){
|
|
|
+ if(scaleInfo&&scaleInfo[it.conceptId]){
|
|
|
this.props.hideList({name:'showTable',value:true},it);
|
|
|
}else{
|
|
|
this.props.getScaleInfo(item);
|
|
@@ -139,16 +136,68 @@ class ChronicInfo extends React.Component{
|
|
|
|
|
|
this.setState({
|
|
|
formulaId:null, //关闭计算公式和可能结果弹窗
|
|
|
- optionId:null
|
|
|
+ optionId:null,
|
|
|
+ scaleParam:{
|
|
|
+ v,i,j
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
- closeTable(){
|
|
|
+ // 量表明细-关闭,isClose是否是点击关闭按钮
|
|
|
+ closeTable(isClose){
|
|
|
+ const {scaleParam} = this.state;
|
|
|
+ const {showHide} = this.props;
|
|
|
+ if(!showHide.isPop){
|
|
|
+ //量表结果,判断需要计算并且dom中有值才能加入病例记录
|
|
|
+ const res = this.$result.current&&this.$result.current.innerText;
|
|
|
+ if(!isClose&&(this.$result.current&&!res)){
|
|
|
+ Notify.info("请先计算量表结果!");
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ !isClose&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
|
|
|
+ this.setState({
|
|
|
+ scaleParam:{}
|
|
|
+ });
|
|
|
+ }
|
|
|
this.props.hideList({name:'showTable',value:false});
|
|
|
}
|
|
|
+ // 非计分量表确定-延时关闭->量表存值
|
|
|
+ unscroeClose(){
|
|
|
+ let {timer} = this.state;
|
|
|
+ this.setState({
|
|
|
+ ff:true
|
|
|
+ })
|
|
|
+ clearTimeout(timer)
|
|
|
+ let _timer = setTimeout(()=>{
|
|
|
+ this.closeTable();
|
|
|
+ },200)
|
|
|
+ this.setState({
|
|
|
+ timer:_timer
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 量表明细-确定
|
|
|
+ comfirnTable(){
|
|
|
+ const {flag} = this.state;
|
|
|
+ this.setState({
|
|
|
+ comfirnFlag:true,
|
|
|
+ flag:!flag //触发更新
|
|
|
+ })
|
|
|
+ }
|
|
|
+ resetComfirnFlag(){
|
|
|
+ this.setState({
|
|
|
+ comfirnFlag:false,
|
|
|
+ ff:false
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
showFormula(id){//计算公式
|
|
|
this.setState({
|
|
|
formulaId:id,
|
|
|
optionId:null //关闭可能结果
|
|
|
+ });
|
|
|
+ const {patDom} = this.props;
|
|
|
+ const ht = $(patDom.current).height();
|
|
|
+ setTimeout(function(){
|
|
|
+ $(patDom.current).scrollTop(ht+200);
|
|
|
})
|
|
|
}
|
|
|
closeFormula(it){
|
|
@@ -169,13 +218,22 @@ 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.conceptId],showHide.conceptId);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
addAssessItem(v,pIndex,i);
|
|
|
}
|
|
|
- handleReg(e){ //只能输入数字
|
|
|
- const hasDot = e.target.value.indexOf('.')!=-1;
|
|
|
+ addFormula(it,v,pIndex,i){
|
|
|
+ const {chronicMagItem} = this.props;
|
|
|
+ this.closeFormula(it);
|
|
|
+ chronicMagItem&&this.handleAddAssessItem(v,pIndex,i);
|
|
|
+ }
|
|
|
+ handleReg(e){ //只能输入数字和特殊符号
|
|
|
+ //const hasDot = e.target.value.indexOf('.')!=-1;
|
|
|
const key = e.key;
|
|
|
- if(key!='Backspace'&&((/[^\d]/.test(key)&&key!='.')||(key=='.'&&(hasDot||!e.target.value)))){
|
|
|
+ if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
|
|
|
e.preventDefault();
|
|
|
}
|
|
|
}
|
|
@@ -184,10 +242,10 @@ class ChronicInfo extends React.Component{
|
|
|
let obj = deepClone(calcuValues);
|
|
|
let values = (obj&&obj[id])||deepClone(calcuContent);
|
|
|
const txt = e.target.value;
|
|
|
- values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.]/g,''); //处理中文输入法的情况
|
|
|
+ values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,''); //处理中文输入法的情况
|
|
|
obj[id] = values;
|
|
|
- if(/[\u4e00-\u9fa5]|[^\d|.]/g.test(txt)){
|
|
|
- e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.]/g,'');
|
|
|
+ if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
|
|
|
+ e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
|
|
|
}
|
|
|
this.setState({
|
|
|
isCalculated:false,
|
|
@@ -215,18 +273,20 @@ class ChronicInfo extends React.Component{
|
|
|
handleRadio(item,parent){//可能结果
|
|
|
let {radioVal} = this.props;
|
|
|
this.setState({
|
|
|
- radioVal:Object.assign({},radioVal,{[parent.id]:item.detailName})
|
|
|
+ radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
|
|
|
})
|
|
|
}
|
|
|
- confirmOption(parent,pIndex){//可能结果确定
|
|
|
+ confirmOption(parent,pIndex,i){//可能结果确定
|
|
|
const {radioVal,possible} = this.state;
|
|
|
- const {savePossibleResult} = this.props;
|
|
|
+ const {savePossibleResult,chronicMagItem} = this.props;
|
|
|
this.setState({
|
|
|
possible:Object.assign({},possible,radioVal),
|
|
|
radioVal:Object.assign({},possible,radioVal),//不设置radioVal只有最近一次选中的值
|
|
|
optionId:null,
|
|
|
});
|
|
|
savePossibleResult&&savePossibleResult({possible:Object.assign({},possible,radioVal),radioVal:Object.assign({},possible,radioVal)})
|
|
|
+ chronicMagItem&&this.handleAddAssessItem(parent,pIndex,i);
|
|
|
+
|
|
|
}
|
|
|
handleSaveCalcu(obj){
|
|
|
this.setState({
|
|
@@ -245,7 +305,7 @@ class ChronicInfo extends React.Component{
|
|
|
if(!calcuValues[i].value) {
|
|
|
allHasInfo = false;
|
|
|
}
|
|
|
- } else if(calcuValues[i].controlType == 1) {
|
|
|
+ } else if(calcuValues[i].controlType == 0) {
|
|
|
let hasSelect = false;
|
|
|
for( let z = 0; z <calcuValues[i].details.length; z++) {
|
|
|
if(calcuValues[i].details[z].state == 1) {
|
|
@@ -272,43 +332,6 @@ class ChronicInfo extends React.Component{
|
|
|
Notify.info('请填写计算公式内容')
|
|
|
}
|
|
|
}
|
|
|
- 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;
|
|
|
- if(!show){
|
|
|
- return '';
|
|
|
- }
|
|
|
- if(flag){ //有结果
|
|
|
- if(j!==undefined){
|
|
|
- reCheck = addedScaleIds.includes(v.details[j].content.id); //列表中是否加入同一量表
|
|
|
- btn = (indexs[i]&&indexs[i].includes(j))||reCheck?<span className={style["add-record"]}>
|
|
|
- <img src={added} />
|
|
|
- 已加入
|
|
|
- </span>:<span className={style["listResult"]} onClick={()=>this.handleAddAssessItem(v,i,j)}>
|
|
|
- <img src={add} />
|
|
|
- 加入病历记录
|
|
|
- </span>;
|
|
|
- }else{
|
|
|
- reCheck = addedScaleIds.includes(v.id); //推送中是否加入同一量表
|
|
|
- btn = (wholeScaleItems&&wholeScaleItems[i])||reCheck?<span className={style["add-record"]}>
|
|
|
- <img src={added} />
|
|
|
- 已加入
|
|
|
- </span>:<span className={style["listResult"]} onClick={()=>addScaleItems(v,i)}>
|
|
|
- <img src={add} />
|
|
|
- 加入病历记录
|
|
|
- </span>;
|
|
|
- }
|
|
|
-
|
|
|
- }else{
|
|
|
- btn = <span className={style["disable-add"]}>
|
|
|
- <img src={add} />
|
|
|
- 加入病历记录
|
|
|
- </span>;
|
|
|
- }
|
|
|
-
|
|
|
- return btn;
|
|
|
- }
|
|
|
handleMouseEnterDrug(index) {
|
|
|
this.setState({
|
|
|
currentIndex: index,
|
|
@@ -316,7 +339,7 @@ class ChronicInfo extends React.Component{
|
|
|
}
|
|
|
handleMouseLeaveDrug() {
|
|
|
this.setState({
|
|
|
- currentIndex: -1,
|
|
|
+ currentIndex: -1,
|
|
|
})
|
|
|
}
|
|
|
handleMouseEnterImg() {
|
|
@@ -329,8 +352,9 @@ class ChronicInfo extends React.Component{
|
|
|
hasEnterImg: false
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
getDetail(){
|
|
|
- const {data,formulaResult,calcuResult} = this.props;
|
|
|
+ const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
|
|
|
const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
|
|
|
let list = data&&data.map((v,i)=>{
|
|
|
return <div className={style["list"]}>
|
|
@@ -342,49 +366,43 @@ class ChronicInfo extends React.Component{
|
|
|
onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
|
>
|
|
|
{v.name}
|
|
|
- {<img className={style['info-img']}
|
|
|
+ {<img className={style['info-img']}
|
|
|
style ={currentIndex === i ? {display: "inline-block"} : {display: "none"}}
|
|
|
- src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
|
|
|
+ src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
|
|
|
onMouseEnter={this.handleMouseEnterImg.bind(this)}
|
|
|
onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
|
|
|
- onClick={this.showInfo.bind(this,v.id)}/>}
|
|
|
-
|
|
|
+ onClick={this.showInfo.bind(this,v)}/>}
|
|
|
+
|
|
|
</span>
|
|
|
{/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}
|
|
|
-
|
|
|
+
|
|
|
:
|
|
|
</p>:''}
|
|
|
{v.details&&v.details.map((it,j)=>{
|
|
|
if(it.type==1){
|
|
|
return <p>
|
|
|
<span className={style["listName"]}>
|
|
|
- <i onClick={this.showTable.bind(this,it.content,v.id,i)}>{'【'+it.content.name+'】'}</i>
|
|
|
- {formulaResult&&formulaResult[it.content.id]?<i>{'结果:'}{formulaResult[it.content.id].calcalculate&&formulaResult[it.content.id].calcalculate.result.value +' '+ formulaResult[it.content.id].calcalculate.result.text}</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.id],v,i,j)
|
|
|
- }
|
|
|
</p>
|
|
|
}else if(it.type==2){
|
|
|
- const cres = calcuResult&&calcuResult[v.id]||it.content.result;
|
|
|
+ const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
|
|
|
const result = cres&&cres[1]&&cres[1].text;
|
|
|
- const details = calcuValues&&calcuValues[v.id]||it.content.details;
|
|
|
+ const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
|
|
|
return <div className={style["marTop"]}>
|
|
|
<span className={style["limit"]}>
|
|
|
计算公式结果:
|
|
|
- <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>{result?result:'请选择'}</i>
|
|
|
+ <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.id&&<MiniToast title={it.content.name}
|
|
|
+ {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
|
|
|
icon={allTableIcon}
|
|
|
- confirmText='关闭'
|
|
|
- show={formulaId&&formulaId==v.id?true:false}
|
|
|
+ confirmText={chronicMagItem?'加入病历记录':'确定'}
|
|
|
+ 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){//单选
|
|
@@ -397,7 +415,7 @@ class ChronicInfo extends React.Component{
|
|
|
return <div className={style["chooseItem"]}>
|
|
|
<Radio label={ii.detailName}
|
|
|
isSelect={ii.state == 1}
|
|
|
- handleClick={this.handleForRadio.bind(this,v.id,details,idd,ind)}>
|
|
|
+ handleClick={this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
|
|
|
</Radio>
|
|
|
</div>
|
|
|
})}
|
|
@@ -409,17 +427,17 @@ class ChronicInfo extends React.Component{
|
|
|
<span>{'请输入'+item.name+':'}</span>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input type="text" placeholder="请输入" value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.id,details,idd)}/>
|
|
|
+ <input type="text" placeholder="请输入" value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>
|
|
|
</td>
|
|
|
<td>
|
|
|
<span>{item.uint}</span>
|
|
|
</td>
|
|
|
-
|
|
|
+
|
|
|
</tr>
|
|
|
}
|
|
|
})}
|
|
|
</table>
|
|
|
- <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.id,it)}>计算</div>
|
|
|
+ <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.conceptId,it)}>计算</div>
|
|
|
<table>
|
|
|
{cres && Array.isArray(cres) &&cres.map((itemResult, resultIndex) => {
|
|
|
return <tr>
|
|
@@ -439,24 +457,22 @@ class ChronicInfo extends React.Component{
|
|
|
return <div className={style["marTop"]}>
|
|
|
<span className={style["limit"]}>
|
|
|
可能结果:
|
|
|
- <i onClick={this.showOption.bind(this,v.id)} className={style["blue"]}>{possible[v.id]?possible[v.id]:'请选择'}</i>
|
|
|
+ <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.id],v,i,j)
|
|
|
- }
|
|
|
<MiniToast title='结果选择'
|
|
|
icon={checkIcon}
|
|
|
- show={optionId&&optionId==v.id?true:false}
|
|
|
+ confirmText={chronicMagItem?'加入病历记录':'确定'}
|
|
|
+ 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)=>{
|
|
|
return <div className={style["chooseItem"]}>
|
|
|
<Radio label={lis.detailName}
|
|
|
- isSelect={radioVal[v.id]==lis.detailName}
|
|
|
+ isSelect={radioVal[v.conceptId]==lis.detailName}
|
|
|
handleClick={this.handleRadio.bind(this,lis,v)}>
|
|
|
</Radio>
|
|
|
{lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
|
|
@@ -477,52 +493,87 @@ class ChronicInfo extends React.Component{
|
|
|
calcuValues:next.calcuValues
|
|
|
})
|
|
|
}
|
|
|
+ if (JSON.stringify(next.wholeResults.possible) != JSON.stringify(this.props.possible)) {
|
|
|
+ this.setState({
|
|
|
+ radioVal: next.wholeResults.radioVal,
|
|
|
+ possible: next.wholeResults.possible
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(next.slideUp!=this.props.slideUp){
|
|
|
+ if(next.slideUp){
|
|
|
+ $(this.$content.current).slideUp(config.slideTime);
|
|
|
+ }else{
|
|
|
+ $(this.$content.current).slideDown(config.slideTime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ slideToggle(){
|
|
|
+ const {toggleSlide,slideUp} = this.props;
|
|
|
+ toggleSlide&&toggleSlide(!slideUp);
|
|
|
}
|
|
|
render(){
|
|
|
- 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,chronicDesease,formulaResult,showHide} = this.props;
|
|
|
- return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
|
- <div className={`${style["tips-title"]} ${style["chronic"]}`}>
|
|
|
- <div className={style["tips-name"]}>
|
|
|
- <img src={chronicPic} />
|
|
|
- <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}</h2>
|
|
|
- <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"]} onClick={() => this.showTableList(chronicDesease&&chronicDesease.id||chronicMagItem&&chronicMagItem.id)}>量表
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div className={style["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.id]?<i className={style['res']}>{'结果:'}{formulaResult[v.id].calcalculate&&formulaResult[v.id].calcalculate.result.value+' '+ (formulaResult[v.id].calcalculate.result.text?formulaResult[v.id].calcalculate.result.text:'')}</i>:''}
|
|
|
- </span>
|
|
|
- {
|
|
|
- this.getAddBtnState(formulaResult&&formulaResult[v.id],v,i)
|
|
|
- }
|
|
|
- </li>
|
|
|
- })}
|
|
|
- </ul>
|
|
|
- </ConfirmModal>
|
|
|
- {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
|
|
|
- title={showHide.name}
|
|
|
- icon={tableIcon}
|
|
|
- top={20}
|
|
|
- bottom={20}
|
|
|
- width={820}>
|
|
|
- <ScaleTable title={showHide.name} tableId={showHide.id}></ScaleTable>
|
|
|
- </ComplexModal>:''}
|
|
|
+ const {comfirnFlag,flag,ff} = this.state;
|
|
|
+ const {chronicMagItem,chronicDesease,data,showHide,slideUp} = this.props;
|
|
|
+ const scaleFooter = <Footer print={true}
|
|
|
+ footText={showHide.isPop||!chronicMagItem?"确定":"加入病历记录"}
|
|
|
+ handlePrint={this.onPrint}
|
|
|
+ handleConfirm={this.comfirnTable}/>;
|
|
|
+ if(data&&data.length>0){
|
|
|
+ return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
|
+ <div className={`${style["tips-title"]} ${style["chronic"]}`} onClick={this.slideToggle}>
|
|
|
+ <div className={style["tips-name"]}>
|
|
|
+ <img src={chronicPic} />
|
|
|
+ <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}<span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span></h2>
|
|
|
+ </div>
|
|
|
+ <div className={style['toggle-btn']}>
|
|
|
+ <img src={slideUp?down:up} alt="展开/收起"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div className={style["content"]} ref={this.$content}>
|
|
|
+ {this.getDetail()}
|
|
|
+ </div>
|
|
|
+ {showHide&&showHide.showTable?<ComplexModal onclose={()=>this.closeTable(true)} footer={scaleFooter}
|
|
|
+ title={showHide.name}
|
|
|
+ icon={tableIcon}
|
|
|
+ top={20}
|
|
|
+ bottom={20}
|
|
|
+ width={820}>
|
|
|
+ <ScaleTable title={showHide.name}
|
|
|
+ tableId={showHide.conceptId}
|
|
|
+ comfirnFlag={comfirnFlag}
|
|
|
+ flag={flag}
|
|
|
+ flagT={ff}
|
|
|
+ resetFlag={this.resetComfirnFlag}
|
|
|
+ unscroeClose={this.unscroeClose}
|
|
|
+ closeTable={this.closeTable}
|
|
|
+ resRef={this.$result}
|
|
|
+ ></ScaleTable>
|
|
|
+ </ComplexModal>:''}
|
|
|
</div>
|
|
|
+ }
|
|
|
+ //量表弹窗-无指标推送时量表弹窗要单独加载
|
|
|
+ if(showHide&&showHide.showTable){
|
|
|
+ return <ComplexModal onclose={()=>this.closeTable(true)} footer={scaleFooter}
|
|
|
+ title={showHide.name}
|
|
|
+ icon={tableIcon}
|
|
|
+ top={20}
|
|
|
+ bottom={20}
|
|
|
+ width={820}>
|
|
|
+ <ScaleTable title={showHide.name}
|
|
|
+ tableId={showHide.conceptId}
|
|
|
+ comfirnFlag={comfirnFlag}
|
|
|
+ flag={flag}
|
|
|
+ flagT={ff}
|
|
|
+ resetFlag={this.resetComfirnFlag}
|
|
|
+ unscroeClose={this.unscroeClose}
|
|
|
+ closeTable={this.closeTable}
|
|
|
+ resRef={this.$result}
|
|
|
+ ></ScaleTable>
|
|
|
+ </ComplexModal>;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
export default ChronicInfo;
|