Quellcode durchsuchen

Merge branch 'optimize' into optimize-zxc

zhangxc vor 6 Jahren
Ursprung
Commit
eadbac5863
34 geänderte Dateien mit 363 neuen und 125 gelöschten Zeilen
  1. 5 4
      src/common/components/ComplexModal/index.less
  2. 1 1
      src/common/components/WrapModalContainer/index.jsx
  3. 1 1
      src/common/components/WrapModalContainer/index.less
  4. 15 10
      src/components/AssessResult/ScaleItem/index.jsx
  5. 8 6
      src/components/AssessResult/index.jsx
  6. 13 0
      src/components/AssessResult/index.less
  7. 2 3
      src/components/CheckBody/index.jsx
  8. 7 1
      src/components/ChronicInfo/index.jsx
  9. 6 6
      src/components/CopyRight/CopyModalSon/index.jsx
  10. 65 0
      src/components/CopyRight/CopyModalSon/index.less
  11. 5 7
      src/components/CopyRight/DiscontentSon/index.jsx
  12. 90 0
      src/components/CopyRight/DiscontentSon/index.less
  13. 1 0
      src/components/CopyRight/index.less
  14. 2 3
      src/components/CurrentIll/index.jsx
  15. 2 20
      src/components/DiagnosticList/index.jsx
  16. 8 8
      src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx
  17. 5 5
      src/components/EmergencyProcedure/EmergencyPart/index.jsx
  18. 15 3
      src/components/MedicalInfo/index.jsx
  19. 3 0
      src/components/MedicalInfo/index.less
  20. 2 3
      src/components/OtherHistory/index.jsx
  21. 15 3
      src/components/ScaleSearch/index.jsx
  22. 3 0
      src/components/ScaleSearch/index.less
  23. 2 2
      src/components/ScaleTableHis/index.jsx
  24. 13 1
      src/containers/AssessResult.js
  25. 10 2
      src/containers/CurrentIll.js
  26. 1 1
      src/containers/DiagnosticList.js
  27. 12 1
      src/containers/MainSuit.js
  28. 9 2
      src/store/actions/checkBody.js
  29. 9 9
      src/store/actions/currentIll.js
  30. 1 15
      src/store/actions/mainSuit.js
  31. 23 5
      src/store/actions/otherHistory.js
  32. 5 1
      src/store/reducers/assessResult.js
  33. 3 1
      src/store/reducers/wrapModalBodyPac.js
  34. 1 1
      src/utils/tools.js

+ 5 - 4
src/common/components/ComplexModal/index.less

@@ -51,16 +51,17 @@
     position: absolute;
     top:0;
     width: 100%;
-  }
-  img{
-    vertical-align: text-top;
-  }
+    img{
+      vertical-align: text-top;
+    }
+  }  
   .closeIcon{
     cursor: pointer;
     position: absolute;
     top: 14px;
     right: 10px;
     z-index: 100;
+    vertical-align: text-top;
   }
 }
 

+ 1 - 1
src/common/components/WrapModalContainer/index.jsx

@@ -18,7 +18,7 @@ class WrapModalContainer extends React.Component {
       <div className={style['shade']} onClick={onClose}></div>
       <div className={style['modal']} id="previewWrapper" style={{width:width+'px',marginLeft:(-width/2)+'px',height:height,marginTop:(-height/2)+'px'}}>
         <div id="previewStatic" className={`${style['close']} drag-title`}>{title}</div>
-        <img src={close} onClick={onClose} />
+        <img className={style['img']} src={close} onClick={onClose} />
         {children}
       </div>
     </div>,domNode)

+ 1 - 1
src/common/components/WrapModalContainer/index.less

@@ -39,7 +39,7 @@
     background-color: #fff;
     z-index: 10;
   }
-  img{
+  .img{
     cursor: pointer;
     position: absolute;
     top: 10px;

+ 15 - 10
src/components/AssessResult/ScaleItem/index.jsx

@@ -40,7 +40,8 @@ class ScaleItem extends Component {
   }
   showOption(id){
     this.setState({
-      optionId:id
+      optionId: id,
+      formulaId: ''
     })
   }
   closeOption(){
@@ -116,7 +117,8 @@ class ScaleItem extends Component {
   }
   showFormula(id){
     this.setState({
-      formulaId:id
+      formulaId: id,
+      optionId: ''
     });
   }
   closeFormula(){
@@ -183,9 +185,11 @@ class ScaleItem extends Component {
       if(indexs[i]&&indexs[i].includes(j)){
         if(its.type==1){     //量表
           let scaleRes=formulaResult&&formulaResult[it.content.conceptId]&&formulaResult[it.content.conceptId].calcalculate;
+          const name = scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.content.name+'】';
           temp =<span className={style['scale']}
+                      title={name}
                       onClick={this.handleShowScale.bind(this,it.content)}>
-                        {scaleRes&&scaleRes.result?(' 【'+it.content.name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+it.content.name+'】'}
+                        {name}
                         </span>;
         }else if(its.type==2){      //计算公式
           const showRes = calcuResult&&calcuResult[item.conceptId]||it.content.result;
@@ -282,10 +286,10 @@ class ScaleItem extends Component {
         }
         const passId = item.details[j].type==1?item.details[j].content.conceptId:undefined;
         const li = disabled?<li>
-            <span>{item.name}:</span>
+            <span className={style['s-title']}>{item.name}:</span>
             <div className={style['row']}>{temp}</div>
           </li>:<li>
-          <span>{item.name}:</span>
+          <span className={style['s-title']}>{item.name}:</span>
           <div className={style['row']}>{temp}</div>
           <div className={style["recommend"]} onClick={()=>this.props.handleRemove(false,i,passId,j)}>
             <img className={style["deleteIconNo"]} src={deleteIconNo} />
@@ -323,15 +327,16 @@ class ScaleItem extends Component {
       it = {conceptId:i,name:scaleItems[i].name};//this.getScaleContent(scaleItems[i].data);
       if(!it) continue;
       let scaleRes=formulaResult&&formulaResult[it.conceptId]&&formulaResult[it.conceptId].calcalculate;
+      const name = scaleRes&&scaleRes.result?(' 【'+scaleItems[i].name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+scaleItems[i].name+'】';
       //这里onClick不能用箭头函数,用箭头函数会一直绑定for的最后一个it
-      temp =<span className={style['scale']} onClick={this.handleShowScale.bind(this,it)}>
-                        {scaleRes&&scaleRes.result?(' 【'+scaleItems[i].name+'】 结果:'+scaleRes.result.value+" "+(scaleRes.result.text||'')):'【'+scaleItems[i].name+'】'}
-                        </span>;
+      temp =<span className={style['scale']}
+                  title={name}
+                  onClick={this.handleShowScale.bind(this,it)}>{name}</span>;
       li = disabled?<li>
-        <span>相关量表:</span>
+        <span className={style['s-title']}>相关量表:</span>
         <div className={style['row']}>{temp}</div>
       </li>:<li>
-        <span>相关量表:</span>
+        <span className={style['s-title']}>相关量表:</span>
         <div className={style['row']}>{temp}</div>
         <div className={style["recommend"]} onClick={()=>this.props.handleRemove(true,it.conceptId)}>
           <img className={style["deleteIconNo"]} src={deleteIconNo} />

+ 8 - 6
src/components/AssessResult/index.jsx

@@ -15,6 +15,7 @@ class AssessResult extends Component {
     const chooseSelecteds = deepClone(props.chooseSelecteds);
     const wholeIndexs = deepClone(props.wholeIndexs);      //深度复制,Object.assgin为浅复制,下下级会同源
     const wholeScale = deepClone(props.wholeScaleItems);
+    const wholeResults = deepClone(props.wholeResults);
 
     this.state={
       chooseSelecteds:chooseSelecteds,     //大数据选择模块
@@ -22,10 +23,7 @@ class AssessResult extends Component {
       wholeAssessItems:wholeIndexs,     //整体评估模块
       wholeScaleItems:wholeScale,
       wholeAssessText:props.wholeAssessText||{},     //整体评估补充说明
-      wholeResults:{
-        possible:props.possible,
-        radioVal:props.radioVal
-      },
+      wholeResults: wholeResults,
       calcuResult:props.calcuResult,     //计算公式结果
       calcuValues:props.calcuValues,    //计算公式填的值
       addedScaleIds:props.addedScaleIds,    //已加入量表的id
@@ -74,10 +72,12 @@ class AssessResult extends Component {
   }
   handleResult(opt){
     const {wholeResults} = this.state.wholeResults;
+    const {savePossibleRes} = this.props;
     const res = Object.assign({},wholeResults,opt);
     this.setState({
       wholeResults:res
     });
+    savePossibleRes && savePossibleRes(res);
   }
   handleChooseChange(i,selects){
     const {chooseSelecteds} = this.state;
@@ -92,21 +92,23 @@ class AssessResult extends Component {
     });
   }
   handleCalcu(values,ret){
+    const {saveCalcuValue,saveCalcuResult}=this.props;
     this.setState({
       calcuResult:ret,
       calcuValues:values
     });
+    saveCalcuResult&&saveCalcuResult(ret);
+    saveCalcuValue&&saveCalcuValue(values);
   }
   componentWillUnmount(){
     //点确定关闭弹窗时把参数传到父组件去
-    const {saveAssessInfos,isAssessConfirm,clearChartData,handleSavePossible} = this.props;
+    const {saveAssessInfos,isAssessConfirm,clearChartData} = this.props;
     clearChartData&&clearChartData();
     if(isAssessConfirm && readyKeepHistory() == 1){
       Notify.error("主诉不能为空");
     }else if(isAssessConfirm && readyKeepHistory() == 2){
       Notify.info('诊断不能为空');
     }
-    handleSavePossible&&handleSavePossible(this.state.wholeResults);
     if(isAssessConfirm){
       saveAssessInfos(this.state,readyKeepHistory());
     }

+ 13 - 0
src/components/AssessResult/index.less

@@ -36,6 +36,7 @@
     line-height: 35px;
     .row{
       display: inline-block;
+      max-width: 100%;
     }
     .results{
       position: relative;
@@ -45,11 +46,22 @@
       margin-right: 10px;
       .recomand{
         color: @blue;
+
       }
     }
+    .s-title{
+      display: inline-block;
+      max-width: 100px;
+      vertical-align: top;
+    }
     .scale{
+      display: inline-block;
       color: @blue;
       cursor: pointer;
+      white-space: nowrap;
+      max-width: 100%;
+      overflow: hidden;
+      text-overflow: ellipsis;
     }
     .blue{
       color:#3B9ED0;
@@ -63,6 +75,7 @@
       float: right;
       color: #929292;
       cursor: pointer;
+      margin-top: 8px;
     }
   }
   .edit-row{

+ 2 - 3
src/components/CheckBody/index.jsx

@@ -70,10 +70,9 @@ class CheckBody extends Component{
       leftL = getPageCoordinate(e).boxLeft
     }else{
       const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-        return;
+      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
+        leftL = ele.offsetLeft+90
       }
-      leftL = ele.offsetLeft+90
     }
     getSearchLocation(getPageCoordinate(e).boxTop,leftL);
     this.setState({

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

@@ -296,7 +296,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) {
@@ -484,6 +484,12 @@ 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);

+ 6 - 6
src/components/CopyRight/CopyModalSon/index.jsx

@@ -1,7 +1,8 @@
 import React, { Component } from "react";
-import style from "../index.less";
+import style from "./index.less";
 import close from '../../../common/images/icon_close.png'
 import { dragBox } from '@utils/drag';
+import ReactDom from "react-dom";
 
 class DiscontentSon extends Component {
   constructor(props) {
@@ -14,10 +15,9 @@ class DiscontentSon extends Component {
   render() {
     const { closeCopyModal,copyVisible,date,copyContent,number } = this.props;
 
-    return <div
-        className={style["copyModal"]}
-        style={copyVisible ? { display: "block" } : { display: "none" }}
-      >
+    
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<React.Fragment>
         <div className={style["shade"]} onClick={closeCopyModal}/>
         <div className={style["copyContent"]} id="CopyModalWrap">
           <div className={`${style["header"]} drag-title`} id="CopyModalTitle">版本信息</div>
@@ -28,7 +28,7 @@ class DiscontentSon extends Component {
           </div>
           <div className={style["content"]}>{copyContent}</div>
         </div>
-      </div>
+        </React.Fragment>,domNode)
   }
 }
 

+ 65 - 0
src/components/CopyRight/CopyModalSon/index.less

@@ -0,0 +1,65 @@
+
+      .copyContent{
+        position: fixed;
+        width: 820px;
+        left: 50%;
+        top: 20%;
+        margin-left: -410px;
+        background: #fff;
+        height: 60%;
+        z-index: 1000;
+        padding: 80px 0 40px;
+        img{
+          cursor: pointer;
+          position: absolute;
+          right: 10px;
+          top: 7px;
+          z-index: 100;
+        }
+        .header {
+          position: absolute;
+          width: 100%;
+          top: 0;
+          font-size: 14px;
+          height: 40px;
+          line-height: 40px;
+          padding: 0 20px;
+          border-bottom: 1px solid #EAEDF1;
+        }
+        .now{
+          position: absolute;
+          width: 100%;
+          top: 35px;
+          font-size: 18px;
+          padding: 15px 10px;
+          border-bottom:1px solid #EAEDF1;
+          margin-bottom: 10px;
+          span{
+            float: right;
+            margin-top: 3px;
+          }
+        }
+        .content {
+          height: 100%;
+          padding: 10px;
+          overflow-y: auto;
+          font-size: 12px;
+          line-height: 20px;
+          div{
+            font-size: 12px;
+            line-height: 20px;
+          }
+        }
+      }
+      .shade {
+        position: fixed;
+        left: 0;
+        top: 0;
+        right: 0;
+        bottom:0;
+        background: #000;
+        opacity: 0.6;
+        z-index: 999;
+        filter:alpha(opacity=60);
+        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+      }

+ 5 - 7
src/components/CopyRight/DiscontentSon/index.jsx

@@ -1,7 +1,8 @@
 import React, { Component } from "react";
-import style from "../index.less";
+import style from "./index.less";
 import close from '../../../common/images/icon_close.png'
 import { dragBox } from '@utils/drag';
+import ReactDom from "react-dom";
 
 class DiscontentSon extends Component {
   constructor(props) {
@@ -13,11 +14,8 @@ class DiscontentSon extends Component {
 
   render() {
     const { closeDisclatmerModal,disVisible,disclatmerContent } = this.props;
-
-    return <div
-          className={style["disModal"]}
-          style={disVisible ? { display: "block" } : { display: "none" }}
-        >
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<React.Fragment>
           <div className={style["shade"]} onClick={closeDisclatmerModal}/>
           <div className={style["disContent"]} id="disContentWrap">
             <div className={`${style["header"]} drag-title`} id="DisclatmerTitle">免责声明</div>
@@ -25,7 +23,7 @@ class DiscontentSon extends Component {
             <div className={style["content"]}>{disclatmerContent}</div>
             <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
           </div>
-      </div>
+          </React.Fragment>,domNode)
   }
 }
 

+ 90 - 0
src/components/CopyRight/DiscontentSon/index.less

@@ -0,0 +1,90 @@
+@import "~@less/mixin.less";
+
+      .disContent{
+        position: fixed;  
+        width: 50%;
+        height: 60%;
+        left: 25%;
+        background: #fff;
+        top: 20%;
+        z-index: 1000;
+        padding: 40px 0 60px 0;
+        img{
+          cursor: pointer;
+          position: absolute;
+          right: 10px;
+          top: 7px;
+          z-index: 100;
+        }
+        .header {
+          position: absolute;
+          top: 0px;
+          width: 100%;
+          height: 40px;
+          line-height: 40px;
+          font-size: 14px;
+          padding: 0 20px;
+          background: #fff;
+          width: 100% ;
+          border-bottom: 1px solid #EAEDF1;
+        }
+        .now{
+          font-size: 18px;
+          padding: 15px 10px;
+          border-bottom:1px solid #EAEDF1;
+          margin-bottom: 10px;
+          span{
+            float: right;
+            margin-top: 3px;
+          }
+        }
+        .content {
+          padding: 20px;
+          height: 100%;
+          overflow: auto;
+          font-size: 12px;
+          line-height: 20px;
+          div{
+            font-size: 12px;
+            line-height: 20px;
+          }
+        }
+        .btnBox {
+          position: relative;
+          // bottom: -60px;
+          width: 100%;
+          height: 60px;
+          background: #fff;
+        }
+        .btn{
+          .btnCom;
+          position: relative;
+          display: inline-block;
+          width: 80px;
+          height: 34px;
+          left: 50%;
+          top: 13px;
+          margin-left: -40px;
+          line-height: 34px;
+          font-size: 14px;
+          // border-radius: 4px;
+          background: #3B9ED0;
+          color:#fff;
+          // text-align: center;
+          // cursor: pointer;
+        }
+      }
+      
+    .shade {
+      position: fixed;
+      left: 0;
+      top: 0;
+      right: 0;
+      bottom:0;
+      z-index: 999;
+      background: #000;
+      opacity: 0.6;
+      filter:alpha(opacity=60);
+      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+    }
+    

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

@@ -45,6 +45,7 @@
       bottom:0;
       background: #000;
       opacity: 0.6;
+      z-index: 9999;
       filter:alpha(opacity=60);
       -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
     }

+ 2 - 3
src/components/CurrentIll/index.jsx

@@ -85,10 +85,9 @@ class CurrentIll extends Component{
       leftL = getPageCoordinate(e).boxLeft
     }else{
       const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-        return;
+      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
+        leftL = ele.offsetLeft+90
       }
-      leftL = ele.offsetLeft+90
     }
     getSearchLocation(getPageCoordinate(e).boxTop,leftL)
     this.setState({

+ 2 - 20
src/components/DiagnosticList/index.jsx

@@ -32,8 +32,6 @@ class DiagnosticList extends Component {
             assessId:'',
             disName:'',
             isAssessConfirm:false,
-            radioVal:{},  //可能结果选择内容
-            possible:{},  //可能结果
             hasOndel: false,
             hasOnIndex: -1
         }
@@ -48,7 +46,6 @@ class DiagnosticList extends Component {
         this.closeHistoryCaseModal = this.closeHistoryCaseModal.bind(this);
         this.referCase = this.referCase.bind(this);
         this.handleSaveAssess = this.handleSaveAssess.bind(this);       //评估弹窗确定
-        this.handleSavePossible = this.handleSavePossible.bind(this);
         this.onPrint = this.onPrint.bind(this);
     }
     onPrint() {
@@ -209,12 +206,6 @@ class DiagnosticList extends Component {
             dragBox('dragModalWrap','dragModalTitle','del')
         }
     }
-    handleSavePossible(obj){
-      this.setState({
-        possible:Object.assign({},obj.possible),
-        radioVal:Object.assign({},obj.radioVal),//不设置radioVal只有最近一次选中的值
-      })
-    }
     handleSaveAssess(){
       this.setState({
         isAssessConfirm:true
@@ -231,12 +222,6 @@ class DiagnosticList extends Component {
       if (this.props.diagnosticStr != nextprops.diagnosticStr) {
         this.props.getBilling();
       }
-      if(deepClone(nextprops.wholeResults)!=deepClone(this.props.wholeResults)){
-          this.setState({
-            radioVal:Object.assign({},nextprops.wholeResults.radioVal),
-            possible:Object.assign({},nextprops.wholeResults.possible),
-          })
-      }
     }
     handleEnterDel(index) {
       this.setState({
@@ -252,7 +237,7 @@ class DiagnosticList extends Component {
     }
     render(){
         const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading} = this.props;
-        const { visible, treatTitle ,showAssess, isAssessConfirm, radioVal, possible,assessId,disName, hasOndel, hasOnIndex} = this.state;
+      const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
@@ -290,12 +275,9 @@ class DiagnosticList extends Component {
                                                top={'3%'}
                                                bottom={'3%'}
                                                width={820}>
-                       <AssessResult handleSavePossible={this.handleSavePossible}
-                                     closeAssess={this.showAssessFn.bind(this)}
+                       <AssessResult closeAssess={this.showAssessFn.bind(this)}
                                      disId={assessId}
                                      disName={disName}
-                                     radioVal={radioVal}
-                                     possible={possible}
                                      isAssessConfirm={isAssessConfirm}
                                      ></AssessResult>
                       </ComplexModal>:''}

+ 8 - 8
src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx

@@ -37,12 +37,12 @@ class PartSec extends React.Component{
       num:num
     })
   }
-  backSec(){
+  backSec(flg){
     const {makeSureCom} = this.props
     this.setState({
       partCom:true
     })
-    makeSureCom('',false,0)    
+    makeSureCom('',false,0,flg)    
   }
   handleStepSecCom(){
     const {data} = this.props
@@ -145,7 +145,7 @@ class PartSec extends React.Component{
         return <React.Fragment>
           <div className={`${styles.nextWar} ${styles.next}`}>
             <span>气胸患者</span> 
-            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+            <img onClick={()=>{this.backSec(true)}} src={back} alt=""/>
           </div>
           <h4>{'结合症状体征是否危机生命是否濒死休克'}</h4>
           <div style={{display:reback?'block':'none'}} className={`${styles.nextWar} ${styles.next}`}>
@@ -161,7 +161,7 @@ class PartSec extends React.Component{
         return <React.Fragment>
         <div className={`${styles.nextCom} ${styles.next}`}>
           <span>非气胸患者</span> 
-          <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+          <img onClick={()=>{this.backSec(true)}} src={back} alt=""/>
         </div>
         <h4>{'查找其他原因'}</h4>
       </React.Fragment>
@@ -171,7 +171,7 @@ class PartSec extends React.Component{
         return <React.Fragment>
           <div className={`${styles.nextWar} ${styles.next}`}>
             <span>伴低血压休克</span> 
-            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+            <img onClick={()=>{this.backSec(true)}} src={back} alt=""/>
           </div>
           <h4>判断右心负荷是否增加</h4>
           <div style={{display:resback?'block':'none'}} className={`${styles.nextWar} ${styles.next}`}>
@@ -187,14 +187,14 @@ class PartSec extends React.Component{
         return <React.Fragment>
           <div className={`${styles.nextCom} ${styles.next}`}>
             <span>不伴低血压休克</span> 
-            <img onClick={()=>{this.backSec()}} src={back} alt=""/>
+            <img onClick={()=>{this.backSec(true)}} src={back} alt=""/>
           </div>
           <h4>根据临床经验或者PE评分规则评估PE可能性</h4>
-          <div className={`${styles.nextWar} ${styles.next}`}>
+          <div style={{display:resback?'block':'none'}} className={`${styles.nextWar} ${styles.next}`}>
             <span>评分高或DDI阳性</span> 
             <i onClick={()=>{makeSureCom('',true,1)}}>确定</i>
           </div>
-          <div className={`${styles.nextCom} ${styles.next}`}>
+          <div style={{display:resback?'block':'none'}} className={`${styles.nextCom} ${styles.next}`}>
             <span>评分低且DDI阴性</span> 
             <i onClick={()=>{makeSureCom('',true,0)}}>确定</i>
           </div>

+ 5 - 5
src/components/EmergencyProcedure/EmergencyPart/index.jsx

@@ -55,15 +55,16 @@ class EmergencyProcedure extends React.Component {
     }else if(idx == 2){
       this.setState({
         trdShow:flg,
-        num:num
+        num:num,
+        back:back
       })
-      this.setState({back:back})
     }else if(idx == 3){
       this.setState({
         trdShow:flg,
-        num:num
+        num:num,
+        resback:true,
+        resback:back
       })
-      this.setState({resback:back})
     }else if(idx == 5){
       this.setState({
         trdShow:flg,
@@ -75,7 +76,6 @@ class EmergencyProcedure extends React.Component {
         num:num
       })
     }
-    
   }
   render(){
     const {data,idx} = this.props

+ 15 - 3
src/components/MedicalInfo/index.jsx

@@ -22,10 +22,12 @@ class MedicalInfo extends Component {
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
         return searchResult && searchResult.map((item) => {
-                return <li key={item.conceptId} onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>
+                return <li key={item.conceptId}
+                           title='点击查看详情'
+                           onClick={() =>getAllConceptDetail({name: item.name, type: item.type})}>
                             <span>{item.name}</span>
                             <i>( {item.libTypeName} )</i>
-                            <button>查看</button>
+                            {/*<button>查看</button>*/}
                         </li>;
             });
     }
@@ -41,9 +43,19 @@ class MedicalInfo extends Component {
       handleChangeValue&&handleChangeValue(val);
     }
   handleChange(){
+    const value = this.$inp.current.value;
+    const {clearResult} = this.props;
       this.setState({
-        val:this.$inp.current.value
+        val: value
       });
+    if (value === '') {
+      this.setState({
+        val: '',
+        hasSearch: false,
+        msg: ''
+      });
+      clearResult && clearResult();
+    }
   }
   handleEnter(e){
       if(e.keyCode==13){

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

@@ -81,6 +81,9 @@
                 margin-top: 8px;
                 outline: none;
             }
+            &:hover{
+                border-bottom:2px solid #3B9ED0;
+            }
         }
     }
     .no-data{

+ 2 - 3
src/components/OtherHistory/index.jsx

@@ -56,10 +56,9 @@ class OtherHistory extends Component{
       leftL = getPageCoordinate(e).boxLeft
     }else{
       const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') == -1){     //点击的不是span无法聚焦就不再设置位置
-        return;
+      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
+        leftL = ele.offsetLeft+90
       }
-      leftL = ele.offsetLeft+90
     }
     getSearchLocation(getPageCoordinate(e).boxTop,leftL)
     this.setState({

+ 15 - 3
src/components/ScaleSearch/index.jsx

@@ -38,9 +38,11 @@ class ScaleSearch extends Component {
   getSearchList() {
     const { searchResult } = this.props;
     return searchResult && searchResult.map((item) => {
-      return <li key={item.conceptId} onClick={this.showScale.bind(this,{conceptId:item.conceptId,name:item.name})}>
+      return <li key={item.conceptId}
+                 title='点击查看详情'
+                 onClick={this.showScale.bind(this,{conceptId:item.conceptId,name:item.name})}>
         <span className={style['scale-name']}>{item.name}{this.getResult(item.conceptId)}</span>
-        <button>查看</button>
+        {/*<button>查看</button>*/}
       </li>;
     });
   }
@@ -56,9 +58,19 @@ class ScaleSearch extends Component {
     handleChangeValue&&handleChangeValue(val);
   }
   handleChange(){
+    const value = this.$inp.current.value;
+    const {clearResult} = this.props;
     this.setState({
-      val:this.$inp.current.value
+      val: value
     });
+    if (value === '') {
+      this.setState({
+        val: '',
+        hasSearch: false,
+        msg: ''
+      });
+      clearResult && clearResult();
+    }
   }
   handleEnter(e){
     if(e.keyCode==13){

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

@@ -86,6 +86,9 @@
         margin-top: 8px;
         outline: none;
       }
+      &:hover{
+        border-bottom:2px solid #3B9ED0;
+      }
     }
   }
   .no-data{

+ 2 - 2
src/components/ScaleTableHis/index.jsx

@@ -104,7 +104,7 @@ class ScaleTableHis extends React.Component{
 
   render(){
     const {title,data,result} = this.props;
-    const scale = data && this.filterScale(data);
+    const scale = data && this.filterScale(data.data);
     const datas = scale && scale.content && JSON.parse(scale.content);
     const scaleResult = datas; //量表计算结果
     return <div className={style['tableBox']} id="printcontent">
@@ -112,7 +112,7 @@ class ScaleTableHis extends React.Component{
               <Information></Information>
             </div> 
             <h1>{datas?datas.scaleName:''}</h1>
-            {data && data.map((v,i)=>{
+            {data &&data.data&& data.data.map((v,i)=>{
               if(v.type==0){
                 return <div dangerouslySetInnerHTML={{__html:v.content}} className={style['textlh']}></div>
               }else{

+ 13 - 1
src/containers/AssessResult.js

@@ -4,7 +4,7 @@ import AssessResult from '@components/AssessResult';
 import {ISREAD} from '@store/types/homePage.js';
 import {billing} from '@store/async-actions/pushMessage';
 import {getAssessData,getIndexData} from '@store/async-actions/fetchModules';
-import {SET_ASSESS_DATA,SET_INDEX_DATA,SET_INDEX_SUB_TYPE,REMOVE_ASSESS_ITEMS,CLEAR_INDEX_DATA,SET_CHRONIC_CALCU_RESULT} from '@types/assessResult';
+import {SET_ASSESS_DATA,SET_INDEX_DATA,SET_INDEX_SUB_TYPE,REMOVE_ASSESS_ITEMS,CLEAR_INDEX_DATA,SET_CHRONIC_CALCU_RESULT,SET_CALCU_VALUES} from '@types/assessResult';
 import {parseChartData,deepClone} from '@utils/tools';
 import {SHOW_TABLE_LIST,HIDE_TABLE_LIST} from '@store/types/pushMessage';
 import {saveMessage} from "../store/async-actions/print";
@@ -119,6 +119,18 @@ function mapDispatchToProps(dispatch) {
         }
       }
     },
+    savePossibleRes(data) {
+      dispatch({
+        type: 'SAVE_POSSIBLE_RESULT',
+        wholeResults: data
+      })
+    },
+    saveCalcuValue(data){
+      dispatch({
+        type:SET_CALCU_VALUES,
+        data
+      })
+    }
   }
 }
 

+ 10 - 2
src/containers/CurrentIll.js

@@ -56,10 +56,18 @@ function mapDispatchToProps(dispatch) {
           clickType:'单击',
           num:1
         });
+        // 判断是否有子模板数据
+        const sonId = obj.relationModule;//子模板id
+        let sonArr = allModules.filter((item)=>{return item.id==sonId})
+        if(sonArr.length==0){//未匹配到子模板
+          Notify.info("未找到相关内容");
+          return
+        }
         dispatch({
           type:INSERT_PROCESS,
-          id:obj.relationModule,
-          allModules:allModules
+          // id:obj.relationModule,
+          // allModules:allModules
+          addSmoduleData:JSON.parse(JSON.stringify(sonArr[0].moduleDetailDTOList))
         });
         dispatch({
           type:ISREAD

+ 1 - 1
src/containers/DiagnosticList.js

@@ -25,7 +25,7 @@ function mapStateToProps(state) {
         items:state.historyTemplates.items,
         chronicMagItem: diagnC?diagnC:state.mainSuit.chronicDesease,
         typeConfig: state.typeConfig.typeConfig,
-        wholeResults:assessResult.wholeResults,
+      //wholeResults:assessResult.wholeResults,
         scaleInfo: pushMessage.scaleInfo,//量表内容
         showHide: pushMessage.showHide,
         loading: diagnosticList.loading,

+ 12 - 1
src/containers/MainSuit.js

@@ -72,11 +72,22 @@ function mapDispatchToProps(dispatch) {
             clickType:'单击',
             num:1
           });
-          dispatch({
+          // 判断是否有子模板数据
+          const sonId = obj.relationModule;
+          let sonArr = allModules.filter((item)=>{return item.id==sonId})
+          if(sonArr.length==0){//未匹配到子模板
+            Notify.info("未找到相关内容");
+            return
+          }
+          /*dispatch({
             type: SHOW_TAIL,
             info:obj.questionMapping,
             id:obj.relationModule,
             allModules:allModules
+          })*/
+          dispatch({
+            type: SHOW_TAIL,
+            addSmoduleData:JSON.parse(JSON.stringify(sonArr[0].moduleDetailDTOList))
           })
           dispatch({
             type:ISREAD

+ 9 - 2
src/store/actions/checkBody.js

@@ -383,7 +383,10 @@ export const changeNumLabelVal = (state,action)=>{
   const newVal = changeVal;
   let item = res.data[index];
   const next = res.data[+index+1];
+  const next2 = res.data[+index + 2];
   const nextVal = next.value||next.name;
+  //下一个非文本标签是数字组件
+  const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
   //标签后是不是标点符号标签,是的话删除本标签时一起删除
   let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
   if(totalVal.trim()){
@@ -399,7 +402,11 @@ export const changeNumLabelVal = (state,action)=>{
     }
     
   }else{//删除完标签内容则删除该标签
-    const num = nextIsDot?2:1;
+    let num = nextIsDot ? 2 : 1;
+    if (nextIsDot && next2IsNum) {      //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
+      next.value = '';
+      num = 1;
+    }
     res.data.splice(index,num);
     res.selecteds.splice(index,num);      //杂音类样式选中状态对应
     res.saveText = checkFullfillText(res.data).saveText;
@@ -421,7 +428,7 @@ export function clearCheckBody(state,action){  //清空
 
 //文本输入标签
 export function setInputLabel(state,action){
-  let res = Object.assign({},state);//console.log(state,action)
+  let res = Object.assign({}, state);
   const {i,text,prefix,suffix,subIndex} = action;
   const item = res.data[i];
   if(+item.tagType===3){      //multSpred标签

+ 9 - 9
src/store/actions/currentIll.js

@@ -63,14 +63,7 @@ export const setModule = (state,action)=>{
 //插入病程变化
 export const insertProcess = (state,action)=>{
   const res = Object.assign({},state);
-  const sonId = action.id;//子模板id
-  let addSmoduleData;
-  let allModules = action.allModules;
-  for(let k=0; k<allModules.length; k++){
-    if(allModules[k].id==sonId){
-      addSmoduleData = JSON.parse(JSON.stringify(allModules[k].moduleDetailDTOList));
-    }
-  }
+  let addSmoduleData = action.addSmoduleData;
   let data = res.data;
   let newData = insertPro(data,addSmoduleData);
   res.data = fullfillText(newData).newArr;
@@ -639,7 +632,10 @@ export const changeNumLabelVal = (state,action)=>{
   const newVal = changeVal;
   let item = res.data[index];
   const next = res.data[+index+1];
+  const next2 = res.data[+index + 2];
   const nextVal = next.value||next.name;
+  //下一个非文本标签是数字组件
+  const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
   //标签后是不是标点符号标签,是的话删除本标签时一起删除
   let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
   // let labText = totalVal?totalVal:newVal;   //如单选没有前后缀
@@ -651,7 +647,11 @@ export const changeNumLabelVal = (state,action)=>{
     }
     res.saveText[index] = totalVal;
   }else{//删除完标签内容则删除该标签
-    const num = nextIsDot?2:1;
+    let num = nextIsDot ? 2 : 1;
+    if (nextIsDot && next2IsNum) {      //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
+      next.value = '';
+      num = 1;
+    }
     res.data.splice(index,num);
     res.saveText.splice(index,num);
     // res.saveText = fullfillText(res.data).saveText;

+ 1 - 15
src/store/actions/mainSuit.js

@@ -95,27 +95,13 @@ export const getBigSymptom = (state,action) => {
 //点击插入新模板--添加病程变化
 export const handleTailClick = (state,action)=>{
   const res = Object.assign({},state);
-  const sonId = action.id;//子模板id
   let num = res.moduleNum.num;
   num++;
-  // const addSmoduleData = JSON.parse(JSON.stringify(res.addSmoduleData));
-  // const addDatas = JSON.parse(JSON.stringify(fullfillText(action.info).newArr));
-  let addSmoduleData;
-  // const allModules = JSON.parse(localStorage.getItem('modules'));
-  let allModules = action.allModules;
-  for(let k=0; k<allModules.length; k++){
-    if(allModules[k].id==sonId){
-      addSmoduleData = JSON.parse(JSON.stringify(allModules[k].moduleDetailDTOList));
-    }
-  }
+  let addSmoduleData = action.addSmoduleData;
   let datas = JSON.parse(JSON.stringify(res.data));
-  let leng = datas.length;
   
   for(let i=0; i<addSmoduleData.length; i++){
     addSmoduleData[i].pos = num;
-    // let pos = leng-1+i;
-   /* let pos = leng-2+i;
-    datas.splice(pos,0,addDatas[i]);*/
   }
   let newData = insertPro(datas,addSmoduleData);
   res.data = fullfillText(newData).newArr;

+ 23 - 5
src/store/actions/otherHistory.js

@@ -210,10 +210,21 @@ export function setCheckText(state,action) {
 
 //文本输入标签
 export function setOtherInput(state,action){
-  let res = Object.assign({},state);
-  const {i,text,prefix,suffix} = action;
-  if(res.data[i]){
-    res.data[i].value=text;
+  let res = Object.assign({}, state);//console.log(state,action)
+  const {i, text, prefix, suffix, subIndex} = action;
+  const item = res.data[i];
+  if (+item.tagType === 3 || +item.tagType === 4) {      //multSpred标签
+    item.questionMapping[subIndex].value = text;
+    let texts = item.questionMapping.map((it) => {
+      return (it.labelPrefix || '') + (it.value || '') + (it.labelSuffix || '');
+    });
+    res.saveText[i] = texts.join('');
+    res.update = Math.random();
+    return res;
+  } else {
+    if (item) {
+      item.value = text;
+    }
   }
   if(text){
     res.saveText[i] = prefix+text+suffix;
@@ -366,7 +377,10 @@ export const changeNumLabelVal = (state,action)=>{
   const newVal = changeVal;
   let item = res.data[index];
   const next = res.data[+index+1];
+  const next2 = res.data[+index + 2];
   const nextVal = next.value||next.name;
+  //下一个非文本标签是数字组件
+  const next2IsNum = +next2.tagType === 1 && +next2.controlType === 7;
   //标签后是不是标点符号标签,是的话删除本标签时一起删除
   let nextIsDot = +next.tagType===8&&!nextVal.match(config.punctuationReg);
   let labText = totalVal?totalVal:newVal;   //如单选没有前后缀
@@ -378,7 +392,11 @@ export const changeNumLabelVal = (state,action)=>{
     }
     res.saveText[index] = labText;
   }else{//删除完标签内容则删除该标签
-    const num = nextIsDot?2:1;
+    let num = nextIsDot ? 2 : 1;
+    if (nextIsDot && next2IsNum) {      //解决连续2个相同的数字组件删除第一个,第二个显示异常bug--临时方案
+      next.value = '';
+      num = 1;
+    }
     res.data.splice(index,num);
     res.selecteds.splice(index,num);//杂音类样式选中状态对应
     res.saveText = fullfillText(res.data).saveText;

+ 5 - 1
src/store/reducers/assessResult.js

@@ -120,7 +120,11 @@ export default (state=init,action)=>{
       res.update1= Math.random();
       return res;
     case SET_CALCU_VALUES:
-      res.calcuValues[action.id] = action.data;
+      if(action.id){
+        res.calcuValues[action.id] = action.data;
+      }else{
+        res.calcuValues = action.data;
+      }
       return res;
     default:
       return res;

+ 3 - 1
src/store/reducers/wrapModalBodyPac.js

@@ -46,7 +46,9 @@ export default (state = initSearchList, action) => {
         tempArrs.push(tmpObj)
       }
     }
-    tmpListImport.push(importLis)
+    if(JSON.stringify(importLis) != '[]'){
+      tmpListImport.push(importLis)
+    }
 
     allState.checkedListImport = [...tmpListImport]
     allState.allCheckLis = [...tempArrs]

+ 1 - 1
src/utils/tools.js

@@ -743,7 +743,7 @@ function getPageCoordinate(event,stic){//获取鼠标点击的位置
     var y = (e.pageY+(stic?25:0)) || (e.clientY + scrollY + (stic?25:0));//弹窗位置偏下25
     let obj = {
       boxLeft : x ,
-      boxTop : y
+      boxTop : y+18
     }
     return obj;
 }