ソースを参照

Merge branch 'settingDev' into dev5.3.1

# Conflicts:
#	src/components/AssistCheck/index.less
#	src/components/Inspect/index.less
zhouna 5 年 前
コミット
b78c3c432a
100 ファイル変更730 行追加1306 行削除
  1. 1 0
      package.json
  2. 2 2
      src/common/components/Calendar/index.less
  3. 3 2
      src/common/components/ComplexModal/index.less
  4. 3 2
      src/common/components/ConfirmModal/index.less
  5. 2 2
      src/common/components/DelToast/index.less
  6. 3 14
      src/common/components/DropList/index.jsx
  7. 4 11
      src/common/components/EditableSpan/index.jsx
  8. 1 1
      src/common/components/InspectCommon/index.less
  9. 3 2
      src/common/components/ItemBox/index.jsx
  10. 1 2
      src/common/components/ItemBox/index.less
  11. 4 1
      src/common/components/Loading/index.jsx
  12. 2 1
      src/common/components/Loading/index.less
  13. 2 1
      src/common/components/MiniToast/index.less
  14. 1 1
      src/common/components/Notify/index.less
  15. 5 6
      src/common/components/NumberPan/index.jsx
  16. 3 5
      src/common/components/NumberUnitPan/index.jsx
  17. 5 2
      src/common/components/SearchOption/index.jsx
  18. 1 2
      src/common/components/SearchOption/index.less
  19. 26 7
      src/common/components/Textarea/index.jsx
  20. 2 1
      src/common/components/WrapModalContainer/index.less
  21. BIN
      src/common/images/btn-closed.png
  22. BIN
      src/common/images/btn-open.png
  23. 19 1
      src/common/less/variables.less
  24. 1 1
      src/components/AddAssistCheck/Textarea/index.less
  25. 20 3
      src/components/AddAssistCheck/index.jsx
  26. 2 2
      src/components/AddAssistCheck/index.less
  27. 20 6
      src/components/AddInspect/index.jsx
  28. 2 2
      src/components/AddInspect/index.less
  29. 12 104
      src/components/AssistCheck/index.jsx
  30. 2 3
      src/components/AssistCheck/index.less
  31. 40 0
      src/components/Banner/ModeChange/index.jsx
  32. 91 0
      src/components/Banner/ModeChange/index.less
  33. 26 49
      src/components/Banner/index.jsx
  34. 13 73
      src/components/Banner/index.less
  35. 9 23
      src/components/CheckBody/index.jsx
  36. 3 3
      src/components/CopyRight/CopyModalSon/index.less
  37. 3 3
      src/components/CopyRight/DiscontentSon/index.less
  38. 1 13
      src/components/CopyRight/index.less
  39. 24 32
      src/components/CurrentIll/index.jsx
  40. 20 5
      src/components/DiagResultSearch/index.jsx
  41. 3 3
      src/components/DiagResultSearch/index.less
  42. 12 4
      src/components/Diagnosis/index.jsx
  43. 10 35
      src/components/DiagnosticItem/index.jsx
  44. 13 24
      src/components/DiagnosticList/index.jsx
  45. 21 4
      src/components/EMRContainer/index.jsx
  46. 6 2
      src/components/EMRContainer/index.less
  47. 3 3
      src/components/Emergency/index.less
  48. 9 21
      src/components/EmergencyProcedure/EmergencyModal/index.less
  49. 2 3
      src/components/EmergencyProcedure/index.less
  50. 11 10
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  51. 5 4
      src/components/HistoryCaseContainer/HistoryList/index.less
  52. 1 1
      src/components/HistoryCaseContainer/index.less
  53. 1 1
      src/components/InfoTitle/index.jsx
  54. 1 1
      src/components/InfoTitle/index.less
  55. 22 9
      src/components/Inspect/index.jsx
  56. 6 4
      src/components/Inspect/index.less
  57. 22 30
      src/components/MainSuit/index.jsx
  58. 0 4
      src/components/MultSpread/index.jsx
  59. 3 9
      src/components/Multiple/SlideItem/index.jsx
  60. 4 26
      src/components/Multiple/index.jsx
  61. 5 24
      src/components/NumberDrop/index.jsx
  62. 2 18
      src/components/NumberUnitDrop/index.jsx
  63. 7 2
      src/components/Operation/index.jsx
  64. 1 2
      src/components/Operation/index.less
  65. 19 35
      src/components/OtherHistory/index.jsx
  66. 17 13
      src/components/Preview/index.jsx
  67. 2 1
      src/components/Preview/index.less
  68. 19 16
      src/components/PrintPreview/index.jsx
  69. 2 1
      src/components/PrintPreview/index.less
  70. 3 3
      src/components/PushContainer/index.jsx
  71. 3 2
      src/components/PushContainer/index.less
  72. 3 1
      src/components/PushItems/DetailsModal/index.less
  73. 0 308
      src/components/PushItems/index.less
  74. 4 21
      src/components/RadioDrop/index.jsx
  75. 2 23
      src/components/RadioInpDrop/index.jsx
  76. 3 9
      src/components/SearchDrop/index.jsx
  77. 0 1
      src/components/SearchDrop/index.less
  78. 8 43
      src/components/SpreadDrop/index.jsx
  79. 9 2
      src/components/SpreadDrop/index.less
  80. 2 2
      src/components/Treat/index.jsx
  81. 5 4
      src/components/Treat/index.less
  82. 2 2
      src/components/TreatDesc/DrugInfo/index.jsx
  83. 3 2
      src/components/TreatDesc/DrugInfo/index.less
  84. 1 11
      src/containers/CheckBody.js
  85. 8 18
      src/containers/CurrentIll.js
  86. 4 13
      src/containers/EditableSpan.js
  87. 4 24
      src/containers/MainSuit.js
  88. 4 19
      src/containers/OtherHistory.js
  89. 19 37
      src/containers/TypeConfigContainer.js
  90. 0 2
      src/containers/eleType.js
  91. 1 1
      src/modules/HomePage/index.less
  92. 1 1
      src/store/actions/currentIll.js
  93. 1 8
      src/store/actions/homePage.js
  94. 2 2
      src/store/actions/typeConfig.js
  95. 4 0
      src/store/async-actions/diagnosticList.js
  96. 16 28
      src/store/async-actions/fetchModules.js
  97. 1 12
      src/store/async-actions/patInfo.js
  98. 4 5
      src/store/async-actions/tabTemplate.js
  99. 2 4
      src/store/reducers/homePage.js
  100. 0 0
      src/store/reducers/typeConfig.js

+ 1 - 0
package.json

@@ -70,6 +70,7 @@
     "koa2-cors": "^2.0.6",
     "log4js": "^3.0.4",
     "react-redux": "4.4.9",
+    "react-scrollbar": "^0.5.6",
     "react-server": "^0.8.1",
     "redux": "3.5.2",
     "redux-thunk": "2.2.0"

+ 2 - 2
src/common/components/Calendar/index.less

@@ -1,6 +1,7 @@
 @import "~@less/mixin.less";
-
+@import "~@less/variables.less";
 .wrapper{
+  .contentZIndex1;
   width: 294px;
   padding: 5px;
   font-size: 0;
@@ -10,7 +11,6 @@
   position: absolute;
   top: 10px;
   right: 0;
-  z-index: 100;
   border: 1px solid #ccc;
   box-sizing: border-box;
   .top{

+ 3 - 2
src/common/components/ComplexModal/index.less

@@ -1,8 +1,9 @@
 @import "~@less/mixin.less";
+@import "~@less/variables.less";
 .container {
   // position: relative;
   // padding-top: 40px;  //改为绝对定位,拖拽元素不在监听document,改为这个
-  z-index: 2000;
+ .maskZIndex;
   position: absolute;
   width: 100%;
   height: 100%;
@@ -56,11 +57,11 @@
     }
   }  
   .closeIcon{
+    .contentZIndex1;
     cursor: pointer;
     position: absolute;
     top: 14px;
     right: 10px;
-    z-index: 100;
     vertical-align: text-top;
   }
 }

+ 3 - 2
src/common/components/ConfirmModal/index.less

@@ -1,5 +1,7 @@
 @import "~@less/mixin.less";
+@import "~@less/variables.less";
 .modal {
+    .maskContentZIndex1;
     position: fixed;
     top: 50%;
     left: 50%;
@@ -7,7 +9,6 @@
     border-radius: 5px;
     background: #fff;
     overflow: hidden;
-    z-index: 1999;
 }
 
 .modal-title {
@@ -74,6 +75,7 @@
 }
 
 .mask {
+    .maskZIndex;
     position: fixed;
     top: 0;
     left: 0;
@@ -83,5 +85,4 @@
     opacity: .6;
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
-    z-index: 1998;
 }

+ 2 - 2
src/common/components/DelToast/index.less

@@ -1,11 +1,11 @@
-// @import "~@less/mixin.less";
+@import "~@less/variables.less";
 .del-box{
+  .contentZIndex1;
   position: absolute;
   width: 206px;
   height: 106px;
   box-shadow: 2px 2px 5px rgba(0,0,0,.4);
   background: #fff;
-  z-index: 66;
   text-align: center;
   padding: 20px;
   right: -30px;

+ 3 - 14
src/common/components/DropList/index.jsx

@@ -1,6 +1,5 @@
 import React,{Component} from 'react';
 import classNames from 'classnames';
-import ReactDom from "react-dom";
 
 import style from "./index.less";
 /****
@@ -24,14 +23,7 @@ class DropList extends Component{
     let isHide = this.props.show?'':style['hide'];
     return classNames(style['list'],name,isHide);
   }
-  
-  getStyle(){
-    const {left,top} = this.props;
-    return {
-      left:left?left+'px':'',
-      top:top?top+'px':''
-    }
-  }
+
   handleSelect(e,item){
     e.stopPropagation();
     const {onSelect} = this.props;
@@ -44,9 +36,7 @@ class DropList extends Component{
   }
   render(){
     const {data,hideTag,boxMark} = this.props;
-    const domNode = document.getElementById('root');
-    return ReactDom.createPortal(
-      <div className={this.getClass()} style={this.getStyle()} contentEditable='false'>
+    return <div className={this.getClass()} contentEditable='false'>
         <ul>
           {data&&data.map((it)=>{
             /*return <li onClick={(e)=>this.handleSelect(e,it)} className={it.selected||(it.selected!==false&&+it.defaultSelect===1)?style['selected']:''}>{it.labelPrefix}{it.questionDetailList&&it.questionDetailList.length>0?it.questionDetailList[0].name:it.name}{it.labelSuffix}</li>*/
@@ -54,8 +44,7 @@ class DropList extends Component{
           })}
           <li onClick={(e)=>this.handleClear(e)} className='red'>清空选项</li>
         </ul>
-      </div>
-    ,domNode)
+      </div>;
   }
 }
 

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

@@ -148,7 +148,7 @@ class EditableSpan extends Component{
 
   handleKeydown(e){
     const ev = e||window.event;
-    const {i,setSearchLocation} = this.props;
+    const {i} = this.props;
     const target = ev.target||ev.srcElement;
     let innerVal = target.innerText || target.innerHTML,ele,boxTop;
     //禁止回车事件
@@ -187,13 +187,9 @@ class EditableSpan extends Component{
         obj.focus();
       }
     }
-    // 注释掉,放开会影响删除
-    // ele = document.activeElement;
-    // boxTop = target.innerText?getPageCoordinate(e).boxTop:$(ele).offset().top+30;
-    // setSearchLocation(boxTop,ele.offsetLeft)     //搜索框的位置动态获取
   }  
   handleKeyup(e){
-    const {boxMark,handleKeydown,i,value,removeId,handleClear,delSingleLable,setSearchLocation} = this.props;
+    const {boxMark,handleKeydown,removeId,handleClear} = this.props;
     const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -269,9 +265,6 @@ class EditableSpan extends Component{
           })
         }
       }
-      ele = document.activeElement;
-      boxTop = target.innerText?getPageCoordinate(e).boxTop:$(ele).offset().top+30;
-      setSearchLocation(boxTop,ele.offsetLeft)     //搜索框的位置动态获取
     }
     
   }
@@ -321,8 +314,8 @@ class EditableSpan extends Component{
                       onInput={this.onChange}
                       onFocus={this.handleFocus}
                       onBlur={this.handleBlur}
-                      onkeydown={this.handleKeydown}
-                      onkeyup={this.handleKeyup}></span>;
+                      onKeyDown={this.handleKeydown}
+                      onKeyUp={this.handleKeyup}></span>;
 
   }
 }

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

@@ -1,8 +1,8 @@
 @import "~@less/variables.less";
 .wrapper {
+    .contentZIndex1;
     position: absolute;
     top: 40px;
-    z-index: 99;
     background-color: #fff;
     padding:28px 8px 8px 8px;
     min-width: 300px;

+ 3 - 2
src/common/components/ItemBox/index.jsx

@@ -23,8 +23,9 @@ class ItemBox extends Component {
     this.handleInput = this.handleInput.bind(this);
   }
   getBoxStyle(){
-    const {boxHeight,boxWidth,boxLineHeight,marginTop,backgroundColor} = this.props;
-    return {width:boxWidth?boxWidth:undefined,height:boxHeight?boxHeight:undefined,lineHeight:boxLineHeight?boxLineHeight:'22px',marginTop:marginTop,backgroundColor:backgroundColor?backgroundColor:''};
+    const {boxHeight,boxWidth,boxLineHeight,marginTop,backgroundColor,style} = this.props;
+    const sty = {width:boxWidth?boxWidth:undefined,height:boxHeight?boxHeight:undefined,lineHeight:boxLineHeight?boxLineHeight:'22px',marginTop:marginTop,backgroundColor:backgroundColor?backgroundColor:''};
+    return style?Object.assign(style,sty):sty;
   }
 
   handleClick(e){

+ 1 - 2
src/common/components/ItemBox/index.less

@@ -2,7 +2,6 @@
 
 .box{
   margin: 2px 20px;
-  word-break: break-all;
   word-break: break-word;
   .title{
     width: 65px;
@@ -19,7 +18,7 @@
   .content{
     // height:120px;
     min-height: 38px;
-    margin-left: 60px;
+    margin:0 470px 0 60px;
     position: relative;
     padding:5px;
     outline: none;

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

@@ -10,6 +10,7 @@ import React, {Component} from 'react';
 import style from './index.less';
 // import icon from './img/loading.gif';
 import icon from '@common/images/loading.gif';
+import ReactDom from 'react-dom';
 
 /*const propTypes = {
     text: PropTypes.string,
@@ -37,7 +38,8 @@ const defaultProps = {
 class Loading extends React.Component{
     render(){
         const {text,show} = this.props;
-        return (
+        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']}/>
@@ -46,6 +48,7 @@ class Loading extends React.Component{
                     <p>{text}</p>
                 </div>
             </div>
+        </React.Fragment>,domNode
         )
     }
 }

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

@@ -1,10 +1,11 @@
+@import "~@less/variables.less";
 .loading{
+  .maskZIndex;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
-  z-index: 999;
   .cover{
     width: 100%;
     height: 100%;

+ 2 - 1
src/common/components/MiniToast/index.less

@@ -1,9 +1,10 @@
+@import "~@less/variables.less";
 .infoBox{
+  .contentZIndex1;
   position: absolute;
   top:27px;
   width: 388px;
   background: #fff;
-  z-index: 40;
   border: 1px solid #EAEDF1;
   /*box-shadow: 0 5px 10px 0 rgba(0,0,0,0.10);*/
   box-shadow: 0 10px 20px 0 #989DA3;

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

@@ -2,7 +2,7 @@
   position: fixed;
   left: 0;
   top: 0;
-  z-index: 10000;
+  z-index: 200;
 }
 .notify-bg {
   position: fixed;

+ 5 - 6
src/common/components/NumberPan/index.jsx

@@ -52,19 +52,19 @@ class NumberPan extends Component{
   getStyle(){
     const {left,top,show} = this.props;
     return {
-      left:left?left+'px':'0',
-      top:top?top+'px':'0',
+      /*left:left?left+'px':'0',
+      top:top?top+'px':'0',*/
       display:show?'table':'none'        //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
     }
   }
   render(){
     const select = this.handleSelect;
     const domNode = document.getElementById('root');
-    return ReactDom.createPortal(
-       <div className={style['panBox']} 
+    return <div className={style['panBox']}
                 style={this.getStyle()}
                 onBlur={(e)=>e.stopPropagation()} 
-                onDoubleClick={(e)=>e.stopPropagation()}>
+                onDoubleClick={(e)=>e.stopPropagation()}
+                onClick={(e)=>e.stopPropagation()}>
       <table className={style['pan']} >
         <tr>
           <td><button onMouseUp={select}>1</button></td>
@@ -92,7 +92,6 @@ class NumberPan extends Component{
         </tr>
       </table>
       </div>
-    ,domNode)
   }
 }
 

+ 3 - 5
src/common/components/NumberUnitPan/index.jsx

@@ -61,8 +61,8 @@ class NumberUnitPan extends Component{
   getStyle(){
     const {left,top,show} = this.props;
     return {
-      left:left?left+'px':'0',
-      top:top?top+'px':'0',
+      /*left:left?left+'px':'0',
+      top:top?top+'px':'0',*/
       display:show?'table':'none'
     }
   }
@@ -76,8 +76,7 @@ class NumberUnitPan extends Component{
   }
   render(){
     const domNode = document.getElementById('root');
-    return ReactDom.createPortal( 
-      <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} onDoubleClick={(e)=>e.stopPropagation()} style={this.getStyle()}>
+    return <div className={style['panBox']} onBlur={(e)=>e.stopPropagation()} style={this.getStyle()}>
         <table className={style['pan']} >
         <tr>
           <td><span onClick={this.handleSelect}>1</span></td>
@@ -117,7 +116,6 @@ class NumberUnitPan extends Component{
         </tr>
       </table>
       </div>
-    ,domNode)
   }
 }
 

+ 5 - 2
src/common/components/SearchOption/index.jsx

@@ -40,9 +40,12 @@ class SearchOption extends React.Component {
     componentDidMount(){
       this.props.handleChangeValue('');
       this.textInput.current.focus();
-      const {windowHeight,pageTop,height} = this.props;
+      const {windowHeight,pageTop,height,refreshScroller} = this.props;
+
+      refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       if(windowHeight - pageTop < height){
-        $("#searchOption")[0].scrollIntoView(false);
+        //$("#searchOption")[0].scrollIntoView(false);
+        refreshScroller().scrollBottom();
       }
     }
     handleClearVal(){

+ 1 - 2
src/common/components/SearchOption/index.less

@@ -1,12 +1,12 @@
 @import "~@less/variables.less";
 
 .search {
+    .contentZIndex1;
     width: 316px;
     padding: 8px;
     box-sizing: border-box;
     position: absolute;
     top: 30px;
-    z-index: 99;
     background-color: #fff;
     // margin-bottom: 80px;
     .llStyle;
@@ -39,7 +39,6 @@
     .clearVal{
         cursor: pointer;
         right: 18px;
-        z-index: 200;
     }
 }
 .show {

+ 26 - 7
src/common/components/Textarea/index.jsx

@@ -11,7 +11,8 @@ class Textarea extends Component {
     this.state = {
       timer:null,
       inpText:'',
-      overFlag:false
+      overFlag:false,
+      editable:true,
     };
     this.$dom = React.createRef();
     this.handleInput = this.handleInput.bind(this);
@@ -19,8 +20,22 @@ class Textarea extends Component {
     //this.handleBlur = this.handleBlur.bind(this);
     this.handleKeydown = this.handleKeydown.bind(this);
   }
-  handleFocus(){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
-    const {handleFocus,fuzhen,handleInput,isChronic} = this.props;
+  handleFocus(e){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
+    const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark} = this.props;
+    const {inpText} = this.state;
+    if(boxMark!='1'&&!hasMain&&!inpText){
+      //现病史、其他史无主诉且本身无内容是聚焦提示无法操作
+      this.setState({
+        editable:false
+      });
+      e.target.blur();
+      Notify.error("无法操作,请先输入主诉");
+      return;
+    }else{
+      this.setState({
+        editable:true
+      });
+    }
     handleFocus&&handleFocus();         //其他史、查体获取数据的方法
     if(fuzhen&& !isChronic&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
       const text = config.currentText.replace("(**)",fuzhen.replace(";",''));
@@ -30,10 +45,14 @@ class Textarea extends Component {
 
   }
   handleInput(e){
-    const {handleInput,boxMark,handlePush,hasMain} = this.props;
-    const {inpText,overFlag} = this.state;
+    const {handleInput,boxMark,handlePush} = this.props;
+    const {inpText,overFlag,editable} = this.state;
     const text = e.target.innerText || e.target.innerHTML;
     const stimer = this.state.timer;
+    if(!editable){
+      e.target.innerText='';
+      return ;
+    }
     if(boxMark=='1'&&text.length>config.limited){           //主诉字符数限制
       e.target.innerText?(e.target.innerText = text.substr(0,config.limited)):(e.target.innerHTML = text.substr(0,config.limited));
       e.target.blur();
@@ -72,7 +91,7 @@ class Textarea extends Component {
   handleKeydown(e){
     const {boxMark} = this.props;
     const ev = e||window.event;
-    if(+boxMark==1){
+    if(+boxMark===1){
       //禁止回车事件
       if(ev.keyCode==13){return false;}
     }
@@ -111,7 +130,7 @@ class Textarea extends Component {
              ref={this.$dom}
              contentEditable={true}
              onInput={this.handleInput}
-             onkeydown={this.handleKeydown}>
+             onKeyDown={this.handleKeydown}>
         </div>
       </div>
     );

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

@@ -1,6 +1,7 @@
+@import "~@less/variables.less";
 .container {
+  .maskZIndex;
   position: fixed;
-  z-index: 2000;
   width: 100%;
   height: 100%;
   .shade {

BIN
src/common/images/btn-closed.png


BIN
src/common/images/btn-open.png


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

@@ -73,7 +73,7 @@
   box-shadow: 0 10px 20px 0 #989DA3;
   // filter:progid:DXImageTransform.Microsoft.Shadow(color='#989DA3',Direction=125,Strength=6);
   border: 1px solid #dedede;
-  z-index: 203;
+  z-index: 20;
   padding: 20px;
   white-space: nowrap;
 }
@@ -269,3 +269,21 @@
   -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
   z-index: 999;
 }
+.maskZIndex {
+  z-index: 100;
+}
+.maskContentZIndex1 {
+  z-index: 110;
+}
+.maskContentZIndex2 {
+  z-index: 120;
+}
+.contentZIndex1 {
+  z-index: 10;
+}
+.contentZIndex2 {
+  z-index: 20;
+}
+.contentZIndex3 {
+  z-index: 30;
+}

+ 1 - 1
src/components/AddAssistCheck/Textarea/index.less

@@ -11,7 +11,7 @@
   resize: none;
   font-family: inherit;
   position: relative;
-  z-index: 10;
+  // z-index: 10;
   word-break: break-all;
   word-wrap:break-word;
 }

+ 20 - 3
src/components/AddAssistCheck/index.jsx

@@ -4,7 +4,7 @@ import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
 import { getPageCoordinate,getCurrentDate } from '@utils/tools';
-import close from './img/close.png';
+import ScrollArea from 'react-scrollbar';
 
 class AddAssistCheck extends React.Component {
   constructor(props) {
@@ -229,21 +229,38 @@ class AddAssistCheck extends React.Component {
     </React.Fragment> 
   }
   render() {
-    const { handleChangeValue, list,assistVal,windowHeight,assistList } = this.props;
+    const { handleChangeValue, list,assistVal,windowHeight,assistList, refreshScroller } = this.props;
     const { visible,pageTop } = this.state;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
     return (
       <div className={styles.wrapper}>
         {this.getAssistLabel()}
         <div id="searchWrapAssist" style={{ position: "relative", clear: 'both' }}>
           <Add showText="添加辅检项" handleClick={(e) => this.handleSearchShow(e)} id="assistCheck" />
-          {this.state.show ? <SearchOption windowHeight={windowHeight} pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
+          {this.state.show ? <SearchOption windowHeight={windowHeight} refreshScroller={refreshScroller }  pageTop={pageTop} height={280} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length>0?this.getSearchList(list):(assistVal == ''?'':<p style={{padding:'5px 30px',color:'#bfbfbf'}}>暂无筛选项</p>)}
             {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
+                <ScrollArea speed={0.8}
+                            horizontal={false}
+                            stopScrollPropagation={true}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
                 {
                   this.getCommonList()
                 }
+                </ScrollArea>
               </div>
             }
           </SearchOption> : ''}

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

@@ -27,8 +27,8 @@
 }
 
 .searchLiUl {
-  overflow-y: auto;
-  max-height: 225px;
+ /* overflow-y: auto;
+  max-height: 225px;*/
   // min-height: 80px;
 }
 

+ 20 - 6
src/components/AddInspect/index.jsx

@@ -4,10 +4,7 @@ import SlideExcel from './SlideExcel';
 import SlideSelect from './SlideSelect';
 import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate} from '@utils/tools';
 import styles from './index.less';
-import date1 from './img/date1.png';
-import close from './img/close.png';
-import slideUp from "@common/images/slide-up.png";
-import slideDown from "@common/images/slide-down.png";
+import ScrollArea from 'react-scrollbar';
 import store from '@store';
 import $ from 'jquery';
 class Inspect extends React.Component {
@@ -317,9 +314,17 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const { getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const {refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
 
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
@@ -385,14 +390,23 @@ class Inspect extends React.Component {
         </div>
         <div style={{ position: "relative", clear: "both", top: "5px" }}>
           <Add showText="添加化验项" handleClick={(e) => this.handleSearchShow(e)} id="searchWrap" />
-          {this.state.show ? <SearchOption windowHeight={windowHeight} height={280} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
+          {this.state.show ? <SearchOption windowHeight={windowHeight} height={280} refreshScroller={refreshScroller} pageTop={pageTop} handleChangeValue={handleChangeValue} visible={true}>
             {list && list.length > 0 ? this.getSearchList(list) : (inspectVal == '' ? '' : <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>暂无筛选项</p>)}
             {
               (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
                 <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
+                <ScrollArea speed={0.8}
+                            horizontal={false}
+                            stopScrollPropagation={true}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
                 {
                   this.getCommonList()
                 }
+                </ScrollArea>
               </div>
             }
           </SearchOption> : ''}

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

@@ -89,8 +89,8 @@
     display: none;
 }
 .searchLiUl {
-  overflow-y: auto;
-  max-height: 225px;
+  /*overflow-y: auto;
+  max-height: 225px;*/
   // min-height: 80px;
 }
 .searchLi {

+ 12 - 104
src/components/AssistCheck/index.jsx

@@ -8,32 +8,9 @@ import { isIE, getUrlArgObject } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
-import store from '@store';
 import { host, prefix } from '@utils/config.js';
 
 
-// (function ($) {
-//   var FileAPI = {
-//     // @default: "./dist/"
-//     staticPath: './dists/',
-
-//     // @default: FileAPI.staticPath + "FileAPI.flash.swf"
-//     flashUrl: './dists/FileAPI.flash.swf',
-
-//     // @default: FileAPI.staticPath + "FileAPI.flash.image.swf"
-//     flashImageUrl: './dists/FileAPI.flash.image.swf'
-//   };
-//   return FileAPI
-// })($)
-
-// import "./dists/FileAPI.js";
-
-// const isLocal = window.location.hostname.indexOf('localhost') != -1;
-// const qhost = isLocal ? host + prefix : prefix;
-// const api = {
-//   upload: qhost + '/lisExcelRes/lisExcelAnalysis'
-// };
-// let numFlg = 0;
 class AssistCheck extends React.Component {
   constructor(props){
         super(props);
@@ -53,18 +30,8 @@ class AssistCheck extends React.Component {
         this.closeInIcss=this.closeInIcss.bind(this)
         this.onClose=this.onClose.bind(this)
         this.handleImportExcel=this.handleImportExcel.bind(this)
-    } 
-    // componentDidMount() {
-    //   $(document).click((event) => {
-    //     let searchWrap = $('#importExcelBtns')[0];   // 导入按钮按钮
-    //     let searchOption = $('#importExcelLists')[0];   // 下拉列表
-    //     if (searchOption) {
-    //       if(searchWrap != event.target){
-    //         this.setState({ importLis: false });
-    //       }
-    //     }
-    //   });
-    // }
+    this.refreshScroller = this.refreshScroller.bind(this);
+    }
     handleImportExcel() {
       this.inputRef.click();
     }
@@ -75,75 +42,6 @@ class AssistCheck extends React.Component {
       })
     }
 
-    // handleBindFileApi(){
-    //   const {message} = this.props;
-    //   var ua = navigator.userAgent;
-    //   var _isIE = ua.indexOf("MSIE") > -1;
-    //   if (_isIE) {
-    //     let version = ua.match(/MSIE ([\d.]+)/)[1];
-    //     this.setState({
-    //       ieVersion: version
-    //     })
-    //   }
-    //   $('iframe').bind('load', function () { })
-    //   const { fetchPushInfos } = this.props;
-    //   // FileAPI.debug = true
-    //   $.support.cors = true;
-    //   const that = this;
-    //   var choose = document.getElementById('choose');
-    //   FileAPI.event.on(choose, 'change', function (evt) {
-    //     var files = FileAPI.getFiles(evt);
-    //     FileAPI.filterFiles(files, function (file, info) {
-    //       let name = file.name;
-    //       // if( name.split('.')[1] == 'xlsx' || name.split('.')[1] == 'xls' ){
-    //       //     Notify.error('请选择正确的excel表格')
-    //       //     return false;
-    //       // }else{
-    //       //     return true;
-    //       //   }
-    //         return true;
-    //     },
-    //       function (files, rejected) {
-    //         if (files.length) {
-    //           //console.log(files[0])
-    //           const securityCode = getUrlArgObject("code");
-    //           const appKeyId = getUrlArgObject("appI");
-    //           const appKeySecret = getUrlArgObject("appS");
-    //           FileAPI.upload({
-    //             // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
-    //             url: api.upload,
-    //             data: { hospitalCode: message == '{}' ? '' : message.hospitalCode },
-    //             files: { uploadfile: files[0] },
-    //             headers: {
-    //               appKeyId: appKeyId,
-    //               appKeySecret: appKeySecret,
-    //               securityCode: securityCode
-    //             },
-    //             complete: function (err, xhr) {
-    //               if (!err) {
-    //                 let res = JSON.parse(xhr.response);
-    //                 let message = res.data.messages;
-    //                 // store.dispatch(getExcelList(res.data));
-    //                 // fetchPushInfos && fetchPushInfos();
-    //                 // if (message && message.length != 0) {
-    //                 //   that.setState({
-    //                 //     visible: true,
-    //                 //     dom: message,
-    //                 //     height: message.length
-    //                 //   })
-    //                 // }
-    //                 // $("#choose").val("");
-    //               } else {
-    //                 let res = JSON.parse(xhr.response);
-    //                 Notify.error(res.msg)
-    //               }
-    //             }
-    //           });
-    //         }
-    //       });
-    //   });
-    // }
-    
     onClose() {
       this.setState({
         hide: false
@@ -160,6 +58,12 @@ class AssistCheck extends React.Component {
         hide: false
       })
     }
+  refreshScroller(){
+    //更新滚动条状态,解决容器变大滚动条不更新bug
+    return this.context.scrollArea;
+    //this.context.scrollArea.scrollBottom();
+
+  }
     render(){
         const {checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
         const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
@@ -213,6 +117,7 @@ class AssistCheck extends React.Component {
                     <div style={{padding:'10px',boxSizing:'border-box'}} >
                         <AddAssistCheck 
                             handleChangeValue={handleChangeValue}
+                            refreshScroller={this.refreshScroller}
                             list={list}
                             handleSign={handleSign}
                             assistLabel={assistLabel}
@@ -236,4 +141,7 @@ class AssistCheck extends React.Component {
     }
 }
 
+AssistCheck.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default AssistCheck;

+ 2 - 3
src/components/AssistCheck/index.less

@@ -3,9 +3,8 @@
 
 
 .top {
-    margin-left: 60px;
     position: relative;
-    margin: 20px 20px -21px 20px;
+    margin: 20px 490px -21px 20px;
     span {
         margin-left: 60px;
         border: 1px dashed @part-border-color;
@@ -55,7 +54,7 @@
   width: 120%;
   top: 29px;
   left: 0;
-  z-index: 15;
+  z-index: 10;
   font-size: 12px;
   box-shadow: 0 10px 20px 0 #989DA3;
   border: 1px solid #dedede;

+ 40 - 0
src/components/Banner/ModeChange/index.jsx

@@ -0,0 +1,40 @@
+import React, { Component } from "react";
+import style from "./index.less";
+import ReactDom from "react-dom";
+import close from '@images/icon_close.png';
+import sopen from '@images/btn-open.png'
+import sclose from '@images/btn-closed.png'
+
+class ModeChange extends Component {
+
+
+    render(){
+        const {closeConfigModal, changeType, confirmType, mode,hideBtn} = this.props;
+        const domNode = document.getElementById('root');
+        const isOpen = +mode===0;
+        return ReactDom.createPortal(<React.Fragment>
+            <div className={style['modal']}>
+              <div className={style['shade']} onClick={closeConfigModal}></div>
+              <div className={style['content']}>
+                <div className={style['close']}>设置<img src={close} onClick={closeConfigModal} /></div>
+                <div className={style["oper"]}>
+                    <p>
+                      <span>开启模板智能推送:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={()=>changeType(isOpen?'1':'0')}>
+                        {hideBtn?<img src={isOpen?sopen:sclose} alt=""/>:''}
+                        {isOpen?'开':'关'}
+                        </a>
+                    </p>
+                </div>
+                <div className={style["explain"]}>
+                    <p>说明:</p>
+                    <p>该设置只针对问诊模块中的“主诉”、“现病史”、“其他史”功能;</p>
+                </div>
+                {hideBtn?<div className={style['btn']} onClick={confirmType}><button>保存修改</button></div>:''}
+            </div>
+        </div>
+      </React.Fragment>,domNode)
+    }
+}
+
+export default ModeChange;

+ 91 - 0
src/components/Banner/ModeChange/index.less

@@ -0,0 +1,91 @@
+@import "~@less/variables.less";
+.modal {
+    .shade {
+      .maskZIndex;
+      position: fixed;
+      top: 0;
+      left:0;
+      right: 0;
+      bottom: 0;
+      background: #000;
+      opacity: 0.6;
+      filter:alpha(opacity=60);
+      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+    }
+    .content {
+      .maskContentZIndex1;
+      position: fixed;
+      top: 100px;
+      width: 432px;
+      left:50%;
+      margin-left: -216px;
+      min-height: 284px;
+      background: #fff;
+      .oper{
+        margin: 20px 30px;
+      }
+      .explain{
+        margin: 50px 30px;
+        p{
+          font-size: 12px;
+          line-height: 20px;
+        }
+      }
+      .switch{
+        text-decoration: none;
+        color:inherit ;
+        img{
+          vertical-align: middle;
+          margin: 0 12px 0 20px;
+        }
+      }
+      .close{
+        line-height: 24px;
+        padding: 8px 3px 7px 10px;
+        border-bottom: 1px solid #EAEDF1;
+        img{
+          float: right;
+          margin: 0px;
+          cursor: pointer;
+        }
+      }
+      h1{
+        font-size: 16px;
+        letter-spacing: 0;
+        margin: 20px 0px 20px 10px;
+      }
+      ul {
+        margin: 0px 0px 0px 10px;
+        li {
+          width: 190px;
+          height: 44px;
+          line-height: 44px;
+          margin: 0px 0px 2px 0px;
+          padding: 0px 0px 0px 10px;
+          cursor: pointer;
+          img{
+            margin: -1px 4px 0 0;
+            visibility: hidden;
+          }
+        }
+      }
+      .btn {
+        text-align: center;
+        margin-bottom: 30px;
+        button{
+          .btnCom;
+          height: 34px;
+          line-height: 32px;
+          text-align: center;
+          outline: none;
+          border-radius: 4px;
+          cursor: pointer;
+          box-sizing: border-box;
+          margin-left: 20px;
+          background: @blue;
+          color: #fff;
+          margin-right: 20px;
+        }
+      }
+    }
+  }

+ 26 - 49
src/components/Banner/index.jsx

@@ -1,29 +1,26 @@
 import React, { Component } from "react";
 import { connect } from "react-redux";
 import style from "./index.less";
+import ReactDom from "react-dom";
 import logo from "../../common/images/logoa.png";
 import setup from "../../common/images/setup.png";
-import close from '../../common/images/icon_close.png';
-import ok from '../../common/images/confirm.png'
 import emergIcon from '../../common/images/emergency.png'
 import {Notify} from '@commonComp';
-// import Emergency from '@components/Emergency';
 import Emergency from '@containers/Emergency';
 import {getAllHis} from '@store/async-actions/fetchModules.js';
 import {timestampToTime,getCurrentDate} from '@utils/tools.js';
 import {dragBox} from '@utils/drag';
 import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
+import ModeChange from './ModeChange'
 
 class Banner extends Component {
   constructor(props){
     super(props)
     this.state = {
       mode: props.typeConfig,
-      zIndex:204,
       emergencyBox:false
     };
     this.showConfigModal = this.showConfigModal.bind(this);
-    this.closeConfigModal = this.closeConfigModal.bind(this);
     this.changeType = this.changeType.bind(this);
     this.confirmType = this.confirmType.bind(this);
     this.showHisModal = this.showHisModal.bind(this);
@@ -33,18 +30,10 @@ class Banner extends Component {
   showConfigModal(){
     this.setState({
       mode:this.props.typeConfig,
-      zIndex:206
     });
     this.props.showConfigModal()
   }
 
-  closeConfigModal(){
-    this.props.closeConfigModal();
-    this.setState({
-      zIndex:204
-    })
-  }
-
   changeType(typeConfig){
     this.setState({
       mode:typeConfig
@@ -52,27 +41,17 @@ class Banner extends Component {
   }
 
   confirmType(){
-    const {typeConfig,confirmType,clearCommS} = this.props;
+    const {typeConfig,confirmType,clearCommS,closeConfigModal} = this.props;
     const mode = this.state.mode;
     // 清空主诉常见症状
     clearCommS();
     if(mode==typeConfig){
-      this.closeConfigModal()
+      closeConfigModal()
       return;
     }
     confirmType&&confirmType(mode);
-    this.closeConfigModal()
-    this.setState({
-      zIndex:204
-    })
+    closeConfigModal()
   }
-  /*componentDidUpdate(){
-    const {failed} = this.props;
-    if(failed){
-      //弹窗提醒
-      Notify.error("模式切换失败,请稍后再试");
-    }
-  }*/
   showHisModal(){
     const {getAllRecord} = this.props;
     // 进入时默认展示当天的病例
@@ -84,23 +63,22 @@ class Banner extends Component {
     getAllRecord&&getAllRecord(item);
     this.setState({
       emergencyBox:true,
-      zIndex:206
     })
   }
   handleHisClose(){
     this.setState({
       emergencyBox:false,
-      zIndex:204
     })
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,disVisible,copyVisible,ifShow,deptName} = this.props;
-    const {mode,zIndex,emergencyBox} = this.state;
-    const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
-
+    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther} = this.props;
+    const {mode,emergencyBox} = this.state;
+    const {showConfigModal, changeType, confirmType} = this;
+    const domNode = document.getElementById('root');
+    const disabled = !(hasMain||hasCurrent||hasOther);
     return (
-      <div className={style["logo"]} style={{zIndex:disVisible||copyVisible?40:zIndex}}>
+      <div className={style["logo"]} >
         <img src={logo} />
         <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]}>
@@ -113,22 +91,21 @@ class Banner extends Component {
             设置
           </div>
         </div>
-        {visible?<div className={style['modal']}>
-          <div className={style['shade']} onClick={closeConfigModal}></div>
-          <div className={style['content']}>
-            <div className={style['close']}>设置<img src={close} onClick={closeConfigModal} /></div>
-            <p className={style['title']}>模式切换<i>(模式说明:切换模式会清空当前所有的数据)</i></p>
-            <ul>
-              <li className={+mode===0?style['selected']:''} onClick={() => changeType(0)}><img src={ok} />智能推送模式</li>
-              <li className={+mode===1?style['selected']:''} onClick={() => changeType(1)}><img src={ok} />纯文本模式</li>
-            </ul>
-            <div className={style['btn']} onClick={confirmType}>确认</div>
-          </div>
-        </div>:''}
-        {emergencyBox?<div className={style['modal']}>
-            <div className={style['shade']} onClick={this.handleHisClose}></div>
-            <Emergency show={emergencyBox} close={this.handleHisClose}/>
-          </div>:''}
+        {visible&& <ModeChange
+          mode = {mode}
+          hideBtn={disabled}
+          closeConfigModal = {closeConfigModal}
+          changeType = {changeType}
+          confirmType = {confirmType}
+        >
+          </ModeChange>}
+        {emergencyBox? ReactDom.createPortal(<React.Fragment> 
+            <div className={style['modal']}>
+              <div className={style['shade']} onClick={this.handleHisClose}></div>
+              <Emergency show={emergencyBox} close={this.handleHisClose}/>
+            </div>
+          </React.Fragment>
+          , domNode):''}
         
       </div>
     );

+ 13 - 73
src/components/Banner/index.less

@@ -1,6 +1,7 @@
 @import "~@less/variables.less";
 
 .logo{
+    .contentZIndex3;
     background: linear-gradient(-90deg, #93CEE3 7%,#3B9ED0 98%);
     background-image: url("../../common/images/bar.png");
     height: 50px;
@@ -44,79 +45,6 @@
       width: 20px;
       height: 20px;
     }
-    .modal {
-      .shade {
-        position: fixed;
-        top: 0;
-        left:0;
-        right: 0;
-        bottom: 0;
-        background: #000;
-        opacity: 0.6;
-        filter:alpha(opacity=60);
-        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
-        z-index: 2000;
-      }
-      .content {
-        position: fixed;
-        z-index: 2001;
-        top: 100px;
-        width: 820px;
-        left:50%;
-        margin-left: -410px;
-        height: 283px;
-        background: #fff;
-        .close{
-          line-height: 24px;
-          padding: 3px 3px 5px 10px;
-          border-bottom: 1px solid #EAEDF1;
-          img{
-            float: right;
-            margin: 0px;
-            cursor: pointer;
-          }
-        }
-        h1{
-          font-size: 16px;
-          letter-spacing: 0;
-          margin: 20px 0px 20px 10px;
-        }
-        ul {
-          margin: 0px 0px 0px 10px;
-          li {
-            width: 190px;
-            height: 44px;
-            line-height: 44px;
-            margin: 0px 0px 2px 0px;
-            padding: 0px 0px 0px 10px;
-            cursor: pointer;
-            &.selected{
-              background: rgba(59,158,208,0.1);
-              img{
-                visibility: visible;
-              }
-            }
-            img{
-              margin: -1px 4px 0 0;
-              visibility: hidden;
-            }
-          }
-        }
-        .btn {
-          .btnCom;
-          width: 80px;
-          height: 34px;
-          background:#3B9ED0;
-          color:#fff;
-          font-size: 14px;
-          line-height: 34px;
-          position: relative;
-          left: 50%;
-          margin-left: -40px;
-          top: 30px;
-        }
-      }
-    }
 }
 .title{
   font-size: 16px;
@@ -125,4 +53,16 @@
   i{
     color: red;
   }
+}
+.shade {
+  .maskZIndex;
+  position: fixed;
+  top: 0;
+  left:0;
+  right: 0;
+  bottom: 0;
+  background: #000;
+  opacity: 0.6;
+  filter:alpha(opacity=60);
+  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }

+ 9 - 23
src/components/CheckBody/index.jsx

@@ -16,8 +16,6 @@ class CheckBody extends Component{
       boxMark:'4',
       boxLeft:0,
       boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
       showAll:false
     };
     this.handleClick = this.handleClick.bind(this);
@@ -32,7 +30,6 @@ class CheckBody extends Component{
         showAll:next.defaultShowAll
       })
     }
-    this.setState({boxLeft:next.boxLeft})
   }
   isThereHigh(arr,ids){
     if(!arr||!ids){
@@ -77,26 +74,15 @@ class CheckBody extends Component{
       return ;
     }
     //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
-        leftL = ele.offsetLeft+90
-      }
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL);
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll;
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
   }
   handleSearchSelect(obj){
    const {questionId,name} = obj;
@@ -122,8 +108,8 @@ class CheckBody extends Component{
     });
   }
   render(){
-    const {searchData,totalHide,data,boxLeft,boxTop,saveText} = this.props;
-
+    const {searchData,totalHide,data,saveText} = this.props;
+    const {boxLeft,boxTop} = this.state;
     return <ItemBox title='查体' handleClick={this.handleClick}>
         {this.getLabels()}
         {/*{showMoreBtn?more:''}*/}

+ 3 - 3
src/components/CopyRight/CopyModalSon/index.less

@@ -1,5 +1,6 @@
-
+@import "~@less/variables.less";
       .copyContent{
+        .maskContentZIndex1;
         position: fixed;
         width: 820px;
         left: 50%;
@@ -7,7 +8,6 @@
         margin-left: -410px;
         background: #fff;
         height: 60%;
-        z-index: 1000;
         padding: 80px 0 40px;
         img{
           cursor: pointer;
@@ -52,6 +52,7 @@
         }
       }
       .shade {
+        .maskZIndex;
         position: fixed;
         left: 0;
         top: 0;
@@ -59,7 +60,6 @@
         bottom:0;
         background: #000;
         opacity: 0.6;
-        z-index: 999;
         filter:alpha(opacity=60);
         -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
       }

+ 3 - 3
src/components/CopyRight/DiscontentSon/index.less

@@ -1,13 +1,13 @@
 @import "~@less/mixin.less";
-
+@import "~@less/variables.less";
       .disContent{
+        .maskContentZIndex1;
         position: fixed;  
         width: 50%;
         height: 60%;
         left: 25%;
         background: #fff;
         top: 20%;
-        z-index: 1000;
         padding: 40px 0 60px 0;
         img{
           cursor: pointer;
@@ -76,12 +76,12 @@
       }
       
     .shade {
+      .maskZIndex;
       position: fixed;
       left: 0;
       top: 0;
       right: 0;
       bottom:0;
-      z-index: 999;
       background: #000;
       opacity: 0.6;
       filter:alpha(opacity=60);

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

@@ -2,7 +2,6 @@
 .container {
   position: absolute;
   bottom: 0px;      //页面布局
-  z-index: 40;
   width: 450px;
   .disTips{
     padding: 10px 20px 0px 20px;
@@ -37,18 +36,7 @@
       float: right;
       cursor: pointer;
     }
-    .shade {
-      position: fixed;
-      left: 0;
-      top: 0;
-      right: 0;
-      bottom:0;
-      background: #000;
-      opacity: 0.6;
-      z-index: 9999;
-      filter:alpha(opacity=60);
-      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
-    }
+    
     .copyModal {
       .copyContent{
         position: fixed;

+ 24 - 32
src/components/CurrentIll/index.jsx

@@ -14,8 +14,6 @@ class CurrentIll extends Component{
       forbidInput:false,
       boxLeft:0,
       boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
       setDataTimer:null
     }
     this.toggleEditable = this.toggleEditable.bind(this);
@@ -25,10 +23,6 @@ class CurrentIll extends Component{
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
   }
-  
-  componentWillReceiveProps(nextProps){
-    this.setState({boxLeft:nextProps.boxLeft})
-  }
 
   toggleEditable(){
     this.setState({
@@ -76,29 +70,16 @@ class CurrentIll extends Component{
     ev.target.innerText?(ev.target.innerText = ""):(ev.target.innerHTML="");
   }
 
-  handleClick(e){//让搜索框跟随鼠标点击移动
-    // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
-    //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const {getSearchLocation} = this.props;
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
-        leftL = ele.offsetLeft+90
-      }
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+  handleClick(e){
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
   }
 
   handleSearchSelect(obj){
@@ -107,7 +88,7 @@ class CurrentIll extends Component{
     fetchModules&&fetchModules({id:questionId,index:focusIndex,name,span,conceptId});
   }
 
-  getInlineTag(){  
+  getInlineTag(){
     const {data,showArr,selecteds,saveText,insertProcess,symptomIds,allModules} = this.props;
     const boxMark = '2';
 
@@ -133,16 +114,24 @@ class CurrentIll extends Component{
       }
     } 
   }
-
+  componentWillReceiveProps(nextProps){
+    const contHeightDiff =  nextProps.data&&this.props.data&&nextProps.data.length!==this.props.data.length;
+    const dataDiff = !!nextProps.data!==!!this.props.data;
+    if(contHeightDiff||dataDiff){
+      this.context.scrollArea.refresh();
+    }
+  }
   render(){
-    const {fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data,boxLeft,boxTop} = this.props;
-    const {forbidInput} = this.state;
+    const {hasMain,readMode,fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
+    const {forbidInput,boxLeft,boxTop} = this.state;
     const searchFlag = searchData.length > 0 ? true : false;
-    if(+type===1){      //文本模式
+    const mode = readMode===-1?type:readMode;
+    if(+mode===1){      //文本模式
       return <Textarea  title='现病史' boxMark='2'
                         isRead={isRead}
                         value={saveText[0]}
                         fuzhen={fuzhen}
+                        hasMain={hasMain}
                         isChronic={isChronic}
                         handlePush={fetchPushInfos}
                         handleInput={handleInput}/>;
@@ -161,4 +150,7 @@ class CurrentIll extends Component{
   }
 }
 
+CurrentIll.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default CurrentIll;

+ 20 - 5
src/components/DiagResultSearch/index.jsx

@@ -1,10 +1,8 @@
 import React, { Component } from 'react';
 import style from './index.less';
-import close from './img/close.png'
-import search from './img/search.png'
 import DiagnosticItem from '@containers/DiagnosticItem'
 import { SearchOption } from '@commonComp';
-import config from '@config/index';
+import ScrollArea from 'react-scrollbar';
 import $ from 'jquery';
 class DiagResultSearch extends Component {
   constructor(props) {
@@ -52,12 +50,29 @@ class DiagResultSearch extends Component {
   }
 
   render() {
-    const { show, searchResult, getSearchResult, handleChangeValue,pageTop,windowHeight } = this.props
+    const { show, searchResult, refreshScroller, handleChangeValue,pageTop,windowHeight } = this.props;
 
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
     return (
       show && <div id='diagSearch' className={style['search-box']}>
-        <SearchOption handleChangeValue={handleChangeValue} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
+        <SearchOption handleChangeValue={handleChangeValue} refreshScroller={refreshScroller} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
+          <ScrollArea speed={0.8}
+                      horizontal={false}
+                      stopScrollPropagation={true}
+                      style={{height:'225px'}}
+                      className={style["area"]}
+                      verticalContainerStyle={contStyle}
+                      verticalScrollbarStyle={barStyle}
+                      contentClassName="content">
           {this.getSearchList(searchResult)}
+          </ScrollArea>
         </SearchOption>
       </div>
     )

+ 3 - 3
src/components/DiagResultSearch/index.less

@@ -1,11 +1,11 @@
 @import "~@less/variables.less";
 .search-box {
+    .contentZIndex1;
     position: absolute;
     top: 20px;
     width: 316px;
     // box-shadow: 0 6px 20px 0 #989DA3;
     background: #fff;
-    z-index: 99;
     margin-bottom: 80px;
     
 }
@@ -41,8 +41,8 @@
 // }
 
 .search-result {
-    overflow-y: auto;
-    max-height: 225px;
+    /*overflow-y: auto;
+    max-height: 225px;*/
     min-height: 80px;
 }
 

+ 12 - 4
src/components/Diagnosis/index.jsx

@@ -1,11 +1,8 @@
 import React, { Component } from 'react';
-import style from './index.less';
 import { Button, ItemBox, ConfirmModal, Loading, Message, Add } from '@commonComp';
 import DiagnosticList from '@containers/DiagnosticList.js';
-// import TreatDrug from '@containers/TreatDrug.js'
 import { getPageCoordinate } from '@utils/tools';
 import DiagResultSearch from '@containers/DiagResultSearch'
-import $ from 'jquery';
 
 class Diagnosis extends Component {
   constructor(props) {
@@ -19,6 +16,7 @@ class Diagnosis extends Component {
     this.showSearch = this.showSearch.bind(this);
     this.hideSearch = this.hideSearch.bind(this);
     this.handleshowSearch = this.handleshowSearch.bind(this);
+    this.refreshScroller = this.refreshScroller.bind(this);
 
   }
   componentWillReceiveProps() {
@@ -40,14 +38,21 @@ class Diagnosis extends Component {
     this.props.show ? this.hideSearch() : this.showSearch()
     this.setState({ pageTop:getPageCoordinate(e).boxTop })
   }
+  refreshScroller(){
+    //更新滚动条状态,解决容器变大滚动条不更新bug
+    return this.context.scrollArea;
+    /*this.context.scrollArea.refresh();
+    this.context.scrollArea.scrollBottom();*/
 
+  }
   render() {
     return (<div id="diagnosisResult">
       <ItemBox id="diagnosis" title='诊断' boxHeight='auto' titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
         <DiagnosticList></DiagnosticList>
         <div style={{ marginLeft: '10px', position: 'relative' }}>
           <Add showText="添加诊断结果" handleClick={this.handleshowSearch} id="addDiag" height="50px" />
-          <DiagResultSearch windowHeight={this.props.windowHeight} pageTop={this.state.pageTop} height={150}></DiagResultSearch>
+          <DiagResultSearch
+            refreshScroller={this.refreshScroller} windowHeight={this.props.windowHeight} pageTop={this.state.pageTop} height={150}></DiagResultSearch>
         </div>
 
 
@@ -58,4 +63,7 @@ class Diagnosis extends Component {
   }
 }
 
+Diagnosis.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default Diagnosis;

+ 10 - 35
src/components/DiagnosticItem/index.jsx

@@ -62,42 +62,17 @@ 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} = this.props;
         item.type = diagType;
-        // setTimeout(()=>{
-        //     this.setState({
-        //         visible: false,
-        //     },()=>{
-                const { diagnosticList, addDiagnostic, clearInput, hideSearch } = this.props;
-                // for (let i = 0; i < diagnosticList.length; i++) {
-                //     if(diagnosticList[i].id === item.id && diagnosticList[i].name === item.name) {
-                //         Notify.info('该诊断已存在');
-                //         return
-                //     }
-                // }
-                if(item.type == 2&&mode==0) {
-                    isChronicMag(item);
-                }
-                // 从缓存取慢病列表
-                // let chronicList = JSON.parse(storageLocal.get('chronic'));
-                // if(!chronicList){
-                //     getChronic();
-                //     chronicList = JSON.parse(storageLocal.get('chronic'));
-                // }
-                // console.log(999,chronicList)
-                // for(let i=0; i<chronicList.length; i++){
-                //     if(chronicList[i].id==item.id&&chronicList[i].name==item.name){
-                //         //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
-                //         // 是--引用   否--走慢病流程
-                //         console.log("是慢病!")
-                //     }
-                // }
-                addDiagnostic&&addDiagnostic(item);
-                clearInput&&clearInput();
-                hideSearch&&hideSearch()
-        //     })
-        // }, 0)
-        document.getElementById("diagnosisResult").scrollIntoView(true)
+         const {  addDiagnostic, clearInput, hideSearch } = this.props;
+
+         if(item.type == 2) {
+             isChronicMag(item);
+         }
+         addDiagnostic&&addDiagnostic(item);
+         clearInput&&clearInput();
+         hideSearch&&hideSearch();
+         document.getElementById("diagnosisResult").scrollIntoView(true)
     }
     handleMouseEnterDrug() {
         this.setState({

+ 13 - 24
src/components/DiagnosticList/index.jsx

@@ -108,40 +108,35 @@ class DiagnosticList extends Component {
         getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1});
     }
     referRecord() {
-        const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props
-        hideReferRecord && hideReferRecord()
+        const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props;
+        hideReferRecord && hideReferRecord();
         // showHistoryCaseModal && showHistoryCaseModal()
         // store.dispatch(initItemList(chronicMagItem))
         initItemList(chronicMagItem).then((res)=>{
-          console.log(99999,chronicMagItem)
             const result = res.data;
             if(result.code==0 && result.data){
               store.dispatch(setInitHistory(result.data));
               showHistoryCaseModal && showHistoryCaseModal();
             }else{
-              if(typeConfig==0){
-                Notify.info("暂无历史病历,已默认展示慢病相关内容");
-                const timer = setTimeout(function(){
-                  autoFillModules && autoFillModules();
-                  clearTimeout(timer);
-                },1000) //需求要求延时
-              }
+              Notify.info("暂无历史病历,已默认展示慢病相关内容");
+              const timer = setTimeout(function(){
+                autoFillModules && autoFillModules();
+                clearTimeout(timer);
+              },1000) //需求要求延时
             }
         })
     }
     noReferRecord() {
-        const { hideReferRecord ,autoFillModules,typeConfig} = this.props
+        const { hideReferRecord ,autoFillModules} = this.props;
         hideReferRecord && hideReferRecord();
-        if(typeConfig==0){//智能推送模式才自动填充
-            autoFillModules&&autoFillModules();
-        }
-        
+        autoFillModules&&autoFillModules();
+
     }
     referCase() {
-        const { hideHistoryCaseModal, items ,autoFillModules,typeConfig} = this.props
+        const { hideHistoryCaseModal, items ,autoFillModules,typeConfig} = this.props;
         const {sign} = this.state;
         hideHistoryCaseModal && hideHistoryCaseModal()
-        if (this.state.activeHistory === -1 && typeConfig==0) {//没有选择历史病例直接点确定
+        if (this.state.activeHistory === -1) {//没有选择历史病例直接点确定
             Notify.info("未选择历史病历,已默认展示慢病相关内容");
               const timer = setTimeout(function(){
                 autoFillModules && autoFillModules();
@@ -152,10 +147,6 @@ class DiagnosticList extends Component {
         let baseList = store.getState();
         
         let baseObj = items[this.state.activeHistory];
-        // 切换模式
-        if(sign != typeConfig){
-          store.dispatch({type: CONFIRM_TYPE, confirmType: baseObj.sign});
-        }
         pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
         this.props.getBilling();
         this.setState({
@@ -170,9 +161,7 @@ class DiagnosticList extends Component {
             sign:-1
         })
         hideHistoryCaseModal && hideHistoryCaseModal()
-        if(typeConfig==0){//智能推送模式才自动填充
-            autoFillModules&&autoFillModules();
-        }
+        autoFillModules&&autoFillModules();
     }
     handleQuoteClick(item, index) {
         // const { handleQuoteClick } = this.props

+ 21 - 4
src/components/EMRContainer/index.jsx

@@ -11,6 +11,7 @@ import OperationContainer from '../../containers/OperationContainer'
 import style from './index.less';
 import AdviceContainer from '../../containers/AdviceContainer';
 import InfoTitle from '@components/InfoTitle'
+import ScrollArea from 'react-scrollbar';
 import {getWindowInnerHeight,getWindowInnerWidth,windowEventHandler} from '@utils/tools';
 
 class EMRContainer extends Component {
@@ -22,12 +23,12 @@ class EMRContainer extends Component {
         // const {initHospital} = this.props;
         // initHospital()
         const height = getWindowInnerHeight() - 175;
-        const width = getWindowInnerWidth() - 480;
+        const width = getWindowInnerWidth() - 20;
         this.$cont.current.style.height = height+"px";
         this.$cont.current.style.width = width + "px";
         windowEventHandler('resize', ()=>{
           const height = getWindowInnerHeight() - 175;
-          const width = getWindowInnerWidth() - 480;
+          const width = getWindowInnerWidth() - 20;
           if(this.$cont.current){
             this.$cont.current.style.height = height + "px";
             this.$cont.current.style.width = width + "px";
@@ -35,8 +36,23 @@ class EMRContainer extends Component {
         });
     }
     render() {
-        return <div className={style['EMR-container']} ref={this.$cont} id="addScrollEvent">
-            <InfoTitle></InfoTitle>
+        const contStyle={
+                          opacity:'0.4',
+                          top:'1px',
+                          right:'460px',
+                          zIndex:'15',
+                          width:'14px',
+                          background:'#f1f1f1'};
+        const barStyle={background:'#777',width:'100%',marginLeft:'0'};
+        return <div className={style['EMR-container']}
+                    ref={this.$cont} id="addScrollEvent">
+          <ScrollArea speed={0.8}
+                      horizontal={false}
+                      className={style["area"]}
+                      verticalContainerStyle={contStyle}
+                      verticalScrollbarStyle={barStyle}
+                      contentClassName="content">
+          <InfoTitle></InfoTitle>
             <div className={style['inner']}>
                 <MainSuit></MainSuit>
                 <CurrentIll></CurrentIll>
@@ -50,6 +66,7 @@ class EMRContainer extends Component {
                 <AdviceContainer></AdviceContainer>
             </div>
             <OperationContainer></OperationContainer>
+          </ScrollArea>
         </div>
     }
 }

+ 6 - 2
src/components/EMRContainer/index.less

@@ -1,7 +1,11 @@
 @import "~@less/variables.less";
+.area{
+   height: 100%;
+    min-width: 1006px;
+ }
 .EMR-container{
   background: #fff;
-  margin-top: 60px;
+  margin:60px 20px 0 0;
   // margin-right:@push-width + 10px;
   padding: 0px 0 10px 0 ;
   box-sizing: border-box;
@@ -14,7 +18,7 @@
 }
 .inner{
   padding-top:20px;
-  padding-bottom: 20px;
+  padding-bottom: 48px;
 }
 .keep {
     position: absolute;

+ 3 - 3
src/components/Emergency/index.less

@@ -1,8 +1,10 @@
 @import "~@less/mixin.less";
+@import "~@less/variables.less";
 .mask-box{
   .mask;
 }
 .emer-box{
+  .maskZIndex;
   // width: 1060px;
   width: 1024px;
   // height: 700px;
@@ -11,7 +13,6 @@
   top:20px; //搜索结果展示-6-26
   left:50%;
   margin-left: -530px;
-  z-index: 2002;
   background: #fff;
   // overflow: hidden;
   .emer-content{
@@ -19,11 +20,11 @@
     height: 100%;
   }
   .closeModal {
+    .contentZIndex1;
     width: 100%;
     position: absolute;
     height: 45px;
     top: 0px;
-    z-index: 800;
   }
   .img{
     width: 40px;
@@ -32,7 +33,6 @@
     top: 5px;
     right: 3px;
     cursor: pointer;
-    z-index: 888;
   }
   .emer-left{
     // width: 360px;

+ 9 - 21
src/components/EmergencyProcedure/EmergencyModal/index.less

@@ -1,12 +1,13 @@
 @import "~@less/mixin.less";
+@import "~@less/variables.less";
 
 .emergencyProdure {
+  .contentZIndex2;
   position: fixed;
   top: 50px;
   bottom: 10px;
   width: 450px;
   right: 10px;
-  z-index: 202;
   padding: 15px;
   background-color: #fff;
   .modalTop {
@@ -45,7 +46,6 @@
     left: 10px;
     padding: 10px;
     box-sizing: border-box;
-    z-index: 20;
     background-color: #fff;
     box-shadow: 0 10px 20px 0 #989DA3;
     border: 1px solid #dedede;
@@ -69,23 +69,11 @@
   .selectColor{
     color: #2A9BD5;
   }
-  .imageModalWrap {
-    position: fixed;
-    left: 0;
-    top: 0;
-    z-index: 300;
-    width: 100%;
-    height: 100%;
-    background-color: #000;
-    opacity: 0.6;
-    filter: alpha(opacity=60);
-    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
-  }
   .imageModal {
+    .maskContentZIndex1;
     position: fixed;
     background-color: #fff;
     overflow: hidden;
-    z-index: 500;
     width: 900px;
     padding-top: 30px;
     box-sizing: border-box;
@@ -107,11 +95,11 @@
     }
   }
   .dragImgWrap {
+    .contentZIndex1;
     width: 100%;
     height: 30px;
     line-height: 36px;
     text-indent: 1em;
-    z-index: 502;
     background-color: transparent;
     position: absolute;
     top: 0;
@@ -122,14 +110,13 @@
     position: absolute;
     top: 6px;
     right: 10px;
-    z-index: 800;
   }
 }
 .imageModalWrap {
+  .maskZIndex;
   position: fixed;
   left: 0;
   top: 0;
-  z-index: 300;
   width: 100%;
   height: 100%;
   background-color: #000;
@@ -137,11 +124,12 @@
   filter: alpha(opacity=60);
   -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }
+
 .imageModal {
+  .maskContentZIndex1;
   position: fixed;
   background-color: #fff;
   overflow: hidden;
-  z-index: 500;
   width: 900px;
   padding-top: 20px;
   box-sizing: border-box;
@@ -168,16 +156,16 @@
   height: 30px;
   line-height: 36px;
   text-indent: 1em;
-  z-index: 502;
+  .maskContentZIndex1;
   background-color: transparent;
   position: absolute;
   top: 0;
   left: 0;
 }
 img.img{
+  .maskContentZIndex2;
   cursor: pointer;
   position: absolute;
   top: 6px;
   right: 10px;
-  z-index: 800;
 }

+ 2 - 3
src/components/EmergencyProcedure/index.less

@@ -1,5 +1,7 @@
+@import "~@less/variables.less";
 .emergencyProdureWrap {
   .emergencyWrap {
+    .contentZIndex1;
     moz-user-select: -moz-none;
     -moz-user-select: none;
     -o-user-select: none;
@@ -8,7 +10,6 @@
     -ms-user-select: none;
     user-select: none;
     position: fixed;
-    z-index: 202;
     top: 55px;
     right: 20px;
     width: auto;
@@ -44,11 +45,9 @@
     line-height: 40px;
     position: absolute;
     left: 0;
-    z-index: 101;
     text-align: center;
     border-radius: 50%;
     color: #fff;
-    z-index: 100;
     background-color: #F93333;
   }
 }

+ 11 - 10
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -11,7 +11,7 @@ import { dragBox } from '@utils/drag';
 import $ from 'jquery';
 import { ConfirmModal } from '@commonComp';
 import {showHistory} from "@store/actions/historyTemplates";
-import { CONFIRM_TYPE } from "@store/types/typeConfig";
+import { SET_READ_MODE } from "@store/types/typeConfig";
 import {billing} from '@store/async-actions/pushMessage';
 import {getHistempDetail} from '@store/async-actions/historyTemplates';
 
@@ -59,17 +59,18 @@ class HistoryCaseContainer extends React.Component {
       })
     }
     makeSure(){
-        const {activeHis} = this.state
-        this.setState({visible:false})
-        store.dispatch(showHistory(false))
-        store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
-        store.dispatch(getHistempDetail(activeHis))
+        const {activeHis} = this.state;
+        this.setState({visible:false});
+        store.dispatch(showHistory(false));
+        //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
+        //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
+        store.dispatch(getHistempDetail(activeHis));
         if(didPushParamChange()){
-          store.dispatch(billing())
+          store.dispatch(billing());
         }
-        const {handleQuoteClick} = this.props
-        handleQuoteClick&&handleQuoteClick()
-        dragBox('hisWrapMove','closeHis','del')
+        const {handleQuoteClick} = this.props;
+        handleQuoteClick&&handleQuoteClick();
+        dragBox('hisWrapMove','closeHis','del');
     }
     close(){
       this.setState({

+ 5 - 4
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -1,5 +1,7 @@
 @import "~@less/mixin.less";
+@import "~@less/variables.less";
 .mainHistory {
+    .maskZIndex;
     position: fixed;
     margin-left: -500px;
     left: 50%;
@@ -8,14 +10,13 @@
     bottom: 7%;
     height: 86%;
     background-color: #fff;
-    z-index: 242;
     overflow: hidden;
     .close {
         position: absolute;
         top: 0;
         right: 0;
         cursor: pointer;
-        z-index: 9999;
+        .contentZIndex1
     }
     .mainHistoryLeft {
         width: 300px;
@@ -23,6 +24,7 @@
         background: #d2d1d1;
         position: relative;
         float: left;
+        padding-top: 80px;
         .title {
             height: 80px;
             line-height: 80px;
@@ -46,7 +48,6 @@
             }
         }
         .lists {
-            padding-top: 80px;
             box-sizing: border-box;
             overflow-y: auto;
             height: 100%;
@@ -113,7 +114,7 @@
       height: 40px;
       margin-left: 300px;
       position: absolute;
-      z-index: 9998;
+      .contentZIndex1;
       // border-bottom: 1px solid #EAEDF1;
     }
 }

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

@@ -3,7 +3,7 @@
      position: fixed;
     left: 0;
     top: 0;
-    z-index: 241;
+    z-index: 100;
     width: 100%;
     height: 100%;
     background-color: #000;

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

@@ -52,7 +52,7 @@ class InfoTitle extends Component {
     render() {
         const {disVisible,copyVisible,winWidth,loading} = this.props;
         const {le} = this.state;
-        return <div className={style['title-wrapper']} style={{zIndex:disVisible||copyVisible?40:204,left:le}}>
+        return <div className={style['title-wrapper']} >
             <PatInfoContainer sizeFlag={winWidth <= 1065?true:false}/>
             <div className={style["operations"]} onClick={this.showHistoryBox}>
                 <span><img src={historyCase} />&nbsp;历史病历</span>

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

@@ -1,5 +1,6 @@
 @import "~@less/variables.less";
 .title-wrapper{
+  .contentZIndex2;
   overflow: hidden;
   /*padding: 12px 20px 8px 20px;*/
   margin-bottom: 40px;
@@ -9,7 +10,6 @@
   left: 10px;
   top: 50px;
   right: 470px;
-  z-index: 204;
   min-width: 548px;
 }
 .operations, .health{

+ 22 - 9
src/components/Inspect/index.jsx

@@ -48,14 +48,15 @@ class Inspect extends React.Component {
       hide: false,
       importLis:false
     }
-    this.handleImportExcel = this.handleImportExcel.bind(this)
-    this.cancel = this.cancel.bind(this)
-    this.getWarings = this.getWarings.bind(this)
-    this.checkSystemIpt = this.checkSystemIpt.bind(this)
-    this.onClose = this.onClose.bind(this)
-    this.handleBindFileApi = this.handleBindFileApi.bind(this)
-    this.closeInIcss = this.closeInIcss.bind(this)
-    this.showSlideImport = this.showSlideImport.bind(this)
+    this.handleImportExcel = this.handleImportExcel.bind(this);
+    this.cancel = this.cancel.bind(this);
+    this.getWarings = this.getWarings.bind(this);
+    this.checkSystemIpt = this.checkSystemIpt.bind(this);
+    this.onClose = this.onClose.bind(this);
+    this.handleBindFileApi = this.handleBindFileApi.bind(this);
+    this.closeInIcss = this.closeInIcss.bind(this);
+    this.showSlideImport = this.showSlideImport.bind(this);
+    this.refreshScroller = this.refreshScroller.bind(this);
   }  
   componentDidMount() {
     $(document).click((event) => {
@@ -198,8 +199,15 @@ class Inspect extends React.Component {
       importLis:!flg
     })
   }
+  refreshScroller(){
+    //更新滚动条状态,解决容器变大滚动条不更新bug
+    return this.context.scrollArea;
+    /*this.context.scrollArea.refresh();
+    this.context.scrollArea.scrollBottom();*/
+
+  }
   render() {
-    const { fetchPushInfos, getInfomation, hospitalMsg, inspectVal, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const { fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -251,11 +259,13 @@ class Inspect extends React.Component {
           title={'化验'}
           editable={false}
           border={true}
+          style={{marginRight:'0'}}
           marginTop={'20px'}
         >
           <div style={{ padding: '10px', boxSizing: 'border-box' }} >
             <AddInspect
               handleSign={handleSign}
+              refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}
               handlePush={fetchPushInfos}
@@ -300,4 +310,7 @@ class Inspect extends React.Component {
   }
 }
 
+Inspect.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default Inspect;

+ 6 - 4
src/components/Inspect/index.less

@@ -1,7 +1,9 @@
 @import "~@less/mixin.less";
 
+.wrapper{
+  margin-right: 470px;
+}
 .top {
-    margin-left: 60px;
     position: relative;
     margin: 20px 20px -21px 20px;
     span {
@@ -14,7 +16,7 @@
         line-height: 30px;
         text-align: center;
         position: relative;
-        z-index: 8;
+        z-index: 10;
     }
     .button {
         float: right;
@@ -23,7 +25,7 @@
         // overflow: hidden;
         margin-top: -3px;
         position: relative;
-        z-index: 15;
+        z-index: 10;
     }
     .disabledBtn{
         float: right;
@@ -87,7 +89,7 @@
   width: 120%;
   top: 29px;
   left: 0;
-  z-index: 99;
+  z-index: 10;
   font-size: 12px;
   box-shadow: 0 10px 20px 0 #989DA3;
   border: 1px solid #dedede;

+ 22 - 30
src/components/MainSuit/index.jsx

@@ -6,7 +6,6 @@ import CommonSymptom from '@components/CommonSymptom';
 import chooseType from '@containers/eleType.js';
 import config from "@config/index";
 import {isIE,getPageCoordinate,windowEventHandler,filterDataArr,getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js";
-import $ from 'jquery';
 import store from '@store';
 import {getFeature} from '@store/async-actions/fetchModules';
 
@@ -22,8 +21,6 @@ class MainSuit extends Component{
       inpText:'',
       clearTimer:null,
       overFlag:false,
-      tmpScroll:0,
-      tmpTop:0,
     };
     this.toggleEditable = this.toggleEditable.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
@@ -33,9 +30,6 @@ class MainSuit extends Component{
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
   }
-  componentWillReceiveProps(nextProps){
-    this.setState({boxLeft:nextProps.boxLeft})
-  }
   toggleEditable(){
     this.setState({
       boxEditable:!this.state.boxEditable
@@ -134,28 +128,17 @@ class MainSuit extends Component{
   }
 
 
-  handleClick(e){//让搜索框跟随鼠标点击移动
+  handleClick(e){
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
-    //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    const {getSearchLocation} = this.props;
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    let num = this.props.datas.length == 0?0:60
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      leftL = ele.offsetLeft+num
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
   }
 
   handleChange(e){
@@ -262,16 +245,22 @@ class MainSuit extends Component{
         clearTimeout(clearTimer);
       },config.delayTime-200); 
   }
-
-
+  /*componentWillReceiveProps(nextProps){   //主诉高度变化不会出现滚动内容看不见的情况,因为已经是最顶部,所以可以不必更新滚动条
+      const contHeightDiff =  nextProps.data&&this.props.data&&nextProps.data.length!==this.props.data.length;
+      const dataDiff = !!nextProps.data!==!!this.props.data;
+      if(contHeightDiff||dataDiff){
+        this.context.scrollArea.refresh();
+      }
+  }*/
   render(){
-    const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop} = this.props;
-    const {symptom} = this.state;
+    const {readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide} = this.props;
+    const {symptom,boxLeft,boxTop} = this.state;
     const symptomFlag = CommonSymptoms.length>0 ? true : false;
     const searchFlag = searchData.length>0 ? true : false;
     const boxTop1 = datas.length>0?boxTop:45;
     const boxLeft1 = datas.length>0?boxLeft:85;
-    if(+type===1){      //文本模式
+    const mode = readMode===-1?type:readMode;
+    if(+mode===1){      //文本模式
       return <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
     }
     return  <div className={style['main-suit']}>
@@ -294,4 +283,7 @@ class MainSuit extends Component{
   }
 }
 
+/*MainSuit.contextTypes = {
+  scrollArea: React.PropTypes.object
+};*/
 export default MainSuit;

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

@@ -84,8 +84,6 @@ class MultSpread extends Component{
           const list = it.questionDetailList&&it.questionDetailList.length>0?it.questionDetailList:it.questionMapping;
           return <RadioDrop data={list}
                             boxMark={boxMark}
-                            prefix={it.labelPrefix}
-                            suffix={it.labelSuffix}
                             placeholder={it.name}
                             show={show}
                             value = {it.value}
@@ -104,8 +102,6 @@ class MultSpread extends Component{
                            show={showArr&&showArr[inx]}
                            order={it.textGenerate}
                            type={boxMark}
-                           textPrefix={it.labelPrefix}
-                           textSuffix={it.labelSuffix}
                            id={it.id}
                            hideTag={true}></Multiple>;
         case +it.controlType===5://带单位数字键盘

+ 3 - 9
src/components/Multiple/SlideItem/index.jsx

@@ -2,14 +2,12 @@ import react from "react";
 import style from "./index.less";
 import classNames from 'classnames';
 import {deepClone} from '@utils/tools.js';
-import ReactDom from "react-dom";
 /**
   单列多选组件下拉 2019-2-20 By_liucf
   接收参数:
   show:是否展示下拉
   data:下拉数据
   handleConfirm: 确定事件
-  left、top: 下拉框的位置,
   seleData、seleId:选中的数据和id,回读标识选中状态用
 **/
 
@@ -66,10 +64,8 @@ class SlideItem extends react.Component{
   }
 
   getStyle(){
-    const {left,top,show} = this.props;
+    const {show} = this.props;
     return {
-      left:left?left+'px':'0',
-      top:top?top+'px':'0',
       display:show?'table':'none' 
     }
   }
@@ -81,9 +77,7 @@ class SlideItem extends react.Component{
   }
   render(){
     const {data} = this.props;
-    const domNode = document.getElementById('root');
-    return ReactDom.createPortal(
-      <div className={this.getListClass()} style={this.getStyle()} contentEditable="false">
+    return <div className={this.getListClass()} style={this.getStyle()} contentEditable="false">
         <ul>
           {data&&data.map((it)=>{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getSeleStyle(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
@@ -91,7 +85,7 @@ class SlideItem extends react.Component{
           <li onClick={this.handleClear} className={style['mClear']}>清空选项</li>
           <li onClick={this.handleClick} className={style['mConfirm']}>确定</li>
         </ul>
-      </div>,domNode)
+      </div>
   }
 }
 

+ 4 - 26
src/components/Multiple/index.jsx

@@ -2,7 +2,7 @@ import react from "react";
 import style from "./index.less";
 import $ from 'jquery';
 import classNames from 'classnames';
-import {handleEnter,isIE,filterArr,deepClone,filterDataArr,getPageCoordinate} from '@utils/tools.js';
+import {handleEnter,isIE,filterArr,deepClone,filterDataArr} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import SlideItem from "./SlideItem";
 import config from '@config/index.js';
@@ -27,10 +27,6 @@ class Multiple extends react.Component{
       labelVal:"",
       seleData:seleData||"",
       seleId:seleId||[],
-      boxLeft:null,
-      boxTop:null,
-      tmpScroll:null,
-      tmpTop:null
     }
     this.$div = React.createRef();
     this.handleShow = this.handleShow.bind(this);
@@ -62,29 +58,13 @@ class Multiple extends react.Component{
 
   handleShow(e){//单击
     e&&e.stopPropagation();
-    let boxLeft = e.pageX -133 + 'px';
-    let offsetTop = e.target.offsetTop;
-    const ht = e.target.offsetHeight;   //如杂音选中文字有多行时,写死会遮挡
-    let boxTop = offsetTop + ht +2 + 'px';
-    this.setState({
-      boxLeft:getPageCoordinate(e).boxLeft,
-      boxTop:getPageCoordinate(e).boxTop,
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
-    })
-    $("#addScrollEvent").scroll(()=>{
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      this.setState({
-        boxTop:this.state.tmpTop - scrollYs + this.state.tmpScroll
-      })
-    })
      this.setStateInit();
     const {ikey,handleShow,placeholder,flag,id,value,tagType,type} = this.props;
     const that = this;
     clearTimeout(this.state.timer);
     this.state.timer = setTimeout(function(){
       if (that.state.editable) {//如果处于编辑状态点击不显示下拉框
-        return
+        return;
       }else{
         handleShow&&handleShow({ikey,placeholder,flag,id,value,tagType,type});
       }
@@ -174,7 +154,7 @@ class Multiple extends react.Component{
   }
   render(){
     const {placeholder,value,show,data,hideTag} = this.props;
-    const {editable,boxTop,boxLeft,seleData,seleId} = this.state;
+    const {editable,seleData,seleId} = this.state;
     return <div className={style["container"]}>
       <div className={this.getClass()}
       ref={this.$div}
@@ -186,9 +166,7 @@ class Multiple extends react.Component{
       contentEditable={editable}>{value||placeholder}</div>
       <div className={this.getListClass()} contentEditable="false">
         <SlideItem 
-          show={show} 
-          left={boxLeft} 
-          top={boxTop} 
+          show={show}
           data={data} 
           seleData={seleData} 
           seleId={seleId} 

+ 5 - 24
src/components/NumberDrop/index.jsx

@@ -2,8 +2,6 @@ import React,{Component} from 'react';
 import className from 'classnames';
 import {NumberPan,Notify} from '@commonComp';
 import style from './index.less';
-import $ from "jquery";
-import {getPageCoordinate} from '@utils/tools.js';
 /***
  * author:zn@2018-11-19
  * 接收参数:
@@ -23,10 +21,6 @@ class NumberDrop extends Component{
       sltTimer:null,
       blurTimer:null,
       hasSelect:false,       //是否点过下拉键盘
-      boxLeft:0,
-      boxTop:0,
-      tmpTop:0,
-      tmpScroll:0,
       placeholder:props.placeholder
     };
     this.$span = React.createRef();
@@ -98,6 +92,7 @@ class NumberDrop extends Component{
     }
   }
   handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
+    e.stopPropagation();
     const {show,handleShow,ikey,id,patId,handleHide,value} = this.props;
     if(show) {
       handleHide && handleHide();
@@ -108,20 +103,7 @@ class NumberDrop extends Component{
         hasSelect:false
       });
       handleShow&&handleShow({ikey,id:patId||id});
-      this.setState({
-        boxLeft:getPageCoordinate(e).boxLeft,
-        boxTop:getPageCoordinate(e).boxTop,
-        tmpScroll: $("#addScrollEvent")[0].scrollTop,
-        tmpTop:getPageCoordinate(e).boxTop
-      });
-      $("#addScrollEvent").scroll(()=>{
-        let scrollYs = $("#addScrollEvent")[0].scrollTop;
-        this.setState({
-          boxTop:this.state.tmpTop - scrollYs + this.state.tmpScroll
-        })
-      })
     }
-    e.stopPropagation();
   }
   validSymbols(txt,min,max){
     //输入只有一个~或/时判断两边是否为合理数字,有多个为不合理
@@ -215,8 +197,9 @@ class NumberDrop extends Component{
   }
   render(){
     const {prefix,suffix,show,value,handleHide,allClick} = this.props;
-    const {placeholder,hasSelect,boxTop,boxLeft} = this.state;
+    const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses()}
+                style={{position:'relative'}}
                 onClick={allClick?this.handleNumClick:null}>
       <span>{prefix}</span>
       <span onFocus={this.handleNumFocus}
@@ -224,7 +207,7 @@ class NumberDrop extends Component{
             contentEditable={true}
             style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
-            onKeyDown={this.handleKeyDowm}
+            onKeyUp={this.handleKeyDowm}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
             className={this.getSpanClass()}
@@ -233,9 +216,7 @@ class NumberDrop extends Component{
       <NumberPan handleSelect={this.select.bind(this)}
                  onClose={handleHide}
                  show={show}
-                 toClear={!hasSelect}
-                 left={boxLeft}
-                 top={boxTop}/>
+                 toClear={!hasSelect}/>
     </div>
   }
 }

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

@@ -3,7 +3,7 @@ import className from 'classnames';
 import {NumberUnitPan} from '@commonComp';
 import style from './index.less';
 import config from '@config/index.js';
-import {filterArr,handleEnter,isIE,getPageCoordinate,filterDataArr} from '@utils/tools.js';
+import {filterArr,handleEnter,isIE,filterDataArr} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import $ from 'jquery';
 /***
@@ -27,10 +27,6 @@ class NumberUnitDrop extends Component{
       value:props.value,
       // placeholderFlag:false,
       labelVal:'',
-      boxLeft:0,
-      boxTop:0,
-      tmpTop:0,
-      tmpScroll:0
     };
     this.$span = React.createRef();
     this.$pre = React.createRef();
@@ -68,17 +64,7 @@ class NumberUnitDrop extends Component{
     },300);
     this.setState({
       timer,
-      boxLeft:getPageCoordinate(e).boxLeft,
-      boxTop:getPageCoordinate(e).boxTop,
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
     });
-    $("#addScrollEvent").scroll(()=>{
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      this.setState({
-        boxTop:this.state.tmpTop - scrollYs + this.state.tmpScroll
-      })
-    })
     handleHide&&handleHide();
   }
 
@@ -99,7 +85,7 @@ class NumberUnitDrop extends Component{
 
   render(){
     const {placeholder,prefix,suffix,show,value,handleHide,hideTag} = this.props;
-    const {editable,hasSelect,boxLeft,boxTop} = this.state;
+    const {editable,hasSelect} = this.state;
     return <div className={this.getClasses()}
                 ref={this.$cont}
                 onClick={this.handleNumClick}>
@@ -110,8 +96,6 @@ class NumberUnitDrop extends Component{
       <span ref = {this.$suf}>{suffix?' '+suffix:suffix}</span>
       <NumberUnitPan handleSelect={(obj)=>this.select(obj)}
                  onClose={handleHide}
-                 top={boxTop}
-                 left={boxLeft}
                  show={show} toClear={!hasSelect} value={value}/>
     </div>
   }

+ 7 - 2
src/components/Operation/index.jsx

@@ -278,11 +278,13 @@ class Operation extends Component {
       this.setState({ title: '' })
       save();
     } else if (type == 2) {
-      diagShowTmp(false)
+      diagShowTmp(false);
       this.setState({ title: '' })
       // 慢病标识
       const chronicFlag = chronicMagItem || chronicDesease?true:false;
       clear(chronicFlag);
+      //更新滚动条
+      this.context.scrollArea.refresh();
     } else if (type == 3) {
       if (this.state.title.trim() == '') {
         Notify.error('请输入模板名称')
@@ -326,7 +328,7 @@ class Operation extends Component {
     const { visible, preVisible,diagShow } = this.props.print;
     const {winWidth,cancelDelTag} = this.props;
     const {zIndex,type,le} = this.state;
-    return <div className={style['container']} style={{zIndex:zIndex,left:le}}>
+    return <div className={style['container']} style={{left:le}}>
       <span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
       <span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
       <span className={style['preButton']} onClick={() => { this.saveHis(3) }}><img src={saveHistory} /> 保存病历模板</span>
@@ -354,4 +356,7 @@ class Operation extends Component {
   }
 }
 
+Operation.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default Operation;

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

@@ -1,5 +1,6 @@
 @import "~@less/variables.less";
 .container {
+    .contentZIndex2;
     padding-left: 80px;
     padding-top: 10px;
     position: fixed;
@@ -51,10 +52,8 @@
         outline: none;
         border-radius: 4px;
         cursor: pointer;
-        color: #000;
         border: 1px solid #3B9ED0;
         box-sizing: border-box;
-        background: #fff;
         margin-left:20px;
         background: #3B9ED0;
         color: #fff;

+ 19 - 35
src/components/OtherHistory/index.jsx

@@ -12,18 +12,13 @@ class OtherHistory extends Component{
       boxMark:'3',
       editable:true,
       boxLeft:0,
-      boxTop:0,
-      tmpScroll:0,
-      tmpTop:0
+      boxTop:0
     };
     this.handleClick = this.handleClick.bind(this);
     this.handleSearchSelect = this.handleSearchSelect.bind(this);
     this.getData = this.getData.bind(this);
   }
-  
-  componentWillReceiveProps(nextProps){
-    this.setState({boxLeft:nextProps.boxLeft})
-  }
+
   handleSearchSelect(obj){
     const {questionId,name} = obj;
     const {fetchModules,focusTextIndex,span,searchInEnd} = this.props;
@@ -42,41 +37,30 @@ class OtherHistory extends Component{
     const {hasMain,type,setInitData,isEmpty} = this.props;
     //无主诉提示在EditableSpan里
     //智能模式有主诉或者文本模式获取最近历史
-    if((+type===0&&hasMain&&isEmpty!=false)||(+type===1&&isEmpty!=false)){
+    if(hasMain&&isEmpty!=false){
       setInitData();
     }
   }
-  handleClick(e){//让搜索框跟随鼠标点击移动
+  handleClick(e){
     //e.stopPropagation();
-    const {getSearchLocation} = this.props;
-    //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
-    this.getData();
-    let leftL=0;      //用焦点元素的左边距替换鼠标点击的左边距,高度还是鼠标点击的位置
-    if(isIE()){
-      leftL = getPageCoordinate(e).boxLeft
-    }else{
-      const ele = document.activeElement;
-      if(ele.toString().indexOf('HTMLSpanElement') != -1){     //点击的不是span无法聚焦就不再设置位置
-        leftL = ele.offsetLeft+90
-      }
-    }
-    getSearchLocation(getPageCoordinate(e).boxTop,leftL)
+    //搜索框位置
+    const ele = document.activeElement;
+    const height = ele.offsetHeight;
+    let boxTop = (+(ele.offsetTop)+height);
+    let boxLeft = ele.offsetLeft;
     this.setState({
-      // boxLeft:getPageCoordinate(e).boxLeft,
-      // boxLeft:leftL,
-      // boxTop:getPageCoordinate(e).boxTop,
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
+      boxLeft:boxLeft,
+      boxTop:boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      let boxTop = this.state.tmpTop - scrollYs + this.state.tmpScroll
-      getSearchLocation(boxTop,this.state.boxLeft)
-    },$("#addScrollEvent")[0])
+    //若使用e.target,因为是onClick事件中,值可能是itembox的而不是span因此会有bug
+    this.getData();
   }
   render(){
-    const {hasMain,searchData,totalHide,isRead,type,fetchPushInfos,handleInput,saveText,boxTop,boxLeft} = this.props;
-    if(+type===1){      //文本模式
+    const {readMode,hasMain,totalHide,searchData,isRead,type,fetchPushInfos,handleInput,saveText} = this.props;
+    const {boxLeft,boxTop} = this.state;
+    const mode = readMode===-1?type:readMode;
+    //智能模式有数据时不切换文本,文本模式有数据时不切换智能
+    if(+mode===1){      //文本模式
       return <Textarea title='其他史' boxMark='3'
                        isRead={isRead}
                        value={saveText[0]}
@@ -88,7 +72,7 @@ class OtherHistory extends Component{
     return  <div>
       <ItemBox title='其他史' isRead={isRead} handleClick={this.handleClick}>
         {this.getLabels()}
-        {searchData && searchData.length>0?<SearchDrop data={searchData} show={!totalHide} left={boxLeft} top={boxTop} onSelect={this.handleSearchSelect}></SearchDrop>:''}
+        {searchData && searchData.length>0?<SearchDrop data={searchData} show={true} top={boxTop} left={boxLeft} onSelect={this.handleSearchSelect}></SearchDrop>:''}
       </ItemBox>
     </div>
   }

+ 17 - 13
src/components/Preview/index.jsx

@@ -1,6 +1,7 @@
 import React, { Component } from "react";
 import {getAllDataList,getAllDataStringList} from '@utils/tools';
 import {dragBox} from '@utils/drag';
+import ReactDom from 'react-dom';
 import PreviewBody from '../PreviewBody';
 import store from '@store';
 import style from "./index.less";
@@ -18,20 +19,23 @@ class Preview extends Component {
     let baseList = store.getState();
     const dataJson = getAllDataList(baseList);
     const dataStr = getAllDataStringList(baseList);
-    return <div className={style['container']}>
-      <div className={style['shade']} onClick={onClose}></div>
-      <div className={style['modal']} id="previewWrapper">
-        <div id="previewStatic" className={`${style['close']} drag-title`}>预览</div>
-        <img src={close} onClick={onClose} />
-        <PreviewBody
-            preInfo={preInfo}
-            dataJson={dataJson}
-            dataStr={dataStr}
-            show={false}
-            come={'preview'}
-        ></PreviewBody>
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<React.Fragment>
+      <div className={style['container']}>
+        <div className={style['shade']} onClick={onClose}></div>
+        <div className={style['modal']} id="previewWrapper">
+          <div id="previewStatic" className={`${style['close']} drag-title`}>预览</div>
+          <img src={close} onClick={onClose} />
+          <PreviewBody
+              preInfo={preInfo}
+              dataJson={dataJson}
+              dataStr={dataStr}
+              show={false}
+              come={'preview'}
+          ></PreviewBody>
+        </div>
       </div>
-    </div>
+      </React.Fragment>,domNode)
   }
 }
 

+ 2 - 1
src/components/Preview/index.less

@@ -1,6 +1,7 @@
+@import "~@less/variables.less";
 .container {
+  .maskZIndex;
   position: relative;
-  z-index: 2000;
   .shade {
     position: fixed;
     left: 0;

+ 19 - 16
src/components/PrintPreview/index.jsx

@@ -1,4 +1,5 @@
 import React, { Component } from "react";
+import ReactDom from 'react-dom';
 import { getAllDataList, getAllDataStringList } from '@utils/tools';
 import { dragBox } from '@utils/drag';
 import style from "./index.less";
@@ -20,23 +21,25 @@ class PrintPreview extends Component {
         let baseList = store.getState();
         const dataJson = getAllDataList(baseList);
         const dataStr = getAllDataStringList(baseList);
-
-        return <div className={style['container']}>
-            <div className={style['shade']} onClick={onClose}></div>
-            <div className={style['modal']} id="previewPrintWrapper">
-                <div id="previewPrintStatic" className={`${style['close']} drag-title`}>打印</div>
-                <img src={close} onClick={onClose} />
-                  <PreviewBody
-                      preInfo={preInfo}
-                      dataJson={dataJson}
-                      dataStr={dataStr}
-                      show={true}
-                      onClose={onClose}
-                      save={save}
-                      come={'preview'}
-                  ></PreviewBody>
+        const domNode = document.getElementById('root');
+        return ReactDom.createPortal(<React.Fragment>
+            <div className={style['container']}>
+                <div className={style['shade']} onClick={onClose}></div>
+                <div className={style['modal']} id="previewPrintWrapper">
+                    <div id="previewPrintStatic" className={`${style['close']} drag-title`}>打印</div>
+                    <img src={close} onClick={onClose} />
+                    <PreviewBody
+                        preInfo={preInfo}
+                        dataJson={dataJson}
+                        dataStr={dataStr}
+                        show={true}
+                        onClose={onClose}
+                        save={save}
+                        come={'preview'}
+                    ></PreviewBody>
+                </div>
             </div>
-        </div>
+        </React.Fragment>,domNode)
     }
 }
 

+ 2 - 1
src/components/PrintPreview/index.less

@@ -1,6 +1,7 @@
+@import "~@less/variables.less";
 .container {
+    .maskZIndex;
     position: relative;
-    z-index: 2000;
     .shade {
       position: fixed;
       left: 0;

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

@@ -65,7 +65,7 @@ class PushContainer extends Component {
    */
   handleActiveClick(id) {
     if (id == '1') {
-      store.dispatch(initItemList("",1));
+      store.dispatch(initItemList(1));
     }
     store.dispatch(tabChange(id))
   }
@@ -206,7 +206,7 @@ class PushContainer extends Component {
   }
   handleClickGetMore(page){
     let tmpPage = ++page
-    store.dispatch(initItemList("",tmpPage,true))
+    store.dispatch(initItemList(tmpPage,true))
   }
   
   makeSure() {
@@ -229,7 +229,7 @@ class PushContainer extends Component {
       store.dispatch(changeTitleAsync(tempObj))
     } else if (this.state.type == 4) {        //模板引入
       const { items } = this.props;
-      store.dispatch(setPageView(this.state.id,items[0].type))
+      store.dispatch(setPageView(this.state.id))
       items && items.map((part) => {
         if (this.state.id == part.id) {
           let typeConfig = part.type;

+ 3 - 2
src/components/PushContainer/index.less

@@ -2,16 +2,17 @@
 
 .container{
   background: #fff;
-  width: @push-width;
+  width: 460px;/*@push-width;*/
   float: right;
   padding-top: 20px;
-  z-index: 200;
+  // z-index: 200;
   position: relative;
   // position: fixed;     
   // top: 50px;
   // bottom: 10px;
   // right: 10px;
   padding-bottom:50px;
+  border-left: 10px #e4e6e7 solid;
 }
 .title{
   color:#666;

+ 3 - 1
src/components/PushItems/DetailsModal/index.less

@@ -1,10 +1,12 @@
+@import "~@less/variables.less";
 .details-wrapper {
+    .maskZIndex;
     position: fixed;
     width: 100%;
     height: 100%;
     left: 0;
     top: 0;
-    z-index: 205;
+  
     img {
         max-width: 100%;
     }

+ 0 - 308
src/components/PushItems/index.less

@@ -66,33 +66,6 @@
       }
     }
   }
-  .show {
-    float: right;
-    color:  #58ACD7;;
-    font-size: 14px;
-    cursor: pointer;
-    img {
-      width: 12px;
-      height: 12px;
-    }
-  }
-  .close{
-    float: right;
-    text-align: right;
-    color: #58ACD7;
-    font-size: 14px;
-    cursor: pointer;
-    clear: both;
-    img {
-      width: 12px;
-      height: 12px;
-    }
-    .close-modal {
-      width: 40px;
-      height: 40px;
-      margin-right: -10px;
-    }
-  }
   .recommend {
     border:1px solid #EAEDF1;
     margin-bottom: 15px;
@@ -126,230 +99,6 @@
       padding:6px 0px 6px 15px;
     }
   }
-  .tips{
-    border:1px solid #EAEDF1;
-    .tips-title,h1{
-      font-size: 14px;
-      color: #000;
-      padding: 8px 15px;
-      background: #EAF7FA;
-      font-weight: bold;
-      img {
-        float:left;
-        margin-top: 0px;
-        margin-right: 5px;
-      }
-    }
-    .tips-title{
-      .tips-name{
-        width: 255px;
-        display: inline-block;
-      }
-      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: #3B9ED0;
-        color: #262626;
-        line-height: 18px;
-        margin: 0 0 -2px 10px;
-      }
-    }
-    .chronic{
-      background: rgba(242,150,91,0.1);
-    }
-    .content{
-      font-size: 14px;
-      padding:6px 15px;
-      .title {
-        font-size: 14px;
-        line-height: 18px;
-        margin-bottom:10px;
-        a{
-          .btnCom;
-          display: inline-block;
-          font-size: 14px;
-          color: #3B9ED0;
-          width: 42px;
-          border: 1px solid #3B9ED0;
-          margin-left: 10px;
-          text-decoration: none;
-        }
-        .tips-details {
-          .btnCom;
-          display: inline-block;
-          width: 42px;
-          height: 20px;
-          border: 1px solid #3B9ED0;
-          font-size: 14px;
-          color: #3B9ED0;
-          line-height: 18px;
-          margin: 0 10px -2px;
-        }
-      }
-      .warn{
-        padding: 10px 0px 0px 0px;
-        font-size: 10px;
-        color: #979797;
-        text-align: center;
-      }
-      .list{
-        border-bottom: 1px solid #EAEDF1;
-        padding-bottom: 10px;
-        position: relative;
-        .infoPic{
-          vertical-align: middle;
-          margin: 0 5px;
-        }
-        >p{
-          margin-top: 10px;
-        }
-        .listName{
-          color:#3B9ED0;
-        }
-        .listResult{
-          float: right;
-          color: #000012;
-          i{
-            color: #F98F24;
-          }
-          img{
-            vertical-align: middle;
-          }
-        }
-      }
-      
-      .list:last-child{
-        border-bottom:none;
-      }
-    }
-  }
-  .modal {
-    .shade {
-      position: fixed;
-      left: 0;
-      top:0;
-      right: 0;
-      bottom: 0;
-      background: #000;
-      opacity: 0.3;
-      filter:alpha(opacity=30);
-      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
-      z-index: 3000;
-    }
-    .content {
-      position: fixed;
-      left: 50%;
-      top: 50%;
-      margin: -150px 0px 0px -95px;
-      width: 300px;
-      height: 190px;
-      border-radius: 5px;
-      background: #fff;
-      z-index: 3001;
-      padding: 0px 10px;
-      .close {
-        height: 50px;
-        img{
-          float: right;
-          cursor: pointer;
-        }
-      }
-      
-      .message {
-        height: 70px;
-        padding:10px 30px;
-        text-align: center;
-        font-size: 16px;
-      }
-      .btn {
-        .initial {
-          width: 90px;
-          height: 30px;
-          border: 1px solid #3B9ED0;
-          float: left;
-          border-radius: 4px;
-          text-align: center;
-          line-height: 30px;
-          color: #3B9ED0;
-          font-size: 14px;
-          cursor: pointer;
-          margin-left: 20px;
-        }
-        .repetition {
-          width: 90px;
-          height: 30px;
-          border: 1px solid #3B9ED0;
-          float: right;
-          border-radius: 4px;
-          text-align: center;
-          line-height: 30px;
-          color: #3B9ED0;
-          font-size: 14px;
-          cursor: pointer;
-          margin-right: 20px;
-        }
-      }
-    }
-  }
-  .tipsModal {
-    .shade {
-      position: fixed;
-      left: 0;
-      top:0;
-      right:0;
-      bottom: 0;
-      background: #000;
-      opacity: 0.6;
-      filter:alpha(opacity=60);
-      -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
-      z-index: 2000;
-    }
-    .message{
-      padding: 10px 20px;
-      overflow: auto;
-    }
-    .content {
-      position: fixed;
-      left: 50%;
-      top:65px;
-      right:0;
-      bottom: 65px;
-      margin-left: -410px;
-      width: 820px;
-      z-index: 2001;
-      background: #fff;
-      padding: 0px;
-      .close {
-        padding: 10px 20px;
-        border-bottom: 1px solid #EAEDF1;
-        img{
-          float: right;
-          margin: -5px -14px 0px 0px;
-          cursor: pointer;
-        }
-      }
-    }
-  }
 }
 .diag-item {
   display: inline-block;
@@ -366,60 +115,3 @@
   text-align: center;
 }
 
-.toast-title{
-  position: absolute;
-  top: 17px;
-  font-size: 16px;
-  // border-bottom: 1px solid #666;
-  width: 87%;
-  height: 25px;
-}
-.toast-cont{
-  line-height: 24px;
-  font-size: 14px;
-  // margin-top: 15px;
-  height: 222px;
-  overflow-y: auto;
-  padding: 10px 0 0 10px;
-  li{
-    margin-top: 10px;
-    cursor: pointer;
-  }
-}
-.footer{
-  .print{
-    .btnCom;
-    width: 111px;
-    height: 34px;
-    line-height: 34px;
-    // outline: none;
-    // border-radius: 4px;
-    /*color: #3B9ED0;*/
-    border: 0 none;
-    // cursor: pointer;
-    background: #fff;
-    margin-right: 20px;
-    img{
-      width: 20px;
-      vertical-align: middle;
-      margin-right: 4px;
-    }
-  }
-  .okBtn{
-    .btnCom;
-    width: 80px;
-    height: 34px;
-    line-height: 32px;
-    // text-align: center;
-    // outline: none;
-    // border-radius: 4px;
-    // cursor: pointer;
-    border: 1px solid #3B9ED0;
-    box-sizing: border-box;
-    margin-left: 20px;
-    background: #3B9ED0;
-    color: #fff;
-    float: right;
-    margin-right: 20px;
-  }
-}

+ 4 - 21
src/components/RadioDrop/index.jsx

@@ -1,5 +1,5 @@
 import React,{Component} from 'react';
-import {handleEnter,getPageCoordinate,windowEventHandler} from '@utils/tools.js';
+import {handleEnter,windowEventHandler} from '@utils/tools.js';
 import {DropList} from '@commonComp';
 import classNames from 'classnames';
 import style from "./index.less";
@@ -24,10 +24,6 @@ class RadioDrop extends Component{
     this.state={
       editable:false,
       timer:null,
-      boxLeft:0,
-      boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
     };
     this.$cont = React.createRef();
     this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
@@ -88,17 +84,7 @@ class RadioDrop extends Component{
     
     this.setState({
       timer,
-      boxLeft:getPageCoordinate(e).boxLeft,
-      boxTop:getPageCoordinate(e).boxTop,
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      this.setState({
-        boxTop:this.state.tmpTop - scrollYs + this.state.tmpScroll
-      })
-    },$("#addScrollEvent")[0])
   }
   componentDidMount(){    //默认值选中
     const {data,ikey,handleSelect,hideTag,mainSaveText,value,boxMark} = this.props;
@@ -145,21 +131,18 @@ class RadioDrop extends Component{
     handleDbclick&&handleDbclick({id:patId||id});
   }
   render(){
-    const {data,prefix,suffix,placeholder,show,value,hideTag,boxMark} = this.props;
-    const {boxLeft,boxTop} = this.state;
+    const {data,placeholder,show,value,hideTag,boxMark} = this.props;
     return <div className={style['container']} ref = {this.$cont}>
-      {prefix}
       <div className={this.getClass()}
            onBlur={this.handleEditLabel}
            contentEditable={this.state.editable}
            onDoubleClick={hideTag?null:this.handledbClick}
            onFocus={(e)=>{e.stopPropagation()}}
            onClick={(e)=>this.handleShow(e,true)}
-           onkeydown={handleEnter}>
+           onKeyDown={handleEnter}>
         {value||placeholder}
       </div>
-      {suffix}
-      <DropList onSelect={this.handleSelect} boxMark={boxMark} data={data} left={boxLeft} top={boxTop} show={show} hideTag={hideTag}/>
+      <DropList onSelect={this.handleSelect} boxMark={boxMark} data={data} show={show} hideTag={hideTag}/>
     </div>
   }
 }

+ 2 - 23
src/components/RadioInpDrop/index.jsx

@@ -1,5 +1,5 @@
 import React,{Component} from 'react';
-import {handleEnter,getPageCoordinate,windowEventHandler,filterDataArr,getLabelIndex} from '@utils/tools.js';
+import {handleEnter,windowEventHandler,filterDataArr,getLabelIndex} from '@utils/tools.js';
 import {DropList,Notify} from '@commonComp';
 import config from '@config/index';
 import style from "./index.less";
@@ -22,10 +22,6 @@ class RadioInpDrop extends Component{
     this.state={
       editable:false,
       timer:null,
-      boxLeft:0,
-      boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
       texts:props.vals||{0:props.value||props.placeholder},
       over:false
     };
@@ -92,10 +88,6 @@ class RadioInpDrop extends Component{
     
     this.setState({
       timer,
-      boxLeft:getPageCoordinate(e).boxLeft,
-      boxTop:getPageCoordinate(e).boxTop,
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
     });
     windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
       let scrollYs = $("#addScrollEvent")[0].scrollTop;
@@ -190,23 +182,10 @@ class RadioInpDrop extends Component{
         list.push(<span>&nbsp;{temp}</span>);
       }
     }
-    /*if(value&&value.indexOf(config.radioOptionPer)!=-1){
-      let arr = [],inpIndex='';
-      let list = value.split(config.radioOptionPer);
-      list.map((it,i)=>{
-        arr.push(<InputComp value={it}></InputComp>);
-        inpIndex = (i+1)*2-1;
-        if(i!=list.length-1){
-          arr.push(<InputComp handleInp={this.handleInnerInp} editable={true} index={inpIndex}></InputComp>);
-        }
-      });
-      return arr;
-    }*/
     return list;
   }
   render(){
     const {data,show,vals,placeholder,hideTag} = this.props;
-    const {boxLeft,boxTop} = this.state;
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
            onBlur={this.handleEditLabel}
@@ -216,7 +195,7 @@ class RadioInpDrop extends Component{
            onKeyDown={handleEnter}>
         {vals?this.parseInputDom():<span>{placeholder}</span>}
       </div>
-      <DropList onSelect={this.handleSelect} data={data} left={boxLeft} top={boxTop} show={show}/>
+      <DropList onSelect={this.handleSelect} data={data} show={show}/>
     </div>
   }
 }

+ 3 - 9
src/components/SearchDrop/index.jsx

@@ -1,6 +1,5 @@
 import React,{Component} from 'react';
 import classNames from 'classnames';
-import ReactDom from "react-dom";
 
 import style from "./index.less";
 /****
@@ -40,7 +39,6 @@ class SearchDrop extends Component{
     }
     return classNames(style['list'],name,isHide);
   }
-
   getStyle(){
     const {left,top} = this.props;
     return {
@@ -48,7 +46,6 @@ class SearchDrop extends Component{
       top:top?top+'px':''
     }
   }
-
   handleSelect(e,item){
     // onClick事件换成onmouseup--点击清除后谷歌下搜索结果点击不上去的情况
     e.stopPropagation();
@@ -60,7 +57,7 @@ class SearchDrop extends Component{
     const {mainEmpty} = this.props;
     let litext = '';
     if(mainEmpty){
-      return <div className={this.getClass()} contenteditable="false" id="searchBox" style={this.getStyle()}>
+      return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
           <ul>
             {this.props.data&&this.props.data.map((it)=>{
               litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
@@ -70,17 +67,14 @@ class SearchDrop extends Component{
         </div>
     }else{
       
-      const domNode = document.getElementById('root');
-      return ReactDom.createPortal(
-        <div className={this.getClass()} contenteditable="false" id="searchBox" style={this.getStyle()}>
+      return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
           <ul>
             {this.props.data&&this.props.data.map((it)=>{
               litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
               return <li onClick={(e)=>this.handleSelect(e,it)} title={litext}>{litext}</li>
             })}
           </ul>
-        </div>
-      ,domNode)
+        </div>;
     }
     
   }

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

@@ -4,7 +4,6 @@
   overflow-y: auto;
   overflow-x: hidden;
   .pop;
-  left: 85px;
   padding: 0 0 10px;
   li{
     width: 200px;

+ 8 - 43
src/components/SpreadDrop/index.jsx

@@ -2,9 +2,8 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import config from '@config/index.js';
 import style from './index.less';
-import {deepClone,filterArr,handleEnter,isIE,getPageCoordinate,windowEventHandler,filterDataArr,getIds} from '@utils/tools.js';
+import {deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds} from '@utils/tools.js';
 import {Notify} from '@commonComp';
-import ReactDom from "react-dom";
 import $ from 'jquery';
 /****
  * 标签组合下拉,选中的项目展开
@@ -45,10 +44,6 @@ class SpreadDrop extends Component{
       ban:{},  //放'伴'字段
       editable:false,      //双击编辑
       labelVal:'',  //存放标签原有的值--主诉字数限制用
-      boxLeft:0,
-      boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
     };
     this.$div = React.createRef();
     this.handleSelect = this.handleSelect.bind(this);
@@ -66,37 +61,12 @@ class SpreadDrop extends Component{
   handleShow(e){//单击
     e&&e.stopPropagation();
     const {ikey,handleShow,placeholder,flag,id,value,tagType,type,data,windowWidth} = this.props;
-    // let boxLeft = e.pageX -175 + 'px';
-    // let offsetTop = e.target.offsetTop;
-    // const ht = e.target.offsetHeight;   //如杂音选中文字有多行时,写死会遮挡
-    // let boxTop = offsetTop + ht +2 + 'px';
-    // this.setState({
-    //   boxLeft:boxLeft,
-    //   boxTop:boxTop
-    // })
-    let num = 0,leftLen;//判断为五类切超出页面
+    let num = 0;//判断为五类切超出页面
     data && data.map((item)=>{
       if(item.formPosition != 1){
         ++num
       }
-    })
-    if(num >= 5 && windowWidth-getPageCoordinate(e).boxLeft < 760){
-      leftLen = windowWidth-780
-    }else{
-      leftLen = getPageCoordinate(e).boxLeft
-    }
-    this.setState({
-      boxLeft:leftLen,
-      boxTop:getPageCoordinate(e).boxTop,
-      tmpScroll: $("#addScrollEvent")[0].scrollTop,
-      tmpTop:getPageCoordinate(e).boxTop
     });
-    windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
-      let scrollYs = $("#addScrollEvent")[0].scrollTop;
-      this.setState({
-        boxTop:this.state.tmpTop - scrollYs + this.state.tmpScroll
-      })
-    },$("#addScrollEvent")[0])
     // window.event? window.event.cancelBubble = true : e.stopPropagation();
      this.setStateInit();      //恢复初始选中状态
     const that = this;
@@ -366,7 +336,7 @@ class SpreadDrop extends Component{
 
   render(){
     const {placeholder,value,show,data,order} = this.props;
-    const {editable,boxLeft,boxTop} = this.state;
+    const {editable} = this.state;
     return  <div className={style['container']}
               onFocus={(e)=>e.stopPropagation()}
               onBlur={(e)=>e.stopPropagation()}
@@ -381,8 +351,8 @@ class SpreadDrop extends Component{
         onInput={this.onChange}
         onkeydown={handleEnter}
         >{value||placeholder}</div>
-          <ListItems data={data} left={boxLeft} order={order}
-            top={boxTop} show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
+          <ListItems data={data} order={order}
+             show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
       </div>
   }
 }
@@ -418,26 +388,21 @@ class ListItems extends Component{
     return list;
   }
   getStyle(){
-    const {left,top,show} = this.props;
+    const {show} = this.props;
     return {
-      left:left?left+'px':'',
-      top:top?top+'px':'',
       display:show?'block':'none'
     }
   }
   render (){
     const {handleClear,handleConfirm,order} = this.props;
-    const domNode = document.getElementById('root');
-    return ReactDom.createPortal(
-      <div className={style["drop-list"]} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
+    return <div className={style["drop-list"]} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
         <p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>
         {this.getLabels()}
-        <div className="oper">
+        <div className="oper clearfix">
           <span className={style['clear']} onClick={handleClear}>清空选项</span>
           <span className={style['confirm']} onClick={handleConfirm}>确定</span>
         </div>
       </div>
-    ,domNode)
   }
 }
 

+ 9 - 2
src/components/SpreadDrop/index.less

@@ -6,7 +6,7 @@
 }
 .drop-list{
   .pop;
-  padding:20px 20px 20px 0;
+  padding:8px 20px 25px 0;
   .row{
     display: inline-block;
     // width: 200px;
@@ -24,6 +24,8 @@
     padding-left: 20px;
     cursor: pointer;
     .mult-li;
+    height: 30px;
+    line-height: 30px;
   }
   .selected{
     .select-li;
@@ -49,13 +51,18 @@
 }
 .orderTips{
   color: #bfbfbf;
-  margin:0 0 10px 28px;
+  margin:0 0 0 28px;
 }
 .clear{
   .btnCom;
   .clear;
+  height: auto;
+  line-height: unset;
 }
 .confirm{
   .btnCom;
   .confirm;
+  height: auto;
+  line-height: unset;
+  width: 60px;
 }

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

@@ -58,8 +58,8 @@ class Treat extends Component {
     }
    
     setTreatBox(){
-      $('#dragModalWrap').css({'z-index': 302});
-      $('#drugWrapper').css({'z-index': 301});
+      $('#dragModalWrap').css({'z-index': 120});
+      $('#drugWrapper').css({'z-index': 110});
     }
     render(){
         const {setDrugInfoMore,treatIndex,treatIndexSet, generalTreat, treatment, treatItem, surgeryTreat, drugHistory, 

+ 5 - 4
src/components/Treat/index.less

@@ -1,32 +1,34 @@
 @import "~@less/mixin.less";
+@import "~@less/variables.less";
 .treat-wrapper{
+    .maskZIndex;
     position: fixed;
     width: 100%;
     height: 100%;
     left: 0;
     top: 0;
-    z-index: 300;
 }
 .close {
+  .contentZIndex1;
   position: absolute;
-  z-index:9999;
   top: 0;
   right: 0;
   cursor: pointer;
 }
 .treat-mask {
+    .maskZIndex;
     position: fixed;
     width: 100%;
     height: 100%;
     top: 0;
     left: 0;
-    z-index: 300;
     background: #000;
     opacity: 0.6;
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
 }
 .treat-box {
+    .maskContentZIndex1;
     position: fixed;
     background: #fff;
     width: 680px;
@@ -34,7 +36,6 @@
     top: 10%;
     height: 80%;
     margin-left: -340px;
-    z-index: 301;
     padding-top: 40px;
     padding-bottom: 80px;
     box-shadow: 0px 0px 5px -2px #7d7c7c;

+ 2 - 2
src/components/TreatDesc/DrugInfo/index.jsx

@@ -48,8 +48,8 @@ class DrugInfo extends Component {
         }
     }
     setDragBox(){
-      $('#dragModalWrap').css({'z-index': 301});
-      $('#drugWrapper').css({'z-index': 302});
+      $('#dragModalWrap').css({'z-index': 110});
+      $('#drugWrapper').css({'z-index': 120});
     }
     render() {
         const { drugInfo, hideDrugInfo, drugInfoList,hideDrugInfoMore } = this.props

+ 3 - 2
src/components/TreatDesc/DrugInfo/index.less

@@ -1,4 +1,6 @@
+@import "~@less/variables.less";
 .drug-info-wrapper {
+    .maskContentZIndex2;
     position: fixed;
     overflow: hidden;
     width: 950px;
@@ -7,7 +9,6 @@
     top: 10%;
     margin-left: -475px;
     background: #fff;
-    z-index: 303;
     padding: 40px 0 60px;
     box-shadow: 0px 0px 5px -2px #7d7c7c;
     word-break: break-all;
@@ -36,10 +37,10 @@
     user-select:none;
 }
 .close-drug-desc {
+    .contentZIndex1;
     position: absolute;
     right: 0;
     top: 0;
-    z-index: 9999;
     width: 40px;
     cursor: pointer;
 }

+ 1 - 11
src/containers/CheckBody.js

@@ -1,7 +1,7 @@
 import {connect} from 'react-redux';
 import CheckBody from '@components/CheckBody';
 import {getModule,getInitData} from '@store/async-actions/fetchModules.js';
-import {HIDE,RESET,SETDROPSHOW,ISREAD,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
+import {HIDE,RESET,SETDROPSHOW,ISREAD,MODI_LOADING} from '@store/types/homePage.js';
 import {SELECTSEARCHDATA} from "@store/types/checkBody";
 import {billing} from '@store/async-actions/pushMessage';
 import {didPushParamChange,filterDataArr} from '@utils/tools.js';
@@ -23,8 +23,6 @@ function mapStateToProps(state){
     span:checkBody.span,
     searchInEnd:checkBody.searchInEnd,      //是否在搜索末尾插入结果
     selecteds:checkBody.selecteds,       //普通多选选中状态
-    boxTop:state.homePage.boxTop,
-    boxLeft:state.homePage.boxLeft,
     importLabel:checkBody.importLabel,    //需高亮的标签id
   }
 }
@@ -58,14 +56,6 @@ function mapDispatchToProps(dispatch){
         }
       });
     },
-    getSearchLocation(top,left){
-      dispatch({
-        type:SEARCH_DROP_LOCATION,
-        top:top,
-        left:left,
-        dis:0
-      })
-    }
   }
 }
 

+ 8 - 18
src/containers/CurrentIll.js

@@ -4,15 +4,15 @@ 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 {SETDROPSHOW} from '@types/homePage.js';
-import {HIDE,RESET,CLICKCOUNT,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
+import {HIDE,RESET,CLICKCOUNT,ISREAD,SETDROPSHOW} from '@store/types/homePage';
 import {billing} from '@store/async-actions/pushMessage';
-import {getModule} from '@store/async-actions/fetchModules.js';
-import {didPushParamChange} from '@utils/tools.js';
+import {getModule} from '@store/async-actions/fetchModules';
+import {didPushParamChange,filterDataArr} from '@utils/tools';
 import {Notify} from '@commonComp';
 
 function mapStateToProps(state) {
-  const {homePage,currentIll,mainSuit,diagnosticList} = state;
+  const {homePage,currentIll,mainSuit,diagnosticList,typeConfig} = state;
+  const hasMain = filterDataArr(mainSuit.saveText);
     return {
         data:currentIll.data,//主诉模板
         emptyData:currentIll.emptyData,//空模板
@@ -26,7 +26,7 @@ function mapStateToProps(state) {
         mainData:mainSuit.data,//主诉使用的模板
         symptomFeature:mainSuit.symptomFeature,//主诉分词数据
         moduleNum:mainSuit.moduleNum,//主诉使用的模板
-        type: state.typeConfig.typeConfig,
+        type: typeConfig.typeConfig,
         mainIds:mainSuit.mainIds,//主诉症状选中的id(去重用)
         mainTailIds:mainSuit.mainTailIds,//主诉症状选中的id(去重用)
         totalHide: homePage.totalHide,
@@ -36,12 +36,11 @@ function mapStateToProps(state) {
         symptomIds:currentIll.symptomIds,//症状id,去重用
         isRead:homePage.isRead,
         fuzhen:diagnosticList.mainSuitStr,//诊断第一个复诊值
-        boxTop:homePage.boxTop,
-        boxLeft:homePage.boxLeft,
         allModules:homePage.allModules,
         // isChronic:!!diagnosticList.chronicMagItem,
         isChronic:mainSuit.chronicDesease?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
-
+        readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
+        hasMain,      //是否有主诉
     }
 }
 
@@ -139,15 +138,6 @@ function mapDispatchToProps(dispatch) {
               editClear:bool
             })
         },
-        
-      getSearchLocation(top,left){
-        dispatch({
-          type:SEARCH_DROP_LOCATION,
-          top:top,
-          left:left,
-          dis:0
-        })
-      },
       freeText(item){//自由输入
         dispatch({
           type: SAVE_CURR_FREE,

+ 4 - 13
src/containers/EditableSpan.js

@@ -4,11 +4,11 @@ import {SETCHECKTEXT,SETSEARCHDATA,CHECK_FOCUS_INDEX,CHECKBODY_CLEAR,DEL_CHECKBO
 import {SET_SEARCH,MAIN_FOCUS_INDEX,CLEAR_SEARCH,SETMAINTEXT,DEL_MAIN,REMOVE_MAIN_ID,DEL_MAIN_LABLE} from '@types/mainSuit';
 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.js';
+import {getSearch} from '@store/async-actions/fetchModules';
 import {billing} from '@store/async-actions/pushMessage';
-import {didPushParamChange,storageLocal} from '@utils/tools.js';
-import {SETTEXTFOCUS,SEARCH_DROP_LOCATION,RESET,SETDROPSHOW,ISREAD} from '@types/homePage';
-import config from '@config/index.js';
+import {didPushParamChange,storageLocal} from '@utils/tools';
+import {SETTEXTFOCUS,RESET,SETDROPSHOW,ISREAD} from '@types/homePage';
+import config from '@config/index';
 
 function mapStateToProps(state){//console.log(state)
   return {
@@ -82,16 +82,7 @@ function otherHisSearch(obj) {
 }
 
 function mapDispatchToProps(dispatch,state) {
-  const dis = JSON.stringify(state.saveText) == '[]'?0:60;
   return {
-    setSearchLocation(top,left){
-      dispatch({
-        type:SEARCH_DROP_LOCATION,
-        top:top,
-        left:left,
-        dis:dis
-      })
-    },
     setFocusIndex(obj){//将选中值插入相应位置
 
       const {i,boxMark} = obj;

+ 4 - 24
src/containers/MainSuit.js

@@ -2,7 +2,7 @@ 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,SEARCH_DROP_LOCATION,MODI_LOADING} from '@store/types/homePage.js';
+import {RESET,CLICKCOUNT,ISREAD,MODI_LOADING} 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';
@@ -14,7 +14,7 @@ import {getInitModules} from '@store/async-actions/homePage.js';
 import {SHOW_REFER_RECORD} from '@store/types/diagnosticList';
 
 function mapStateToProps(state) {//console.log(state)
-  const {mainSuit,homePage,diagnosticList} = state;
+  const {mainSuit,homePage,diagnosticList,typeConfig} = state;
   return {
     showDrop:mainSuit.showDrop,//用于更新
     update:mainSuit.update,
@@ -23,7 +23,7 @@ function mapStateToProps(state) {//console.log(state)
     selecteds:mainSuit.selecteds,//数据源
     saveText:mainSuit.saveText,
 	  searchData:mainSuit.searchDatas,//搜索结果
-    type: state.typeConfig.typeConfig,
+    type: typeConfig.typeConfig,
     showArr:homePage.showDrop,
     totalHide:homePage.totalHide,
     focusIndex:mainSuit.focusIndex,
@@ -34,13 +34,12 @@ function mapStateToProps(state) {//console.log(state)
     mainIds:mainSuit.mainIds,//选中症状的id,搜索去重用
     isRead:homePage.isRead,
     commSymHide:homePage.commSymHide,
-    boxTop:homePage.boxTop,
-    boxLeft:homePage.boxLeft,
     currentData:state.currentIll.data,
     allModules:homePage.allModules,
     chronicDesease:mainSuit.chronicDesease?mainSuit.chronicDesease:diagnosticList.chronicMagItem,
     items:state.historyTemplates.items,
     showHisBox:mainSuit.showHisBox,
+    readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
   }
 }
 
@@ -164,25 +163,6 @@ function mapDispatchToProps(dispatch) {
             type:CLEAR_DIAGNOSE,
           })
       },
-      getSearchLocation(top,left){
-        dispatch({
-          type:SEARCH_DROP_LOCATION,
-          top:top,
-          left:left,
-          dis:0
-        })
-      },
-      /*async getSymptomFeature(item){
-        const it = item&&item.trim();
-        const symptomFeature = await getFeature(it);
-        if(symptomFeature.data.code==0){
-          const data = symptomFeature.data.data;
-          dispatch({
-            type:SET_FEATURE,
-            data:data
-          })
-        }
-      },*/
       getSymptomFeature(data){
         dispatch({
           type:SET_FEATURE,

+ 4 - 19
src/containers/OtherHistory.js

@@ -2,10 +2,10 @@ import React from 'react';
 import {connect} from 'react-redux';
 import OtherHistory from "../components/OtherHistory";
 import {SETSELECTED,CLEARSELECTED,CONFIRMSELECTED,SELECTOTHERSEARCHDATA,SETDATA,SETTEXTMODEVALUE,OTHEREDICLEAR} from '@types/otherHistory';
-import {HIDE,RESET,ISREAD,SEARCH_DROP_LOCATION} from '@store/types/homePage.js';
-import {getModule,setOtherHisModule} from '@store/async-actions/fetchModules.js';
+import {HIDE,RESET,ISREAD} from '@store/types/homePage';
+import {getModule,setOtherHisModule} from '@store/async-actions/fetchModules';
 import {billing} from '@store/async-actions/pushMessage';
-import {didPushParamChange,filterDataArr,fullfillText} from '@utils/tools.js';
+import {didPushParamChange,filterDataArr,fullfillText} from '@utils/tools';
 
 function mapStateToProps(state){
   const {otherHistory,homePage,typeConfig,mainSuit} = state;
@@ -27,8 +27,7 @@ function mapStateToProps(state){
     selecteds:otherHistory.selecteds,       //普通多选选中状态
     editClear:otherHistory.editClear,       //编辑状态
     isRead:state.homePage.isRead,
-    boxTop:state.homePage.boxTop,
-    boxLeft:state.homePage.boxLeft,
+    readMode:typeConfig.readMode,       //回读回来的模式(与当前模式并存)
   }
 }
 
@@ -37,12 +36,6 @@ function mapDispatchToProps(dispatch,store){
     setInitData(){
       //先获取最近记录,没有的话显示模板
       dispatch(setOtherHisModule());
-      //右侧推送
-      setTimeout(function(){      //延迟待确定后的数据更新后推送,避免获取的参数还是旧的
-        if(didPushParamChange()){     //操作后内容有变化才推送
-          dispatch(billing());
-        }
-      },500);
     },
     fetchModules(param){
       const {id,name,index,span,searchInEnd} = param;
@@ -86,14 +79,6 @@ function mapDispatchToProps(dispatch,store){
         bool:bool
       })
     },
-    getSearchLocation(top,left){
-      dispatch({
-        type:SEARCH_DROP_LOCATION,
-        top:top,
-        left:left,
-        dis:0
-      })
-    }
   }
 }
 

+ 19 - 37
src/containers/TypeConfigContainer.js

@@ -1,24 +1,32 @@
 import React from "react";
 import { connect } from "react-redux";
 import Banner from "../components/Banner";
-import { SHOW_CONFIG_MODAL, CLOSE_CONFIG_MODAL, CHANGE_TYPE, CONFIRM_TYPE } from "../store/types/typeConfig";
-import { BILLING_ADVICE} from '@store/types/pushMessage';
-
+import { SHOW_CONFIG_MODAL, CLOSE_CONFIG_MODAL, CONFIRM_TYPE } from "../store/types/typeConfig";
 import {pushAllDataList} from '@utils/tools';
 import {saveMode,getOtherHisRecord} from '@store/async-actions/fetchModules';
 import config from "@config/index";
-import { initItemList } from '@store/async-actions/tabTemplate';
 import { allCheckedShow } from '@store/actions/tabTemplate';
 import {Notify} from '@commonComp';
-import {SETOTHERHISTORY} from "../store/types/homePage";
+
+//判断模块是否有数据
+function ifHasData(data,saveText){
+  if(saveText[0]||data.length>1||(data.length===1&&(data[0].value||(data[0].value!==''&&data[0].name)))){
+    return true;
+  }
+  return false;
+}
 
 function mapStateToProps(state) {
+  const main = state.mainSuit;
+  const current = state.currentIll;
+  const other = state.otherHistory;
+  const typeConfig = state.typeConfig;
   return {
-    disVisible:state.copyRight.disVisible,
-    copyVisible:state.copyRight.copyVisible,
-    //failed:state.typeConfig.failed,
-    typeConfig:state.typeConfig.typeConfig||config.defaultValue.mode,
-    visible:state.typeConfig.visible
+    typeConfig:typeConfig.typeConfig||config.defaultValue.mode,
+    visible:typeConfig.visible,
+    hasMain:ifHasData(main.data,main.saveText),
+    hasCurrent:ifHasData(current.data,current.saveText),
+    hasOther:ifHasData(other.data,other.saveText),
   };
 }
 
@@ -30,9 +38,6 @@ function mapDispatchToProps(dispatch) {
     closeConfigModal: () => {
       dispatch({type: CLOSE_CONFIG_MODAL})
     },
-    changeType: typeConfig => {
-      dispatch({type: CHANGE_TYPE, typeConfig})
-    },
     confirmType: confirmType => {
       //保存模式切换结果
       dispatch(saveMode(confirmType)).then((res)=>{
@@ -40,33 +45,10 @@ function mapDispatchToProps(dispatch) {
           //清空所有数据
           pushAllDataList('','clear');
           dispatch({type: CONFIRM_TYPE, confirmType});
-          //切换模式是要重新获取其他史数据
-          dispatch({
-            type:SETOTHERHISTORY,
-            data:[],
-            save:[],
-            otherIsHis:false
-          });
-          dispatch(getOtherHisRecord());        //获取其他史最近记录
-          Notify.success("模式切换成功");
-          dispatch(initItemList(confirmType,1));//切换模式调用模板接口
+          Notify.success("修改成功");
           dispatch(allCheckedShow(false))    //全选反选显示重置
-          dispatch({//推送重置
-            type: BILLING_ADVICE,
-            determine:[],
-            doubt:[],
-            possible:[],
-            vigilant: [],
-            likely:[],
-            lab: [],
-            pacs:[],
-            setPushEmergency:[],
-            setPushEmergencyIdx:''
-          });
         }else{
           Notify.error(res.data.msg+",请稍后再试");
-          //dispatch({type:MODE_CHANGE_FAIL,data:true});      //保存失败弹窗提示
-          //alert('模式保存失败')
         }
       });
 

+ 0 - 2
src/containers/eleType.js

@@ -30,8 +30,6 @@ export function singleRadio(params){
       const custom= JSON.parse(localStorage.getItem('radio'+data.id));
       const list = data.questionDetailList&&data.questionDetailList.length>0?data.questionDetailList:data.questionMapping;
       return <RadioDrop data={custom&&custom.length?[...custom,...list]:list}
-                        prefix={data.labelPrefix}
-                        suffix={data.labelSuffix}
                         placeholder={data.name}
                         show={showArr&&showArr[showInx]}
                         value = {data.value}

+ 1 - 1
src/modules/HomePage/index.less

@@ -8,7 +8,7 @@
     opacity: .4;
     filter:alpha(opacity=40);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=40);";
-    z-index: 9998;
+    z-index: 100;
 }
 .load{
     width: 40px;

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

@@ -38,7 +38,7 @@ export const setModule = (state,action)=>{
     if(v.flag && v.flag==2){
       sliceIdx = i;
     }
-  })
+  });
   res.addModule = data&&data.slice(0,sliceIdx+1);//截取到flag=2 有无治疗
   res.update=Math.random();
   return res;

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

@@ -100,14 +100,7 @@ export const setLabelToEdit = (state,action)=>{
   res.update=Math.random();
   return res;
 };
-//编辑状态
-export const searchDropLocation = (state,action)=>{
-  let res = Object.assign({},state);
-  // console.log(action,'dir')
-  res.boxTop = action.top?action.top:res.boxTop;
-  res.boxLeft = action.left?action.left+action.dis:res.left;
-  return res;
-};
+
 export const getInspectList = (state,action)=>{
   let res = Object.assign({},state);
   res.inspectList = action.data

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

@@ -16,8 +16,8 @@ export const confirmType=(state,action)=>{
   return res;
 };
 
-export const modeChangeFail = (state,action)=>{
+export const setReadMode=(state,action)=>{
   const res=Object.assign({},state);
-  res.failed = action.data;
+  res.readMode = action.readMode;
   return res;
 };

+ 4 - 0
src/store/async-actions/diagnosticList.js

@@ -1,6 +1,7 @@
 import { SET_DIAG_TO_MAINSUIT, SET_CHRONIC_MAG_ITEM, SHOW_REFER_RECORD,SHOW_LOADING } from '@store/types/diagnosticList';
 import {getAllDataList,getAllDataStringList,isAllClear,filterDataArr} from '@utils/tools';
 import {getChronic,getInitModules} from '@store/async-actions/homePage.js';
+import { SET_READ_MODE } from "@store/types/typeConfig";
 import {storageLocal} from '@utils/tools'
 import { SAVE_FREE } from '@store/types/mainSuit';
 import {ISREAD,MODI_LOADING} from "../types/homePage";
@@ -47,6 +48,7 @@ export const isChronicMag = (item) => {
                         if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){
                             //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
                             // 是--引用   否--走慢病流程
+                            dispatch({type: SET_READ_MODE, readMode: '0'});     //慢病流程设为结构化
                             dispatch({
                                 type: SET_CHRONIC_MAG_ITEM,
                                 chronicMagItem: item
@@ -70,6 +72,8 @@ export const isChronicMag = (item) => {
                     if(chronicList[i].conceptId==item.conceptId&&chronicList[i].name==item.name){
                         //弹窗提示 “是否引用往期病例”?--往期病例接口、弹窗、引用
                         // 是--引用   否--走慢病流程
+
+                        dispatch({type: SET_READ_MODE, readMode: '0'});
                         dispatch({
                             type: SET_CHRONIC_MAG_ITEM,
                             chronicMagItem: item

+ 16 - 28
src/store/async-actions/fetchModules.js

@@ -89,11 +89,9 @@ export const getOtherHisRecord = ()=>{
   return (dispatch,getStore)=>{
     const state = getStore();
     const {message} =state.patInfo;
-    const mode = state.typeConfig.typeConfig;
     const param = {
       hospitalCode:message.hospitalCode,
       patientCode:message.patientCode,
-      sign:mode
     };
     json(api.getOtherHisRecord,param).then((res)=>{
       if(res.data.code=='0'){
@@ -102,38 +100,28 @@ export const getOtherHisRecord = ()=>{
         const objStr = JSON.parse(data.otherStr||'[]');
         let arr = [];//console.log(obj)
         if((!obj||!obj.other||obj.other.length==0)&&!objStr[0]){        //无其他史历史记录用默认模板
-          if(mode=='1'){      //文本模式
+          /*if(mode=='1'){      //文本模式
             dispatch({
               type:SETOTHERHISTORY,
               data:[],
               selecteds:[],
               save:[]
             });
-          }
+          }*/
         }else{
-          arr = obj.other;
-          if(mode =='1'){     //文本模式
-            dispatch({
-              type:SETOTHERHISTORY,
-              data:[],
-              selecteds:[],
-              save:[objStr[0]]
-            });
-          }else{
-            const text = filterDataArr(objStr);
-            dispatch({
-              type:SETOTHERHISTORY,
-              data:[{tagType:8,name:'',controlType:0,value:text}],
-              /*period:{
-                yjs_1: obj.yjs_1,
-                yjs_2: obj.yjs_2,
-                yjs_3: obj.yjs_3,
-                yjs_4: obj.yjs_4,
-              },
-              selecteds:obj.otherHistorySelecteds,*/
-              save:[text]
-            });
-          }
+          const text = filterDataArr(objStr);
+          dispatch({
+            type:SETOTHERHISTORY,
+            data:[{tagType:8,name:'',controlType:0,value:text}],
+            /*period:{
+              yjs_1: obj.yjs_1,
+              yjs_2: obj.yjs_2,
+              yjs_3: obj.yjs_3,
+              yjs_4: obj.yjs_4,
+            },
+            selecteds:obj.otherHistorySelecteds,*/
+            save:[text]
+          });
         }
       }
     });
@@ -215,7 +203,7 @@ export function setOtherHisModule(){
     const otherModel = initData.otherHisModel;
     const block = Object.assign(JSON.parse(config.textLabel),{full:true});
     const mode = state.typeConfig.typeConfig;
-    const model = otherModel&&otherModel.length>0?[...otherModel]:[block];     //查体模板
+    const model = otherModel&&otherModel.length>0?[...otherModel]:[block];     //其他史模板,没有模板数据则显示一个空文本标签
     const arr = deepClone(initData.otherHis);        //最近其他史数据
     const arrSave = deepClone(initData.otherHisSave);    //最近其他史saveText
     const selects = initData.otherSelecteds?[...initData.otherSelecteds]:[];  //其他史杂音类选中项

+ 1 - 12
src/store/async-actions/patInfo.js

@@ -67,18 +67,7 @@ export const initHistoryDetails = (dispatch) => {
                 dispatch({
                   type:ISREAD
                 });
-                // 设置初始模式
-                if(detail.sign == 1 || detail.sign == 0){
-                    dispatch({
-                        type: CONFIRM_TYPE,
-                        confirmType: detail.sign
-                    })
-                    if(baseList.tabTemplate.items.length == 0){
-                      dispatch(initItemList("",1));        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
-                    }
-                }else{
-                  dispatch(initItemList(baseList.typeConfig.typeConfig,1))
-                }
+                dispatch(initItemList(1));        //模板列表没有就获取模板列表用于保存时做数据对比是否保存过
                 dispatch({type:MODI_LOADING,flag:false});
             } else {
                 dispatch({type:MODI_LOADING,flag:false});

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

@@ -16,9 +16,8 @@ import {
   pushAllDataList
 } from '@utils/tools';
 
-export const initItemList = (type,current,flg) => { //初始化数据
+export const initItemList = (current,flg) => { //初始化数据
   let baseList = store.getState();
-  let whichSign = baseList.typeConfig.typeConfig;
   let state = baseList.patInfo.message;
 
   return (dispatch) => {
@@ -26,7 +25,6 @@ export const initItemList = (type,current,flg) => { //初始化数据
       "doctorId": state.doctorId,
       "hospitalDeptId": state.hospitalDeptId,
       "hospitalId": state.hospitalId,
-      "type": type || whichSign,
       "current": current,
       "sex":[1,2,3],
       "size": 9999
@@ -160,14 +158,15 @@ export const changeTitleAsync = (obj) => { //改标题
   }
 };
 
-export const setPageView = (id,typeConfig) => { //批量删除
+export const setPageView = (id) => { //获取模板结构化数据
   return (dispatch) => {
     axios.json('/templateInfo/getTemplateIdAlls', {
       id: id
     }).then((res) => {
       let data = res.data;
       if (data.code == 0) {
-        pushAllDataList(typeConfig, 'push', data.data, 'template')//引用
+        //模板列表不筛选模式后,单个模式引用时看本身的模式
+        pushAllDataList(data.data.type, 'push', data.data, 'template')//引用
       } else {
         Notify.error(data.msg);
       }

+ 2 - 4
src/store/reducers/homePage.js

@@ -1,6 +1,6 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,
-  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,SEARCH_DROP_LOCATION,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG} from '../types/homePage.js';
-import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,searchDropLocation,getInspectList,getAssistList} from '../actions/homePage.js';
+  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG} from '../types/homePage.js';
+import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList} from '../actions/homePage.js';
 
 const initState = {
   totalHide:false,
@@ -63,8 +63,6 @@ export default function (state=initState,action) {
       // res.loadingFlag = false;
       res.loadingFlag = action.flag;
       return res;
-    case SEARCH_DROP_LOCATION:
-      return searchDropLocation(state,action);
     case GET_INSPECT_LIST:
       return getInspectList(state,action);
     case GET_ASSIST_LIST:

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


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません