|
@@ -30,7 +30,6 @@ class ChronicInfo extends React.Component{
|
|
show:true,
|
|
show:true,
|
|
showInfo:false,
|
|
showInfo:false,
|
|
showOption:false,
|
|
showOption:false,
|
|
- showTable:false,
|
|
|
|
showAssess:false, //评估弹窗
|
|
showAssess:false, //评估弹窗
|
|
infoId:null, //静态知识
|
|
infoId:null, //静态知识
|
|
formulaId:null, //计算公式
|
|
formulaId:null, //计算公式
|
|
@@ -60,7 +59,8 @@ class ChronicInfo extends React.Component{
|
|
}
|
|
}
|
|
|
|
|
|
onPrint() {
|
|
onPrint() {
|
|
- let dom = this.state.showTable?$("#printcontent"):$("#AssistResult");
|
|
|
|
|
|
+ const {showHide} = this.props;
|
|
|
|
+ let dom = showHide&&showHide.showTable?$("#printcontent"):$("#AssistResult");
|
|
dom.jqprint({
|
|
dom.jqprint({
|
|
debug: false,
|
|
debug: false,
|
|
importCSS: true,
|
|
importCSS: true,
|
|
@@ -72,13 +72,22 @@ class ChronicInfo extends React.Component{
|
|
$(this.$content.current)[0].scrollIntoView(true);
|
|
$(this.$content.current)[0].scrollIntoView(true);
|
|
}
|
|
}
|
|
|
|
|
|
- showTableList(id){//量表
|
|
|
|
|
|
+ showTableList(id){//量表按钮
|
|
const {getTableList,questionId} = this.props;
|
|
const {getTableList,questionId} = this.props;
|
|
// getTableList(questionId&&questionId.id);
|
|
// getTableList(questionId&&questionId.id);
|
|
if(id){
|
|
if(id){
|
|
getTableList(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(id){//显示静态知识
|
|
// 静态知识显示在提示信息里(4-18)
|
|
// 静态知识显示在提示信息里(4-18)
|
|
const {getInfomation} = this.props;
|
|
const {getInfomation} = this.props;
|
|
@@ -109,25 +118,19 @@ class ChronicInfo extends React.Component{
|
|
}
|
|
}
|
|
showTable(it,parentId){
|
|
showTable(it,parentId){
|
|
const {formulaResult,scaleInfo} = this.props;
|
|
const {formulaResult,scaleInfo} = this.props;
|
|
- // 密西根糖尿病周围神经病评分(MDNS) 为例
|
|
|
|
- /*const item = {
|
|
|
|
- id:40744,
|
|
|
|
- name:'密西根糖尿病周围神经病评分(MDNS)'
|
|
|
|
- }*/
|
|
|
|
|
|
+ // 密西根糖尿病周围神经病评分(MDNS) 为例 id:40744
|
|
const item = {
|
|
const item = {
|
|
id:it.id,
|
|
id:it.id,
|
|
name:it.name
|
|
name:it.name
|
|
}
|
|
}
|
|
// 判断:store里已经有该量表就无需重新调接口
|
|
// 判断:store里已经有该量表就无需重新调接口
|
|
if(scaleInfo&&scaleInfo[it.id]){
|
|
if(scaleInfo&&scaleInfo[it.id]){
|
|
-
|
|
|
|
|
|
+ this.props.hideList({name:'showTable',value:true});
|
|
}else{
|
|
}else{
|
|
- // formulaResult
|
|
|
|
this.props.getScaleInfo(item);
|
|
this.props.getScaleInfo(item);
|
|
}
|
|
}
|
|
|
|
|
|
this.setState({
|
|
this.setState({
|
|
- showTable:true,
|
|
|
|
tableName:it.name,
|
|
tableName:it.name,
|
|
tableId:it.id,
|
|
tableId:it.id,
|
|
parentId:parentId
|
|
parentId:parentId
|
|
@@ -135,11 +138,11 @@ class ChronicInfo extends React.Component{
|
|
}
|
|
}
|
|
closeTable(){
|
|
closeTable(){
|
|
this.setState({
|
|
this.setState({
|
|
- showTable:false,
|
|
|
|
tableName:'',
|
|
tableName:'',
|
|
tableId:null,
|
|
tableId:null,
|
|
parentId:null,
|
|
parentId:null,
|
|
})
|
|
})
|
|
|
|
+ this.props.hideList({name:'showTable',value:false});
|
|
}
|
|
}
|
|
showAssessFn(){
|
|
showAssessFn(){
|
|
this.setState({
|
|
this.setState({
|
|
@@ -147,10 +150,7 @@ class ChronicInfo extends React.Component{
|
|
isAssessConfirm:false
|
|
isAssessConfirm:false
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- close(){
|
|
|
|
- const {hideList} = this.props;
|
|
|
|
- hideList&&hideList();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
showFormula(id){//计算公式
|
|
showFormula(id){//计算公式
|
|
this.setState({
|
|
this.setState({
|
|
formulaId:id
|
|
formulaId:id
|
|
@@ -197,7 +197,7 @@ class ChronicInfo extends React.Component{
|
|
|
|
|
|
}
|
|
}
|
|
getDetail(){
|
|
getDetail(){
|
|
- const {data,indexs} = this.props;
|
|
|
|
|
|
+ const {data,indexs,scaleInfo,formulaResult} = this.props;
|
|
const {showInfo,showOption,infoId,formulaId,optionId,possible,radioVal} = this.state;
|
|
const {showInfo,showOption,infoId,formulaId,optionId,possible,radioVal} = this.state;
|
|
let list = data&&data.map((v,i)=>{
|
|
let list = data&&data.map((v,i)=>{
|
|
return <div className={style["list"]}>
|
|
return <div className={style["list"]}>
|
|
@@ -215,7 +215,11 @@ class ChronicInfo extends React.Component{
|
|
{v.details&&v.details.map((it,j)=>{
|
|
{v.details&&v.details.map((it,j)=>{
|
|
if(it.type==1){
|
|
if(it.type==1){
|
|
return <p>
|
|
return <p>
|
|
- <span className={style["listName"]} onClick={this.showTable.bind(this,it.content,v.id)}>{'【'+it.content.name+'】'}</span>
|
|
|
|
|
|
+ <span className={style["listName"]} onClick={this.showTable.bind(this,it.content,v.id)}>
|
|
|
|
+ {'【'+it.content.name+'】'}
|
|
|
|
+ {formulaResult&&formulaResult[it.content.id]?<i>{'结果:'+ formulaResult[it.content.id].text}</i>:''}
|
|
|
|
+
|
|
|
|
+ </span>
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
<img src={added} />
|
|
<img src={added} />
|
|
已加入
|
|
已加入
|
|
@@ -227,9 +231,11 @@ class ChronicInfo extends React.Component{
|
|
</p>
|
|
</p>
|
|
}else if(it.type==2){
|
|
}else if(it.type==2){
|
|
return <div className={style["marTop"]}>
|
|
return <div className={style["marTop"]}>
|
|
- <span>计算公式结果:</span>
|
|
|
|
- <span className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>请选择</span>
|
|
|
|
- <img src={level1} />
|
|
|
|
|
|
+ <span className={style["limit"]}>
|
|
|
|
+ 计算公式结果:
|
|
|
|
+ <i className={style["blue"]} onClick={this.showFormula.bind(this,v.id)}>请选择</i>
|
|
|
|
+ <img src={level1} />
|
|
|
|
+ </span>
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
<img src={added} />
|
|
<img src={added} />
|
|
已加入
|
|
已加入
|
|
@@ -299,9 +305,11 @@ class ChronicInfo extends React.Component{
|
|
</div>
|
|
</div>
|
|
}else if(it.type==3){
|
|
}else if(it.type==3){
|
|
return <div className={style["marTop"]}>
|
|
return <div className={style["marTop"]}>
|
|
- <span>可能结果:</span>
|
|
|
|
- <span onClick={this.showOption.bind(this,v.id)} className={style["blue"]}>{possible[i]?possible[i]:'请选择'}</span>
|
|
|
|
- <img src={level1} />
|
|
|
|
|
|
+ <span className={style["limit"]}>
|
|
|
|
+ 可能结果:
|
|
|
|
+ <i onClick={this.showOption.bind(this,v.id)} className={style["blue"]}>{possible[i]?possible[i]:'请选择'}</i>
|
|
|
|
+ <img src={level1} />
|
|
|
|
+ </span>
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
{indexs[i]&&indexs[i].includes(j)?<span className={style["addResult"]}>
|
|
<img src={added} />
|
|
<img src={added} />
|
|
已加入
|
|
已加入
|
|
@@ -345,8 +353,8 @@ class ChronicInfo extends React.Component{
|
|
<span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
|
|
<span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
|
|
<span className={style['okBtn']} onClick={()=>this.closeTable()}>确定</span>
|
|
<span className={style['okBtn']} onClick={()=>this.closeTable()}>确定</span>
|
|
</div>;
|
|
</div>;
|
|
- const {chronicMagItem,showList,tableList,scaleInfo,data,saveAssessInfos,chronicDesease} = this.props;
|
|
|
|
- const {showInfo,showOption,showTable,showAssess,isAssessConfirm,tableName,tableId,parentId} = this.state;
|
|
|
|
|
|
+ const {chronicMagItem,showList,tableList,scaleInfo,data,saveAssessInfos,chronicDesease,formulaResult,showHide} = this.props;
|
|
|
|
+ const {showInfo,showOption,showAssess,isAssessConfirm,tableName,tableId,parentId} = this.state;
|
|
//console.log(8989,chronicMagItem,chronicDesease);
|
|
//console.log(8989,chronicMagItem,chronicDesease);
|
|
return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
return <div className={style["tips"]} style={{marginBottom:'15px'}}>
|
|
<div className={`${style["tips-title"]} ${style["chronic"]}`}>
|
|
<div className={`${style["tips-title"]} ${style["chronic"]}`}>
|
|
@@ -370,22 +378,25 @@ class ChronicInfo extends React.Component{
|
|
<div className={style["content"]}>
|
|
<div className={style["content"]}>
|
|
{this.getDetail()}
|
|
{this.getDetail()}
|
|
</div>
|
|
</div>
|
|
- <ConfirmModal visible={showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={300}>
|
|
|
|
|
|
+ <ConfirmModal visible={showHide&&showHide.showList} noFooter='true' title='全部量表' close={this.close} titleBg="#DFEAFE" icon={allTableIcon} height={400} width={400}>
|
|
<ul className={style['toast-cont']}>
|
|
<ul className={style['toast-cont']}>
|
|
{tableList&&tableList.map((v,i)=>{
|
|
{tableList&&tableList.map((v,i)=>{
|
|
- return <li>
|
|
|
|
- <span>{'【'+v.name+'】'}</span>
|
|
|
|
|
|
+ return <li onClick={this.handleListClick.bind(this,v)}>
|
|
|
|
+ <span>
|
|
|
|
+ {'【'+v.name+'】'}
|
|
|
|
+ {formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</i>:''}
|
|
|
|
+ </span>
|
|
</li>
|
|
</li>
|
|
})}
|
|
})}
|
|
</ul>
|
|
</ul>
|
|
</ConfirmModal>
|
|
</ConfirmModal>
|
|
- {showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
|
|
|
|
|
|
+ {showHide&&showHide.showTable?<ComplexModal onclose={this.closeTable} footer={scaleFooter}
|
|
title={tableName}
|
|
title={tableName}
|
|
icon={tableIcon}
|
|
icon={tableIcon}
|
|
top={20}
|
|
top={20}
|
|
bottom={20}
|
|
bottom={20}
|
|
width={820}>
|
|
width={820}>
|
|
- <ScaleTable data={scaleInfo} title={tableName} tableId={tableId} parentId={parentId}></ScaleTable>
|
|
|
|
|
|
+ <ScaleTable title={tableName} tableId={tableId} parentId={parentId}></ScaleTable>
|
|
</ComplexModal>:''}
|
|
</ComplexModal>:''}
|
|
{showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
|
|
{showAssess?<ComplexModal onclose={this.showAssessFn} footer={footer}
|
|
title='管理和评估'
|
|
title='管理和评估'
|