Browse Source

Squashed commit of the following:

commit 16f4a9bd92d379e2115e7d10001df91309a8b9c3
Merge: c1bf7dc 6f8fde5
Author: liucf <liucf@zjlantone.com>
Date:   Tue May 7 15:04:15 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit c1bf7dc19fab28d1699cfad6473142352209d4f8
Author: liucf <liucf@zjlantone.com>
Date:   Tue May 7 15:04:08 2019 +0800

    计算结果text为null处理

commit 6f8fde5f1de4a2fd1ed9eeb19d4771abd46299b7
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue May 7 14:40:55 2019 +0800

    查体收起个数bug修改1176

commit bb5f042e0b42cb38c6bdca1164b00b4479ad00e1
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue May 7 13:15:35 2019 +0800

    查体收起遮挡加背景

commit fada0ec114385c5664c515f4f86ba2618a096f9d
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue May 7 12:23:58 2019 +0800

    其他史无数据显示模板,评估参数不写死

commit 347443f14bf0902edbd8ca3cd1bbc943ec17d8af
Merge: d4cb47b 6e43e19
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue May 7 11:10:20 2019 +0800

    Merge remote-tracking branch 'origin/ChronicMag' into ChronicMag

commit d4cb47b6f2aee8d8134751c6b7262993d29c599f
Author: zhouna <zhouna@zjlantone.com>
Date:   Tue May 7 11:10:07 2019 +0800

    历史病例量表显示

commit 6e43e1966c9f376c46f83af92da50021186977d5
Author: liucf <liucf@zjlantone.com>
Date:   Tue May 7 10:54:02 2019 +0800

    可能结果添加推荐项

commit 2ee6ba8b86b835e759429f811ca4d7ee7c073f26
Author: liucf <liucf@zjlantone.com>
Date:   Mon May 6 17:07:34 2019 +0800

    右侧推送放开

commit 65f81b639d8581348d50885584197e18f643536f
Merge: 4011f28 a2f09ac
Author: liucf <liucf@zjlantone.com>
Date:   Mon May 6 17:05:06 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 4011f28c7f66f79d14ace47ce32e459bb7edde64
Author: liucf <liucf@zjlantone.com>
Date:   Mon May 6 17:04:57 2019 +0800

    计算按钮显示字段修改

commit a2f09ac4de68c23433a43db3dda66e489f7b555c
Merge: 74e4f37 50a207d
Author: Luolei <16657115156@163.com>
Date:   Mon May 6 17:03:14 2019 +0800

    Merge branch 'Chronic-ll' into ChronicMag

commit 50a207dc27beb237197ca553421b4f44e377ee68
Author: Luolei <16657115156@163.com>
Date:   Mon May 6 17:02:36 2019 +0800

    保存日期修改

commit 74e4f373155c043eccd0b142a1c1039a38e2a254
Merge: 4d13996 af6ea4c
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Mon May 6 16:49:28 2019 +0800

    Merge branch 'ChronicMag' of http://192.168.2.236:10080/zhouna/newICSS into ChronicMag

commit 4d13996993605eea3f5e7638c58acf9085645293
Author: zhangxc <zhangxc@zjlantone.com>
Date:   Mon May 6 16:49:09 2019 +0800

    修改慢病用药和普通病用药顺序
liucf 6 years atrás
parent
commit
58c7a71d2d

+ 2 - 1
src/common/components/CheckBtn/index.jsx

@@ -16,7 +16,8 @@ class CheckBtn extends React.Component {
   }
 
   handleClick(id){
-    this.props.handleClick(id);
+    const {handleClick} = this.props;
+    handleClick&&handleClick(id);
   }
 
   getStyle(){

+ 2 - 1
src/common/components/Radio/index.jsx

@@ -18,7 +18,8 @@ class Radio extends React.Component {
   }
 
   handleClick(id){
-    this.props.handleClick(id);
+    const {handleClick} = this.props;
+    handleClick&&handleClick(id);
   }
 
   getStyle(){

+ 7 - 5
src/common/js/func.js

@@ -95,12 +95,14 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       tempText = '',
       value = '',
       item={},
-      checkHiddenDefault=false;
+      cNum = 0,
+      checkHiddenDefault=false;//console.log(arr)
   arr&&arr.map((it,i)=>{
     notText = notTextLabel(it);
+    cNum = i;
     value = it.value||'';
     textLabel = !ifEmpty&&i==0?Object.assign({},JSON.parse(config.textLabel),{showInCheck:true}):JSON.parse(config.textLabel);
-    _textLabel = !ifEmpty&&i<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
+    _textLabel = !ifEmpty&&cNum<config.showCheckNum+1?Object.assign({},JSON.parse(config._textLabel),{showInCheck:true}):JSON.parse(config._textLabel);
     if(i===0){
       //第一个标签不是文本标签时在前面添加文本标签
       if(!noPre&&notText){
@@ -118,9 +120,9 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       saveText.push(tempText);
     }else{
       pre = arr[i-1];
-      item = !ifEmpty&&i<config.showCheckNum?Object.assign({},it,{showInCheck:true}):it;
+      item = !ifEmpty&&cNum<config.showCheckNum?Object.assign({},it,{showInCheck:true}):it;
       //判断单选项是否有默认选中,位置在隐藏区域时,查体所有标签展示
-      if(!ifEmpty&&!checkHiddenDefault&&i>config.showCheckNum&&+it.tagType===1&&(+it.controlType===0||+it.controlType===1)){
+      if(!ifEmpty&&!checkHiddenDefault&&cNum>config.showCheckNum&&+it.tagType===1&&(+it.controlType===0||+it.controlType===1)){
         if(it.questionDetailList.find((it)=>it.defaultSelect=='1')){
           checkHiddenDefault=true;
         }
@@ -148,7 +150,7 @@ export const fullfillText = (arr,noPre=false,noEnd=false,ifEmpty=true)=>{
       }
       if(notText&&!noEnd&&i===arr.length-1){//最后一个非文本标签,后面添加一个文本标签
         //不能用上面的变量textLabel,因为上一个if可能也进了,这样就是同一个对象,值改变时会同步
-        newArr.push(JSON.parse(config.textLabel));
+        newArr.push(ifEmpty?textLabel:_textLabel);
         saveText.push("");
       }
     }

+ 50 - 5
src/components/AssessResult/AssessHis/index.jsx

@@ -1,20 +1,28 @@
 import React, { Component } from "react";
 import style from "./index.less";
-import { Radio} from '@commonComp';
+import { Radio,ComplexModal} from '@commonComp';
 import arrow from '@common/images/icon_tri_blue.png';
 import loadingIcon from '@common/images/loading.gif';
 import ChooseItem from "../ChooseItem";
 import ScaleItem from "../ScaleItem";
 import ChartItem from "../ChartItem";
+import printIcon from '@common/images/team.png';
+import tableIcon from '@common/images/table.png';
+import ScaleTableHis from '@components/ScaleTableHis';
+import $ from "jquery";
 
 class AssessResultHis extends Component {
   constructor(props) {
     super(props);
     this.state={
       chartTimeTypes:{},      //图表模块
+      tableName:'',
+      tableId:'',
+      parentIndex:0
     };
     this.showAssessFn = this.showAssessFn.bind(this);
     this.getAssessContent = this.getAssessContent.bind(this);
+    this.showScaleFn = this.showScaleFn.bind(this);
   }
   handleChartChange(i,selects){
     const {chartTimeTypes} = this.state;
@@ -36,6 +44,7 @@ class AssessResultHis extends Component {
       case 0:     //数据来源与右侧手动添加
         return <ScaleItem title={name}
                           data={wholeAssess}
+                          showScaleFn={this.showScaleFn}
                           indexs={wholeIndexs}
                           disabled={true}
                           isRecommend={item.isRecommend}></ScaleItem>;
@@ -72,19 +81,55 @@ class AssessResultHis extends Component {
       chartTimeTypes:indexTimeTypes
     });
   }*/
+  showScaleFn(item,pid){
+    const { list,inquiryId } = this.props;
+    const obj = list&&list[inquiryId];
+    if(item){
+      this.setState({
+        tableName:item.name,
+        tableId:item.id,
+        showScale:!this.state.showScale
+      });
+    }else{
+      this.setState({
+        showScale:!this.state.showScale
+      });
+    }
+
+  }
+  onPrint(){
+    let dom = $("#printcontent");
+    dom.jqprint({
+      debug: false,
+      importCSS: true,
+      printContainer: true,
+      operaSupport: false,
+    });
+  }
   render() {
-    const { loading,isChronic } = this.props;
+    const { loading,isChronic, list,inquiryId } = this.props;
+    const {tableName,tableId,showScale} = this.state;
+    const obj = list&&list[inquiryId];
+    const scaleFooter = <div className={style['footer']}>
+      <span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
+      <span className={style['okBtn']} onClick={()=>this.showScaleFn()}>关闭</span>
+    </div>;
     return <div className={style['assess-cont']}>
       <div className={style['assess-result']}>
         <p className={style['enter']}>{isChronic?'管理和评估':'推荐'}结果:<a onClick={this.showAssessFn}>查看结果<img src={arrow} /></a></p>
       </div>
       <div className={style['assess-box']}>
         {loading?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
-        {/*{data?data.map((it,i)=>{
-          return this.handoutTypes(it,i);
-        }):data===null?<p className={style['no-data']}>没有历史评估记录!</p>:''}*/}
         {this.getAssessContent()}
       </div>
+      {showScale?<ComplexModal onclose={this.showScaleFn} footer={scaleFooter}
+                                          title={tableName}
+                                          icon={tableIcon}
+                                          top={20}
+                                          bottom={20}
+                                          width={820}>
+        <ScaleTableHis title={tableName} tableId={tableId} result={obj.scaleResult&&obj.scaleResult[tableId]} data={obj.scaleInfo&&obj.scaleInfo[tableId]}></ScaleTableHis>
+      </ComplexModal>:''}
     </div>;
   }
 }

+ 35 - 0
src/components/AssessResult/AssessHis/index.less

@@ -29,4 +29,39 @@
   img{
     width: 30px;
   }
+}
+.footer{
+  .print{
+    width: 111px;
+    height: 34px;
+    line-height: 34px;
+    outline: none;
+    border-radius: 4px;
+    /*color: #3B9ED0;*/
+    border: 0 none;
+    cursor: pointer;
+    background: #fff;
+    margin-right: 20px;
+    img{
+      width: 20px;
+      vertical-align: middle;
+      margin-right: 4px;
+    }
+  }
+  .okBtn{
+    width: 80px;
+    height: 34px;
+    line-height: 32px;
+    text-align: center;
+    outline: none;
+    border-radius: 4px;
+    cursor: pointer;
+    border: 1px solid #3B9ED0;
+    box-sizing: border-box;
+    margin-left: 20px;
+    background: #3B9ED0;
+    color: #fff;
+    float: right;
+    margin-right: 20px;
+  }
 }

+ 4 - 4
src/components/AssessResult/ScaleItem/index.jsx

@@ -55,10 +55,10 @@ class ScaleItem extends Component {
     });
     this.closeOption();
   }
-  handleShowScale(item,parentId){
+  handleShowScale(item,parentId,pIndex){
     const {showScaleFn,closeAssess} = this.props;
     closeAssess&&closeAssess();    //关闭评估弹窗
-    showScaleFn&&showScaleFn(item,parentId);        //显示量表
+    showScaleFn&&showScaleFn(item,parentId,pIndex);        //显示量表
 
   }
   handleRadio(item,parent){
@@ -168,7 +168,7 @@ class ScaleItem extends Component {
           let scaleRes=formulaResult&&formulaResult[it.content.id]&&formulaResult[it.content.id].calcalculate;
 
           temp =<span className={style['scale']}
-                      onClick={()=>this.handleShowScale(it.content,item.id)}>
+                      onClick={()=>this.handleShowScale(it.content,item.id,i)}>
                         {scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+scaleRes.result.text):'【'+it.content.name+'】'}
                         </span>;
         }else if(its.type==2){      //计算公式
@@ -211,7 +211,7 @@ class ScaleItem extends Component {
                                 <span>{'请输入'+item1.name+':'}</span>
                               </td>
                               <td>
-                                <input type="text" disabled={disabled} placeholder="请输入"  value={item1.value} onInput={(e)=>this.handleInputformula(item.id,idd,e.target.value)}/>
+                                {disabled?item1.value:<input type="text" placeholder="请输入"  value={item1.value} onInput={(e)=>this.handleInputformula(item.id,idd,e.target.value)}/>}
                               </td>
                               <td>
                                 <span>{item1.uint}</span>

+ 1 - 1
src/components/CheckBody/index.jsx

@@ -31,7 +31,7 @@ class CheckBody extends Component{
   }
   getLabels(){
     const {data,showArr,saveText,selecteds,importLabel} = this.props;
-    let arr = [],list=[];//console.log(data,saveText)
+    let arr = [],list=[];
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
     const moreText = filterDataArr([...saveText].splice(moreNum+1));     //被收起的标签中是否有有值得,有则不能再收起showMoreBtn?more:''

+ 1 - 0
src/components/CheckBody/index.less

@@ -7,6 +7,7 @@
   /*float: right;*/
   position: absolute;
   right: 0;
+  background: #fff;
   img{
     vertical-align: text-top;
     width: 15px;

+ 2 - 1
src/components/ChronicInfo/index.jsx

@@ -444,6 +444,7 @@ class ChronicInfo extends React.Component{
                                                isSelect={radioVal[v.id]==lis.detailName}
                                                handleClick={this.handleRadio.bind(this,lis,v)}>
                                         </Radio>
+                                        {lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
                                     </div>
                                   })}
                                 </div>
@@ -508,7 +509,7 @@ class ChronicInfo extends React.Component{
                           <span>
                             <i onClick={this.handleListClick.bind(this,v)}>{'【'+v.name+'】'}</i>
                             {/*{formulaResult&&formulaResult[v.id]?<i>{'结果:'+formulaResult[v.id].text}</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}</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>
                           </li>
                         })}

+ 3 - 0
src/components/ChronicInfo/index.less

@@ -272,4 +272,7 @@
     cursor: auto;
     margin-top: 15px;
     cursor: pointer;
+  }
+  .recomand{
+    color:#3B9ED0;
   }

+ 1 - 1
src/components/ScaleTable/index.jsx

@@ -296,7 +296,7 @@ class ScaleTable extends React.Component{
                   {this.getContent()}
                   {datas&&datas.Calc==1?<div className={style['total']}>
                     <span>总分:</span>
-                    <span>{scaleResult&&scaleResult.calcalculate&&scaleResult.calcalculate.result&&scaleResult.calcalculate.result.value +' '+ scaleResult.calcalculate.result.text||''}</span>
+                    <span>{scaleResult&&scaleResult.calcalculate&&scaleResult.calcalculate.result&&scaleResult.calcalculate.result.value +' '+ (scaleResult.calcalculate.result.text?scaleResult.calcalculate.result.text:'')}</span>
                     <span className={style['totalBtn']} onClick={this.handleFormula}>得分</span>
                   </div>:''}
                 </div>

+ 111 - 0
src/components/ScaleTableHis/index.jsx

@@ -0,0 +1,111 @@
+import React from 'react';
+import style from './index.less';
+// import mocks from '../../mock/chronicTable.js'
+import { Radio,CheckBtn ,Notify} from '@commonComp';
+ import Information from '../Information';
+ import {deepClone} from '@utils/tools.js';
+ import {getFormulaResult} from '@store/async-actions/fetchModules.js';
+/**
+*量表 具体信息页面
+*title:量表标题/scaleName
+*data:量表内容:scaleName量表标题,calculate量表计算结果,group分组,
+*
+*
+**/
+class ScaleTableHis extends React.Component{
+  constructor(props){
+    super(props);
+  }
+  filterScale(data){//type=1为表格内容
+    let scale = {};
+    for(let i=0; i<data.length; i++){
+      if(data[i].type==1){
+        scale = data[i];
+      }
+    }
+    return scale;
+  }
+
+  getContent(datas){
+    const {title,formulaResult,data} = this.props;
+    // const datas = valueData&&valueData.group?valueData:mocks.newData;
+    let content =  datas&&datas.group&&datas.group.map((v,i)=>{
+                return <div className={style['group']}>
+                  <p className={style['groupName']}>{v.groupName}</p>
+                  {v.rows&&v.rows.map((it,ind)=>{
+                    return <div>
+                      {it.row.map((item,index)=>{
+                        if(item.controlType==0){
+                          return <div className={style['block']} style={{border:it.required==1&&!item.isSelect&&start?'1px solid #f00':'none'}}>
+                              <p className={style['miniName']}>{item.name}</p>
+                              {item.details&&item.details.map((vv,ii)=>{
+                                return <div className={style['item']}>
+                                        <Radio label={vv.detailName+'('+vv.score+')'}
+                                           isSelect={vv.select==1}
+                                               disabled={true}>
+                                        </Radio>
+                                        {vv.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
+                                    </div>
+                              })}
+                              
+                            </div>
+                          }else{
+                            return <div className={style['block']}>
+                                <p className={style['miniName']}>{item.name}</p>
+                                  {item.details&&item.details.map((vv,ii)=>{
+                                    return <div className={style['item']}>
+                                    <CheckBtn value={vv.detailName}
+                                                    label={vv.detailName}
+                                                    disabled={true}
+                                                    isSelect={vv.select==1}>
+                                          </CheckBtn>
+                                    {vv.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
+                                    </div>
+                                  })}
+                            </div>
+                          }
+                        
+                      })}
+                    </div>
+                  })}
+                  {v.groupCalculate.isShow==1?<p className={style['subTotal']}>
+                    <span>计分:</span>
+                    {/*<span>{v.groupCalculate.result.value}</span>*/}
+                    <span>{scaleResult&&scaleResult.group.map((m,ii)=>{
+                      if(m.groupName==v.groupName){
+                        return m.groupCalculate.result.value;
+                      }
+                    })}</span>
+                  </p>:''}  
+                </div>
+              })
+    return content;
+  }
+
+  render(){
+    const {title,data,result} = this.props;console.log(this.props)
+    const scale = data && this.filterScale(data);
+    const datas = scale && scale.content && JSON.parse(scale.content);
+    const scaleResult = datas; //量表计算结果
+    return <div className={style['tableBox']} id="printcontent">
+            <div className={style['printShow']}>
+              <Information></Information>
+            </div> 
+            <h1>{datas?datas.scaleName:''}</h1>
+            {data && data.map((v,i)=>{
+              if(v.type==0){
+                return <div dangerouslySetInnerHTML={{__html:v.content}} className={style['textlh']}></div>
+              }else{
+                return <div className={style['textContent']}>
+                  {this.getContent(datas)}
+                  {datas&&datas.Calc==1?<div className={style['total']}>
+                    <span>总分:</span>
+                    <span>{result&&result.calcalculate&&result.calcalculate.result&&result.calcalculate.result.value +' '+ result.calcalculate.result.text||''}</span>
+                  </div>:''}
+                </div>
+              }
+            })}
+          </div>
+  }
+}
+export default ScaleTableHis;

+ 83 - 0
src/components/ScaleTableHis/index.less

@@ -0,0 +1,83 @@
+.tableBox{
+  // height: 690px;
+  overflow-y: auto;
+  padding: 30px;
+  h1{
+    font-size: 16px;
+    font-weight: bold;
+    margin: 10px 0 30px;
+    text-align: center;
+  }
+}
+strong{
+  font-weight: bold;
+}
+.textlh{
+  p{
+    line-height: 22px;
+  }
+}
+.textContent{
+  margin: 40px 0 30px;
+  .group{
+    border-bottom: 4px solid #EBEBEB;
+    padding-bottom: 10px;
+    margin-top: 25px;
+    .item{
+      display: inline-block;
+      margin-right: 24px;
+    }
+    .recomand{
+      color:#3B9ED0;
+    }
+    .block{
+      margin-top: 20px;
+      padding-top: 5px;
+    }
+    .redBorder{
+      border: 1px solid #f00;
+    }
+    // .miniName{
+    //   margin-top: 25px;
+    // }
+  }
+  .groupName{
+    font-size: 14px;
+    font-weight: bold;
+    color:#000;
+    margin: 25px 0;
+  }
+  .subTotal{
+    height: 49px;
+    line-height: 49px;
+    border-top: 1px solid #EBEBEB;
+    text-align: right;
+    margin-top: 10px;
+  }
+  .total{
+    height: 72px;
+    line-height: 72px;
+    border-bottom: 10px solid #EBEBEB;
+    text-align: right;
+    .totalBtn{
+      display: inline-block;
+      width: 64px;
+      height: 32px;
+      line-height: 32px;
+      color:#3B9ED0;
+      border: 1px solid #3B9ED0;
+      border-radius: 4px;
+      margin-left: 40px;
+      text-align: center;
+      cursor: pointer;
+    }
+  }
+}
+.printShow {
+  display: none;
+}
+@media print {
+  .printShow {
+    display: block;
+  }
+}

+ 5 - 5
src/store/async-actions/fetchModules.js

@@ -155,11 +155,11 @@ export function getInitData(){
     json(api.getBigPush,param).then((res)=>{
       if(+res.data.code === 0){
         const data = res.data.data&&res.data.data.vital;
-        //const str = JSON.stringify(data);
-        //const arr = fullfillText(JSON.parse(str),false,false,false).newArr;
+        const str = JSON.stringify(data);
+        const arr = fullfillText(JSON.parse(str),false,false,false).newArr;
         dispatch({
           type:SET,
-          data:[...data],
+          data:arr,
           isEmpty:false
         });
       }else{
@@ -187,7 +187,7 @@ export function setOtherHisModule(){
     const arrSave = JSON.parse(JSON.stringify(initData.otherHisSave || null));    //最近其他史saveText
     const selects = JSON.parse(JSON.stringify(initData.otherSelecteds || null));  //其他史杂音类选中项
     const isHis = initData.otherIsHis;     //是否是历史数据
-    const onlyOneText = arr && arr.length == 1 && arr[0].tagType == 8 && !(arr[0].name || arr[0].value);    //是否只有一个自由文本标签
+    const onlyOneText = arr && arr.length == 1 && arr[0].tagType == 8 && !arr[0].value;    //是否只有一个自由文本标签
     const listObj = isHis && (mode == 1 || (!onlyOneText && mode == 0)) ? {
       newArr: arr,
       saveText: arrSave || []
@@ -260,7 +260,7 @@ export function getIndexData(range){
       diseaseId:21773,
       startTime:range[0],
       endTime:range[1],
-      patientId:1001,//patInfo.message.patientId,
+      patientId:patInfo.message.patientId,
     };
     return json(api.getIndexData,param);
   }

+ 1 - 1
src/store/async-actions/homePage.js

@@ -21,7 +21,7 @@ function modulesParseJson(data){
   let json = {},obj={},saveTextJson={},moduleName={};
   data.map((it)=>{
     moduleName[config.moduleCP[it.type]] = it.name;//添加病情变化/病程变化子模板需要使用模板名称
-    obj = fullfillText(it.moduleDetailDTOList);
+    obj = it.type==4?fullfillText(it.moduleDetailDTOList,false,false,false):fullfillText(it.moduleDetailDTOList);
     json[config.moduleCP[it.type]] = formatContinueDots(obj.newArr);
     saveTextJson[config.moduleCP[it.type]] = obj.saveText;
   });

+ 11 - 8
src/store/async-actions/print.js

@@ -14,16 +14,13 @@ export const saveMessage = (bool) => {
     let baseList = store.getState();
     let state = baseList.patInfo.message;
     let whichSign = baseList.typeConfig.typeConfig;
+    const pushMessage = baseList.pushMessage;
     let jsonStr = getAllDataStringList(baseList);
     let jsonData = getAllDataList(baseList);
     const lisData = baseList.inspect.pushItem;
     const lisArr = transferIndexData(lisData);
-      let obj = [];
-      Object.keys(baseList.assessResult.wholeIndexs).map((i)=>{
-        obj[i]=baseList.pushMessage.chronicPushItems[i];
-      });
     const evaluation={
-      htmlContent:JSON.stringify(getEvaluations(baseList.assessResult,obj)),
+      htmlContent:JSON.stringify(getEvaluations(baseList.assessResult,pushMessage)),
       //scaleList:[]
     };//getEvaluation();
     //console.log(baseList)
@@ -133,14 +130,20 @@ function transferIndexData(data) {
    return arr;
 }
 
-function getEvaluations(base,added){
+function getEvaluations(base,pushMessage){
+    let obj = [];
+    Object.keys(base.wholeIndexs).map((i)=>{
+      obj[i]=pushMessage.chronicPushItems[i];
+    });
     return {
       data:base.data,
       chooseSelecteds:base.chooseSelecteds,
       indexTimeTypes:base.indexTimeTypes,
-      wholeAssess:added,
+      wholeAssess:obj,
       wholeAssessText:base.wholeAssessText,
-      wholeIndexs:base.wholeIndexs
+      wholeIndexs:base.wholeIndexs,
+      scaleInfo:pushMessage.scaleInfo,
+      scaleResult:pushMessage.formulaResult
     };
 }
 

+ 1 - 1
src/store/async-actions/pushMessage.js

@@ -157,7 +157,7 @@ export const getTableList = (id)=>{
 }
 
 // 量表明细
-export const getScaleInfo = (it)=>{console.log('参数:',it)
+export const getScaleInfo = (it)=>{
     return (dispatch,getState)=>{
         const emrData = getEMRParams();
           const params = {