Kaynağa Gözat

Merge remote-tracking branch 'origin/master' into referMaster

zhouna 5 yıl önce
ebeveyn
işleme
4f90575e97
100 değiştirilmiş dosya ile 1289 ekleme ve 847 silme
  1. 11 8
      src/common/components/EditableSpan/index.jsx
  2. 18 1
      src/common/components/ItemBox/index.jsx
  3. 5 4
      src/common/components/Loading/index.jsx
  4. 15 1
      src/common/components/Loading/index.less
  5. 8 8
      src/common/components/Notify/index.js
  6. 9 9
      src/common/components/Notify/index.less
  7. 1 2
      src/common/components/Notify/notify.js
  8. 1 0
      src/common/components/NumberPan/index.jsx
  9. 75 30
      src/common/components/NumberUnitPan/index.jsx
  10. 17 1
      src/common/components/NumberUnitPan/index.less
  11. 3 3
      src/common/components/Radio/index.jsx
  12. 3 0
      src/common/components/Radio/index.less
  13. 13 1
      src/common/components/Textarea/index.jsx
  14. BIN
      src/common/images/icon-current.png
  15. BIN
      src/common/images/wn.png
  16. 1 1
      src/common/less/base.less
  17. 1 0
      src/common/less/variables.less
  18. 1 1
      src/components/AddAssistCheck/index.jsx
  19. 1 1
      src/components/Advice/index.jsx
  20. 5 3
      src/components/AssessResult/ChooseItem/index.jsx
  21. 14 278
      src/components/AssessResult/ScaleItem/index.jsx
  22. 3 34
      src/components/AssessResult/index.jsx
  23. 5 7
      src/components/AssessResult/index.less
  24. 30 0
      src/components/AssistCheck/index.jsx
  25. 5 4
      src/components/Banner/index.jsx
  26. 1 0
      src/components/CheckBody/index.less
  27. 42 22
      src/components/ChronicInfo/index.jsx
  28. 5 0
      src/components/CommonSymptom/index.jsx
  29. 1 2
      src/components/CurrentIll/index.jsx
  30. 13 2
      src/components/DiagnosticItem/index.jsx
  31. 3 0
      src/components/DiagnosticList/index.jsx
  32. 1 1
      src/components/EMRContainer/index.jsx
  33. 4 2
      src/components/InfoTitle/index.jsx
  34. 1 1
      src/components/InfoTitle/index.less
  35. 30 0
      src/components/Inspect/index.jsx
  36. 4 2
      src/components/MainSuit/index.jsx
  37. 1 0
      src/components/MultSpread/index.jsx
  38. 33 16
      src/components/NumberDrop/index.jsx
  39. 2 2
      src/components/NumberUnitDrop/index.jsx
  40. 2 2
      src/components/Operation/index.less
  41. 1 1
      src/components/OtherHistory/index.jsx
  42. 18 6
      src/components/PreInIcss/RotateImg/index.jsx
  43. 2 2
      src/components/PreviewBody/Inspect/index.jsx
  44. 1 1
      src/components/PreviewBody/ItemPart/index.jsx
  45. 1 1
      src/components/PreviewBody/index.jsx
  46. 2 0
      src/components/PushContainer/index.jsx
  47. 17 7
      src/components/PushItems/DetailsModal/index.jsx
  48. 87 37
      src/components/PushItems/DetailsModal/index.less
  49. 58 0
      src/components/PushItems/MRAnalyse/index.jsx
  50. 118 0
      src/components/PushItems/MRAnalyse/index.less
  51. 2 0
      src/components/PushItems/RecommendInspect/index.less
  52. 15 1
      src/components/PushItems/index.jsx
  53. 1 0
      src/components/RadioDrop/index.less
  54. 14 8
      src/components/RadioInpDrop/index.jsx
  55. 2 2
      src/components/SpreadDrop/index.jsx
  56. 3 3
      src/components/TemplateItems/index.jsx
  57. 1 1
      src/components/TemplateItems/index.less
  58. 11 3
      src/components/Treat/AdverseReactions/index.jsx
  59. 2 2
      src/components/Treat/GeneralTreat/index.jsx
  60. 25 13
      src/components/TreatDesc/DrugInfo/index.jsx
  61. 91 34
      src/components/TreatDesc/DrugInfo/index.less
  62. 0 40
      src/containers/AssessResult.js
  63. 4 2
      src/containers/AssistCheck.js
  64. 12 2
      src/containers/CheckBody.js
  65. 14 3
      src/containers/CurrentIll.js
  66. 2 1
      src/containers/DiagnosticItem.js
  67. 3 2
      src/containers/DiagnosticList.js
  68. 12 3
      src/containers/EditableSpan.js
  69. 4 0
      src/containers/Inspect.js
  70. 13 2
      src/containers/MainSuit.js
  71. 1 2
      src/containers/MedicalInfoContainer.js
  72. 12 1
      src/containers/MultSpread.js
  73. 14 2
      src/containers/Multiple.js
  74. 12 2
      src/containers/NumberDrop.js
  75. 12 2
      src/containers/NumberUnitDrop.js
  76. 12 2
      src/containers/RadioDrop.js
  77. 12 2
      src/containers/RadioInpDrop.js
  78. 1 2
      src/containers/ScaleSearchContainer.js
  79. 42 6
      src/containers/SpreadDrop.js
  80. 17 0
      src/containers/eleType.js
  81. 2 1
      src/modules/HomePage/index.jsx
  82. 6 2
      src/store/actions/checkBody.js
  83. 38 14
      src/store/actions/currentIll.js
  84. 1 1
      src/store/actions/diagnosticList.js
  85. 2 1
      src/store/actions/homePage.js
  86. 2 1
      src/store/actions/otherHistory.js
  87. 16 10
      src/store/actions/pushMessage.js
  88. 1 1
      src/store/actions/typeConfig.js
  89. 9 14
      src/store/async-actions/fetchModules.js
  90. 2 1
      src/store/async-actions/historyTemplates.js
  91. 1 11
      src/store/async-actions/mainSuit.js
  92. 26 3
      src/store/async-actions/patInfo.js
  93. 24 25
      src/store/async-actions/preIcss.js
  94. 5 2
      src/store/async-actions/print.js
  95. 55 19
      src/store/async-actions/pushMessage.js
  96. 4 2
      src/store/async-actions/tabTemplate.js
  97. 12 86
      src/store/async-actions/treat.js
  98. 22 6
      src/store/reducers/assistCheck.js
  99. 2 0
      src/store/reducers/copyRight.js
  100. 0 0
      src/store/reducers/homePage.js

+ 11 - 8
src/common/components/EditableSpan/index.jsx

@@ -54,7 +54,7 @@ class EditableSpan extends Component{
       });
     })
     
-    const {mainSaveText,full,setFocusIndex,i,boxMark,value}= this.props;
+    const {mainSaveText,full,setFocusIndex,i,boxMark,value,handleClear}= this.props;
     let mainText = filterDataArr(mainSaveText);//主诉字数
     if(+boxMark==3||+boxMark==4){         //主诉为空,且第一次聚焦其他史查体时提示且不可输入
       if(!mainText&&full&&(value===''||value===undefined)){
@@ -63,6 +63,7 @@ class EditableSpan extends Component{
         return ;
       }
     }
+    handleClear&&handleClear({boxMark});    //点到其他自由文本标签时关闭搜索下拉
     let text = e.target.innerText || e.target.innerHTML;
     setFocusIndex&&setFocusIndex({i,boxMark,dom:this.$span});
     this.setState({
@@ -303,7 +304,8 @@ class EditableSpan extends Component{
             }
           }else{
             let tmpVal = data.substr(0,data.length-1)
-            handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            // handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            removeId && removeId({boxMark,i:index-1,text:""});
             preObj.html(tmpVal)
             if(preObj[0].nodeName !=="DIV"){
               moveEnd(preObj[0]);
@@ -340,9 +342,10 @@ class EditableSpan extends Component{
     setSelectArea({i,boxMark,dir:'start'});
   }
   selectEnd(){
-    const {i,setSelectArea,boxMark,select_start}= this.props;
+    const {i,setSelectArea,boxMark,select_start,handleClear}= this.props;
     if(select_start!==i){     //判断不能省,否则无法聚焦
       setSelectArea({i,boxMark,dir:'end'});
+      handleClear&&handleClear({boxMark})
       window.getSelection().empty();
     }
   }
@@ -353,16 +356,16 @@ class EditableSpan extends Component{
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
     //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
     const ext = preIsExt?style['ext']:style['unselect'];
-    const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
+    const unselect = value.match(config.punctuationReg)||(preSelected&&preSelected.match(config.punctuationReg))?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
     const selectedArea = mouseSelect?style['selected-area']:'';
     const $span = this.$span.current;
-    if(br&&$span&&!$span.innerText){
-      this.$span.current.innerHTML=' ';
+    const val = $span&&$span.innerHTML.trim();
+    if(br&&$span&&!val){
+      $span.innerHTML=' ';
     }
-    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6),selectedArea);
+    return classNames(style['editable-span'],isFull,hasBr,setFontColorSize(2,unselect?6:8),unselect,selectedArea);
   }
-
   render() {
     return <span className={this.getClass()}
                  contentEditable='true'

+ 18 - 1
src/common/components/ItemBox/index.jsx

@@ -2,6 +2,12 @@ import React,{Component} from 'react';
 import style from './index.less';
 import store from '@store';
 import {isIE,handleEnter,setFontColorSize} from '@utils/tools.js';
+import {HIDEDROP,
+  SET_CURRENT_MODULE
+} from '@types/homePage';
+import {
+  getMRAnalyse
+} from '@store/async-actions/pushMessage';
 import $ from 'jquery';
 /***
  * author:zn@2018-11-13
@@ -30,9 +36,20 @@ class ItemBox extends Component {
   }
   handleClick(e){
     e.stopPropagation();
-    const {handleClick,hideAllDrop} = this.props;
+    const {handleClick,hideAllDrop,title} = this.props;
+    const state = store.getState()
+    const moduleName = state.homePage.moduleName
+    const currentIllIsNull = state.currentIll.saveText.length === 0
+    const checkBodyIsNull = state.checkBody.saveText.length === 0
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
     hideAllDrop&&hideAllDrop();
+    if((title=='化验'|| title=='辅检'|| title=='诊断' || title=='医嘱'||title == '现病史' &&  currentIllIsNull || title == '查体' &&  checkBodyIsNull)&& moduleName != title) {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:title
+      })
+      store.dispatch(getMRAnalyse())
+    }
   }
   handleInput(e){
     const {handleChange,data} = this.props;

+ 5 - 4
src/common/components/Loading/index.jsx

@@ -8,8 +8,9 @@
 import React, {Component} from 'react';
 /*import PropTypes from 'prop-types';*/
 import style from './index.less';
-// import icon from './img/loading.gif';
+ import wnIcon from '@common/images/wn.png';
 import icon from '@common/images/loading.gif';
+import Notify from '@commonComp/Notify';
 import ReactDom from 'react-dom';
 
 /*const propTypes = {
@@ -37,16 +38,16 @@ const defaultProps = {
 
 class Loading extends React.Component{
     render(){
-        const {text,show} = this.props;
+        const {text,show,type} = this.props;
         const domNode = document.getElementById('root');
         return ReactDom.createPortal(<React.Fragment>
             <div className={style['loading']} style={{display: show ? 'block' : 'none'}}>
                 {/*{this.props.shadeIsShow?<div className={style['cover']}/>:null}*/}
                 <div className={style['cover']}/>
-                <div className={style['info']}>
+              {type==='warning'?Notify.info(text,0, false,false):<div className={style['info']}>
                     <img src={icon}/>
                     <p>{text}</p>
-                </div>
+                </div>}
             </div>
         </React.Fragment>,domNode
         )

+ 15 - 1
src/common/components/Loading/index.less

@@ -23,8 +23,22 @@
       width: 40px;
       height: 40px;
     }
+    p{
+      color: #fff;
+    }
   }
-  p{
+  .t-info{
+    position: absolute;
+    top: 40%;
+    left: 40%;
+    background: #000;
+    opacity: 0.8;
     color: #fff;
+    padding:25px;
+    border-radius: 10px;
+    img{
+      vertical-align: middle;
+      margin-right: 10px;
+    }
   }
 }

+ 8 - 8
src/common/components/Notify/index.js

@@ -29,19 +29,19 @@ function createNotification() {
 }
 
 let notification
-const notice = (type, content, duration=2000, onClose) => {
+const notice = (type, content, duration=2000, onClose, showClose=true) => {
     if (!notification) notification = createNotification()
-    return notification.addNotice({ type, content, duration, onClose })
+    return notification.addNotice({ type, content, duration, onClose,showClose })
 }
 
 export default {
-    info(content, duration, onClose) {
-        return notice('info', content, duration, onClose)
+    info(content, duration, onClose, showClose) {
+        return notice('info', content, duration, onClose, showClose)
     },
-    success(content = '操作成功', duration, onClose) {
-        return notice('success', content, duration, onClose)
+    success(content = '操作成功', duration, onClose, showClose) {
+        return notice('success', content, duration, onClose, showClose)
     },
-    error(content, duration , onClose) {
-        return notice('error', content, duration, onClose)
+    error(content, duration , onClose, showClose) {
+        return notice('error', content, duration, onClose, showClose)
     }
 }

+ 9 - 9
src/common/components/Notify/index.less

@@ -10,11 +10,11 @@
   top: 0; 
 }
 .notify-box {
-  min-width: 350px;
-  height:70px;
+  // min-width: 350px;
+  // height:70px;
   position: fixed;
-  padding-right: 90px;
-  top:30%;
+  padding-right: 100px;
+  top:40%;
   left:50%;
   transform: translate(-50%, -50%);
   // margin:-35px 0 0  -175px;
@@ -22,13 +22,13 @@
   border-radius: 10px;
   line-height: 70px;
   box-sizing: border-box;
-  border: 1px solid;
+  border: 1px solid #000;
 }
 .notify-text {
-  min-width: 224px;
-  height: 70px;
+  // min-width: 224px;
+  max-height: 280px;
   padding:  0 40px 0 0;
-  // overflow: hidden;
+  overflow-y: auto;
   position: relative;
   left: 66px;
   top: 0;
@@ -76,6 +76,6 @@
 }
 .notify-close {
   position: absolute;
-  right: 10px;
+  right: 0px;
   top: 15px;
 }

+ 1 - 2
src/common/components/Notify/notify.js

@@ -22,7 +22,6 @@ class NotifyBox extends Component {
 
         // notices.push(notice);//展示所有的提示
         notices[0] = notice;//仅展示最后一个提示
-        
         this.setState({ notices })
         if (notice.duration > 0) {
             clearTimeout(this.state.timer);
@@ -70,7 +69,7 @@ class NotifyBox extends Component {
                             <div className={style['notify-box']} style={styles[notice.type]}>
                                 <div className={style[`${icons[notice.type]}`]}></div>
                                 <div className={style['notify-text']}>{notice.content}</div>
-                                <img  className={style['notify-close']} onClick={()=>{this.removeNotice(notice.key)}} src={close}/>
+                                {notice.showClose&&<img  className={style['notify-close']} onClick={()=>{this.removeNotice(notice.key)}} src={close}/>}
                             </div>
                         </div>
                     ))

+ 1 - 0
src/common/components/NumberPan/index.jsx

@@ -73,6 +73,7 @@ class NumberPan extends Component{
                 style={this.getStyle()}
                 onBlur={(e)=>e.stopPropagation()} 
                 onDoubleClick={(e)=>e.stopPropagation()}
+                onMouseDown={(e)=>e.stopPropagation()}
                 onClick={(e)=>e.stopPropagation()}>
       <table className={style['pan']} >
         <tr>

+ 75 - 30
src/common/components/NumberUnitPan/index.jsx

@@ -15,16 +15,17 @@ class NumberUnitPan extends Component{
       value:''
     }
     this.handleSelect = this.handleSelect.bind(this);
+    this.getUnitTable = this.getUnitTable.bind(this);
   }
   handleSelect(e){
     e.stopPropagation();
     const {handleSelect,toClear} = this.props;
     const text = e.target.innerText || e.target.innerHTML;
     const preValue = this.state.value;
-    if(+text==0 && !preValue){//第一位不能是0
-      Notify.info("请输入正确时间");
-      return false;
-    }
+    // if(+text==0 && !preValue){//第一位不能是0
+    //   Notify.info("请输入正确时间");
+    //   return false;
+    // }
     const value = toClear?'':this.state.value;     //键盘输入替换已有的值
     this.setState({
       value: value+text
@@ -48,10 +49,10 @@ class NumberUnitPan extends Component{
   handleBack(e){
     e.stopPropagation();
      const {handleSelect,value} = this.props;
-    const len = value.length-1;
-    if(len<0){
+    if(value===undefined||value==''){
       return;
     }
+    const len = value.length-1;
     const text = value.substring(0,len);
     this.setState({
       value:text
@@ -66,48 +67,40 @@ class NumberUnitPan extends Component{
       display:show?'table':'none'
     }
   }
-  componentWillReceiveProps(nextProps){
-    //重新选择的值替换 不追加
-     if(!nextProps.show){
-      this.setState({
-        value:''
-      });
-     }
-  }
-  render(){
-    const domNode = document.getElementById('root');
-    return <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={this.getStyle()}>
-        <table className={style['pan']} >
+  getUnitTable(){
+    const {unitType} = this.props;
+    if(unitType == 8){
+      return <table className={style['pan']} >
         <tr>
           <td><span onClick={this.handleSelect}>1</span></td>
           <td><span onClick={this.handleSelect}>2</span></td>
           <td><span onClick={this.handleSelect}>3</span></td>
-          <td><span onClick={this.handleSelect}>分钟</span></td>
-          <td><span onClick={this.handleSelect}></span></td>
-          <td><span onClick={this.handleSelect}>余</span></td>
+          <td><span onClick={this.handleSelect}>ml</span></td>
+          <td><span onClick={this.handleSelect}>qd</span></td>
+          <td><span onClick={this.handleClose.bind(this)} className={style.borderNone}>.</span></td>
         </tr>
         <tr>
           <td><span onClick={this.handleSelect}>4</span></td>
           <td><span onClick={this.handleSelect}>5</span></td>
           <td><span onClick={this.handleSelect}>6</span></td>
-          <td><span onClick={this.handleSelect}>小时</span></td>
-          <td><span onClick={this.handleSelect}></span></td>
-          <td><span onClick={this.handleSelect}>次</span></td> 
+          <td><span onClick={this.handleSelect}>mg</span></td>
+          <td><span onClick={this.handleSelect}>bid</span></td>
+          <td><span onClick={this.handleClose.bind(this)} className={style.borderNone}>.</span></td>
         </tr>
         <tr>
           <td><span onClick={this.handleSelect}>7</span></td>
           <td><span onClick={this.handleSelect}>8</span></td>
           <td><span onClick={this.handleSelect}>9</span></td>
-          <td><span onClick={this.handleSelect}></span></td>
-          <td><span onClick={this.handleSelect}></span></td>
-          <td><span onClick={this.handleSelect}>岁</span></td> 
+          <td><span onClick={this.handleSelect}>g</span></td>
+          <td><span onClick={this.handleSelect}>tid</span></td>
+          <td><span onClick={this.handleClose.bind(this)} className={style.borderNone}>.</span></td>
         </tr>
         <tr>
           <td><span onClick={this.handleSelect}>.</span></td>
           <td><span onClick={this.handleSelect}>0</span></td>
-          <td><span onClick={this.handleSelect}></span></td>
-          <td><span onClick={this.handleSelect}>/</span></td>
-          <td><span onClick={this.handleSelect}></span></td>
+          <td><span onClick={this.handleSelect}></span></td>
+          <td><span onClick={this.handleSelect}></span></td>
+          <td><span onClick={this.handleSelect}>qid</span></td>
           <td className={style['imgN']}><img src={backspace} onClick={this.handleBack.bind(this)} /></td>
         </tr>
         <tr>
@@ -115,6 +108,58 @@ class NumberUnitPan extends Component{
           <td colspan="3"><span onClick={this.handleClose.bind(this)} className={style['comf']}>确定</span></td>
         </tr>
       </table>
+    }
+    return <table className={style['pan']} >
+      <tr>
+        <td><span onClick={this.handleSelect}>1</span></td>
+        <td><span onClick={this.handleSelect}>2</span></td>
+        <td><span onClick={this.handleSelect}>3</span></td>
+        <td><span onClick={this.handleSelect}>分钟</span></td>
+        <td><span onClick={this.handleSelect}>周</span></td>
+        <td><span onClick={this.handleSelect}>余</span></td>
+      </tr>
+      <tr>
+        <td><span onClick={this.handleSelect}>4</span></td>
+        <td><span onClick={this.handleSelect}>5</span></td>
+        <td><span onClick={this.handleSelect}>6</span></td>
+        <td><span onClick={this.handleSelect}>小时</span></td>
+        <td><span onClick={this.handleSelect}>年</span></td>
+        <td><span onClick={this.handleSelect}>次</span></td>
+      </tr>
+      <tr>
+        <td><span onClick={this.handleSelect}>7</span></td>
+        <td><span onClick={this.handleSelect}>8</span></td>
+        <td><span onClick={this.handleSelect}>9</span></td>
+        <td><span onClick={this.handleSelect}>天</span></td>
+        <td><span onClick={this.handleSelect}>月</span></td>
+        <td><span onClick={this.handleSelect}>岁</span></td> 
+      </tr>
+      <tr>
+        <td><span onClick={this.handleSelect}>.</span></td>
+        <td><span onClick={this.handleSelect}>0</span></td>
+        <td><span onClick={this.handleSelect}>~</span></td>
+        <td><span onClick={this.handleSelect}>/</span></td>
+        <td><span onClick={this.handleSelect}>秒</span></td>
+        <td className={style['imgN']}><img src={backspace} onClick={this.handleBack.bind(this)} /></td>
+      </tr>
+      <tr>
+        <td colspan="3"><span onClick={this.handleClear.bind(this)} className={style['clearN']}>清空</span></td>
+        <td colspan="3"><span onClick={this.handleClose.bind(this)} className={style['comf']}>确定</span></td>
+      </tr>
+    </table>
+  }
+  componentWillReceiveProps(nextProps){
+    //重新选择的值替换 不追加
+     if(!nextProps.show){
+      this.setState({
+        value:''
+      });
+     }
+  }
+  render(){
+    const domNode = document.getElementById('root');
+    return <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={this.getStyle()}>
+        {this.getUnitTable()}
       </div>
   }
 }

+ 17 - 1
src/common/components/NumberUnitPan/index.less

@@ -5,9 +5,16 @@
 .pan{
   width: 280px;
   font-weight: normal;
+  tr {
+    overflow: hidden;
+    height:44px;
+    padding: 0;
+  }
   td{
-    width: 68px;
+    width: 49px;
     height:44px;
+    padding: 0;
+    overflow: hidden;
   }
   span{
     border:1px #fff solid;
@@ -17,7 +24,10 @@
     width: 100%;
     height: 100%;
     text-align: center;
+    height: 44px;
     line-height: 44px;
+    padding: 0;
+    margin: 0;
     color: #333;
     cursor: pointer;
   }
@@ -48,4 +58,10 @@
   .clearN:hover{
     border-color: #fff;
   }
+  .borderNone {
+    opacity: 0;
+  }
+  .borderNone:hover {
+    border: 1px solid transparent;
+  }
 }

+ 3 - 3
src/common/components/Radio/index.jsx

@@ -36,10 +36,10 @@ class Radio extends React.Component {
   }
 
   render() {
-    const {id,label,isSelect,disabled} = this.props;
+    const {id,label,isSelect,disabled, noSelected} = this.props;
     if(disabled){
       return (
-        <div className={style['radio']}
+        <div className={`${style['radio']} ${noSelected ? style['noSelected']:''}`}
              style={this.getStyle()}>
           <img src={isSelect?disable:off}/>
           <span style={{color:'#aaa'}}>{label}</span>
@@ -47,7 +47,7 @@ class Radio extends React.Component {
       )
     }
     return (
-      <div className={style['radio']}
+      <div className={`${style['radio']} ${noSelected ? style['noSelected']:''}`}
            onClick={() =>this.handleClick(id)}
            style={this.getStyle()}>
         <img src={isSelect?on:off}/>

+ 3 - 0
src/common/components/Radio/index.less

@@ -7,4 +7,7 @@
     vertical-align: middle;
     margin-right: 6px;
   }
+}
+.noSelected {
+  cursor:not-allowed;
 }

+ 13 - 1
src/common/components/Textarea/index.jsx

@@ -7,6 +7,8 @@ import {getFeature} from '@store/async-actions/fetchModules';
 import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
 import store from '@store';
 import $ from "jquery";
+import {SET_CURRENT_MODULE} from '@types/homePage';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
 class Textarea extends Component {
   constructor(props) {
@@ -25,7 +27,9 @@ class Textarea extends Component {
     this.handleBlur = this.handleBlur.bind(this);
   }
   handleFocus(e){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
-    const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark} = this.props;
+    const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark,title} = this.props;
+    const state = store.getState()
+    const moduleName = state.homePage.moduleName
     //黏贴时去掉html格式
     const that = this;
     let txt = '';
@@ -56,6 +60,14 @@ class Textarea extends Component {
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});
     }*/
+    if(moduleName != title) {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:title
+      })
+      store.dispatch(getMRAnalyse())
+    }
+
 
   }
   handleInput(e){

BIN
src/common/images/icon-current.png


BIN
src/common/images/wn.png


+ 1 - 1
src/common/less/base.less

@@ -50,7 +50,7 @@ button + button {
 html,body {
     font-size: @font-size-base; 
     // color: @B800;
-    background: @body-bg;
+    /*background: @body-bg;*/
 }
 :global(#root) {
     overflow: auto;

+ 1 - 0
src/common/less/variables.less

@@ -201,6 +201,7 @@
 .blue-border{
   border:2px @blue solid;
   border-radius: 2px;
+  cursor: text!important;
   /*box-shadow: 0px 0px 2px @blue;*/
 }
 

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

@@ -38,7 +38,7 @@ class AddAssistCheck extends React.Component {
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
-          if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+          if (_con && _con != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
             if (this.state.show) {
               this.props.setHighter(48)
             }

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

@@ -90,7 +90,7 @@ class Advice extends Component{
         </div>}
         {!isFirstMainDiag && hasFollowUp &&<FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
         {advice.scheme && advice.scheme.length > 0 &&<div contentEditable='false' className={`${style['scheme']} ${setFontColorSize(2)}`}>
-          {advice.scheme && advice.scheme.length > 0  && <h1>治疗方案</h1>}
+          {advice.scheme && advice.scheme.length > 0  && <h1>建议用药</h1>}
           {scheme}
         </div>}
         <div className={`${style['billing']} ${setFontColorSize(2)}`} > 

+ 5 - 3
src/components/AssessResult/ChooseItem/index.jsx

@@ -41,12 +41,14 @@ class ChooseItem extends Component {
                 <div className={style['row']}>
                   {it.details&&it.details.map((i)=> {
                     if(it.controltype ==0){
-                      return <div className={style['choose-item']}>
+                      return <div className={`${style['choose-item']}  ${selecteds&&selecteds[it.name]==i.detailName||(selecteds&&!selecteds[it.name]&&i.state==1) ? style['selectd']:style['dis-selectd']}`}>
                                 <Radio label={i.detailName}
                                        value={i.detailName}
                                        disabled={disabled}
-                                       isSelect={selecteds&&selecteds[it.name]==i.detailName||(Object.keys(selecteds||{}).length===0&&i.state==1)}
-                                       handleClick={this.handleRadio.bind(this,it.name,i.detailName)}></Radio>
+                                       isSelect={selecteds&&selecteds[it.name]==i.detailName||(selecteds&&!selecteds[it.name]&&i.state==1)}
+                                       noSelected = {title == '风险因素评估:'}
+                                       handleClick={title == '风险因素评估:' ? '':this.handleRadio.bind(this,it.name,i.detailName)}
+                                       ></Radio>
                                 {/*{i.state?<i>(智能推荐)</i>:''}*/}
                               </div>;
                     }else{

+ 14 - 278
src/components/AssessResult/ScaleItem/index.jsx

@@ -2,11 +2,7 @@ import React, { Component } from "react";
 import style from "../index.less";
 import deleteIcon from '@common/images/delete.png';
 import deleteIconNo from '@common/images/delete_no.png';
-import allTableIcon from '@common/images/all-table.png';
-import level1 from "@common/images/级别1.png";
-import checkIcon from '@common/images/check.png';
 import {ComplexModal,MiniToast,Radio} from '@commonComp';
-import Notify from '@commonComp/Notify';
 import {deepClone,preventDefault} from '@utils/tools';
 import { getFormulaResult } from '@store/async-actions/fetchModules'
 /**
@@ -17,171 +13,15 @@ class ScaleItem extends Component {
   constructor(props) {
     super(props);
     this.$area = React.createRef();
-    const {result}= props;
-    let radioVal = result&&result.radioVal;
     this.state = {
-      scaleId:'',
-      scaleName:'',
-      parentId:'',
-      showScale:false,
-      optionId:'',
-      radioVal:Object.assign({},radioVal)||{},
-      formulaId:'',
       text:props.text,
-      isCalculated:false,
-      calcuValues:deepClone(props.calcuValues),   //计算公式填的值
     };
     this.getItems = this.getItems.bind(this);
     this.getDetailItems = this.getDetailItems.bind(this);
-    this.showOption = this.showOption.bind(this);
-    this.closeOption = this.closeOption.bind(this);
-    this.closeFormula = this.closeFormula.bind(this);
-    this.handleInputformula =this.handleInputformula.bind(this);
-  }
-  showOption(id){
-    this.setState({
-      optionId: id,
-      formulaId: ''
-    })
-  }
-  closeOption(){
-    const {result} = this.props;
-    const possible=result&&result.possible;
-    let {radioVal} = this.state;
-    this.setState({
-      radioVal:Object.assign({},radioVal,possible),
-      optionId:null,
-    });
-  }
-  confirmOption(){
-    const {handleRes} = this.props;
-    const {radioVal} = this.state;
-    handleRes&&handleRes({
-      possible:Object.assign({},radioVal),
-      radioVal:Object.assign({},radioVal),//不设置radioVal只有最近一次选中的值
-    });
-    this.setState({
-      optionId:null,
-    });
-  }
-  handleShowScale(item){
-    const {showScaleFn,closeAssess} = this.props;
-    //closeAssess&&closeAssess();    //关闭评估弹窗
-    showScaleFn&&showScaleFn(item,true);
-  }
-  handleRadio(item,parent){
-    let {result} = this.props;
-    let radioVal = result&&result.radioVal;
-    this.setState({
-      radioVal:Object.assign({},radioVal,{[parent.conceptId]:item.detailName})
-    })
-  }
-  handleReg(e){   //只能输入数字和特殊符号
-    const key = e.key;
-    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      preventDefault(e);
-    }
-  }
-  handleInputformula(id,calcuContent,i,e) {
-    const { calcuResult,handleCalcu } = this.props;
-    const {calcuValues} = this.state;
-    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,'');       //处理中文输入法的情况
-    obj[id] = values;
-    if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
-      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
-    }
-    this.setState({
-      isCalculated:false,
-      calcuValues:obj
-    });
-    handleCalcu&&handleCalcu(id,values,calcuResult);
-  }
-  handleForRadio(id,calcuContent,i,fidx){//计算公式
-    const { calcuValues } = this.state;
-    let obj = deepClone(calcuValues);
-    let values = (obj&&obj[id])||deepClone(calcuContent);
-    let details = values[i].details;
-    for(let x=0;x<details.length;x++){
-      if(x!=fidx){
-        details[x].state=0;
-      }else{
-        details[x].state=1;
-      }
-    }
-    obj[id] = values;
-    this.setState({
-      isCalculated:false,
-      calcuValues:obj
-    });
-  }
-  showFormula(id){
-    this.setState({
-      formulaId: id,
-      optionId: ''
-    });
-  }
-  closeFormula(){
-    if(this.state.isCalculated){
-      this.setState({
-        formulaId:null,
-      });
-    }else{
-      this.setState({
-        formulaId:null,
-        calcuValues:deepClone(this.props.calcuValues)
-      });
-    }
-  }
-  calcuFormula(item) { //计算公式计算
-    const { calcuResult,handleCalcu } = this.props;
-    const {calcuValues,formulaId} = this.state;
-    let it=calcuValues&&deepClone(calcuValues[formulaId]);
-    let allHasInfo = true;
-    for (let i = 0; i < it.length; i++) {
-      if(it[i].controlType == 2) {  //输入框类型的有没有填值
-        if(!it[i].value) {
-          allHasInfo = false
-        }
-      } else if(it[i].controlType == 0) {
-        let hasSelect = false;
-        for( let z = 0; z <it[i].details.length; z++) {
-          if(it[i].details[z].state == 1) {
-            hasSelect= true
-          }
-        }
-        if(!hasSelect) {
-          allHasInfo = false
-        }
-      }
-    }
-    const itemCopy = deepClone(item)
-    itemCopy.content.details = calcuValues[formulaId]
-    // item.content.details = calcuValues[formulaId];
-    if(allHasInfo) { //所有都有值,则计算
-      let results = deepClone(calcuResult);
-      getFormulaResult({type:2,data:itemCopy}).then((res)=>{
-        if(+res.data.code==0){
-          const result = res.data.data.result;
-          results[formulaId] = result;
-          handleCalcu&&handleCalcu(formulaId,calcuValues[formulaId],results);
-          this.setState({
-            isCalculated:true
-          });
-        }else{
-          Notify.error(res.data.msg||'计算没有结果返回');
-        }
-      })
-    } else {  //不是所有值都填过了
-      Notify.info('请填写计算公式内容')
-    }
   }
   getDetailItems(item,i){
     let arr = [],temp='';
-    const {indexs,result,formulaResult,disabled,calcuValues,calcuResult} = this.props;
-    const {optionId,formulaId,radioVal} = this.state;
+    const {indexs,result,formulaResult,disabled,calcuResult} = this.props;
     const possible=result&&result.possible;
     item.details.map((its,j)=>{
       let it=its;
@@ -189,118 +29,27 @@ class ScaleItem extends Component {
         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)}>
+          temp =<span className={style['scale']}>
                         {name}
                         </span>;
         }else if(its.type==2){      //计算公式
           const showRes = calcuResult&&calcuResult[item.conceptId]||it.content.result;
-          const details = calcuValues&&calcuValues[item.conceptId]||it.content.details;
-
           const cresult = showRes&&showRes[1]&&showRes[1].text;
-                    temp = <div className={style['results']}>
-                    <span>计算公式结果:</span>
-                    <span className={style["blue"]} style={disabled?{cursor:'default'}:''} onClick={disabled?'':this.showFormula.bind(this,item.conceptId,it)}>{cresult?cresult:'请选择'}</span>
-                      {disabled?'':<img src={level1} />}
-                      {disabled?'':<MiniToast title={it.content.name}
-                               confirmText='关闭'
-                               icon={allTableIcon}
-                               show={formulaId&&formulaId==item.conceptId?true:false}
-                               close={this.closeFormula}
-                               confirm={this.closeFormula}
-                               footer="true">
-                      <table>
-                        {details.map((item1,idd)=>{
-                          if(item1.controlType==0){//单选
-                            return <tr>
-                              <td>
-                                <span>{item1.isShow == '0' ? item1.name+':' : '请选择'+item1.name+':'}</span>
-                              </td>
-                              <td>
-                              {Array.isArray(item1.details)&&item1.isShow == '0'&&item1.details.map((ii,ind)=>{
-                                return ii.state == 1 && <div className={style["chooseItem"]}>
-                                          {ii.detailName}
-                                      </div>
-                              })}
-                              {Array.isArray(item1.details)&&item1.isShow != '0'&&item1.details.map((ii,ind)=>{
-                                return <div className={style["chooseItem"]}>
-                                        <Radio label={ii.detailName}
-                                                  isSelect={ii.state == 1}
-                                                  handleClick={this.handleForRadio.bind(this,item.conceptId,details,idd,ind)}>
-                                          </Radio>
-                                      </div>
-                              })}          
-                                
-
-                               
-                              </td>
-                            </tr>
-                          }else if(item1.controlType==2){//输入框
-                            
-                            return <tr>
-                              <td>
-                                <span>{item1.isShow == '0' ? item1.name+':':'请输入'+item1.name+':'}</span>
-                              </td>
-                              <td>
-                                {item1.isShow == '0' ? item1.value + ' ' +item1.uint : <input type="text" placeholder="请输入"  value={item1.value} onKeyDown={this.handleReg.bind(this)} onInput={(e)=>this.handleInputformula(item.conceptId,details,idd,e)}/>}
-                              </td>
-                              <td>
-                                {item1.isShow != '0'&&<span>{item1.uint}</span>}  
-                              </td>
-
-                            </tr>
-                          }
-                        })}
-                      </table>
-                      <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,its)}>计算</div>
-                      <table>
-                        {showRes && Array.isArray(showRes) &&showRes.map((itemResult) => {
-                          return <tr>
-                            <td>
-                              <span>{itemResult.name+':'}</span>
-                            </td>
-                            <td>
-                              <span>{itemResult.text}</span>
-                            </td>
-                          </tr>
-                        })}
-                      </table>
-                    </MiniToast>}
-                </div>
+                    temp = <span className={style['results']}>
+                    患者可能有:
+                    <i className={style["blue"]}>{cresult}</i>
+                </span>
         }else if(its.type==3){
           temp = <div className={style['results']}>
                     <span>可能结果:</span>
-                    <span onClick={disabled?'':this.showOption.bind(this,item.conceptId)} style={disabled?{cursor:'default'}:''} className={style["blue"]}>{possible&&possible[item.conceptId]?possible[item.conceptId]:'请选择'}</span>
-                    {disabled?'':<img src={level1} />}
-                    {disabled?'':<MiniToast title='结果选择'
-                         icon={checkIcon}
-                         show={optionId&&optionId==item.conceptId?true:false}
-                         close={this.closeOption}
-                         confirm={this.confirmOption.bind(this,item.conceptId)}
-                         footer={true}>
-                        <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&&radioVal[item.conceptId]==lis.detailName||(Object.keys(radioVal).length===0&&lis.state==1)}
-                                     handleClick={this.handleRadio.bind(this,lis,item,i)}>
-                              </Radio>
-                              {/*{lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}*/}
-                            </div>
-                          })}
-                        </div>
-                    </MiniToast>}
+                    <span className={style["blue"]}>{possible[item.conceptId]}</span>
                   </div>;
         }
         const passId = item.details[j].type==1?item.details[j].content.conceptId:undefined;
         const li = disabled?<li>
-            <span className={style['s-title']}>{item.name}:</span>
-            <div className={style['row']}>{temp}</div>
+            <div className={style['s-title']}>{item.name}:{temp}</div>
           </li>:<li>
-          <span className={style['s-title']}>{item.name}:</span>
-          <div className={style['row']}>{temp}</div>
+          <span className={style['s-title']}>{item.name}:{temp}</span>
           <div className={style["recommend"]} onClick={this.props.handleRemove.bind(this,false,i,passId,j)}>
             <img className={style["deleteIconNo"]} src={deleteIconNo} />
             <img className={style["deleteIcon"]} src={deleteIcon} />
@@ -317,16 +66,6 @@ class ScaleItem extends Component {
       return this.getDetailItems(it,i);
     });
   }
-  getScaleContent(data){
-    if(!data){
-      return null;
-    }
-    const item = data&&data.find((it)=>{
-      return it.type==1;
-    });
-    const content = JSON.parse(item.content||null);
-    return {conceptId:item.conceptId,content,name:content.scaleName};
-  }
   getScales(){
     const {scaleItems,disabled,formulaResult} = this.props;
     let li='',temp='',arr=[],it={};
@@ -334,20 +73,17 @@ class ScaleItem extends Component {
       return '';
     };
     for( let i in scaleItems){
-      it = {conceptId:i,name:scaleItems[i].name};//this.getScaleContent(scaleItems[i].data);
+      it = {conceptId:i,name:scaleItems[i].name};
       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']}
-                  title={name}
-                  onClick={this.handleShowScale.bind(this,it)}>{name}</span>;
+      temp =<i className={style['scale']}>{name}</i>;
       li = disabled?<li>
-        <span className={style['s-title']}>相关量表:</span>
-        <div className={style['row']}>{temp}</div>
+        <span className={style['s-title']}>相关量表:{temp}</span>
       </li>:<li>
-        <span className={style['s-title']}>相关量表:</span>
-        <div className={style['row']}>{temp}</div>
+        <span className={style['s-title']}>相关量表:{temp}</span>
+        {/*<div className={style['row']}>{temp}</div>*/}
         <div className={style["recommend"]} onClick={this.props.handleRemove.bind(this,true,it.conceptId)}>
           <img className={style["deleteIconNo"]} src={deleteIconNo} />
           <img className={style["deleteIcon"]} src={deleteIcon} />

+ 3 - 34
src/components/AssessResult/index.jsx

@@ -25,19 +25,12 @@ class AssessResult extends Component {
       wholeAssessText:props.wholeAssessText||{},     //整体评估补充说明
       wholeResults: wholeResults,
       calcuResult:props.calcuResult,     //计算公式结果
-      calcuValues:props.calcuValues,    //计算公式填的值
       addedScaleIds:props.addedScaleIds,    //已加入量表的id
     };
     this.handleChooseChange = this.handleChooseChange.bind(this);
     this.handleScaleDel = this.handleScaleDel.bind(this);
     this.handleScaleText = this.handleScaleText.bind(this);
-    this.handleResult = this.handleResult.bind(this);
   }
-  /*componentWillMount(){
-    const {disId,disName,getAssess} = this.props;
-    //获取评估
-    getAssess&&getAssess(disId,disName);
-  }*/
   handleScaleText(text){
     const {disName} = this.props;
     const obj = Object.assign({},this.state.wholeAssessText);
@@ -70,15 +63,6 @@ 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;
     this.setState({
@@ -91,15 +75,6 @@ class AssessResult extends Component {
       chartTimeTypes:Object.assign(chartTimeTypes,{[i]:selects})
     });
   }
-  handleCalcu(id,values,ret){
-    const {saveCalcuValue,saveCalcuResult}=this.props;
-    this.setState({
-      calcuResult:ret,
-      calcuValues:{[id]:values}
-    });
-    saveCalcuResult&&saveCalcuResult(ret);
-    saveCalcuValue&&saveCalcuValue(values, id);
-  }
   componentWillUnmount(){
     //点确定关闭弹窗时把参数传到父组件去
     const {saveAssessInfos,isAssessConfirm,clearChartData} = this.props;
@@ -121,13 +96,13 @@ class AssessResult extends Component {
     }
   }
   handoutTypes(item,i){
-    const {getIndexData,indexData,timeTypes,wholeIndexs,closeAssess,showScaleFn,chronicPushItems,
+    const {getIndexData,indexData,timeTypes,wholeIndexs,chronicPushItems,
       formulaResult,indexNames,disName} =this.props;
     let obj = [];
     Object.keys(wholeIndexs).map((i)=>{
       obj[i]=chronicPushItems[i];
     });
-    const {chooseSelecteds,wholeAssessItems,wholeScaleItems,wholeAssessText,chartTimeTypes,wholeResults,calcuResult,calcuValues} = this.state;
+    const {chooseSelecteds,wholeAssessItems,wholeScaleItems,wholeAssessText,chartTimeTypes,wholeResults,calcuResult} = this.state;
     const chartData = indexData;
     const name = item.regionName+":";
     const list = item.data&&item.data.rows;
@@ -137,18 +112,12 @@ class AssessResult extends Component {
                           data={obj}
                           handleRemove={this.handleScaleDel}
                           handleInp={this.handleScaleText}
-                          handleRes={this.handleResult}
-                          handleCalcu={this.handleCalcu.bind(this)}
                           text={wholeAssessText[disName]}
                           indexs={wholeAssessItems}
                           scaleItems ={wholeScaleItems}
                           result={wholeResults}
-                          showScaleFn={showScaleFn}
                           calcuResult={calcuResult}
-                          calcuValues={calcuValues}
-                          formulaResult={formulaResult}
-                          chronicPushItems={chronicPushItems}
-                          closeAssess={closeAssess}></ScaleItem>;
+                          formulaResult={formulaResult}></ScaleItem>;
       case 1:     //数据来源于大数据
         return <ChooseItem title={name}
                            data={list}

+ 5 - 7
src/components/AssessResult/index.less

@@ -50,23 +50,21 @@
       }
     }
     .s-title{
-      display: inline-block;
+      /*display: inline-block;
       max-width: 100px;
-      vertical-align: top;
+      vertical-align: top;*/
     }
     .scale{
-      display: inline-block;
+      /*display: inline-block;*/
       color: @blue;
-      cursor: pointer;
-      white-space: nowrap;
+      /*white-space: nowrap;
       max-width: 100%;
       overflow: hidden;
       text-overflow: ellipsis;
-      vertical-align: top;
+      vertical-align: top;*/
     }
     .blue{
       color:#3B9ED0;
-      cursor: pointer;
     }
     .blue + img{
       vertical-align: middle;

+ 30 - 0
src/components/AssistCheck/index.jsx

@@ -9,6 +9,9 @@ import { dragBox } from '@utils/drag';
 import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
 import { host, prefix } from '@utils/config.js';
+import store from '@store';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+import {SET_CURRENT_MODULE} from '@types/homePage';
 
 class AssistCheck extends React.Component {
   constructor(props){
@@ -33,12 +36,30 @@ class AssistCheck extends React.Component {
     }
     handleImportExcel() {
       this.inputRef.click();
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
+      if(moduleName != '辅检') {
+        store.dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName:'辅检'
+        });
+        store.dispatch(getMRAnalyse());
+      }
     }
     showSlideImport(){
       let flg = this.state.importLis
       this.setState({
         importLis:!flg
       })
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
+      if(moduleName != '辅检') {
+        store.dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName:'辅检'
+        });
+        store.dispatch(getMRAnalyse());
+      }
     }
 
     onClose() {
@@ -51,6 +72,15 @@ class AssistCheck extends React.Component {
       this.setState({
         hide: true
       })
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
+      if(moduleName != '辅检') {
+        store.dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName:'辅检'
+        });
+        store.dispatch(getMRAnalyse());
+      }
     }
     closeInIcss(){
       this.setState({

+ 5 - 4
src/components/Banner/index.jsx

@@ -107,7 +107,7 @@ class Banner extends Component {
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
+    const {visible,pre,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
     const {emergencyBox} = this.state;
     const {showConfigModal, changeType, confirmType} = this;
     const domNode = document.getElementById('root');
@@ -121,10 +121,10 @@ class Banner extends Component {
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
                       <i>本科室近期全部病历</i>
                     </div>:''}
-          <div className={style.prec} onClick={()=>preShow(show)}>
+          {pre == 1?<div className={style.prec} onClick={()=>preShow(show)}>
             <img className={style["st"]} src={prec} alt="预问诊"/>
             <i> 预问诊信息</i>
-          </div>
+          </div>:null}
           <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
             <i> 设置</i>
@@ -157,7 +157,8 @@ const mapStateToProps = function(state){
   return {
     ifShow:sysConfig.general_show,
     deptName:message.selfDeptName,
-    show:state.preIcss.preShow
+    show:state.preIcss.preShow,
+    pre:sysConfig.connect_prec
   }
 }
 

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

@@ -18,4 +18,5 @@
   position: absolute;
   right: 0;
   top: 9px;
+  cursor: pointer;
 }

+ 42 - 22
src/components/ChronicInfo/index.jsx

@@ -51,6 +51,8 @@ class ChronicInfo extends React.Component{
     };
     this.$result = React.createRef();
     this.$content = React.createRef();
+    this.$calcuFormula = React.createRef();
+    this.$resultLikely = React.createRef();
     this.showInfo = this.showInfo.bind(this);
     this.closeInfo = this.closeInfo.bind(this);
     this.showOption = this.showOption.bind(this);
@@ -96,16 +98,24 @@ class ChronicInfo extends React.Component{
       infoId:null
     })
   }
-  showOption(id){
+  showOption(id,e){
     this.setState({
       optionId:id,
       formulaId:null //关闭计算公式
     });
     const {patDom} = this.props;
     const ht = $(patDom.current).height();
-    setTimeout(function(){
-      $(patDom.current).scrollTop(ht+200);
-    })
+    const bottom = ht+120-e.clientY
+    
+    // setTimeout(function(){
+
+    //   $(patDom.current).scrollTop(ht);
+    // })
+    if(bottom < 220) {
+      setTimeout(()=>{
+        this.$resultLikely.current.scrollIntoView(true)
+      })
+    }
   }
   closeOption(){
     // 关闭-有可能结果则保持与结果一致,没有就保持最新选择的内容
@@ -146,8 +156,8 @@ class ChronicInfo extends React.Component{
   // 量表明细-关闭,isClose是否是点击关闭按钮
   closeTable(isClose){
     const {scaleParam} = this.state;
-    const {showHide,chronicMagItem} = this.props;
-    if(!showHide.isPop){
+    const {chronicMagItem} = this.props;
+    //if(!showHide.isPop){    //管理评估中点开的量表,按钮显示为确定,不可加入病例
       //量表结果,判断需要计算并且dom中有值才能加入病例记录
       // innerHTML 兼容FF26
       const res = this.$result.current&&(this.$result.current.innerText||this.$result.current.innerHTML);
@@ -155,11 +165,11 @@ class ChronicInfo extends React.Component{
         Notify.info("请先计算量表结果!");
         return ;
       }
-      !isClose&&chronicMagItem&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);   //是慢病流程才能加入病例
+      !isClose&&chronicMagItem&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
       this.setState({
         scaleParam:{}
       });
-    }
+    //}
     this.props.hideList({name:'showTable',value:false});
   }
   // 非计分量表确定-延时关闭->量表存值
@@ -190,18 +200,28 @@ class ChronicInfo extends React.Component{
       ff:false
     })
   }
- 
-  showFormula(id){//计算公式
+  showFormula(id,e){//计算公式
     this.setState({
       formulaId:id,
       optionId:null  //关闭可能结果
     });
     const {patDom} = this.props;
     const ht = $(patDom.current).height();
-    setTimeout(function(){
-      $(patDom.current).scrollTop(ht+200);
-    })
+  
+    const bottom = ht+120-e.clientY
+    
+    // setTimeout(function(){
+
+    //   $(patDom.current).scrollTop(ht);
+    // })
+    if(bottom < 340) {
+      setTimeout(()=>{
+        this.$calcuFormula.current.scrollIntoView(true)
+      })
+    }
+   
   }
+
   closeFormula(it){
     const {formulaId,isCalculated} =this.state;
     if(!isCalculated){
@@ -228,7 +248,7 @@ class ChronicInfo extends React.Component{
     addAssessItem(v,pIndex,i);
   }
   addFormula(it,v,pIndex,i){
-    const {chronicMagItem, setCalcuInfo} = this.props;
+    const {chronicMagItem,setCalcuInfo} = this.props;
     this.closeFormula(it);
     const itCopy = deepClone(it)
     const vCopy = deepClone(v)
@@ -276,7 +296,7 @@ class ChronicInfo extends React.Component{
   }
   confirmOption(parent,pIndex,i){//可能结果确定
     const {radioVal,possible} = this.state;
-    const {savePossibleResult,chronicMagItem} = this.props;
+    const {chronicMagItem,savePossibleResult} = this.props;
     if(Object.keys(radioVal).length===0){     //初始状态,可能有推荐选项
       const defaulted = parent.details[i].content.details.filter((it)=>+it.state===1);
       if(defaulted.length>0){
@@ -367,8 +387,8 @@ class ChronicInfo extends React.Component{
     return hasCritical
   }
   getDetail(){
-    const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
-    const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
+    const {data,formulaResult,chronicMagItem} = this.props;
+    const {formulaId,optionId,possible,radioVal,currentIndex,hasEnterImg} = this.state;
     /*let names = [];*/
     let list = data&&data.map((v,i)=>{
                     /*if(this.getCritical(v)&&names.includes(v.name)){    //重复项
@@ -415,7 +435,7 @@ class ChronicInfo extends React.Component{
                           // const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
                           //每次都取最新推送内容
                           const details = it.content.details || [];
-                          return <div className={style["marTop"]}>
+                          return <div className={style["marTop"]}  ref={this.$calcuFormula}>
                             <span className={style["limit"]}>
                               计算公式结果:
                               <i className={style["blue"]} onClick={this.showFormula.bind(this,v.conceptId)}>{result?result:'请选择'}</i>
@@ -423,7 +443,7 @@ class ChronicInfo extends React.Component{
                             </span>
                             {formulaId&&formulaId==v.conceptId&&<MiniToast title={it.content.name}
                                 icon={allTableIcon}
-                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                confirmText={chronicMagItem?'加入管理评估':'确定'}
                                 show={formulaId&&formulaId==v.conceptId?true:false}
                                 close={this.closeFormula.bind(this,it)}
                                 confirm={this.addFormula.bind(this,it,v,i,j)}
@@ -484,7 +504,7 @@ class ChronicInfo extends React.Component{
                             </MiniToast>}
                           </div>
                         }else if(it.type==3){
-                          return <div className={style["marTop"]}>
+                          return <div className={style["marTop"]} ref={this.$resultLikely}>
                             <span className={style["limit"]}>
                               可能结果:
                               <i onClick={this.showOption.bind(this,v.conceptId)} className={style["blue"]}>{possible[v.conceptId]?possible[v.conceptId]:'请选择'}</i>
@@ -492,7 +512,7 @@ class ChronicInfo extends React.Component{
                             </span>
                             <MiniToast title='结果选择'
                                 icon={checkIcon}
-                                confirmText={chronicMagItem?'加入病历记录':'确定'}
+                                confirmText={chronicMagItem?'加入管理评估':'确定'}
                                 show={optionId&&optionId==v.conceptId?true:false}
                                 close={this.closeOption}
                                 confirm={this.confirmOption.bind(this,v,i,j)}
@@ -552,7 +572,7 @@ class ChronicInfo extends React.Component{
     const {comfirnFlag,flag,ff} = this.state;
     const {chronicMagItem,chronicDesease,data,showHide,slideUp} = this.props;
     const scaleFooter = <Footer print={true}
-                                footText={showHide.isPop||!chronicMagItem?"确定":"加入病历记录"}
+                                footText={chronicMagItem?'加入管理评估':'确定'}
                                 handlePrint={this.onPrint}
                                 handleConfirm={this.comfirnTable}/>;
     if(data&&data.length>0){

+ 5 - 0
src/components/CommonSymptom/index.jsx

@@ -63,6 +63,11 @@ class CommonSymptom extends Component{
       conceptId
     })
   }
+  componentWillReceiveProps(next){
+    if(next.show!==this.props.show){
+      this.handleClear();
+    }
+  }
   getStyle(id){
     const {conceptId} = this.state;
     if(conceptId.includes(id)){

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

@@ -4,7 +4,6 @@ import {ItemBox,Notify,Textarea,TailInlineTag} from '@commonComp';
 import chooseType from '@containers/eleType.js';
 import SearchDrop from '@components/SearchDrop';
 import {filterDataArr,getPageCoordinate,windowEventHandler,isIE} from '@utils/tools'
-import $ from 'jquery';
 
 class CurrentIll extends Component{
   constructor(props){
@@ -75,7 +74,7 @@ class CurrentIll extends Component{
     const ele = document.activeElement;
     const height = ele.offsetHeight;
     let boxTop = (+(ele.offsetTop)+height);
-    let boxLeft = ele.offsetLeft;
+    let boxLeft = ele.offsetLeft+70;
     this.setState({
       boxLeft:boxLeft,
       boxTop:boxTop

+ 13 - 2
src/components/DiagnosticItem/index.jsx

@@ -2,10 +2,14 @@ import React, { Component } from 'react';
 import style from './index.less';
 import {ConfirmModal} from '@commonComp';
 import Notify from '@commonComp/Notify';
+import store from '@store';
 import infoShow from '@common/images/info-show.png';
 import infoMove from '@common/images/info-move.png';
 import {getChronic} from '@store/async-actions/homePage.js';
 import {storageLocal} from '@utils/tools';
+import {
+    getMRAnalyse
+  } from '@store/async-actions/pushMessage';
 
 class DiagnosticItem extends Component{
     constructor(props){
@@ -64,9 +68,8 @@ class DiagnosticItem extends Component{
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
     }
     addDiagodal(diagType){
-        const {item, isChronicMag,mode} = this.props;
+        const {item, isChronicMag,mode,EMRScrollCont,type,addDiagnostic, clearInput, hideSearch} = this.props;
         item.type = diagType;
-         const {  addDiagnostic, clearInput, hideSearch } = this.props;
 
          if(item.type == 2&&mode=='0') {      //文本模式不走慢病
              isChronicMag(item);
@@ -76,6 +79,14 @@ class DiagnosticItem extends Component{
          hideSearch&&hideSearch();
         this.context.scrollArea&&this.context.scrollArea.refresh();
          //document.getElementById("diagnosisResult").scrollIntoView(true)
+         if(type == 'disSelect') {
+            const scrollTop = document.getElementById("diagnosisResult").offsetTop
+            setTimeout(() =>{
+               EMRScrollCont.scrollYTo(scrollTop);
+            })
+         }
+         store.dispatch(getMRAnalyse())
+
     }
     handleMouseEnterDrug() {
         this.setState({

+ 3 - 0
src/components/DiagnosticList/index.jsx

@@ -21,6 +21,7 @@ import {getAssessData} from '@store/async-actions/fetchModules';
 import tableIcon from '@common/images/table.png';
 import { CONFIRM_TYPE } from "@store/types/typeConfig";
 import $ from "jquery";
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
 class DiagnosticList extends Component {
     constructor(props) {
@@ -135,6 +136,8 @@ class DiagnosticList extends Component {
         const { hideReferRecord ,autoFillModules,refreshScroller} = this.props;
         hideReferRecord && hideReferRecord();
         autoFillModules&&autoFillModules();
+       
+        store.dispatch(getMRAnalyse());
         setTimeout(function(){
           refreshScroller()&&refreshScroller().scrollTop();
         },100)

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

@@ -48,7 +48,7 @@ class EMRContainer extends Component {
         const contStyle={
                           opacity:'0.4',
                           top:'1px',
-                          right:'460px',
+                          right:'458px',
                           zIndex:'15',
                           width:'14px',
                           background:'#f1f1f1'};

+ 4 - 2
src/components/InfoTitle/index.jsx

@@ -50,7 +50,7 @@ class InfoTitle extends Component {
         }
     }
     render() {
-        const {disVisible,copyVisible,winWidth,loading} = this.props;
+        const {loading,loadingText,loadingType} = this.props;
         const {le} = this.state;
         return <div className={style['title-wrapper']}  style={{left:le}}>
             <PatInfoContainer />
@@ -63,7 +63,7 @@ class InfoTitle extends Component {
                 </div>
             </div>
             <HistoryCases></HistoryCases>
-            <Loading show={loading}/>
+            <Loading show={loading} text={loadingText} type={loadingType}/>
         </div>;
     }
 }
@@ -73,6 +73,8 @@ function mapStateToProps(state) {
     copyVisible:state.copyRight.copyVisible,
     winWidth:state.homePage.windowWidth,
     loading:state.copyRight.loading,
+    loadingText:state.copyRight.loadingText,
+    loadingType:state.copyRight.loadingType
   }
 }
 

+ 1 - 1
src/components/InfoTitle/index.less

@@ -9,7 +9,7 @@
   position: fixed;
   left: 10px;
   top: 50px;
-  right: 470px;
+  right: 468px;
   min-width: 548px;
   padding-right: 122px;
   .activeWrap {

+ 30 - 0
src/components/Inspect/index.jsx

@@ -10,6 +10,8 @@ import { host, prefix } from '@utils/config.js';
 import { isIE, getUrlArgObject,getCurrentDate,setFontColorSize } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBody from '@containers/WrapModalBody';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+import {SET_CURRENT_MODULE} from '@types/homePage';
 
 
 (function ($) {
@@ -130,6 +132,7 @@ class Inspect extends React.Component {
                       }
                     }
                     store.dispatch(getExcelList(res.data));
+                    store.dispatch(getMRAnalyse());
                     fetchPushInfos && fetchPushInfos();
                     if (message && message.length != 0) {
                       that.setState({
@@ -155,6 +158,15 @@ class Inspect extends React.Component {
   }
   handleImportExcel() {
     this.inputRef.click();
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
   }
   cancel() {
     this.setState({ visible: false })
@@ -182,6 +194,15 @@ class Inspect extends React.Component {
     this.setState({
       hide: true
     })
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
   }
   onClose() {
     this.setState({
@@ -199,6 +220,15 @@ class Inspect extends React.Component {
     this.setState({
       importLis:!flg
     })
+    const storeState = store.getState()
+    const {moduleName} = storeState.homePage
+    if(moduleName != '化验') {
+      store.dispatch({
+        type: SET_CURRENT_MODULE,
+        moduleName:'化验'
+      });
+      store.dispatch(getMRAnalyse());
+    }
   }
   refreshScroller(){
     //滚动条对象

+ 4 - 2
src/components/MainSuit/index.jsx

@@ -131,7 +131,7 @@ class MainSuit extends Component{
     let boxTop = (+(ele.offsetTop)+height);
     let boxLeft = ele.offsetLeft;
     this.setState({
-      boxLeft:boxLeft,
+      boxLeft:boxLeft+50,
       boxTop:boxTop
     });
   }
@@ -276,6 +276,8 @@ class MainSuit extends Component{
     const boxTop1 = datas.length>0?boxTop:45;
     const boxLeft1 = datas.length>0?boxLeft:85;
     const mode = readMode===null||readMode===-1?type:readMode;
+    const textDom=document.getElementById("mainSuit");    //主诉有输入时不显示常见
+    const hasText = saveText&&saveText.join("")||(textDom&&textDom.innerText);
     if(+mode===1){      //文本模式
       return <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
     }
@@ -295,7 +297,7 @@ class MainSuit extends Component{
         {''}{datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
       </ItemBox>
       {/*没有推送结果就不显示*/}
-      {symptomFlag && !searchFlag&&datas.length===0 ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&showArr['common']} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
+      {symptomFlag && !searchFlag&&datas.length===0&&!hasText ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&showArr['common']} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
     </div>
   }
 }

+ 1 - 0
src/components/MultSpread/index.jsx

@@ -202,6 +202,7 @@ class MultSpread extends Component{
           this.setBMIstate(it);
           return <NumberDrop prefix={it.labelPrefix}
                              suffix={it.labelSuffix}
+                             boxMark={boxMark}
                              placeholder={it.name}
                              isExtBlue={isExtBlue}
                              isSelectAll={text}

+ 33 - 16
src/components/NumberDrop/index.jsx

@@ -92,19 +92,32 @@ class NumberDrop extends Component{
     this.emitBMIData('');
     this.setState({
       placeholder:this.props.placeholder,
-      hasSelect:false
+      hasSelect:false,
+      value:''
     });
   }
   handleNumFocus(e){
-    /*const {placeholder} = this.state;
-    const val = e.target.innerText.trim();
-    //console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
+    const {placeholder} = this.state;
+    const val = this.$span.current.innerText.trim();//console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
     if(val!=''&&val == placeholder){
       this.setState({
         placeholder:''
       });
-    }*/
-    e.stopPropagation();
+    }
+    e&&e.stopPropagation();
+    const {show,handleShow,ikey,id,patId,handleHide} = this.props;
+    if(show) {
+      handleHide && handleHide();
+      return;
+    }else{
+      //this.$span.current.focus();
+      this.setState({
+        hasSelect:false,
+        placeholder:''      //火狐26placeholder点击不隐藏bug修改
+      });
+      handleShow&&handleShow({ikey,id:patId||id});
+    }
+
   }
   handleKeyDowm(e){
     if(e.keyCode==13){
@@ -113,9 +126,11 @@ class NumberDrop extends Component{
       handleHide && handleHide();
     }
   }
-  handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
+  handleNumClick(e){    //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
     e.stopPropagation();
-    const {show,handleShow,ikey,id,patId,handleHide} = this.props;
+    this.$span.current.focus();
+    //this.handleNumFocus();
+    /*const {show,handleShow,ikey,id,patId,handleHide} = this.props;
     if(show) {
       handleHide && handleHide();
       return;
@@ -126,7 +141,7 @@ class NumberDrop extends Component{
         placeholder:''      //火狐26placeholder点击不隐藏bug修改
       });
       handleShow&&handleShow({ikey,id:patId||id});
-    }
+    }*/
   }
   validSymbols(txt,min,max){
     //输入只有一个~或/时判断两边是否为合理数字,有多个为不合理
@@ -219,8 +234,8 @@ class NumberDrop extends Component{
     e.stopPropagation();
   }
   handleMouseDown(){
-    const {i,setSelectArea,boxMark,show}= this.props;
-    !show&&setSelectArea({i,boxMark,dir:'start'});
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
   }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
@@ -243,7 +258,7 @@ class NumberDrop extends Component{
     if(wrBmi!==nextProps.wrBmi&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
       handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText,formulaCode});
     }
-
+    
     if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
       return
     }
@@ -258,21 +273,23 @@ class NumberDrop extends Component{
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses(nospecial)}
                 style={{position:'relative'}}
-                onClick={allClick?this.handleNumClick:null}
+                /*onClick={allClick?this.handleNumClick:null}*/
                 onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
                 onMouseDown={this.handleMouseDown.bind(this)}>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
+      <span onClick={allClick?this.handleNumClick:null} className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
       <span onFocus={this.handleNumFocus}
-            onClick={allClick?null:this.handleNumClick}
+            onClick={e=>e.stopPropagation()}
             contentEditable={true}
             style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
             onkeyup={this.handleKeyDowm}
+            onmousedown={(e)=>e.stopPropagation()}
+            onmouseup={(e)=>e.stopPropagation()}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
             className={`${this.getSpanClass(nospecial)}`}
             >&nbsp;{val||placeholder}</span>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{suffix}</span>
+      <span onClick={allClick?this.handleNumClick:null} className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
                  noString={formulaCode?true:false}
                  onClose={handleHide}

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

@@ -96,7 +96,7 @@ class NumberUnitDrop extends Component{
   }
 
   render(){
-    const {placeholder,prefix,suffix,show,value,handleHide,select_start,i,boxMark} = this.props;
+    const {placeholder,prefix,suffix,show,value,handleHide,select_start,i,boxMark,unitType} = this.props;
     const {editable,hasSelect} = this.state;
     return <div className={this.getClasses()}
                 ref={this.$cont}
@@ -111,7 +111,7 @@ class NumberUnitDrop extends Component{
       <span ref = {this.$suf} className="prefixUnset">{suffix?' '+suffix:suffix}</span>
       <NumberUnitPan handleSelect={(obj)=>this.select(obj)}
                  onClose={handleHide}
-                 show={show} toClear={!hasSelect} value={value}/>
+                 show={show} toClear={!hasSelect} unitType={unitType} value={value}/>
     </div>
   }
 }

+ 2 - 2
src/components/Operation/index.less

@@ -6,9 +6,9 @@
     position: fixed;
     bottom: 0;
     left: 10px;
-    right: 470px;
+    right: 468px;
     // min-width: 720px;
-    min-width: 548px;
+    min-width: 547px;
     background-color: #fff;
     // z-index: 240;
     padding-bottom: 10px;

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

@@ -49,7 +49,7 @@ class OtherHistory extends Component{
     let boxTop = (+(ele.offsetTop)+height);
     let boxLeft = ele.offsetLeft;
     this.setState({
-      boxLeft:boxLeft,
+      boxLeft:boxLeft+50,
       boxTop:boxTop
     });
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug

+ 18 - 6
src/components/PreInIcss/RotateImg/index.jsx

@@ -36,7 +36,7 @@ class RotateImg extends Component {
     const { idx,imgLis,windowHeight } = this.props;
     let currentImg = imgLis[idx];
     let scaleHeight = windowHeight*0.8;
-    let width = currentImg.width,height = currentImg.height;
+    let width = currentImg.width,height = currentImg.height,overLen;
     if(width>height){
       if(width > scaleHeight){
         height=scaleHeight/width*height
@@ -48,6 +48,7 @@ class RotateImg extends Component {
         height = scaleHeight
       }
     }
+    localStorage.setItem("changeImg",true)
     this.setState({
       current:idx,
       length:imgLis.length,
@@ -55,6 +56,10 @@ class RotateImg extends Component {
       imgHeight:height,
       mgLeft:-width/2,
       mgTop:-height/2
+    },()=>{
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left;
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top;
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL);
     })
   }
   handleNext(){
@@ -62,7 +67,7 @@ class RotateImg extends Component {
     const { imgLis,isMove,windowHeight } = this.props;
     let scaleHeight = windowHeight*0.8;
     let tmpIdx = this.state.current;
-    let tmpLen = this.state.length,width,height;
+    let tmpLen = this.state.length,width,height,overLen;
     if(tmpIdx == tmpLen-1){
       width = imgLis[0].width
       height = imgLis[0].height
@@ -93,6 +98,10 @@ class RotateImg extends Component {
       mgLeft:-width/2,
       mgTop:-height/2,
       de:0
+    },()=>{
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left;
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top;
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL);
     })
   }
   handlePrev(){
@@ -130,11 +139,18 @@ class RotateImg extends Component {
       mgLeft:-width/2,
       mgTop:-height/2,
       de:0
+    },()=>{
+      let overLenL = $("#drugImg").offset().left-$("#previewWrapper").offset().left
+      let overLenT = $("#drugImg").offset().top-$("#previewWrapper").offset().top
+      localStorage.setItem("changeImg",width>height?overLenT:overLenL)
     })
     this.props.setMove(false)
   }
   handlePlus(){
     const {imgWidth,imgHeight,isMove} = this.state;
+    const { idx,imgLis } = this.props;
+    let width = imgLis[idx].width
+    let height = imgLis[idx].height
     if(this.props.isMove){
       this.setState({
         imgWidth:1.2*imgWidth,
@@ -175,10 +191,6 @@ class RotateImg extends Component {
       deg = deg-0+90
     }
     this.setState({
-      // imgWidth:tmpHeight,
-      // imgHeight:tmpWidth,
-      // mgLeft:-tmpHeight/2,
-      // mgTop:-tmpWidth/2,
       de:deg
     })
   }

+ 2 - 2
src/components/PreviewBody/Inspect/index.jsx

@@ -22,7 +22,7 @@ const PreviewInspect = (props) => {
                       <td className={style.assistTableTdTrd}>
                         {normalVal(value.min, value.max)}
                       </td>
-                      <td className={style.assistTableTdFor}>{value.time == '' ? ('导入时间: ' + dateTime) : '化验时间: ' + toTime(value.time)
+                      <td className={style.assistTableTdFor}>{value.time == '' ? ('导入时间:' + dateTime) : '化验时间:' + toTime(value.time)
                     }</td>
                     </tr>
                   })
@@ -55,7 +55,7 @@ const PreviewInspect = (props) => {
                       <td className={style.assistTableTdTrd}>
                         {normalVal(val.minValue, val.maxValue)}
                       </td>
-                      <td className={style.assistTableTdFor}>{'化验时间:' + item.time}</td>
+                      <td className={style.assistTableTdFor}>{'化验时间' + item.time}</td>
                     </tr>
                   }
                 })

+ 1 - 1
src/components/PreviewBody/ItemPart/index.jsx

@@ -4,7 +4,7 @@ import { filterDataArr } from '@utils/tools';
 const ItemPart = (props) => {
   let {dataStr,title,type,dataJson,other_yjs,lastDot} = props;
   if(lastDot){
-    dataStr=dataStr.trim().replace(/;$/g,'');
+    dataStr=dataStr.trim().replace(/;$/g,'');
   }
   return <tr className={style['patInfoFst']}>
     <td className={style['patInfoSec']}>{title}</td>

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

@@ -111,7 +111,7 @@ class PreviewBody extends Component {
             <td className={`${style['patInfoSec']} ${style['pushMessage']} ${style['font14']}`}>
               {((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check)&& (adviceData&&adviceData.assay.check > 0))) && <p className={style.pushMessageTitle}><span>开单项目</span></p>}
               {
-                ((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check) && (adviceData&&adviceData.assay.check > 0))) && <div className={style.pushMessageDes}>{adviceData.check?adviceData.check+',':''} {adviceData.assay}</div>
+  ((adviceData&&adviceData.assay && adviceData.assay.length > 0) || ((adviceData&&adviceData.check) && (adviceData&&adviceData.assay.check > 0))) && <div className={style.pushMessageDes}>{adviceData.assay}{adviceData.check}</div>
               }
               {adviceData&&adviceData.commontreatment && adviceData.commontreatment.length > 0 && <p  className={style.pushMessageTitle}><span>一般治疗</span></p>}
               {

+ 2 - 0
src/components/PushContainer/index.jsx

@@ -73,6 +73,8 @@ class PushContainer extends Component {
    */
   handleActiveClick(id) {
     if (id == '2') {
+      document.getElementById("searchTmp").value = ""
+      // let searchVal = document.getElementById("searchTmp").value
       store.dispatch(initItemList(1,0));
     }
     store.dispatch(tabChange(id))

+ 17 - 7
src/components/PushItems/DetailsModal/index.jsx

@@ -2,6 +2,7 @@ import React, { Component } from "react";
 import styles from "./index.less";
 import NewPortal from './NewPortal'
 import close from "./../img/close.png";
+import imgCurrent from '@common/images/icon-current.png';
 import $ from "jquery";
 import { imageUrlPrefix } from '@utils/config.js';
 import { dragBox } from '@utils/drag';
@@ -66,13 +67,14 @@ class DetailsModal extends Component {
 
                 <div className={styles['details-wrapper']}>
                     <div className={styles['details-content-wrapper']} id="detailsContentWrap">
-                        <h1 id="detailsContentTitle" className={`${styles['details-content-name']} drag-title`} >{tipsDetails && showAllName ? showAllName : tipsDetails &&tipsDetails.name} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
+                        <div id="detailsContentTitle" className={`${styles['details-drag-name']} drag-title`}></div>
+                        <h1  className={`${styles['details-content-name']}`} >{tipsDetails && showAllName ? showAllName : tipsDetails &&tipsDetails.name} <img className={styles['details-close']} onClick={this.hideTips} src={close} /></h1>
                         <div className={styles['details-content']} id= 'detailsContent' onScroll={this.handleScrollModal.bind(this, tipsDetails)}>
                             {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
-                                return (<div id={item.title}>
+                                return (<div id={item.title} class={styles['details-content-box']}>
                                     <div className={styles['details-content-title-box']} >
                                         <span className={styles['details-content-title-name']}>{item.title}</span>
-                                        <div className={styles['details-content-title-line']}></div>
+                                        <div className={styles['details-content-title-circle-box']}><span className={styles['details-content-title-circle']}></span></div>
                                     </div>
                                     <pre dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre>
                                 </div>)
@@ -82,16 +84,24 @@ class DetailsModal extends Component {
                         <div className={styles['content-menu-box']}>
                             <div className={styles['content-menu-wrapper']}>
                                 <div className={styles['content-menu']}>
-                                    {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
-                                            return (<div>
+                                    <div className={styles['content-menu-border']}>    
+                                        {tipsDetails && tipsDetails.details && tipsDetails.details.map((item, index) => {
+                                            return (<div class={styles['details-menu-title-wrapper']}>
                                                 <div className={styles['details-menu-title-box']}>
                                                     {index === 0 ? '' : <div className={styles['details-content-menu-line']}></div>}
-                                                    <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                                        <span className={styles['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
+                                                    <span onClick={this.handleClickMenu.bind(this, index, item, tipsDetails)} className={styles['details-content-menu-name']} style = {index === currentIndex ? {color:'#3B9ED0'} : ''}>
+                                                        <div className={styles['details-content-menu-circle-box']}>
+                                                            {index !== currentIndex&&<span className={styles['details-content-menu-circle']} ></span>}
+                                                            {index === currentIndex&&<img className={styles['details-content-menu-img']} src ={imgCurrent}/>}
+                                                        </div>
+                                                        {item.title}
                                                     </span>
                                                 </div>
                                             </div>)
                                         })}
+
+                                    </div>
+                                   
                                 </div>
 
                             </div>

+ 87 - 37
src/components/PushItems/DetailsModal/index.less

@@ -6,15 +6,21 @@
     height: 100%;
     left: 0;
     top: 0;
-    line-height: 20px;
+    line-height: 21px;
     img {
         max-width: 100%;
     }
 }
+.details-drag-name {
+    position: absolute;
+    width: 100%;
+    height: 70px;
+    top: 0;
+}
 
 .details-content-wrapper {
     position: fixed;
-    padding: 50px 0;
+    padding: 110px 0 50px 0;
     width: 80%;
     height: 80%;
     left: 10%;
@@ -33,49 +39,51 @@
 
 .details-content-name {
     position: absolute;
-    top: 0;
+    top: 43px;
     width: 100%;
-    padding: 0 40px;
-    height: 50px;
-    line-height: 50px;
-    font-size: 24px;
+    padding: 0  40px;
+    height: 37px;
+    line-height: 37px;
+    font-size: 28px;
+    font-weight: bold;
+    color: #1E1E1E;
 }
 
 .details-content-title-box {
     position: relative;
-    height: 40px;
-    line-height: 40px;
+    line-height: 30px;
     font-size: 20px;
 }
+.details-menu-title-wrapper {
+    padding: 0 4px 0 20px;
+    position: relative;
+}
 
 .details-content-title-name {
-    position: absolute;
+    position: relative;
+    font-weight: bold;
     background: #fff;
     padding-right: 5px;
-    font-size: 20px;
+    font-size: 22px;
+    line-height: 30px;
+    display: inline-block;
     z-index: 10;
+    color: #1E1E1E;
 }
 
-.details-content-title-line {
-    position: absolute;
-    width: 100%;
-    height: 20px;
-    top: 0;
-    border-bottom: 1px dashed #ccc;
-}
+
 .details-close {
     position: absolute;
     right: 0;
     cursor: pointer;
+    top: -43px;
 }
 .details-content {
     position: relative;
     height: 100%;
-    padding: 0 180px 0 40px;
+    padding: 0 220px 0 40px;
     overflow-y: auto;
-    ul, ol {
-        padding: 0 0 0 15px;
-      }
+    
       ul li {
         list-style: disc;
         list-style-position: inside;
@@ -87,46 +95,61 @@
 }
 .content-menu-box {
     position: absolute;
-    top: 50px;
+    top: 110px;
     right: 20px;
-    width: 160px;
+    width: 200px;
     height: 80%;
     overflow: hidden;
     
 }
 .content-menu-wrapper {
-    width: 200px;
+    width: 240px;
     height: 100%;
     overflow-y: auto;
 }
 .content-menu {
     
-    background: #eee;
-    border: 1px solid #eee;
-    width: 160px;
-    padding: 15px 18px;
+    background: #F5F6F7;
+    border: 1px solid #F5F6F7;
+    width: 200px;
+    padding: 15px 20px;
 }
 .details-content-menu-line {
-    height: 15px;
+    height: 20px;
     width: 0;
-    border: 1px solid #ccc;
-    background-color: #ccc;
-    margin-left: 4px
+    background-color: #E0E2E3;
+    margin-left: 0px
 }
 .details-content-menu-name {
-    color: #33475f;
-    font-size: 13px;
+    position: relative;
+    color: #777777;
+    font-size: 14px;
     cursor: pointer;
+    line-height: 19px;
+}
+.details-content-menu-circle-box {
+    display:inline-block;
+    position: absolute;
+    left: -25px;
+    background: #F5F6F7;
+
 }
 .details-content-menu-circle {
+    position: relative;
     display: inline-block;
     width: 8px;
     height: 8px;
     border-radius: 5px;
-    border: 1px solid #ccc;
     margin-top: 5px;
-    background-color: #eee;
+    background-color: #E0E2E3;
     margin-right: 10px;
+   
+}
+.details-content-menu-img {
+    position: relative;
+    z-index: 20;
+    left: -3px;
+    top: 0;
 }
 .details-mask {
     position: fixed;
@@ -139,8 +162,35 @@
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }
+.details-content-box {
+    border-left: 1px solid #969C9F;
+    padding: 0 0 0 33px;
+}
+.details-content-title-circle-box {
+   position: absolute;
+   z-index: 10;
+   background: #fff;
+   left: -40px;
+   height: 32px;
+   top: 0px;
+}
+.details-content-title-circle {
+    display: inline-block;
+    width: 12px;
+    height: 12px;
+    border-radius: 50%;
+    background: #3B9ED0;
+    position: relative;
+    top: 2px;
+}
+.content-menu-border{
+    border-left: 2px solid #E0E2E3;
+}
 pre {
     white-space: pre-wrap;
     word-wrap: break-word;
     font-family: inherit;
+    color: #1E1E1E;
+    margin: 10px 0;
+    line-height: 21px;
   }

+ 58 - 0
src/components/PushItems/MRAnalyse/index.jsx

@@ -0,0 +1,58 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import up from '@common/images/slide-up.png';
+import down from '@common/images/slide-down.png';
+import chronicPic from "@common/images/chronic.png";
+import className from 'classnames';
+import $ from 'jquery';
+import config from '@config/index';
+
+class MRAnalyse extends Component {
+    constructor(props) {
+        super(props)
+        this.state = {
+            slideUp: false
+        }
+        this.$content = React.createRef();
+
+        this.slideToggle = this.slideToggle.bind(this);
+    }
+    slideToggle(){
+        const { slideUp } = this.state
+        $(this.$content.current).slideToggle(config.slideTime);
+        this.setState({
+            slideUp: !slideUp
+        })
+    }
+    getDetail() {
+        const { MRAnalyseResult } = this.props
+        // const result =[
+        //     "诊断名称不标准(腹痛待查)",
+        //     "现病史缺少症状部位(腹痛)",
+        //     "现病史缺少症状缓解情况(腹痛)",
+        //     "现病史缺少症状加剧情况(腹痛)"
+        // ]
+        return MRAnalyseResult.map(item => (
+            <p>{item}</p>
+        ))
+    }
+    render() {
+        const {slideUp} = this.state
+        return <div className={style["tips"]} style={{marginBottom:'15px'}}>
+            <div className={className(style["tips-title"],style["chronic"],"clearfix")} onClick={this.slideToggle}>
+                <div className={style["tips-name"]}>
+                    <img src={chronicPic} />
+                    <h2>{'病历书写规范提示'}<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>
+        </div>
+    }
+}
+
+export default MRAnalyse;

+ 118 - 0
src/components/PushItems/MRAnalyse/index.less

@@ -0,0 +1,118 @@
+@import "~@less/mixin.less";
+.tips{
+    border:1px solid #EAEDF1;
+    margin-bottom: 15px;
+    .tips-title{
+      font-size: 14px;
+      color: #000;
+      padding: 8px 15px;
+      background: #EAF7FA;
+      font-weight: bold;
+      white-space: nowrap;
+      cursor: pointer;
+      background: rgba(242,150,91,0.1);
+      .tips-name{
+        width: 238px;
+        float: left;
+        /*display: inline-block;*/
+        img {
+          float:left;
+          margin-top: 0px;
+          margin-right: 5px;
+        }
+      }
+      h2{
+        display: inline-block;
+      }
+      .tips-btn{
+        display: inline-block;
+        float: right;
+      }
+      .redTips{
+        display: inline-block;
+        font-size: 12px;
+        -webkit-transform:scale(0.9);
+        color: red;
+        font-weight: normal;
+        white-space: nowrap;
+      }
+      .tipsDetails {
+        .btnCom;
+        display: inline-block;
+        font-weight: normal;
+        width: 42px;
+        height: 20px;
+        border: 1px solid #262626;
+        font-size: 12px;
+        color: #262626;
+        line-height: 18px;
+        margin: 0 0 -2px 10px;
+        }
+      }
+      .toggle-btn{
+        /*display: inline-block;*/
+        float: right;
+        cursor: pointer;
+      }
+      .content{
+        font-size: 14px;
+        padding:6px 15px;
+        transition:display 2s;
+        -moz-transition:display 2s; /* Firefox 4 */
+        -webkit-transition:display 2s; /* Safari and Chrome */
+        -o-transition:display 2s; /* Opera */
+        .list{
+          border-bottom: 1px solid #EAEDF1;
+          padding-bottom: 10px;
+          position: relative;
+          .infoPic{
+            vertical-align: middle;
+            margin: 0 5px;
+            cursor: pointer;
+          }
+          >p{
+            margin-top: 10px;
+          }
+          .listName{
+            color:#3B9ED0;
+            cursor: pointer;
+            display: inline-block;
+            width: 73%;
+          }
+           .listResult{
+            .add-record;
+          }
+          .addResult{
+            color: #3B9ED0;
+            text-align: left;
+            padding-left: 5px;
+            cursor: default;
+          }
+        }
+        .marTop{
+          margin-top: 10px;
+          position: relative;
+          .limit{
+            display: inline-block;
+            width: 72%;
+          }
+          img{
+            vertical-align: middle;
+          }
+        }
+        .blue{
+          color:#3B9ED0;
+          cursor: pointer;
+        }
+        .infoOption{
+          padding: 20px 0;
+        }
+        .list:last-child{
+          border-bottom:none;
+        }
+      }
+  
+    .slide{
+      display: none;
+    }
+    }

+ 2 - 0
src/components/PushItems/RecommendInspect/index.less

@@ -53,6 +53,8 @@ overflow: hidden;
   color:  #58ACD7;;
   font-size: 14px;
   cursor: pointer;
+  position: relative;
+  top: 5px;
   img {
     width: 12px;
     height: 12px;

+ 15 - 1
src/components/PushItems/index.jsx

@@ -8,6 +8,7 @@ import vigilantImg from "../../common/images/vigilant.png";
 import likelyImg from "../../common/images/likely.png";
 import DetailsModal from './DetailsModal';
 import PushDiag from "./PushDiag";
+import MRAnalyse from './MRAnalyse';
 import DiagnosticItem from "@containers/DiagnosticItem";
 import store from "@store";
 import {addLabel} from '@store/actions/inspect';
@@ -19,6 +20,7 @@ import RecommendInspect from './RecommendInspect';
 import TipsMsg from './TipsMsg'
 import dataLis from '@components/EmergencyProcedure/emergency';
 import EmergencyProcedure from '@components/EmergencyProcedure';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
 class PushItems extends Component {
   constructor(props) {
@@ -61,6 +63,7 @@ class PushItems extends Component {
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
+    
     let obj = {   //添加化验
       details: [],
       name: '',
@@ -92,6 +95,7 @@ class PushItems extends Component {
       }
       store.dispatch(addLabel(assayArr))
     }
+
     if(checkedCheck.length > 0){
       let checkArr = []
       for(let i = 0;i < checkedCheck.length;i++){
@@ -101,6 +105,11 @@ class PushItems extends Component {
         checkArr.push(tmpObj)
       }
       store.dispatch(addAssistLabel(checkArr))
+
+      
+    }
+    if(checkedAssay.length > 0 ||checkedCheck.length > 0) {
+      store.dispatch(getMRAnalyse())
     }
     //滚动到底部
     setTimeout(function(){
@@ -162,7 +171,8 @@ class PushItems extends Component {
       tipsDetails,
       tmpFlg,
       showPartName,
-      showAllName
+      showAllName,
+      MRAnalyseResult
     } = this.props.pushMessage;
     const { tipsDiscalimer,chronicPushItems,wholeIndexs,setPushEmergencyIdx,sysConfig,windowHeight,hideAllDrop,getInfomation} = this.props;
     const {
@@ -269,6 +279,10 @@ class PushItems extends Component {
             {<ChronicInfo
               patDom={this.$cont}
               data={chronicPushItems}></ChronicInfo>}
+           {MRAnalyseResult.length > 0 && <MRAnalyse
+              MRAnalyseResult = {MRAnalyseResult}
+            >
+            </MRAnalyse>}
             <TipsMsg
               patDom={this.$cont}
              tmpFlg = {tmpFlg}

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

@@ -2,6 +2,7 @@
 .container{
   display: inline-block;
   position: relative;
+  cursor: pointer;
   /*margin-right: 5px;*/
 }
 .tag,.selected-tag,.no-tag{

+ 14 - 8
src/components/RadioInpDrop/index.jsx

@@ -153,7 +153,7 @@ class InputComp extends Component{
     // FF26 只有innerHTML
     const text = e.target.innerText || e.target.innerHTML;
     const {handleBlur,index} = this.props;
-    e.target.innerHTML = '';
+    // e.target.innerHTML = '';
     // FF26 会把&nbsp; 也获取到
     handleBlur(index,text.replace('&nbsp;',''));
   }
@@ -191,15 +191,19 @@ class InputComp extends Component{
     }
     this.over=false;
   }
-  componentWillReceiveProps(next){
-    //超过限制时,再点开下拉被删除的输入文字又出现bug修改
+  componentDidMount(){
+    const {value} = this.props;
     const inp = this.$inp.current;
-    const value = next.value;
-    inp.innerHTML = '';
-    setTimeout(function(){
-      inp.innerHTML = value;
-    });
+    inp.innerHTML = value
   }
+  // componentWillReceiveProps(next){
+  //   //超过限制时,再点开下拉被删除的输入文字又出现bug修改
+  //   const inp = this.$inp.current;
+  //   const value = next.value;
+  //   setTimeout(function(){
+  //     inp.innerHTML = value
+  //   });
+  // }
   render(){
     const {value} = this.props;
     return <span contentEditable={true}
@@ -207,6 +211,8 @@ class InputComp extends Component{
                  className={`${style['inner-inp']}`}
                  onClick={(e)=>{e.stopPropagation()}}
                  onFocus={(e)=>{e.stopPropagation()}}
+                 onMouseDown={(e)=>{e.stopPropagation()}}
+                 onMouseUp={(e)=>{e.stopPropagation()}}
                  onInput={this.handleInp}
                  onBlur={this.handleBlur}>&nbsp;</span>
   }

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

@@ -224,7 +224,7 @@ class SpreadDrop extends Component{
     const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText,copyType,value,mainData});
     delete params.tmpDom;       //避免上面deepClone selecteds报错
     handleConfirm&&handleConfirm(params);
-	this.btnClickFlag = true;
+	  this.btnClickFlag = true;
     //点确定后隐藏弹窗
     this.props.handleHide();
   }
@@ -391,7 +391,7 @@ class SpreadDrop extends Component{
     let showDefaulted = this.ifDefault();
     let showV = showDefaulted&&value===undefined?showVal:value;      //未选中过值时展示默认选中
     const noPushData = (+tagType===11)&&(!data[1]||!data[1].questionDetailList||data[1].questionDetailList.length===0);    //无推送数据
-    const showCommonData = (+type===2)&&(+tagType===11)&&noPushData&&CommonSymptoms.length>0?true:false;
+    const showCommonData = (+tagType===11)&&noPushData&&CommonSymptoms.length>0?true:false;
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})
     }

+ 3 - 3
src/components/TemplateItems/index.jsx

@@ -143,8 +143,8 @@ class TemplateItems extends React.Component {
                         </div> :
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input placeholder="模板搜索" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
-                                {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                                <input placeholder="模板搜索" id="searchTmp" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                {this.state.val?<img src={delIcon} id='clearTemplateSearch' alt="清空" onClick={this.clear}/>:''}
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>
                             {
@@ -156,7 +156,7 @@ class TemplateItems extends React.Component {
                     items&&!admin ? 
                         <div className={style.wrapperTop}>
                             <div className={style.templateSearch}>
-                                <input placeholder="模板搜索" id='templateSearch' maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                <input placeholder="模板搜索" id="searchTmp" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
                                 {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>

+ 1 - 1
src/components/TemplateItems/index.less

@@ -138,4 +138,4 @@
     .manger {
         float: right;
     }
-}
+}

+ 11 - 3
src/components/Treat/AdverseReactions/index.jsx

@@ -1,4 +1,5 @@
 import React, { Component } from 'react';
+import { Radio } from '@commonComp';
 import style from './index.less';
 import info2 from './../img/info2.png';
 import info3 from './../img/info3.png';
@@ -75,9 +76,16 @@ class AdverseReactions extends Component {
                         
                     </span>
                         {item.details.map((it, idx) => {
-                            return <span className={`style['adverse-reactions-name'] ${it.value == 1 ? style['selectd']:''}`} key={item.conceptId + item.name + it.name}>
-                                <input type="radio" checked={it.value == 1}  id={item.conceptId +item.name + it.name} onChange={this.changeReact.bind(this, it, index)}/>
-                                <label for={item.conceptId +item.name + it.name}> {it.name} </label>
+                            return <span className={`${style['adverse-reactions-name']} ${it.value == 1 ? style['selectd']:style['dis-selectd']}`} key={item.conceptId + item.name + it.name}>
+                                {/* <input type="radio" checked={it.value == 1}  id={item.conceptId +item.name + it.name} 
+                                    // onChange={this.changeReact.bind(this, it, index)}
+                                />
+                                <label for={item.conceptId +item.name + it.name}> {it.name} </label> */}
+                                <Radio label={it.name}
+                                       isSelect={it.value == 1}
+                                       noSelected = 'true'
+                                      //  handleClick={this.handleRadio.bind(this,it.name,i.detailName)}
+                                ></Radio>
                                 {/* {it.value==1 && <span className={style['adverse-reactions-recommend']}>(智能推荐)</span>} */}
                             </span>
                         })}

+ 2 - 2
src/components/Treat/GeneralTreat/index.jsx

@@ -9,7 +9,7 @@ class GeneralTreat extends Component {
     constructor(props){
         super(props);
         this.state = {
-            slideUp: false
+            slideUp: true
         }
         this.$content = React.createRef();
     }
@@ -33,7 +33,7 @@ class GeneralTreat extends Component {
                     {title}
                     {hasFold && <img  className={style['slide-toggle']} src={slideUp?up:down} alt="展开/收起"/>}
                 </div>
-                <div ref={this.$content} className={hasFold?style['general-item-hide']:style['general-item-show']}  dangerouslySetInnerHTML={{__html: generalTreat.content}}>
+                <div ref={this.$content} className={hasFold?style['general-item-show']:style['general-item-hide']}  dangerouslySetInnerHTML={{__html: generalTreat.content}}>
                 </div>
 
             </div>

+ 25 - 13
src/components/TreatDesc/DrugInfo/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from 'react';
 import style from './index.less';
 import close from './../img/close.png';
+import imgCurrent from '@common/images/icon-current.png';
 import $ from "jquery";
 import {dragBoxs} from '@utils/drag'
 import { imageUrlPrefix } from '@utils/config.js';
@@ -56,28 +57,39 @@ class DrugInfo extends Component {
         const { currentIndex } = this.state
         return (<div className={style['drug-info-wrapper']} id="drugWrapper">
                 <img src={close} onClick={hideDrugInfo} className={style['close-drug-desc']}/>
-                <h3 onMouseDown={this.setDragBox} id="drugTitle" className={style['drug-title']}>{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</h3>
+                <div id="drugTitle" className={`${style['details-drag-name']}`}></div>
+                <h1 onMouseDown={this.setDragBox}  className={style['drug-title']}>{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</h1>
                 { drugInfo && drugInfo.drugDesc.length > 0 && <div className={style['drug-desc-wrapper']} id='drugDesc' onScroll={this.handleScrollModal.bind(this,  drugInfo.drugDesc)}>
-                    <div className={style['drug-title1']} >{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</div>
+                    {/* <div className={style['drug-title1']} >{drugInfo.tagType == 8 ? drugInfo.title+'说明书' : drugInfo.tagType == 10 ? drugInfo.title+ '说明': ''}</div> */}
                     {drugInfo.drugDesc.map((item, index) =>{
                         return <div className={style['drug-desc-item']} id={item.title.trim()}>
-                            <div className={style['drug-desc-title']} >{item.title.trim()}</div> 
+                            <div className={style['details-content-title-box']} >
+                                <span className={style['details-content-title-name']}>{item.title}</span>
+                                <div className={style['details-content-title-circle-box']}><span className={style['details-content-title-circle']}></span></div>
+                            </div>
                             <pre className={style['drug-desc-content']} dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre> 
                         </div>
                     })}
                     <div className={style['content-menu-box']}>
                         <div className={style['content-menu-wrapper']}>
                             <div className={style['content-menu']}>
-                                {drugInfo.drugDesc.map((item, index) => {
-                                    return (<div >
-                                        <div className={style['details-menu-title-box']}>
-                                            {index === 0 ? '' : <div className={style['details-content-menu-line']}></div>}
-                                            <span onClick={this.handleClickMenu.bind(this, index, item, drugInfo.drugDesc)} className={style['details-content-menu-name']} style = {index === currentIndex ? {color:'#0089be'} : ''}>
-                                                <span className={style['details-content-menu-circle']} style = {index === currentIndex ? {background:'#0089be'} : ''}></span>{item.title}
-                                            </span>
-                                        </div>
-                                    </div>)
-                                })}
+                                <div className={style['content-menu-border']}> 
+                                    {drugInfo.drugDesc.map((item, index) => {
+                                        return (<div class={style['details-menu-title-wrapper']}>
+                                            <div className={style['details-menu-title-box']}>
+                                                {index === 0 ? '' : <div className={style['details-content-menu-line']}></div>}
+                                                <span onClick={this.handleClickMenu.bind(this, index, item, drugInfo.drugDesc)} className={style['details-content-menu-name']} style = {index === currentIndex ? {color:'#3B9ED0'} : ''}>
+                                                    <div className={style['details-content-menu-circle-box']}>
+                                                        {index !== currentIndex&&<span className={style['details-content-menu-circle']} ></span>}
+                                                        {index === currentIndex&&<img className={style['details-content-menu-img']} src ={imgCurrent}/>}
+                                                    </div>
+                                                    {item.title}
+                                                </span>
+                                            </div>
+                                        </div>)
+                                    })}
+                                </div>
+                                
                             </div>
                         </div>
                     </div>

+ 91 - 34
src/components/TreatDesc/DrugInfo/index.less

@@ -9,14 +9,12 @@
     top: 10%;
     margin-left: -475px;
     background: #fff;
-    padding: 40px 0 60px;
+    padding: 110px 0 50px 0;
     box-shadow: 0px 0px 5px -2px #7d7c7c;
     word-break: break-all;
     max-width: 100%;
     line-height: 20px;
-    ul, ol {
-        padding: 0 0 0 15px;
-      }
+    
       ul li {
         list-style: disc;
         list-style-position: inside;
@@ -31,14 +29,11 @@
     overflow-y: auto;
     padding: 0 40px;
 }
-.drug-title {
+.details-drag-name {
     position: absolute;
-    top: 0;
     width: 100%;
-    height: 40px;
-    line-height: 40px;
-    padding: 0 40px;
-    border-bottom: 1px solid #979797;
+    height: 70px;
+    top: 0;
     cursor: move;
     moz-user-select: -moz-none;
     -moz-user-select: none;
@@ -48,6 +43,18 @@
     -ms-user-select:none;
     user-select:none;
 }
+.drug-title {
+    position: absolute;
+    top: 43px;
+    width: 100%;
+    height: 37px;
+    line-height: 37px;
+    font-size: 28px;
+    font-weight: bold;
+    padding: 0 40px;
+    color: #1E1E1E;
+}
+
 .close-drug-desc {
     .contentZIndex1;
     position: absolute;
@@ -58,7 +65,8 @@
 }
 .drug-desc-item {
     zoom: 1;
-    padding: 5px 0;
+    border-left: 1px solid #969C9F;
+    padding: 0 0 0 33px;
     &:after{
         content: "";
         display: block;
@@ -70,76 +78,125 @@
 .drug-desc-title {
     display: inline-block;
     font-weight: bold;
-    font-size: 14px;
+    font-size: 22px;
     // height: 100%;
     // float: left;
     // width: 190px;
     // text-align-last:justify;    /*chrome*/
     // text-justify: distribute;   /*ff*/
 }
-.drug-desc-title::before {
-    content: '【'
-}
-.drug-desc-title::after {
-    content: '】'
-}
+
 .drug-title1 {
     height: 60px;
     line-height: 60px;
     font-size: 32px;
-    color: #000000;
+    color: #1E1E1E;
     text-align: center;
 }
 .drug-desc-content {
     /*width: 100%;*/
-    margin: 0px 160px 0px 10px;
+    margin: 10px 200px 10px 10px;
 }
 
 .content-menu-box {
     position: absolute;
-    top: 50px;
+    top: 110px;
     right: 20px;
-    width: 160px;
+    width: 200px;
     height: 80%;
     overflow: hidden;
     
 }
 .content-menu-wrapper {
-    width: 200px;
+    width: 240px;
     height: 100%;
     overflow-y: auto;
 }
+.content-menu-border{
+    border-left: 2px solid #E0E2E3;
+    padding: 0 4px 0 20px;
+}
 .content-menu {
     
-    background: #eee;
-    border: 1px solid #eee;
-    width: 160px;
-    padding: 15px 18px;
+    background: #F5F6F7;
+    border: 1px solid #F5F6F7;
+    width: 200px;
+    padding: 15px 20px;
 }
 .details-content-menu-line {
-    height: 15px;
+    height: 20px;
     width: 0;
-    border: 1px solid #ccc;
-    background-color: #ccc;
     margin-left: 4px
 }
 .details-content-menu-name {
-    color: #33475f;
-    font-size: 13px;
+    position: relative;
+    color: #777777;
+    font-size: 14px;
     cursor: pointer;
+    line-height: 19px;
+}
+.details-content-menu-circle-box {
+    display:inline-block;
+    position: absolute;
+    left: -25px;
+    background: #F5F6F7;
+
 }
 .details-content-menu-circle {
+    position: relative;
     display: inline-block;
     width: 8px;
     height: 8px;
     border-radius: 5px;
-    border: 1px solid #ccc;
     margin-top: 5px;
-    background-color: #eee;
+    background-color: #E0E2E3;
     margin-right: 10px;
+   
+}
+.details-content-menu-img {
+    position: relative;
+    z-index: 20;
+    left: -3px;
+    top: 0;
+}
+.details-content-title-circle-box {
+    position: absolute;
+    z-index: 10;
+    background: #fff;
+    left: -40px;
+    height: 32px;
+    top: 0px;
+ }
+ .details-content-title-circle {
+     display: inline-block;
+     width: 12px;
+     height: 12px;
+     border-radius: 50%;
+     background: #3B9ED0;
+     position: relative;
+     top: 2px;
+ }
+ .details-content-title-box {
+    position: relative;
+    line-height: 40px;
+    margin: 0 180px 0 0;
+    font-size: 20px;
+}
+.details-content-title-name {
+    position: relative;
+    font-weight: bold;
+    background: #fff;
+    padding-right: 5px;
+    font-size: 22px;
+    line-height: 30px;
+    display: inline-block;
+    z-index: 10;
+    color: #1E1E1E;
 }
 pre {
     white-space: pre-wrap;
     word-wrap: break-word;
     font-family: inherit;
+    color: #1E1E1E;
+    line-height: 21px;
   }

+ 0 - 40
src/containers/AssessResult.js

@@ -70,33 +70,6 @@ function mapDispatchToProps(dispatch) {
         type:CLEAR_INDEX_DATA
       })
     },
-    saveCalcuResult(data){
-      dispatch({
-        type: SET_CHRONIC_CALCU_RESULT,
-        data:deepClone(data)
-      })
-    },
-    // setCalcuInfo(id, calcuVal, calcuResult) {
-    //   dispatch({
-    //     type: SET_CHRONIC_CALCU_RESULT,
-    //     result:calcuResult,
-    //     id:id
-    //   });
-    //   dispatch({
-    //     type:SET_CALCU_VALUES,
-    //     data:deepClone(calcuVal),
-    //     id:id
-    //   })
-    // },
-    showScaleFn(item,isPop){
-      dispatch({
-        type:SHOW_TABLE_LIST,
-        name:'showTable',
-        value:true,
-        isPop,
-        item:Object.assign({},item)
-      });
-    },
     //保存管理评估
     saveAssessInfos(obj,flg,noSave){     //noSave未true则不调页面保存接口
       dispatch(Object.assign({},obj,{type:SET_SAVE_ASSESS_DATA}));
@@ -107,19 +80,6 @@ function mapDispatchToProps(dispatch) {
         }
       }
     },
-    savePossibleRes(data) {
-      dispatch({
-        type: 'SAVE_POSSIBLE_RESULT',
-        wholeResults: data
-      })
-    },
-    saveCalcuValue(data,id){
-      dispatch({
-        type:SET_CALCU_VALUES,
-        data,
-        id
-      })
-    }
   }
 }
 

+ 4 - 2
src/containers/AssistCheck.js

@@ -6,10 +6,10 @@ import AssistCheck from '@components/AssistCheck';
 import { assistLable,delAssistLabel,changeAssistVal,changeDate,allCheckImports,selectOneChecks,showInIcsss } from '@store/actions/assistCheck';
 import { getSearchList,getInstroduce ,getImportLists,getSonDetailList} from '@store/async-actions/assistCheck';
 import {ISREAD,HIDEDROP} from '@store/types/homePage.js';
-import {billing, getConceptDetail} from '@store/async-actions/pushMessage';
+import {billing, getConceptDetail,getMRAnalyse} from '@store/async-actions/pushMessage';
 import { getCalendarDate} from '@utils/tools';
 
-function mapStateToProps(state) {//console.log(state)
+function mapStateToProps(state) {//console.log(state.typeConfig)
     return {
         list:state.assistCheck.list,
         assistLabel:state.assistCheck.assistLabel,
@@ -58,9 +58,11 @@ function mapDispatchToProps(dispatch, store) {
         },
         handleSign(id,idx,type){
             dispatch(assistLable(id,idx,type))
+            dispatch(getMRAnalyse())
         },
         handleDelAssist(idx,name,type){
             dispatch(delAssistLabel(idx,name,type))
+            dispatch(getMRAnalyse())
             dispatch({
               type:ISREAD
             })

+ 12 - 2
src/containers/CheckBody.js

@@ -1,10 +1,11 @@
 import {connect} from 'react-redux';
 import CheckBody from '@components/CheckBody';
 import {getModule,getInitData,pregetCheckbodyData} from '@store/async-actions/fetchModules.js';
-import {HIDE,RESET,SETDROPSHOW,ISREAD,MODI_LOADING,HIDEDROP} from '@store/types/homePage.js';
+import {HIDE,RESET,SETDROPSHOW,ISREAD,MODI_LOADING,HIDEDROP,SET_CURRENT_MODULE} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA,REPUSH_CHECK_LABELS} from "@store/types/checkBody";
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {didPushParamChange,filterDataArr} from '@utils/tools.js';
+import store from '@store';
 
 function mapStateToProps(state){ 
   const {homePage,mainSuit,checkBody,diagnosticList} = state;
@@ -59,7 +60,16 @@ function mapDispatchToProps(dispatch){
       });
     },
     rePush(){
+      const storeState = store.getState()
+      const {moduleName} = storeState.homePage
       dispatch(pregetCheckbodyData(false,true));
+      if(moduleName != '查体') {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: '查体'
+        });
+        dispatch(getMRAnalyse());
+      }
     },
     hideAllDrop(){
       dispatch({

+ 14 - 3
src/containers/CurrentIll.js

@@ -4,11 +4,12 @@ import CurrentIll from '@components/CurrentIll';
 import {INSERT_PROCESS,SET_CURRENT_DATA,SETTEXTMODEVALUE,SET_LABEL_MODULE,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,SAVE_CURR_FREE} from '@store/types/currentIll';
 import {pushMessage} from '../store/async-actions/pushContainer';
 import {getModules} from '../store/async-actions/fetchModules.js';
-import {HIDE,RESET,CLICKCOUNT,ISREAD,SETDROPSHOW,HIDEDROP} from '@store/types/homePage';
-import {billing} from '@store/async-actions/pushMessage';
+import {HIDE,RESET,CLICKCOUNT,ISREAD,SETDROPSHOW,HIDEDROP,SET_CURRENT_MODULE} from '@store/types/homePage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {getModule} from '@store/async-actions/fetchModules';
 import {didPushParamChange,filterDataArr} from '@utils/tools';
 import {Notify} from '@commonComp';
+import store from '@store';
 
 function mapStateToProps(state) {
   const {homePage,currentIll,mainSuit,diagnosticList,typeConfig} = state;
@@ -47,7 +48,10 @@ function mapStateToProps(state) {
 
 function mapDispatchToProps(dispatch) {
     return {
-       insertProcess(obj,allModules){//点击病程变化
+        insertProcess(obj,allModules){//点击病程变化
+        const storeState = store.getState()
+        const {moduleName, moduleObj} = storeState.homePage
+
         // 埋点dispatch
         dispatch({
           type:CLICKCOUNT,
@@ -58,6 +62,13 @@ function mapDispatchToProps(dispatch) {
         dispatch({
           type:INSERT_PROCESS,
         });
+        if(moduleName != '现病史') {
+          dispatch({
+            type: SET_CURRENT_MODULE,
+            moduleName: '现病史'
+          });
+          dispatch(getMRAnalyse());
+        }
         dispatch({
           type:ISREAD
         })

+ 2 - 1
src/containers/DiagnosticItem.js

@@ -12,7 +12,8 @@ import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
 function mapStateToProps(state) {
     return {
         diagnosticList: state.diagnosticList.diagnosticList,
-        mode:state.typeConfig.mode
+        mode:state.typeConfig.mode,
+        EMRScrollCont:state.inspect.context.scrollArea,             //滚动条对象
     }
 }
 

+ 3 - 2
src/containers/DiagnosticList.js

@@ -4,7 +4,7 @@ import DiagnosticList from '@components/DiagnosticList';
 import { DEL_DIAGNOSTIC, UP_DIAGNOSTIC, DOWN_DIAGNOSTIC, GET_DIAGNOSTIC_STR, HIDE_REFER_RECORD, SHOW_HISTORY_CASE,HIDE_HISTORY_CASE ,SHOW_LOADING} from '@store/types/diagnosticList'; 
 import { getTreatResult } from '@store/async-actions/treat';
 import { SHOW_TREAT, DEL_REACT, DEL_FOLLOW_UP } from '@store/types/treat.js';
-import {billing, getConceptDetail} from '../store/async-actions/pushMessage';
+import {billing, getConceptDetail,getMRAnalyse} from '../store/async-actions/pushMessage';
 import {keepPushData} from '@store/actions/tabTemplate';
 import { visibleHistory } from '@store/actions/historyTemplates'
 import {autoFillModules} from '@store/async-actions/fetchModules';
@@ -27,7 +27,7 @@ function mapStateToProps(state) {
       //wholeResults:assessResult.wholeResults,
         scaleInfo: pushMessage.scaleInfo,//量表内容
         showHide: pushMessage.showHide,
-        loading: diagnosticList.loading,
+        loading: diagnosticList.loading&&!state.copyRight.loading,
         windowWidth: state.homePage.windowWidth
     }
 }
@@ -49,6 +49,7 @@ function mapDispatchToProps(dispatch) {
             dispatch({
                 type: GET_DIAGNOSTIC_STR
             });
+            dispatch(getMRAnalyse())
         },
         delReact: (item) => {
             dispatch({

+ 12 - 3
src/containers/EditableSpan.js

@@ -5,10 +5,11 @@ import {SET_SEARCH,MAIN_FOCUS_INDEX,CLEAR_SEARCH,SETMAINTEXT,DEL_MAIN,REMOVE_MAI
 import {SETOTHERTEXT,SETOTHERSEARCHDATA,OTHER_FOCUS_INDEX,OTHERHIS_CLEAR,DEL_OTHERHIS,REMOVE_OTHER_ID,DEL_OTHERHIS_LABLE} from '@types/otherHistory';
 import {SET_CURRENT_SEARCH,CURRENT_CLEAR,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,DEL_CURRENT,REMOVE_CURR_ID,DEL_CURRENT_LABLE} from '@types/currentIll';
 import {getSearch} from '@store/async-actions/fetchModules';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {didPushParamChange,storageLocal} from '@utils/tools';
-import {SETTEXTFOCUS,RESET,SETDROPSHOW,ISREAD,SET_SELECTED_AREA} from '@types/homePage';
+import {SETTEXTFOCUS,RESET,SETDROPSHOW,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@types/homePage';
 import config from '@config/index';
+import store from '@store';
 
 function mapStateToProps(state){//console.log(state)
   return {
@@ -91,7 +92,8 @@ function otherHisSearch(obj) {
 function mapDispatchToProps(dispatch,state) {
   return {
     setFocusIndex(obj){//将选中值插入相应位置
-
+      const storeState = store.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       const {i,boxMark} = obj;
       switch (+obj.boxMark){
         case 1:
@@ -138,6 +140,13 @@ function mapDispatchToProps(dispatch,state) {
       dispatch({
         type: RESET
       });
+      if(moduleName != moduleObj[boxMark]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[boxMark]
+        });
+        dispatch(getMRAnalyse());
+      }
     },
     handleChange(obj){//存data值
       switch (+obj.boxMark){

+ 4 - 0
src/containers/Inspect.js

@@ -21,6 +21,7 @@ import {
 import {
   billing,
   getConceptDetail,
+  getMRAnalyse
 } from '@store/async-actions/pushMessage';
 import {HIDEDROP} from '@types/homePage';
 
@@ -55,6 +56,7 @@ function mapDispatchToProps(dispatch, store) {
     handleSign(id, idx, type) {
       dispatch(setLabel(idx, type))
       dispatch(getSublableList(id))
+      dispatch(getMRAnalyse())
     },
     handleLabelSub(e, id, idx) {
       dispatch(fillActived(id, idx))
@@ -73,9 +75,11 @@ function mapDispatchToProps(dispatch, store) {
     },
     handleCloseExcel(idx) {
       dispatch(delExcelLis(idx));
+      dispatch(getMRAnalyse())
     },
     delPartItem(idx) {
       dispatch(delPartItem(idx))
+      dispatch(getMRAnalyse())
     },
     setTipValue(idx,value) {
       dispatch(setTip(idx,value))

+ 13 - 2
src/containers/MainSuit.js

@@ -2,17 +2,18 @@ import React from 'react';
 import { connect } from 'react-redux';
 import MainSuit from '@components/MainSuit';
 import {CLEAR_COMSYMPTOMS,SHOW_TAIL,INSERT_MAIN,CLEAR_SEARCH,SET_SEARCH,SAVE_FREE,SET_DATA,INSERT_SEARCH,SETTEXTMODEVALUE,SET_FEATURE,SAVE_CHRONIC,SHOW_HISTORY_BOX,HIDE_HISTORY_BOX} from '@store/types/mainSuit';
-import {RESET,CLICKCOUNT,ISREAD,MODI_LOADING,SETDROPSHOW} from '@store/types/homePage.js';
+import {RESET,CLICKCOUNT,ISREAD,MODI_LOADING,SETDROPSHOW,SET_CURRENT_MODULE} from '@store/types/homePage.js';
 import {getCommSymptoms,getCommSymptomPush} from '@store/async-actions/mainSuit.js'
 import {CLEAR_DIAGNOSE} from '@store/types/diagnosticList';
 import {getSearch,getFeature,autoFillModules} from '@store/async-actions/fetchModules';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {didPushParamChange,filterDataArr,inspectAndAssist} from '@utils/tools.js';
 import config from '@config/index.js';
 import {Notify} from '@commonComp';
 import {getInitModules} from '@store/async-actions/homePage.js';
 import {SHOW_REFER_RECORD} from '@store/types/diagnosticList';
 import { SET_READ_MODE } from "@store/types/typeConfig";
+import store from '@store';
 
 function mapStateToProps(state) {
   const {mainSuit,homePage,diagnosticList,typeConfig} = state;
@@ -45,6 +46,7 @@ function mapStateToProps(state) {
 }
 
 function mapDispatchToProps(dispatch) {
+  
     return {
         reTotalHide:()=>{//重置隐藏
           dispatch({
@@ -218,10 +220,19 @@ function mapDispatchToProps(dispatch) {
         dispatch(autoFillModules())
       },
       handleShow(obj) {
+        const storeState = store.getState()
+        const {moduleName, moduleObj} = storeState.homePage
         dispatch({
           type:SETDROPSHOW,
           data:obj
         });
+        if(moduleName != moduleObj[obj.ikey]) {
+          dispatch({
+            type: SET_CURRENT_MODULE,
+            moduleName: moduleObj[obj.ikey]
+          });
+          dispatch(getMRAnalyse());
+        }
         dispatch({
           type: RESET
         });

+ 1 - 2
src/containers/MedicalInfoContainer.js

@@ -32,12 +32,11 @@ function mapDispatchToProps(dispatch) {
                 type:CLEAR_INFO_SEARCH_LIST
               })
         },
-        showScaleFn(item,isPop){
+        showScaleFn(item){
           dispatch({
             type:SHOW_TABLE_LIST,
             name:'showTable',
             value:true,
-            isPop,
             item:Object.assign({},item)
           });
         },

+ 12 - 1
src/containers/MultSpread.js

@@ -5,7 +5,9 @@ import {OTHERADDLABELITEM} from '@types/otherHistory';
 import {ADDLABELITEM} from '@types/checkBody';
 import {MAINADDLABELITEM} from '@store/types/mainSuit';
 import {CURRENTADDLABELITEM} from '@store/types/currentIll';
-import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT,ISREAD,SET_SELECTED_AREA} from '@store/types/homePage';
+import {HIDE,RESET,CLICKCOUNT,SETADDITEMINIT,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@store/types/homePage';
+import store from '@store';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
 function mapStateToProps(state){
   return {
@@ -61,6 +63,8 @@ function mapDispatchToProps(dispatch){
       const {copyId,ikey} = param;
       const boxMark = ikey.substr(0,1);
       const inx = ikey.split("-")[1];
+      const storeState = store.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       //埋点记录
       dispatch({
         type:CLICKCOUNT,
@@ -69,6 +73,13 @@ function mapDispatchToProps(dispatch){
         num:1
       });
       dispatch(getCopyData(copyId,inx,boxMark));
+      if(moduleName != moduleObj[ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
     },
     handleClick(obj){
       dispatch({

+ 14 - 2
src/containers/Multiple.js

@@ -1,15 +1,16 @@
 // import React from "react";
 import {connect} from "react-redux";
 import Multiple from "@components/Multiple";
-import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,SET_SELECTED_AREA} from '@store/types/homePage.js';
+import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@store/types/homePage.js';
 import {CURRENT_MUL,CURRENT_TEXT_LABEL} from '@types/currentIll';
 import {MAINSUIT_MUL,CHANGE_LABELVAL} from '@types/mainSuit';
 import {OTHERHIS_MUL,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {CHECKBODY_MUL,CHANGECHECKTEXTLABEL} from '@types/checkBody';
 import {filterDataArr,getLabelIndex,didPushParamChange} from '@utils/tools.js';
 import config from '@config/index.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing, getMRAnalyse} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
+import store from '@store';
 
 function handleMainSuit(dispatch,params){
   const {ikey,seleData,seleId,value,mainSaveText} = params;
@@ -141,8 +142,12 @@ function mapStateToProps(state){
 }
 
 function mapDispatchToProps(dispatch){
+
   return{
+   
     handleShow(obj){
+      const storeState = store.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       dispatch({
         type:CLICKCOUNT,
         data:obj,
@@ -153,6 +158,13 @@ function mapDispatchToProps(dispatch){
         type:SETDROPSHOW,
         data:obj
       });
+      if(moduleName != moduleObj[obj.ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[obj.ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
       dispatch({
         type: RESET
       });

+ 12 - 2
src/containers/NumberDrop.js

@@ -3,13 +3,14 @@ import {connect} from 'react-redux';
 import NumberDrop from "@components/NumberDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETNUMBER4} from '@types/checkBody';
-import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD,SET_SELECTED_AREA} from '@types/homePage';
+import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@types/homePage';
 import {NUMBER_SELECT} from '@store/types/mainSuit';
 import {CURRENT_NUMBER} from '@store/types/currentIll';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
 import {filterArr,didPushParamChange,filterDataArr} from '@utils/tools';
 import config from '@config/index';
+import storeGlobal from '@store';
 
 function mapStateToProps(state){
   return {
@@ -89,6 +90,8 @@ function mapDispatchToProps(dispatch,store){
       })
     },
     handleShow(params) {
+      const storeState = storeGlobal.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       dispatch({
         type:CLICKCOUNT,
         data:params,
@@ -99,6 +102,13 @@ function mapDispatchToProps(dispatch,store){
         type:SETDROPSHOW,
         data:params
       });
+      if(moduleName != moduleObj[params.ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[params.ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
       /*dispatch({
         type: RESET
       });*/

+ 12 - 2
src/containers/NumberUnitDrop.js

@@ -3,13 +3,14 @@ import {connect} from 'react-redux';
 import NumberUnitDrop from "@components/NumberUnitDrop";
 import {SETNUMBER,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETNUMBER4,CHANGECHECKTEXTLABEL} from '@types/checkBody.js';
-import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD,SET_SELECTED_AREA} from '@types/homePage.js';
+import {SETDROPSHOW,CLICKCOUNT,HIDE,RESET,HIDEDROP,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@types/homePage.js';
 import {NUMBER_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {CURRENT_NUMBER,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
 import {didPushParamChange,filterDataArr,getLabelIndex} from '@utils/tools.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import config from '@config/index.js';
+import storeGlobal from '@store';
 
 function mapStateToProps(state){
   return {
@@ -162,6 +163,8 @@ function mapDispatchToProps(dispatch,store){
       })
     },
     handleShow(params) {
+      const storeState = storeGlobal.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       dispatch({
         type:CLICKCOUNT,
         data:params,
@@ -172,6 +175,13 @@ function mapDispatchToProps(dispatch,store){
         type:SETDROPSHOW,
         data:params
       });
+      if(moduleName != moduleObj[params.ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[params.ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
       /*dispatch({
         type: RESET
       });*/

+ 12 - 2
src/containers/RadioDrop.js

@@ -3,13 +3,14 @@ import {connect} from 'react-redux';
 import RadioDrop from "@components/RadioDrop";
 import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
 import {SETSELECTED4,CHANGECHECKTEXTLABEL} from '@types/checkBody';
-import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA} from '@types/homePage.js';
+import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@types/homePage.js';
 import {RADIO_SELECT,CHANGE_LABELVAL} from '@store/types/mainSuit.js';
 import {CURRENT_RADIO,CURRENT_TEXT_LABEL} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
 import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText} from '@utils/tools.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import config from '@config/index.js';
+import storeGlobal from '@store';
 
 function mapStateToProps(state){
   const {typeConfig} = state;
@@ -139,6 +140,8 @@ function mapDispatchToProps(dispatch,store){
       })
     },
     handleShow(obj) {
+      const storeState = storeGlobal.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       dispatch({
         type:CLICKCOUNT,
         data:obj,
@@ -149,6 +152,13 @@ function mapDispatchToProps(dispatch,store){
         type:SETDROPSHOW,
         data:obj
       });
+      if(moduleName != moduleObj[obj.ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[obj.ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
       dispatch({
         type: RESET
       });

+ 12 - 2
src/containers/RadioInpDrop.js

@@ -3,13 +3,14 @@ import {connect} from 'react-redux';
 import RadioInpDrop from "@components/RadioInpDrop";
 import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,SET_OT_RADIO_INPUT_VAL} from '@types/otherHistory';
 import {SETSELECTED4,SET_CK_RADIO_INPUT_VAL} from '@types/checkBody';
-import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA} from '@types/homePage.js';
+import {SETDROPSHOW,HIDE,RESET,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@types/homePage.js';
 import {RADIO_SELECT,SET_MS_RADIO_INPUT_VAL} from '@store/types/mainSuit.js';
 import {CURRENT_RADIO,SET_RADIO_INPUT_VALUE} from '@store/types/currentIll.js';
 import {Notify} from '@commonComp';
 import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText} from '@utils/tools.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import config from '@config/index.js';
+import storeGlobal from '@store';
 
 function mapStateToProps(state){
   return {
@@ -149,6 +150,8 @@ function mapDispatchToProps(dispatch,store){
       })
     },
     handleShow(obj) {
+      const storeState = storeGlobal.getState()
+      const {moduleName, moduleObj} = storeState.homePage
       dispatch({
         type:CLICKCOUNT,
         data:obj,
@@ -159,6 +162,13 @@ function mapDispatchToProps(dispatch,store){
         type:SETDROPSHOW,
         data:obj
       });
+      if(moduleName != moduleObj[obj.ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[obj.ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
       dispatch({
         type: RESET
       });

+ 1 - 2
src/containers/ScaleSearchContainer.js

@@ -23,12 +23,11 @@ function mapDispatchToProps(dispatch) {
         getScale(item) {
             dispatch(getScaleInfo(item))
         },
-        showScaleFn(item,isPop){
+        showScaleFn(item){
           dispatch({
             type:SHOW_TABLE_LIST,
             name:'showTable',
             value:true,
-            isPop,
             item:Object.assign({},item)
           });
         },

+ 42 - 6
src/containers/SpreadDrop.js

@@ -3,17 +3,18 @@ import {connect} from 'react-redux';
 
 import SpreadDrop from '@components/SpreadDrop';
 import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SETOTHERCHECKBOX,CHANGEOTHERTEXTLABEL} from '@types/otherHistory';
-import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA} from '@store/types/homePage.js';
+import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD,SET_SELECTED_AREA,SET_CURRENT_MODULE} from '@store/types/homePage.js';
 import {getModules as fetchModules} from '@store/async-actions/fetchModules.js';
 import {getCommSymptomPush,getCommSymptoms} from '@store/async-actions/mainSuit.js'
 import {GET_BIGDATAPUSH,MIX_CONFIRM,COMM_CONFIRM,CHANGE_LABELVAL} from '@store/types/mainSuit';
 import {SETCHECKBOX,CHANGECHECKTEXTLABEL,CHECKCONFIRMSELECTED} from '@types/checkBody';
 import {CURRENT_CONFIRM,SETMAINCHECKBOX,CURRENT_TEXT_LABEL,CURRENT_GET_BIGDATAPUSH,SHOW_COMMON_ON_CURRENT} from '@types/currentIll';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {Notify} from '@commonComp';
 import {filterArr,didPushParamChange,filterDataArr,getLabelIndex,fullfillText,checkFullfillText,getIds} from '@utils/tools.js';
 import config from '@config/index.js';
 import {CLEAR_COMSYMPTOMS} from "../store/types/mainSuit";
+import storeGlobal from '@store';
 
 function mapStateToProps(state) {//console.log(state);
   const {mainSuit,homePage} = state;
@@ -149,7 +150,7 @@ function mainSuitModule(dispatch,store,params){
 
 // 现病史
 function currentIll(dispatch,store,params){
-  const {nones,exists,withs,exclusion,excluName,ban,noneIds} = params;
+  const {nones,exists,withs,exclusion,excluName,ban,noneIds,tagType} = params;
   const index = params.ikey;
   let ikey = getLabelIndex(index);
   let existsId = exists && exists.length>0?getIds(exists):[];
@@ -157,6 +158,13 @@ function currentIll(dispatch,store,params){
   // const ids = (existsId.concat(withsId)).join(",");
   const ids = existsId.concat(withsId);
   let has = [],wes=[];
+  if(params.exclusion){//既往史
+    dispatch({
+      type: CURRENT_CONFIRM,
+      data:{exclusion,excluName,exists:has,withs:wes,nones:nones,ikey,ban,noneIds,tagType}
+    });
+    return ;
+  }
   //获取选中项目模板
   fetchModules(ids).then((res)=>{
     if(+res.data.code===0){
@@ -173,12 +181,13 @@ function currentIll(dispatch,store,params){
         });
         dispatch({
           type: CURRENT_CONFIRM,
-          data: {exists:has,withs:wes,nones:nones,ikey,ban,noneIds}
+          data: {exclusion,excluName,exists:has,withs:wes,nones:nones,ikey,ban,noneIds,tagType}
         });
       }else{
         dispatch({
           type: CURRENT_CONFIRM,
-          data: {exists,withs,nones,ikey,ban,noneIds}
+          data: {exclusion,excluName,exists:has,withs:wes,nones:nones,ikey,ban,noneIds,tagType}
+          // data: {exists,withs,nones,ikey,ban,noneIds}
         });
       }
       dispatch({    //自由文本标签数据更新
@@ -502,12 +511,21 @@ function mapDispatchToProps(dispatch,store){
         if(+result.code == 0){
           // let pushDataList = result.data.symptom;
           let bigDataList = result.data.symptom;
-          if(+obj.type===2&&!bigDataList&&!obj.hasCommon){
+          if(!bigDataList&&!obj.hasCommon){
             dispatch(getCommSymptoms());
             dispatch({
               type:SETDROPSHOW,
               data:obj
             });
+            const storeState = storeGlobal.getState()
+            const {moduleName, moduleObj} = storeState.homePage
+            if(moduleName != moduleObj[obj.ikey[0]]) {
+              dispatch({
+                type: SET_CURRENT_MODULE,
+                moduleName: moduleObj[obj.ikey[0]]
+              });
+              dispatch(getMRAnalyse());
+            }
             return;
           }
           let pushDataList = [];
@@ -540,6 +558,15 @@ function mapDispatchToProps(dispatch,store){
               type:SETDROPSHOW,
               data:obj
             });
+            const storeState = storeGlobal.getState()
+            const {moduleName, moduleObj} = storeState.homePage
+            if(moduleName != moduleObj[obj.ikey[0]]) {
+              dispatch({
+                type: SET_CURRENT_MODULE,
+                moduleName: moduleObj[obj.ikey[0]]
+              });
+              dispatch(getMRAnalyse());
+            }
           }else{
             Notify.info(result.msg);
             return;
@@ -552,6 +579,15 @@ function mapDispatchToProps(dispatch,store){
         type:SETDROPSHOW,
         data:obj
       });
+      const storeState = storeGlobal.getState()
+      const {moduleName, moduleObj} = storeState.homePage
+      if(moduleName != moduleObj[obj.ikey[0]]) {
+        dispatch({
+          type: SET_CURRENT_MODULE,
+          moduleName: moduleObj[obj.ikey[0]]
+        });
+        dispatch(getMRAnalyse());
+      }
       dispatch({
         type: RESET
       });

+ 17 - 0
src/containers/eleType.js

@@ -79,6 +79,7 @@ export function singleRadio(params){
                          show={showArr&&showArr[showInx]}
                          ikey={showInx}
                          value={data.value}
+                         unitType={data.controlType}
                          hideTag={hideTag}></NumberUnitDrop>;
     case 6:
       return <InlineTag prefix={data.labelPrefix}
@@ -113,6 +114,22 @@ export function singleRadio(params){
                          ikey={showInx}
                          value={data.value}
                          hideTag={hideTag}></NumberDrop>;
+    case 8://带单位数字键盘
+      return <NumberUnitDrop prefix={data.labelPrefix}
+                         suffix={data.labelSuffix}
+                         placeholder={data.name}
+                         mouseSelect={params.mouseSelected}
+                         i={i}
+                         isExtBlue={data.specFlag===4?true:false}
+                         formulaCode={data.formulaCode}
+                         boxMark={boxMark}
+                         id={data.id}
+                         isImports={boxMark==1 ?NumberUnitDropIsHigh: isHigh}
+                         show={showArr&&showArr[showInx]}
+                         ikey={showInx}
+                         unitType={data.controlType}
+                         value={data.value}
+                         hideTag={hideTag}></NumberUnitDrop>;
     case 11:
       return <RadioInpDrop data={data.questionDetailList}
                            vals={data.vals}

+ 2 - 1
src/modules/HomePage/index.jsx

@@ -7,7 +7,7 @@ import {ConfirmModal} from '@commonComp';
 import store from '@store';
 
 import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG,SETPRE,SETREADDITEMS,RESET_SELECT_TAG,ISREAD} from '@store/types/homePage.js';
-import {billing} from '@store/async-actions/pushMessage';
+import {billing,getMRAnalyse} from '@store/async-actions/pushMessage';
 import {CLEAR_SEARCH,DELETE_MAIN_SELECTED_TAGS} from '@types/mainSuit';
 import {CURRENT_CLEAR,DELETE_CURRENT_SELECTED_TAGS} from '@types/currentIll';
 import {OTHERHIS_CLEAR,DELETE_OTHER_SELECTED_TAGS} from '@types/otherHistory';
@@ -122,6 +122,7 @@ const mapDispatchToProps = function (dispatch) {
         const {homePage} = state;
         pushAllDataList(1,'push',homePage.preData,'preIcss');
         dispatch(billing())
+        dispatch(getMRAnalyse())
         dispatch({type:SETPRE,show:false});
       },
       noReferRecord(){

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

@@ -1,5 +1,5 @@
 import config from '@config/index.js';
-import {formatContinueDots,getLabelIndex,handleLocalDelTag,checkFullfillText,shiftLocalDelTag,getLifeLabels,getValuedLabels,removeRepeat} from '@utils/tools.js';
+import {formatContinueDots,getLabelIndex,handleLocalDelTag,checkFullfillText,shiftLocalDelTag,getLifeLabels,getValuedLabels,removeRepeat,getIds} from '@utils/tools.js';
 
 export function preSetCheckbody(state,action) {
   let res = Object.assign({},state);
@@ -345,7 +345,11 @@ export function reflashLabels(state,action) {
   const oldValuedLabels = getValuedLabels(res.data);    //旧已填值标签
   const lifeLabels = removeRepeat(newLifeLabels,oldLifeLabels);   //将被保留的生命体征标签
   const newUnlifeLabels = getLifeLabels(action.data,true);    //新非生命体征标签
-  const addTextsArr = checkFullfillText([...lifeLabels,...oldValuedLabels,...newUnlifeLabels]);
+  const ids = getIds(oldValuedLabels);
+  const stayUnlifeLabels = newUnlifeLabels.filter((it)=>{   //已填值的相同标签已被移到上面,这里去重
+    return !ids.includes(it.id);
+  });
+  const addTextsArr = checkFullfillText([...lifeLabels,...oldValuedLabels,...stayUnlifeLabels]);
   res.data = addTextsArr.newArr;
   res.saveText = addTextsArr.saveText;
   res.update = Math.random();

+ 38 - 14
src/store/actions/currentIll.js

@@ -136,7 +136,7 @@ export const setData = (state,action) =>{
   
   if (useEmpty) {
     const data = res.emptyData?JSON.parse(JSON.stringify(res.emptyData)):[];
-    res.data = fullfillText(data).newArr;
+    res.data = fullfillText(data,false,false,'2').newArr;
     res.useEmpty = true; //取子模板标识
   } else {
     if(mainData&&mainData.length>0){//主诉使用模板
@@ -272,7 +272,7 @@ export const setData = (state,action) =>{
         current = newSymptomArr;
       }
       let currentData = JSON.parse(JSON.stringify(current));
-      res.data = fullfillText(currentData).newArr;
+      res.data = fullfillText(currentData,false,false,'2').newArr;
     }else{//分词
       if(symptomFeature&&symptomFeature.length>0){
         let featureData = JSON.parse(JSON.stringify(symptomFeature));
@@ -319,12 +319,12 @@ export const setData = (state,action) =>{
           current = endFeatureData;
         }
         let currentData = JSON.parse(JSON.stringify(current));
-        res.data = fullfillText(currentData).newArr;
+        res.data = fullfillText(currentData,false,false,'2').newArr;
       }
     }
   }
   let resData = JSON.parse(JSON.stringify(res.data));
-  res.saveText = fullfillText(resData).saveText;
+  res.saveText = fullfillText(resData,false,false,'2').saveText;
   res.update=Math.random();
   return res;
 }
@@ -338,9 +338,20 @@ export const confirm = (state,action) =>{
   let res = Object.assign({},state);
   let length1 = res.data.length;
   let arr = JSON.parse(JSON.stringify(res.data));
-  const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds} = action.data;
+  const {nones,exists,withs,ikey,exclusion,excluName,ban,noneIds,tagType} = action.data;
   let existConpId = [];
   let withConpId = [];
+
+  const items = [...exists||[],...withs||[]];//既往史清空选项
+  if((!exists||!withs||items.length==0)&&!nones&&!exclusion){       //取消无殊的选中,空白提交
+    arr[ikey].value = '';
+    arr[ikey].selecteds = {};
+  }
+  //既往史选中互斥项
+  if(exclusion){
+    arr[ikey].value = excluName;
+    arr[ikey].selecteds = action.data;
+  }
   exists.map((v,i)=>{
     existConpId.push(v.conceptId);
   })
@@ -350,32 +361,45 @@ export const confirm = (state,action) =>{
   res.symptomIds = res.symptomIds.concat(existConpId,withConpId,noneIds);//搜索去重
   // 伴 标签
   const banText = JSON.stringify(ban)=='{}'?'':{id:ban.id,name:ban.name,value:ban.name,tagType:config.tagType};
-
   // 处理主症状标签及尾巴展开symptomType=1
   if(exists && exists.length>0){
     let tempArr = [];
      for(let i=0;i<exists.length; i++){
-      tempArr.push(getLabel(exists[i].id,exists[i].questionMapping && exists[i].questionMapping.length==0?exists[i].name+',':exists[i].name),...(exists[i].questionMapping && exists[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==1;})));
+      if(tagType == 6){
+        tempArr.push(...(exists[i].questionMapping && exists[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==1;})));
+      }else{
+        tempArr.push(getLabel(exists[i].id,exists[i].questionMapping && exists[i].questionMapping.length==0?exists[i].name+',':exists[i].name),...(exists[i].questionMapping && exists[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==1;})));
+      }
     }
-    arr.splice(ikey,0,...tempArr);
+    arr.splice(ikey,0,...formatContinueDots(tempArr));
   }
-  
   let length = arr.length - length1;
   let withsArr = JSON.parse(JSON.stringify(arr));
   // 伴 伴随症状标签及尾巴展开symptomType=2
   if(withs && withs.length>0){
     let tempArr = [];
     for(let i=0;i<withs.length; i++){
-      tempArr.push(banText,getLabel(withs[i].id,withs[i].questionMapping && withs[i].questionMapping.length==0?(withs[i].name+','):(withs[i].name)),...(withs[i].questionMapping&&withs[i].questionMapping.length>0?withs[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==2;}):[]));
+      if(tagType == 6){
+        tempArr.push(banText,...(withs[i].questionMapping&&withs[i].questionMapping.length>0?withs[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==2;}):[]));
+      }else{
+        tempArr.push(banText,getLabel(withs[i].id,withs[i].questionMapping && withs[i].questionMapping.length==0?(withs[i].name+','):(withs[i].name)),...(withs[i].questionMapping&&withs[i].questionMapping.length>0?withs[i].questionMapping.filter((item)=>{return item.symptomType==0||item.symptomType==2;}):[]));
+      }
     }
-    withsArr.splice(parseInt(ikey)+length,0,...tempArr);
+    withsArr.splice(parseInt(ikey)+length,0,...formatContinueDots(tempArr));
   }
-
   // 无 不用展开
+
   let lengthN = withsArr.length - length1;
   let noneArr = JSON.parse(JSON.stringify(withsArr));  
   if(nones.length>1){//只点无不上去
-    const nonesName = nones.slice(0,nones.length-1)+',';
+    let nonesName = ""
+    if(tagType == 6){
+      nonesName = nones
+      noneArr[ikey].value = '';
+      noneArr[ikey].selecteds = {};
+    }else{
+      nonesName = nones.slice(0,nones.length-1)+','
+    }
     const noneObj = Object.assign({},JSON.parse(config.textLabel),{name:nonesName,value:nonesName});
     const none = nones?noneObj:'';
     noneArr.splice(parseInt(ikey)+lengthN,0,none);
@@ -692,7 +716,7 @@ export function removeId(state,action){
       data[index].value = text;
     }
   }else{
-    if(!data[index].value && data[index-1].tagType==8){
+    if(!data[index].value &&data[index-1]&& data[index-1].tagType==8){
       data.splice(index,1);
       res.saveText.splice(index,1);
     }else{

+ 1 - 1
src/store/actions/diagnosticList.js

@@ -54,7 +54,7 @@ export const getDiagnosticStr = (state, action) => {
     let diagnosticStr= '';
     let diagnosticStrNoType = ''
     for (let i = 0; i < diagnosticList.length; i++) {
-        diagnosticStr = diagnosticStr + diagnosticList[i].name + '(' + getDiagType(diagnosticList[i].type) + '); '
+        diagnosticStr = diagnosticStr + diagnosticList[i].name + '(' + getDiagType(diagnosticList[i].type) + ')'
         diagnosticStrNoType = diagnosticStrNoType + diagnosticList[i].name + ','
     }
     res.diagnosticStrNoType = diagnosticStrNoType

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

@@ -138,4 +138,5 @@ export const resetSelectArea = (state,action)=>{
   delete res.select_start;
   delete res.select_end;
   return res;
-}
+}
+

+ 2 - 1
src/store/actions/otherHistory.js

@@ -169,7 +169,8 @@ export function changeTextLabel(state,action) {
           localStorage.setItem('radio'+item.id,JSON.stringify([li]));
         }
         //取消原选中状态
-        item.questionDetailList.find((it)=>it.selected==true).selected=false;
+        const sltItem = item.questionDetailList.find((it)=>it.selected==true);
+        sltItem?sltItem.selected=false:'';
       }
       item.labelPrefix = prefix||'';
       item.labelSuffix = suffix||'';

+ 16 - 10
src/store/actions/pushMessage.js

@@ -62,7 +62,7 @@ function getAdviceStr(advice) {
 					if(treatmentItem.treatmentStr === '') {
 						AdviceStr += treatmentItem.treatmentStr
 					}else {
-						AdviceStr += treatmentItem.treatmentStr + ', '
+						AdviceStr += treatmentItem.treatmentStr + ''
 					}
 				}
 			}
@@ -85,8 +85,8 @@ function getAdviceStr(advice) {
 
 
 	}
-	if(AdviceStr.slice(AdviceStr.length-2) == ', ') {
-		AdviceStr = AdviceStr.slice(0, AdviceStr.length-2)
+	if(AdviceStr.slice(AdviceStr.length-1) == ',') {
+		AdviceStr = AdviceStr.slice(0, AdviceStr.length-1)
 	}
 	// if(commontreatment)  { 
 	// 	AdviceStr = commontreatment +'; ' + AdviceStr;
@@ -117,13 +117,13 @@ export const addScheme = (state, action) => {
 				for(let l = 0; l < treatment[i].meditionDetails[j].treatment[k].medicitionsList.length; l++) {
 					const drugItem = treatment[i].meditionDetails[j].treatment[k].medicitionsList[l]
 					if(drugItem.selected) {
-						treatmentStr = treatmentStr + drugItem.medicitionName + ', '
+						treatmentStr = treatmentStr + drugItem.medicitionName + ''
 						drugList.push({conceptId: drugItem.conceptId, conceptName: drugItem.medicitionName })
 						SelectedDrugNum++
 					}
 					
 				}
-				treatment[i].meditionDetails[j].treatment[k].treatmentStr = treatmentStr.substring(0,treatmentStr.length-2)
+				treatment[i].meditionDetails[j].treatment[k].treatmentStr = treatmentStr.substring(0,treatmentStr.length-1)
 				treatment[i].meditionDetails[j].treatment[k].drugList = drugList
 			}
 		}
@@ -200,7 +200,7 @@ export const addScheme = (state, action) => {
 									const medicitionsItem = treatItem.medicitionsList[w]
 									if(medicitionsItem.selected) {
 										if(schemeItem.treatmentStr !== '') {
-											schemeItem.treatmentStr += ', ' +medicitionsItem.medicitionName
+											schemeItem.treatmentStr += '' +medicitionsItem.medicitionName
 										} else {
 											schemeItem.treatmentStr += '' +medicitionsItem.medicitionName
 										}
@@ -329,7 +329,7 @@ export const addBilling = (state, action) => {
 			if( i === 0 && res.advice.check !== '') {
 				res.advice.assay = res.advice.assay  +  assay[i].name
 			} else {
-				res.advice.assay = res.advice.assay + ', ' + assay[i].name
+				res.advice.assay = res.advice.assay + '' + assay[i].name
 			}
 		}
 		
@@ -338,12 +338,12 @@ export const addBilling = (state, action) => {
 		if ( res.advice.check === '') { //如果最后一个,则不需要逗号
 			res.advice.check = res.advice.check + check[i].name
 		} else {
-			res.advice.check = res.advice.check + ', '+ check[i].name 
+			res.advice.check = res.advice.check + ''+ check[i].name 
 		}
 	}
 	if(res.advice.assay  && res.advice.check !== '') {
-			if(res.advice.assay.substring(res.advice.assay.length-2,res.advice.assay.length-1) !== ',') {
-				res.advice.assay = res.advice.assay + ', '
+			if(res.advice.assay.substring(res.advice.assay.length-1,res.advice.assay.length) !== ',') {
+				res.advice.assay = res.advice.assay + ''
 			} 
 	}
 	res.AdviceStr = getAdviceStr(res.advice)
@@ -412,3 +412,9 @@ export const delFollowUp = (state, action) => {
 	return res;
 }
 
+export const setMRAnalyse = (state, action) =>{ 
+	const res = Object.assign({}, state);
+	res.MRAnalyseResult = action.MRAnalyseResult;
+	return res;
+}   
+

+ 1 - 1
src/store/actions/typeConfig.js

@@ -28,7 +28,7 @@ export const setReadMode=(state,action)=>{
   res.readMode = action.readMode||(action.readConfig&&action.readConfig[0]);
   if(action.readConfig){
     res.readConfig = action.readConfig;
-    res.isPreIcss = action.isPreIcss
   }
+  res.isPreIcss = action.isPreIcss||false
   return res;
 };

+ 9 - 14
src/store/async-actions/fetchModules.js

@@ -217,7 +217,7 @@ export function setOtherHisModule(){
     const listObj = isHis && (mode == 1 || (!onlyOneText && mode == 0)) ? {
       newArr: arr,
       saveText: arrSave || []
-    } : fullfillText(model);
+    } : fullfillText(model,false,false,'3');
     dispatch({
       type: SETDATA,
       data: listObj.newArr,
@@ -266,22 +266,17 @@ export function getAssessData(disId,disName){
   //return ()=>{
     const emrData = getEMRParams();
     const param = {
-      diseaseId:disId,
+      ruleType:config.ruleTypeMap['11'],
       disType:1,
-      diag:disName,
-      diseaseName:disName,
       featureType:'11',
-      ruleType:config.ruleTypeMap['11'],
-      lis:emrData.lis,
-      other: emrData.other,
-      pasts: emrData.other,
-      sex:emrData.sex,
-      age:emrData.age,
-      pacs:emrData.pacs,
-      vital:emrData.vital,
-      symptom:emrData.current + emrData.main
+      diseaseId:disId,
+      diseaseName:{
+        "dateValue": "",
+        "name": disName,
+        "uniqueName": disName
+      }
     };
-    return json(api.getAssess,param);
+    return json(api.getAssess,Object.assign({},param,emrData));
   //}
 }
 

+ 2 - 1
src/store/async-actions/historyTemplates.js

@@ -3,7 +3,7 @@ import { pushAllDataList,didPushParamChange } from '@utils/tools';
 import { initHistory } from '@store/actions/historyTemplates';
 import Notify from '@commonComp/Notify';
 import store from '@store';
-import { billing } from '@store/async-actions/pushMessage';
+import { billing, getMRAnalyse} from '@store/async-actions/pushMessage';
 
 export const initItemList = (item) => {
   let baseList = store.getState();
@@ -31,6 +31,7 @@ export const getHistempDetail = (item) => {
                 if(didPushParamChange()) {
                   dispatch(billing());
                 }
+                dispatch(getMRAnalyse())
             }else{
                 Notify.error(data.msg);
             }

+ 1 - 11
src/store/async-actions/mainSuit.js

@@ -44,18 +44,8 @@ export async function getCommSymptomPush(){//获取大数据推送症状
       const type = 1;
       const emrData = getEMRParams();
       const params = {
-        "age": emrData.age,
-        "hosCode": emrData.hosCode,
         "featureType": type,//类型1:症状,4:查体,5:化验,6:辅检,7:诊断
-        "diag": emrData.dis,
-        "lis": emrData.lis,
-        "other": emrData.other,
-        "pasts": emrData.other,
-        "pacs": emrData.pacs,
-        "sex": emrData.sex,
-        "vital":emrData.vital,
-        "symptom": emrData.current + emrData.main
       };
-    const bigData = json(api.symptomPush,params);
+    const bigData = json(api.symptomPush,Object.assign({},params,emrData));
     return bigData;
 }

+ 26 - 3
src/store/async-actions/patInfo.js

@@ -9,6 +9,10 @@ import {ISREAD,MODI_LOADING,SETPRE,SETPREDATA,SETADMIN} from "../types/homePage"
 import { initItemList } from '@store/async-actions/tabTemplate';
 import config from '@config/index';
 import {Notify} from '@commonComp';
+import {SHOW_LOADING} from '@store/types/copyRight.js';
+import {getMRAnalyse} from '@store/async-actions/pushMessage';
+
+
 
 const api = {
     getPatInfo: '/patientInfo/getTopPatientInfo',
@@ -43,6 +47,7 @@ export const getPreMsg = (dispatch, getState) => {
             }
             // dispatch({type:SETPRE,show:true});
             dispatch({type:SETPREDATA,preData:preIcss});
+           
         } else {
             // console.log(res)
         }
@@ -113,7 +118,7 @@ export const initHistoryDetails = (dispatch) => {
             "inquiryCode": state.recordId,
         }).then((res) => {
             const data = res.data;
-            let pre = baseList.homePage.sysConfig.connect_prec;
+            // let pre = baseList.homePage.sysConfig.connect_prec;
             if (data.code == 0) {
                 const detail = data.data;
                 if(detail.dataJson){
@@ -122,6 +127,7 @@ export const initHistoryDetails = (dispatch) => {
                   // let pre = baseList.homePage.sysConfig.connect_prec;
                   // (pre==1)&&getPreMsg(dispatch)
                 }
+                dispatch(getMRAnalyse())
                 dispatch({
                   type:ISREAD
                 });
@@ -176,6 +182,7 @@ export async function getPatientMessage(dispatch, getState){
     patientCode:urlDatas.patientNo,
     recordId:urlDatas.recordId
   };
+
   let res1 = await json(api.getPatInfo, params);
   /*console.log(res1);
   console.log(1);*/
@@ -185,12 +192,28 @@ export async function getPatientMessage(dispatch, getState){
   let data1 = {},data2 = {};
   if(res1.data.code=='0'){
     data1 = res1.data.data;
-    getDoctorConfig(data1.doctorId,dispatch);
+    data1.doctorId&&getDoctorConfig(data1.doctorId,dispatch);
+  }else{
+    dispatch({type:MODI_LOADING,flag:false});
+    dispatch({type:SHOW_LOADING,flag:true,text:res1.data.msg,lType:'warning'});
+    return;
   }
   if(res2.data.code=='0'){
     data2 = res2.data.data;
+  }else{
+    dispatch({type:MODI_LOADING,flag:false});
+    dispatch({type:SHOW_LOADING,flag:true,text:res2.data.msg,lType:'warning'});
+    return;
+  }
+  //患者或医生信息有误,禁止操作
+  if(Object.keys(data1).length>0&&Object.keys(data2).length>0&&data1.doctorId){
+    dispatch({type:SHOW_LOADING,flag:false});
+  }else{
+    dispatch({type:MODI_LOADING,flag:false});
+    dispatch({type:SHOW_LOADING,flag:true,text:"获取医生信息失败",lType:'warning'});
+    return;
   }
-  getAdminCheckout(data1.doctorId,data1.hospitalId,dispatch)
+  getAdminCheckout(data1.doctorId,data1.hospitalId,dispatch);
   dispatch({
     type: GET_PATIENT_MESSAGE,
     data:Object.assign(data1,data2)

+ 24 - 25
src/store/async-actions/preIcss.js

@@ -5,9 +5,9 @@ import { GET_PREC_LIST,SET_PREC_SHOW } from "../types/preIcss";
 import config from '@config/index';
 import {Notify} from '@commonComp';
 
-export const getPreMsg = () => {
+export const getPreMsg = (sign) => {
     let baseList = store.getState().patInfo.message;
-    json('/api/prec/inquiryInfo/hisInquirys', {
+    json('/api/prec/inquiryInfo/hisInquirysForIcss', {
         "isHaveDetail":1,
         "hospitalCode": baseList.hospitalCode,
         "dayLimit":config.preIcss.deadline===-1?undefined:config.preIcss.deadline,
@@ -18,9 +18,10 @@ export const getPreMsg = () => {
         if (data.code == 0) {
             let result = data.data;
             if(result.length > 0){
-              store.dispatch({type:SET_PREC_SHOW})
+                !sign&&store.dispatch({type:SET_PREC_SHOW})
             }else{
-              Notify.info('暂无预问诊信息');
+                sign&&store.dispatch({type:SET_PREC_SHOW})
+                !sign&&Notify.info('暂无预问诊信息');
             }
             store.dispatch({type:GET_PREC_LIST,preData:result});
         } else {
@@ -35,28 +36,26 @@ export const tellPred = () => {
     let idcon = baseData.patInfo.message;
     const inCode = config.preIcss.recordIdVal===-1?getUrlArgObject("recordId"):config.preIcss.recordIdVal;
     json('/api/prec/inquiryInfo/inquiryQuoteForIcss', {
-        "hospitalCode": baseList.hospitalCode,
-        "inquiryCode":inCode,
-        "patientCode": baseList.patientCode,
-        "patientIdentityNum":idcon.patientIdentityNum,
-        "doctorCode":baseList.doctorCode,
-        "doctorId": baseList.doctorId,
-        "doctorName":baseList.doctorName,
-        "hospitalDeptCode":baseList.hospitalDeptCode,
-        "hospitalDeptId": baseList.hospitalDeptId,
-        "hospitalDeptName":baseList.hospitalDeptName,
-        "hospitalId": baseList.hospitalId,
-        "hospitalName":baseList.hospitalName,
+        "hospitalCode": idcon.hospitalCode,
+        "hospitalId": idcon.hospitalId,
+        "hospitalName":idcon.hospitalName,
+        "inquiryCode":idcon.recordId,
+        "patientCode": idcon.patientCode,
+        "patientIdentityNum":idcon.patientIdentityNum||null,
+        "doctorCode":idcon.doctorCode,
+        "doctorId": idcon.doctorId,
+        "doctorName":idcon.doctorName,
+        "hospitalDeptCode":idcon.hospitalDeptCode,
+        "hospitalDeptId": idcon.hospitalDeptId,
+        "hospitalDeptName":idcon.hospitalDeptName,
         "inquiryId": baseList.id,
-        "patientId": baseList.patientId,
-        "patientIdNo":baseList.patientIdNo,
-        "patientName":baseList.patientName,
-        "patientPhone":baseList.patientPhone,
-        "patientSex": baseList.patientSex,
-        "sonHospitalCode":baseList.sonHospitalCode,
-        "sonHospitalId": baseList.sonHospitalId,
-        "sonHospitalName":baseList.sonHospitalName
+        "patientId": idcon.patientId,
+        "patientIdNo":idcon.patientIdNo,
+        "patientName":idcon.patientName,
+        "patientPhone":idcon.patientPhone||null,
+        "patientSex": idcon.patientSex=='男'?1:idcon.patientSex=='女'?2:3,
+        "patientBirthday": idcon.birthday
     },true).then((res) => {
-      
+        getPreMsg(1)
     })
 }

+ 5 - 2
src/store/async-actions/print.js

@@ -13,8 +13,11 @@ import {
     filterOtherDataArr
 } from '@utils/tools';
 export const getConceptDetails = (bool) => {
-    tellPred()
     let baseList = store.getState();
+    let isPreIcss = baseList.typeConfig.isPreIcss;
+    if(isPreIcss){
+        tellPred()
+    }
     let disLis = baseList.diagnosticList.diagnosticList||[];
     let tmpLis  = [];
     for(let i = 0;i < disLis.length;i++){
@@ -192,7 +195,7 @@ function transferIndexData(data) {
    data.map((it)=>{
        if(it.uniqueName&&it.value!=''){
            arr.push({
-             creatTime:it.time+':00',
+             creatTime:it.dateValue,
              indexUnique:it.uniqueName,
              indexUnit:it.units,
              indexValue:it.value,

+ 55 - 19
src/store/async-actions/pushMessage.js

@@ -1,19 +1,24 @@
 import { get, post, json } from "@utils/ajax";
-import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS ,SET_CHRONIC_TABLELIST,SET_SCALE_INFO,SET_CHRONIC_PUSHS,SHOW_TABLE_LIST, SHOW_TIPS_DETAILS,TOGGLE_CHRONIC_INFO} from '@store/types/pushMessage';
+import { BILLING_ADVICE, SET_TIPS, SET_TIPS_DETAILS ,SET_CHRONIC_TABLELIST,SET_SCALE_INFO,
+  SET_CHRONIC_PUSHS,SHOW_TABLE_LIST, SHOW_TIPS_DETAILS,TOGGLE_CHRONIC_INFO, SET_MR_ANALYSE} from '@store/types/pushMessage';
 import { SET_DRUG_INFO, SHOW_DRUG_INFO } from '@store/types/treat';
 import { SET_CLICK_DIAG } from '../types/diagnosticList';
-import {storageLocal,getEMRParams} from '@utils/tools';
+import {storageLocal,getEMRParams, getMRInfo,getAllDataStringList,isAllClear} from '@utils/tools';
 import {getBigPush} from '@utils/utils';
 import {SET_IMPORT_CHECKBODY_LABEL,PRESET} from "../types/checkBody";
 import dataLis from '@components/EmergencyProcedure/emergency';
 import  Notify from '@commonComp/Notify';
 import {pregetCheckbodyData} from '@store/async-actions/fetchModules';
 import {tabChange} from '@store/actions/tabTemplate';
+
 const api={
   getTableList:'/scale/getList', //获取量表列表
   getTableInfo:'/scale/getContent', //获取量表明细
   getConceptDetail:'/conceptDetail/getConceptDetail', //获取静态提示信息
+  getMRAnalyse: '/mrqc/analyse' //病历质控
 }
+import store from '@store';
+
 
 //获取右侧推送信息
 export const billing = (mdata,boxMark) => {
@@ -21,13 +26,13 @@ export const billing = (mdata,boxMark) => {
   const state = getState();
    const checkBody = state.checkBody.data;
    let diagMain = state.diagnosticList.diagnosticList.length>0&&state.diagnosticList.diagnosticList[0]
-   let getCheck = boxMark==2&&!(checkBody&&checkBody.length>0&&!checkBody[0].full);
+   //let getCheck = boxMark==2&&!(checkBody&&checkBody.length>0&&!checkBody[0].full);
   const emrData = getEMRParams();
   //mdata为主诉无标签直接输入时的内容,symptom参数传主诉+现病史文本
   const mainData =  mdata?(emrData.current + mdata):(emrData.current + emrData.main);
-  const feaType = getCheck?"42,41,5,6,7":"42,5,6,7";    //41只返回查体模板,4只返回查体高亮
+  const feaType = "42,5,6,7";    //41只返回查体模板,4只返回查体高亮
    getBigPush(feaType,mainData,true).then((data) => {
-        let {dis, lab, pacs,vitalIds,moduleVital} = data.data.data||{};
+        let {dis, lab, pacs,vitalIds} = data.data.data||{};
         lab = lab||[];
         pacs = pacs||[];
         // console.log('推送数据', data.data.data);
@@ -88,10 +93,10 @@ export const billing = (mdata,boxMark) => {
             setPushEmergency: setPushEmergency||[],
             setPushEmergencyIdx:setPushEmergencyIdx
         });
-        dispatch({
+        /*dispatch({
           type:PRESET,
           data:moduleVital
-        });
+        });*/
         //查体高亮标签
         dispatch({
           type:SET_IMPORT_CHECKBODY_LABEL,
@@ -260,20 +265,11 @@ export const getScaleInfo = (it)=>{
     return (dispatch,getState)=>{
         const emrData = getEMRParams();
           const params = {
-            age: emrData.age,
-            sex: emrData.sex,
             featureType: "21",
-            diag: emrData.dis,
-            lis: emrData.lis,
             scaleId:it.conceptId,
-            scaleName:it.name,
-            other: emrData.other,
-            pacs: emrData.pacs,
-            vital:emrData.vital,
-            symptom: emrData.current + emrData.main,
-            // indications:'' //指标结果
+            scaleName:it.name
           };
-        json(api.getTableInfo, params)
+        json(api.getTableInfo, Object.assign({},params,emrData))
         .then((res)=>{
             const result = res.data;
             // if(result.code==0 && result.data.scale && result.data.scale.length>0){
@@ -297,4 +293,44 @@ export const getScaleInfo = (it)=>{
             console.log(e)
         })
     }
-}
+}
+
+// 病历质控
+export const getMRAnalyse = () => {
+  let baseList = store.getState();
+  let jsonStr = getAllDataStringList(baseList);
+  let flg = isAllClear(jsonStr);
+  if(flg) {
+    return (dispatch, getState) => {
+      const param = getMRInfo()
+      json(api.getMRAnalyse, param)
+      .then((res) =>{
+          const data = res.data;
+          if(data.code == '0') {
+            dispatch({
+              type: SET_MR_ANALYSE,
+              MRAnalyseResult: data.data.warning
+            })
+          } else {
+            dispatch({
+              type: SET_MR_ANALYSE,
+              MRAnalyseResult: []
+            })
+          }
+          
+      }).catch((e) => {
+        console.log(e)
+      })
+    }
+
+  } else {
+    return (dispatch, getState) => {
+      dispatch({
+        type: SET_MR_ANALYSE,
+        MRAnalyseResult: []
+      })
+    }
+  }
+  
+}
+

+ 4 - 2
src/store/async-actions/tabTemplate.js

@@ -22,7 +22,7 @@ import {
   getUrlArgObject,
   didPushParamChange
 } from '@utils/tools';
-import { billing } from '@store/async-actions/pushMessage';
+import { billing, getMRAnalyse } from '@store/async-actions/pushMessage';
 
 export const initItemList = (current,name) => {
   let admin = store.getState().homePage.admin;
@@ -36,7 +36,7 @@ export const initItemList = (current,name) => {
 export const initCommonItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
   let state = baseList.patInfo.message;
-
+  // let searchVal = document.getElementById("searchTmp").value
   return (dispatch) => {
     axios.json('/templateInfo/getTemplatePageAlls', {
       "doctorId": state.doctorId,
@@ -60,6 +60,7 @@ export const initCommonItemList = (current,name) => { //初始化数据
 };
 export const initAdminItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
+  // let searchVal = document.getElementById("searchTmp").value
   let state = baseList.patInfo.message;
   return (dispatch) => {
     axios.json('/templateAdmin/getTemplatePageAlls', {
@@ -334,6 +335,7 @@ export const setPageView = (id) => { //获取模板结构化数据
         if(didPushParamChange()){     //诊断变化时会调推送,避免重复调
           dispatch(billing())
         }
+        dispatch(getMRAnalyse())
       } else {
         Notify.error(data.msg);
       }

+ 12 - 86
src/store/async-actions/treat.js

@@ -13,7 +13,7 @@ import {getChronic} from '@store/async-actions/homePage.js';
 import config from "@config/index";
 
 const api={
-    pushTreatment:'/push/pushTreatment',
+    push:'/push/pushInner',
     getConceptDetail:'/conceptDetail/getConceptDetail'
 }
 
@@ -24,90 +24,17 @@ export const getTreatResult = (item) =>{
             treatItem: item
         })
         const state = getState();
-        let url = api.pushTreatment;
+        let url = api.push;
         
 
         const emrData = getEMRParams();
-        const diagnosticList = state.diagnosticList.diagnosticList;
-        let diag = '';
-        if(diagnosticList) {
-            for (let i = 0; i < diagnosticList.length; i++ ) {
-                if(i === 0 ) {
-                    diag = diag + diagnosticList[i].name;
-                } else {
-                    diag = diag + ',' + diagnosticList[i].name;
-                }
-                
-            }
+        const diseaseName = {
+            "dateValue": "",
+            "name": "",
+            "uniqueName": item.name
         }
-        const params = {
-            "age": emrData.age,
-            "featureType": "8",
-            "ruleType":config.ruleTypeMap["8"],
-            "diag": diag,
-            "diseaseName":  item.name,
-            "lis": emrData.lis,
-            "other": emrData.other,
-            "pasts": emrData.other,
-            "pacs": emrData.pacs,
-            "sex": emrData.sex,
-            "symptom": emrData.current + emrData.main,
-            "vital": emrData.vital,
-            "patientId": emrData.patientId,
-            "hosCode": emrData.hosCode
-        };
-        // const params = {
-        //     "disType":"1",
-        //     "age":28,
-        //     "diag":"2型糖尿病性肾病,1型糖尿病,糖尿病肾病",
-        //     "diseaseName":"2型糖尿病",
-        //     "featureType":"8",
-        //     "hosCode":"A001",
-        //     "lis":[
-        //         {
-        //             "name":"糖化血红蛋白测定",
-        //             "detailName":"糖化血红蛋白(HbA1c)",
-        //             "uniqueName":"糖化血红蛋白测定--糖化血红蛋白(HbA1c)",
-        //             "source":"0",
-        //             "minValue":4,
-        //             "otherValue":"",
-        //             "maxValue":6,
-        //             "units":"%",
-        //             "value":"5"
-        //         },
-        //         {
-        //             "name":"空腹葡萄糖测定",
-        //             "detailName":"葡萄糖(GLU)",
-        //             "uniqueName":"空腹葡萄糖测定--葡萄糖(GLU)",
-        //             "source":"0",
-        //             "minValue":3.9,
-        //             "otherValue":"",
-        //             "maxValue":6.1,
-        //             "units":"mmol/L",
-        //             "value":"5"
-        //         },
-        //         {
-        //             "name":"肝功能测定",
-        //             "detailName":"谷丙转氨酶(ALT)",
-        //             "uniqueName":"肝功能测定--谷丙转氨酶(ALT)",
-        //             "source":"0",
-        //             "minValue":5,
-        //             "otherValue":"",
-        //             "maxValue":40,
-        //             "units":"U/L",
-        //             "value":"180"
-        //         }
-        //     ],
-        //     "lisOrder":"",
-        //     "lisString":"",
-        //     "other":"",
-        //     "otherOrder":"",
-        //     "pacs":"",
-        //     "pacsOrder":"",
-        //     "sex":1,
-        //     "symptom":"患者患有2型糖尿病近来出现泡沫尿",
-        //     "vital":"体温40℃"
-        // }
+        const params = Object.assign(emrData,{"diseaseName":diseaseName,"featureType": "8",
+            "ruleType":config.ruleTypeMap["8"],})
         const isChronic = state.diagnosticList.chronicMagItem ||state.mainSuit.chronicDesease;
         // const isChronic = true
         if (isChronic) {
@@ -120,7 +47,7 @@ export const getTreatResult = (item) =>{
                             params.disType = 1
                         }
                     }
-                    getTreatment(item, dispatch, state, url,params, isChronic)
+                    getTreatment(item, dispatch, state, url,Object.assign({},params,emrData), isChronic)
 
                 });
             } else {
@@ -129,10 +56,10 @@ export const getTreatResult = (item) =>{
                         params.disType = 1
                     }
                 }
-                getTreatment(item, dispatch, state,url,params, isChronic)
+                getTreatment(item, dispatch, state,url,Object.assign({},params,emrData), isChronic)
             }
         } else {
-            getTreatment(item, dispatch, state,url,params, isChronic)
+            getTreatment(item, dispatch, state,url,Object.assign({},params,emrData), isChronic)
         }
         
     }
@@ -145,10 +72,9 @@ function getTreatment(item, dispatch, state,url,params, isChronic) {
         if(data.data.code == '0') {
             // dispatch({type:MODI_LOADING,flag:false});
             // dispatch({type:SHOW_LOADING,flag:false});
-           
             let treat;
             if(data.data.data) {
-                treat = data.data.data || {}
+                treat = data.data.data.treat || {}
             }
             if(treat) {
                 let { treatmentPlan, commonTreatment, surgeryTreatment, drugHistory, adverseEvent, followUp} = treat

+ 22 - 6
src/store/reducers/assistCheck.js

@@ -12,6 +12,7 @@ const initSearchList = {
   list: [], //点击的结果
   assistLabel: [], //搜索的结果
   dataString: '', //结果拼接
+  dataArr: [], //结果拼接
   assistVal: '',
 
   hospitalPac: [], //医院检索到的
@@ -42,14 +43,18 @@ export default (state = initSearchList, action) => {
       }
     }
     newState.assistLabel = [...tempArr]
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataString = tmpObj.str
+    newState.dataArr = tmpObj.arr
     return newState;
   }
   if (action.type == GET_ASSIST_SEARCH_LIST) { //右侧推送添加到左侧
     const newState = Object.assign({}, state);
     newState.list = action.list
     newState.assistVal = action.val
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataString = tmpObj.str
+    newState.dataArr = tmpObj.arr
     return newState;
   }
   if (action.type == GET_ASSIST_LABEL) { //默认
@@ -70,7 +75,9 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArrs];
       }
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == DEL_ASSIST_LABEL) { //删除
@@ -87,7 +94,9 @@ export default (state = initSearchList, action) => {
       }
       newState.assistLabel = [...tempArrs]
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == CHANGE_ASSIST_VAL) { //改变输入值
@@ -99,7 +108,9 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArr]
       }
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == CHANGE_DATE) { //新增
@@ -111,7 +122,9 @@ export default (state = initSearchList, action) => {
         newState.assistLabel = [...tempArr]
       }
     }
-    newState.dataString = getAllString(newState.checkedListImport,newState.assistLabel)
+    let tmpObj = getAllString(newState.checkedListImport,newState.assistLabel)
+    newState.dataArr = tmpObj.arr
+    newState.dataString = tmpObj.str
     return newState;
   }
   if (action.type == CLEAR_ASSIST_DATA) {
@@ -119,6 +132,9 @@ export default (state = initSearchList, action) => {
     newState.assistLabel = [...action.data];
     newState.dataString = action.saveText;
     newState.checkedListImport = action.checkedListImport;
+    if(action.checkedListImport.length == 0&&action.data.length==0){
+      newState.dataArr = [];
+    }
     return newState;
   }
   return state;

+ 2 - 0
src/store/reducers/copyRight.js

@@ -29,6 +29,8 @@ export default function(state = initState, action) {
       return getVersion(state, action);
     case SHOW_LOADING:
       res.loading = action.flag;
+      res.loadingText=action.text;
+      res.loadingType=action.lType;
       return res;
     default:
       return state;

+ 0 - 0
src/store/reducers/homePage.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor