Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/dev/new1'

# Conflicts:
#	src/components/PushItems/DetailsModal/index.less
zhouna 5 rokov pred
rodič
commit
0b795b7a4a
100 zmenil súbory, kde vykonal 1256 pridanie a 1279 odobranie
  1. 9 0
      newICSS.iml
  2. 1 0
      package.json
  3. 2 2
      src/common/components/Calendar/index.less
  4. 3 2
      src/common/components/ComplexModal/index.less
  5. 3 2
      src/common/components/ConfirmModal/index.less
  6. 2 2
      src/common/components/DelToast/index.less
  7. 3 14
      src/common/components/DropList/index.jsx
  8. 34 26
      src/common/components/EditableSpan/index.jsx
  9. 2 1
      src/common/components/EditableSpan/index.less
  10. 1 1
      src/common/components/InspectCommon/index.less
  11. 15 4
      src/common/components/ItemBox/index.jsx
  12. 1 2
      src/common/components/ItemBox/index.less
  13. 4 1
      src/common/components/Loading/index.jsx
  14. 2 1
      src/common/components/Loading/index.less
  15. 2 1
      src/common/components/MiniToast/index.less
  16. 1 1
      src/common/components/Notify/index.less
  17. 5 6
      src/common/components/NumberPan/index.jsx
  18. 3 5
      src/common/components/NumberUnitPan/index.jsx
  19. 5 2
      src/common/components/SearchOption/index.jsx
  20. 1 2
      src/common/components/SearchOption/index.less
  21. 63 11
      src/common/components/Textarea/index.jsx
  22. 1 1
      src/common/components/Textarea/index.less
  23. 2 1
      src/common/components/WrapModalContainer/index.less
  24. BIN
      src/common/images/btn-closed.png
  25. BIN
      src/common/images/btn-open.png
  26. BIN
      src/common/images/icon_back.png
  27. 7 1
      src/common/less/base.less
  28. 21 3
      src/common/less/variables.less
  29. 1 1
      src/components/AddAssistCheck/Textarea/index.less
  30. 51 7
      src/components/AddAssistCheck/index.jsx
  31. 3 3
      src/components/AddAssistCheck/index.less
  32. 2 2
      src/components/AddInspect/SlideExcel/index.jsx
  33. 7 3
      src/components/AddInspect/SlideExcel/index.less
  34. 45 15
      src/components/AddInspect/SlideSelect/index.jsx
  35. 11 8
      src/components/AddInspect/SlideSelect/index.less
  36. 60 11
      src/components/AddInspect/index.jsx
  37. 4 3
      src/components/AddInspect/index.less
  38. 20 13
      src/components/AssessResult/ScaleItem/index.jsx
  39. 1 0
      src/components/AssessResult/index.less
  40. 14 105
      src/components/AssistCheck/index.jsx
  41. 2 3
      src/components/AssistCheck/index.less
  42. 48 0
      src/components/Banner/ModeChange/index.jsx
  43. 98 0
      src/components/Banner/ModeChange/index.less
  44. 27 50
      src/components/Banner/index.jsx
  45. 13 73
      src/components/Banner/index.less
  46. 14 25
      src/components/CheckBody/index.jsx
  47. 14 9
      src/components/ChronicInfo/index.jsx
  48. 11 0
      src/components/ChronicInfo/index.less
  49. 13 2
      src/components/CommonSymptom/index.jsx
  50. 14 1
      src/components/CommonSymptom/index.less
  51. 3 3
      src/components/CopyRight/CopyModalSon/index.less
  52. 3 3
      src/components/CopyRight/DiscontentSon/index.less
  53. 1 13
      src/components/CopyRight/index.less
  54. 29 34
      src/components/CurrentIll/index.jsx
  55. 24 7
      src/components/DiagResultSearch/index.jsx
  56. 4 4
      src/components/DiagResultSearch/index.less
  57. 22 8
      src/components/Diagnosis/index.jsx
  58. 16 36
      src/components/DiagnosticItem/index.jsx
  59. 33 37
      src/components/DiagnosticList/index.jsx
  60. 36 10
      src/components/EMRContainer/index.jsx
  61. 7 3
      src/components/EMRContainer/index.less
  62. 2 2
      src/components/Emergency/HisList/index.jsx
  63. 2 2
      src/components/Emergency/index.jsx
  64. 3 3
      src/components/Emergency/index.less
  65. 11 22
      src/components/EmergencyProcedure/EmergencyModal/index.less
  66. 2 3
      src/components/EmergencyProcedure/index.less
  67. 11 10
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  68. 5 4
      src/components/HistoryCaseContainer/HistoryList/index.less
  69. 1 1
      src/components/HistoryCaseContainer/index.less
  70. 1 1
      src/components/InfoTitle/index.jsx
  71. 1 1
      src/components/InfoTitle/index.less
  72. 25 9
      src/components/Inspect/index.jsx
  73. 6 4
      src/components/Inspect/index.less
  74. 61 48
      src/components/MainSuit/index.jsx
  75. 12 1
      src/components/MedicalInfo/index.jsx
  76. 5 2
      src/components/MedicalInfo/index.less
  77. 0 4
      src/components/MultSpread/index.jsx
  78. 3 9
      src/components/Multiple/SlideItem/index.jsx
  79. 4 26
      src/components/Multiple/index.jsx
  80. 13 24
      src/components/NumberDrop/index.jsx
  81. 2 18
      src/components/NumberUnitDrop/index.jsx
  82. 79 56
      src/components/Operation/index.jsx
  83. 10 9
      src/components/Operation/index.less
  84. 19 35
      src/components/OtherHistory/index.jsx
  85. 17 13
      src/components/Preview/index.jsx
  86. 2 1
      src/components/Preview/index.less
  87. 19 16
      src/components/PrintPreview/index.jsx
  88. 2 1
      src/components/PrintPreview/index.less
  89. 3 3
      src/components/PushContainer/index.jsx
  90. 3 2
      src/components/PushContainer/index.less
  91. 1 1
      src/components/PushItems/DetailsModal/index.jsx
  92. 18 3
      src/components/PushItems/DetailsModal/index.less
  93. 1 1
      src/components/PushItems/TipsMsg/index.jsx
  94. 19 1
      src/components/PushItems/TipsMsg/index.less
  95. 7 2
      src/components/PushItems/index.jsx
  96. 0 308
      src/components/PushItems/index.less
  97. 16 23
      src/components/RadioDrop/index.jsx
  98. 14 25
      src/components/RadioInpDrop/index.jsx
  99. 12 1
      src/components/ScaleSearch/index.jsx
  100. 0 0
      src/components/ScaleSearch/index.less

+ 9 - 0
newICSS.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 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>;
   }
 }
 

+ 34 - 26
src/common/components/EditableSpan/index.jsx

@@ -37,6 +37,7 @@ class EditableSpan extends Component{
     this.handleKeydown = this.handleKeydown.bind(this);
     this.handleKeyup = this.handleKeyup.bind(this);
     this.moveEnd = this.moveEnd.bind(this);
+    this.handleClick = this.handleClick.bind(this);
   }
   handleFocus(e){
     e.stopPropagation();
@@ -122,13 +123,13 @@ class EditableSpan extends Component{
     const {boxMark,handleClear,handleChange,i} = this.props;
     e.stopPropagation();
     // 延时清空搜索结果,不延时会影响选中
-    clearTimeout(this.state.clearTimer);
+    /*clearTimeout(this.state.clearTimer);
     const clearTimer = setTimeout(function(){
       handleClear && handleClear({boxMark})
     },config.delayTime);
     this.setState({
       clearTimer
-    });
+    });*/
   }
 
   moveEnd(obj) {
@@ -148,7 +149,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;
     //禁止回车事件
@@ -171,29 +172,29 @@ class EditableSpan extends Component{
           ev.preventDefault();
         }else{
           ev.returnValue=false;
+        }
+        if(obj){
+          this.moveEnd(obj[0]);
         } 
-        this.moveEnd(obj[0]);
       }
     }
     if(ev.keyCode==39){//向右
       let nextObj = $(this.$span.current).next();
       let obj = nextObj[0]&&nextObj[0].nodeName=="DIV"?nextObj.next():nextObj;
-      if(textIndex == textLength || textLength==undefined){
+      if(textIndex == textLength || textLength==undefined || (textIndex == 0 && textLength==1)){
         if(ev.preventDefault){//阻止默认事件
           ev.preventDefault();
         }else{
           ev.returnValue=false;
         }
-        obj.focus();
+        if(obj){
+          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,removeSpan} = this.props;
     const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -204,7 +205,8 @@ class EditableSpan extends Component{
     }*/
     if(ev.keyCode==46){//delete
       //判断nexObj
-      let nextObj = $(this.$span.current).next();
+      // let nextObj = $(this.$span.current).next();
+      let nextObj = $(this.$span.current);
       if(preVal.trim().length==1&& !innerVal){
         removeId && removeId({boxMark,i:index,text:"",flag:'del'});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
@@ -216,10 +218,11 @@ class EditableSpan extends Component{
       //action里往后删除
       if(innerVal == preVal){
         let data = innerVal.trim();
-        if(nextObj && !config.punctuationReg.test(data)){
+        if(nextObj && !config.punctuationReg.test(data) || data=='<br>'){
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'del'});
           // nextObj.focus();  
-          if(nextObj[0].nodeName !=="DIV"){
+          if(nextObj && nextObj[0] && nextObj[0].nodeName !=="DIV"){
+            // IE浏览器focus光标在最后,其他浏览器在最前
             nextObj.focus();
           }
           /*this.setState({
@@ -259,7 +262,8 @@ class EditableSpan extends Component{
         //判断是否为空、中英文:, 。、;,且不是第一位
         // let pattern = new RegExp(/^\,?$|^\,?$|^\.?$|^\。?$|^\、?$|^\;?$|^\;?$|^\:?$|^\:?$|\s/);
         // if(index!==0 && pattern.test(data)){
-        if(index!==0 && !config.punctuationReg.test(data)){
+        // 后半段是处理IE
+        if(index!==0 && !config.punctuationReg.test(data) || index!==0 && data=='<br>'){
           // let preObj = $(this.$span.current).prev();
           let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'backsp'});
@@ -269,9 +273,10 @@ class EditableSpan extends Component{
           })
         }
       }
-      ele = document.activeElement;
-      boxTop = target.innerText?getPageCoordinate(e).boxTop:$(ele).offset().top+30;
-      setSearchLocation(boxTop,ele.offsetLeft)     //搜索框的位置动态获取
+      // 主诉使用模板删除最后一个空span时移除
+      if(boxMark==1 && index==0 && !innerVal){
+        removeSpan();
+      }
     }
     
   }
@@ -281,6 +286,9 @@ class EditableSpan extends Component{
       this.$span.current.innerText?(this.$span.current.innerText = next.value||''):(this.$span.current.innerHTML = next.value||'');
     }
   }
+  handleClick(e){
+    $(this.$span.current).attr({"contentEditable":true}).focus()
+  }
   componentDidMount(){
     const {value} = this.props;
     const that = this;
@@ -304,7 +312,6 @@ class EditableSpan extends Component{
         sel.removeAllRanges();
       }
     }*/
-
   getClass(){
     const {full,value,saveText,i} = this.props;
     const preSelected = saveText[i-1];
@@ -316,13 +323,14 @@ class EditableSpan extends Component{
 
   render() {
     return <span className={this.getClass()}
-                      contentEditable='true'
-                      ref={this.$span}
-                      onInput={this.onChange}
-                      onFocus={this.handleFocus}
-                      onBlur={this.handleBlur}
-                      onkeydown={this.handleKeydown}
-                      onkeyup={this.handleKeyup}></span>;
+                 contentEditable='true'
+                 ref={this.$span}
+                 onInput={this.onChange}
+                 onFocus={this.handleFocus}
+                 onBlur={this.handleBlur}
+                 onkeydown={this.handleKeydown}
+                 onclick={this.handleClick}
+                 onkeyup={this.handleKeyup}></span>;
 
   }
 }

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

@@ -5,10 +5,11 @@
   word-break: break-word;
   min-width: 10px;
   // line-height: 2;
-  /*height: 16px;*/
+  height: 16px;//火狐需要
   line-height: 16px;
   vertical-align: middle;
   text-align: left;
+  padding-right: 1px;//火狐左右移动需要
 }
 .full{
   width: 100%;

+ 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;

+ 15 - 4
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){
@@ -47,7 +48,15 @@ class ItemBox extends Component {
       },this);
     }
   }
-
+componentWillReceiveProps(nextP){
+    if(nextP.children.length>1){
+      const that = this;
+      //数据渲染后更新滚动条
+      setTimeout(function(){
+        that.context.scrollArea&&that.context.scrollArea.refresh();
+      });
+    }
+}
   render(){
     const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"} >
@@ -58,5 +67,7 @@ class ItemBox extends Component {
     </div>
   }
 }
-
+ItemBox.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default ItemBox;

+ 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()&&refreshScroller().refresh();    //点开搜索弹窗更新滚动条,
       if(windowHeight - pageTop < height){
-        $("#searchOption")[0].scrollIntoView(false);
+        //$("#searchOption")[0].scrollIntoView(false);
+        refreshScroller()&&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 {

+ 63 - 11
src/common/components/Textarea/index.jsx

@@ -3,6 +3,9 @@ import style from "./index.less";
 import Notify from '../Notify';
 import config from '@config/index';
 import {isIE} from '@utils/tools.js';
+import {getFeature} from '@store/async-actions/fetchModules';
+import {getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js";
+import store from '@store';
 import $ from "jquery";
 
 class Textarea extends Component {
@@ -11,29 +14,49 @@ 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);
     this.handleFocus = this.handleFocus.bind(this);
     //this.handleBlur = this.handleBlur.bind(this);
     this.handleKeydown = this.handleKeydown.bind(this);
+    this.handleBlur = this.handleBlur.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;console.log(inpText,boxMark,hasMain)
+    if(boxMark!='1'&&!hasMain&&!e.target.innerText){
+      //现病史、其他史无主诉且本身无内容是聚焦提示无法操作
+      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)){
+    /*if(fuzhen&& !isChronic&&!(this.$dom.current.innerText?this.$dom.current.innerText:this.$dom.current.innerHTML)){
       const text = config.currentText.replace("(**)",fuzhen.replace(";",''));
       this.$dom.current.innerText?(this.$dom.current.innerText = text):(this.$dom.current.innerHTML = text);
       handleInput&&handleInput({text});
-    }
+    }*/
 
   }
   handleInput(e){
-    const {handleInput,boxMark,handlePush,hasMain} = this.props;
-    const {inpText,overFlag} = this.state;
+    const {handleInput,boxMark,handlePush,value} = 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();
@@ -45,7 +68,8 @@ class Textarea extends Component {
       this.setState({
         inpText:text.substr(0,config.limited),
         overFlag:true
-      })
+      });
+      handleInput&&handleInput({text:text.substr(0,config.limited)});
       return;
     }
     /*if(boxMark=='3'&&!hasMain){
@@ -69,10 +93,34 @@ class Textarea extends Component {
       timer
     });
   }
+  //除主诉外 其他是否为空
+  ifClear(){
+    let baseList = store.getState();
+    let jsonData = getAllDataList(baseList);
+    let jsonStr = getAllDataStringList(baseList);
+    let flg = ifOtherClear(jsonData,jsonStr,baseList);
+    return flg;
+  }
+  handleBlur(e){
+    const {saveChronic} = this.props;
+    const text = e.target.innerText;
+    getFeature(text).then((res)=>{
+      if(res.data.code==0){
+        const result = res.data.data;
+        // 慢病
+        if(result && result[0].chronicLabel==1){
+          let flg = this.ifClear();
+          if(!flg){
+            saveChronic && saveChronic(result[0],true);
+          }
+        }
+      }
+    })
+  }
   handleKeydown(e){
     const {boxMark} = this.props;
     const ev = e||window.event;
-    if(+boxMark==1){
+    if(+boxMark===1){
       //禁止回车事件
       if(ev.keyCode==13){return false;}
     }
@@ -87,6 +135,9 @@ class Textarea extends Component {
     const isRead = this.props.isRead;
     if(next.isRead != isRead||(next.value!=this.props.value&&next.value&&next.value.indexOf("复诊")!=-1)){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
       this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
+      this.setState({
+        inpText:''
+      });
     }
   }
   componentDidMount(){
@@ -101,7 +152,7 @@ class Textarea extends Component {
     }
   }
   render() {
-    const { title } = this.props;
+    const { title,boxMark } = this.props;
     return (
       <div className={style["box"]}>
         <div className={style["title"]}>{title}</div>
@@ -111,7 +162,8 @@ class Textarea extends Component {
              ref={this.$dom}
              contentEditable={true}
              onInput={this.handleInput}
-             onkeydown={this.handleKeydown}>
+             onkeydown={this.handleKeydown}
+             onBlur={+boxMark===1?this.handleBlur:null}>
         </div>
       </div>
     );

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

@@ -23,8 +23,8 @@
     padding:5px;
     outline: none;
     border-bottom:1px @part-border-color dashed;
+    margin-right: 470px;
     word-break: break-all;
-    word-wrap:break-word;
     textarea{
       width: 100%;
     }

+ 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


BIN
src/common/images/icon_back.png


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

@@ -49,7 +49,7 @@ button + button {
 
 html,body {
     font-size: @font-size-base; 
-    color: @B800;
+    // color: @B800;
     background: @body-bg;
 }
 :global(#root) {
@@ -64,3 +64,9 @@ html,body {
 :global(.mainsuit-box) {
     
 }
+:global(.ql-align-center) {
+    text-align: center;
+}
+:global(.ql-align-right) {
+    text-align: right;
+}

+ 21 - 3
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;
 }
@@ -84,8 +84,8 @@
   padding-right: 8px;
 }
 .select-li{
-  height: 32px;
-  line-height: 32px;
+  height: 30px;
+  line-height: 30px;
   width: 100%;
   font-size: 14px;
   text-align: left;
@@ -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;
 }

+ 51 - 7
src/components/AddAssistCheck/index.jsx

@@ -3,8 +3,8 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 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 { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
+import ScrollArea from 'react-scrollbar';
 
 class AddAssistCheck extends React.Component {
   constructor(props) {
@@ -31,10 +31,14 @@ class AddAssistCheck extends React.Component {
     $(document).click((event) => {
       let _con = $('#searchWrapAssist');   // 设置目标区域
       let _cons = $('#datePick');   // 设置目标区域
+      // let _conClick = $('#assistCheck');   // 点击的按钮
       let _del = document.getElementById("delBox");   // 删除弹窗
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+        if(this.state.show){
+          this.props.setHighter(48)
+        }
         this.setState({ show: false });
       }
       if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
@@ -86,7 +90,12 @@ class AddAssistCheck extends React.Component {
   handleSearchShow(e) {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
-    // e.stopPropagation();
+    // e.stopPropagation(); 
+    if(tmpShow){
+      this.props.setHighter(48)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
   }
   handleShowDate(idx) {
     this.setState({
@@ -97,13 +106,30 @@ class AddAssistCheck extends React.Component {
 
   getSearchList(list) {      //搜索列表
     const { handleSign } = this.props;
-    return <ul className={styles.searchLiUl}>
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    return <ScrollArea speed={0.8}
+                       horizontal={false}
+                       stopScrollPropagation={list.length>6?true:false}
+                       style={{height:'225px'}}
+                       className={styles["area"]}
+                       verticalContainerStyle={contStyle}
+                       verticalScrollbarStyle={barStyle}
+                       contentClassName="content">
+      <ul className={styles.searchLiUl}>
       {
         list && list.map((item, idx) => {
           return <li key={item.id}
             className={styles.searchLi}
             title={(item.name == item.retrievalName || !item.retrievalName) ? null : '(' + item.retrievalName + ')'}
             onClick={() => {
+              this.props.setHighter(48)
               handleSign(item.conceptId,idx,'search');
               this.setState({ show: false })
             }}
@@ -112,7 +138,7 @@ class AddAssistCheck extends React.Component {
           </li>
         })
       }
-    </ul>
+      </ul></ScrollArea>;
   }
   getCommonList() {      //常用列表
     const { handleSign,assistList } = this.props;
@@ -123,6 +149,7 @@ class AddAssistCheck extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
+              this.props.setHighter(48)
               handleSign(item.conceptId, idx,'common');
               this.setState({ show: false })
             }}
@@ -229,21 +256,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={assistList.length>6?true:false}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
                 {
                   this.getCommonList()
                 }
+                </ScrollArea>
               </div>
             }
           </SearchOption> : ''}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 3 - 3
src/components/AddAssistCheck/index.less


+ 2 - 2
src/components/AddInspect/SlideExcel/index.jsx

@@ -47,7 +47,7 @@ class SlideExcel extends Component {
               <td style={{ width: '30%' }}>
                 <span className={styles.tagSpan}>
                   {value.itemName}
-                  <span className={styles.imgInfo} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                 </span>
               </td>
               <td style={{ width: '20%' }}>
@@ -66,7 +66,7 @@ class SlideExcel extends Component {
                 <td style={{ width: '30%' }}>
                   <span className={styles.tagSpan}>
                     {value.itemName}
-                    <span className={styles.imgInfo} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                    <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                   </span>
                 </td>
                 <td style={{ width: '20%' }}>

+ 7 - 3
src/components/AddInspect/SlideExcel/index.less

@@ -148,7 +148,7 @@
 .imgInfo {
   position: relative;
 }
-.imgInfo {
+.imgInfo , .imgInfo1{
   width: 15px;
   height: 17px;
   border-bottom: 0 none !important;
@@ -161,7 +161,10 @@
   display: none;
   cursor: pointer;
 }
-.imgInfo:hover {
+.imgInfo1 {
+  top: -13px;
+}
+.imgInfo:hover, .imgInfo1:hover {
   background: url('../img/info3.png') no-repeat center center;
   background-size: 100% auto; 
 }
@@ -175,7 +178,8 @@
   position: relative;
 }
 .tagSpan:hover {
-  .imgInfo {
+  .imgInfo, .imgInfo1 {
     display: block;
   }
+ 
 }

+ 45 - 15
src/components/AddInspect/SlideSelect/index.jsx

@@ -1,12 +1,12 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,timestampToTime } from '@utils/tools';
+import { normalVal,timestampToTime,getPageCoordinate,setPosition } from '@utils/tools';
 import { InspectCommon, Calendar,DelToast} from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import $ from 'jquery';
 import date1 from '../img/date1.png';
-import close from '../img/close.png';
+import ScrollArea from 'react-scrollbar';
 
 class SlideSelect extends Component {
   constructor(props) {
@@ -16,12 +16,13 @@ class SlideSelect extends Component {
       activeInd:false,
       activeName:'',
     };
-    this.toTime = this.toTime.bind(this)
-    this.handleSlide = this.handleSlide.bind(this)
-    this.handleDel = this.handleDel.bind(this)
-    this.handleCancel = this.handleCancel.bind(this)
-    this.delConfirm = this.delConfirm.bind(this)
-    this.timeSure = this.timeSure.bind(this)
+    this.toTime = this.toTime.bind(this);
+    this.handleSlide = this.handleSlide.bind(this);
+    this.handleDel = this.handleDel.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.delConfirm = this.delConfirm.bind(this);
+    this.timeSure = this.timeSure.bind(this);
+    this.handleLabelSub = this.handleLabelSub.bind(this);
   }
   handleChangeDate(date) {
     // console.log(date,'外')
@@ -82,8 +83,18 @@ class SlideSelect extends Component {
     const {handleChangeDate} = this.props;
     handleChangeDate&&handleChangeDate(date)
   }
+  handleLabelSub(e,questionId,idx){
+    const {handleLabelSub,handleFillShow,setHighter,refreshScroller} = this.props;
+    handleLabelSub(e,questionId,idx);
+    handleFillShow(e,idx);
+    //弹窗高度超出屏幕,增加页面高度
+    setPosition(e,"#inspectFill",setHighter);
+    /*setTimeout(function(){//如果化验下面有很多数据,则会跳过头
+      refreshScroller()&&refreshScroller().scrollYTo(290);
+    })*/
+  }
   render() {
-    const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate,showToast} = this.props;
+    const {windowWidth,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
     const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
     let staticTime = {}
@@ -99,25 +110,35 @@ class SlideSelect extends Component {
         second: tmp2[2]
       }
     }
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'6px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    const listLen = currentData.details&&currentData.details.length;
+    const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
     return (
       <li key={item.questionId} className={styles.slideLi}> 
         {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
-                <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>
+                <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo1} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
-                <i className={styles.tagSpan} data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>
+                <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
         }
-        
+
         {
           item.details && item.details.map((val)=>{
             if(val.value && val.value != ''){
@@ -135,7 +156,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
+                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -153,7 +174,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
+                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -212,7 +233,16 @@ class SlideSelect extends Component {
                             </div>
                         </div>
                             {/* 填写单内容显示 */}
+                      <ScrollArea speed={0.8}
+                                  horizontal={false}
+                                  stopScrollPropagation={stopScroll}
+                                  style={{maxHeight:'358px'}}
+                                  className={styles["area"]}
+                                  verticalContainerStyle={contStyle}
+                                  verticalScrollbarStyle={barStyle}
+                                  contentClassName="content">
                             { getItemList() }
+                      </ScrollArea>
                     </InspectCommon>
                 : null
             }

+ 11 - 8
src/components/AddInspect/SlideSelect/index.less

@@ -168,7 +168,7 @@
 .imgInfo {
   position: relative;
 }
-.imgInfo {
+.imgInfo, .imgInfo1 {
   width: 15px;
   height: 17px;
   border-bottom: 0 none !important;
@@ -181,15 +181,18 @@
   display: none;
   cursor: pointer;
 }
-.imgInfo:hover {
-  background: url('../img/info3.png') no-repeat center center;
-  background-size: 100% auto; 
-}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
 .tagSpan {
   position: relative;
 }
 .tagSpan:hover {
-  .imgInfo {
-    display: block;
-  }
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
 }

+ 60 - 11
src/components/AddInspect/index.jsx

@@ -2,12 +2,9 @@ import React from 'react';
 import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
 import SlideExcel from './SlideExcel';
 import SlideSelect from './SlideSelect';
-import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate} from '@utils/tools';
+import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate,setPosition} 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 {
@@ -28,6 +25,7 @@ class Inspect extends React.Component {
       // tmpIds: [],      //内层外层
       impId: null
     }
+    this.$ul = React.createRef();
     this.handleChangeDate = this.handleChangeDate.bind(this)
     this.handleShowDate = this.handleShowDate.bind(this)
     this.getItemList = this.getItemList.bind(this)
@@ -92,11 +90,17 @@ class Inspect extends React.Component {
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (searchOption) {
         if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
+          if(this.state.show){
+            this.props.setHighter(48)
+          }
           this.setState({ show: false });
         }
       }
       if (inspectFill) {
         if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+          if(this.state.showFill){
+            this.props.setHighter(48)
+          }
           this.setState({ showFill: false, date: false });
         }
       }
@@ -119,6 +123,7 @@ class Inspect extends React.Component {
   }
   changeShowFill() {
     this.setState({ showFill: false })
+    this.props.setHighter(48)
   }
   handleChangeDate(info) {
     // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
@@ -129,6 +134,11 @@ class Inspect extends React.Component {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation();
+    if(tmpShow){
+      this.props.setHighter(48)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
   }
   handleFillShow(e, idx) {
     let tmpShow = this.state.showFill;
@@ -139,7 +149,7 @@ class Inspect extends React.Component {
       currentData: baseList,
       dateTime: baseList.time ? baseList.time : getCurrentDate(1)
     })
-    e.stopPropagation();
+    // e.stopPropagation();
   }
   handleShowDate() {
     this.setState({
@@ -193,7 +203,7 @@ class Inspect extends React.Component {
     } else {
       fillActive = this.state.currentData;
     }
-    return <ul className={styles.searchLis}>
+    return <ul className={styles.searchLis} ref={this.$ul}>
       {
         fillActive && fillActive.details && fillActive.details.map((item, idx) => {
           if (item.controlType == 1) {
@@ -242,13 +252,30 @@ class Inspect extends React.Component {
   }
   getSearchList(list) {//搜索列表
     const { handleSign } = this.props;
-    return <ul className={styles.searchLiUl}>
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    return <ScrollArea speed={0.8}
+                       horizontal={false}
+                       stopScrollPropagation={list.length>6?true:false}
+                       style={{height:'225px'}}
+                       className={styles["area"]}
+                       verticalContainerStyle={contStyle}
+                       verticalScrollbarStyle={barStyle}
+                       contentClassName="content">
+      <ul className={styles.searchLiUl}>
       {
         list && list.map((item, idx) => {
           return <li key={idx}
             className={styles.searchLi}
             title={(item.name == item.retrievalName || !item.retrievalName) ? item.name : item.name + '(' + item.retrievalName + ')'}
             onClick={() => {
+              this.props.setHighter(48)
               handleSign(item.questionId, idx, 'search');
               this.setState({ show: false })
             }}
@@ -257,7 +284,7 @@ class Inspect extends React.Component {
           </li>
         })
       }
-    </ul>
+      </ul></ScrollArea>;
   }
   getCommonList() {//常用列表
     const { handleSign, inspectList } = this.props;
@@ -268,6 +295,7 @@ class Inspect extends React.Component {
             className={styles.searchLi}
             title={item.name}
             onClick={() => {
+              this.props.setHighter(48)
               handleSign(item.questionId, idx, 'common');
               this.setState({ show: false })
             }}
@@ -317,9 +345,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 {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,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}>
@@ -358,6 +394,9 @@ class Inspect extends React.Component {
                 return <SlideSelect
                   item={item}
                   idx={idx}
+                  listDom={this.$ul}
+                  windowWidth={windowWidth}
+                  refreshScroller={refreshScroller}
                   showToast={idx == id ? true : false}
                   showFill={this.state.showFill}
                   handlePush={handlePush}
@@ -378,6 +417,7 @@ class Inspect extends React.Component {
                   handleDelConfirm={this.delConfirm}
                   handleConfirm={handleConfirm}
                   getInfomation={getInfomation}
+                  setHighter={setHighter}
                 ></SlideSelect>
               })
             }
@@ -385,14 +425,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> : ''}

+ 4 - 3
src/components/AddInspect/index.less

@@ -1,3 +1,4 @@
+
 @import "~@less/variables.less";
 .labelWrap>li {
     // cursor: pointer;
@@ -89,8 +90,8 @@
     display: none;
 }
 .searchLiUl {
-  overflow-y: auto;
-  max-height: 225px;
+  /*overflow-y: auto;
+  max-height: 225px;*/
   // min-height: 80px;
 }
 .searchLi {
@@ -182,7 +183,7 @@
         position: absolute;
         top: -5px;
         right: -5px;
-        z-index: 30;
+        z-index: 1;
         border-radius: 50%;
         background: @closeIcon;
         // background: url('/img/close.png') no-repeat center center;

+ 20 - 13
src/components/AssessResult/ScaleItem/index.jsx

@@ -211,30 +211,37 @@ class ScaleItem extends Component {
                           if(item1.controlType==0){//单选
                             return <tr>
                               <td>
-                                <span>{'请选择'+item1.name+':'}</span>
+                                <span>{item1.isShow == '0' ? item1.name+':' : '请选择'+item1.name+':'}</span>
                               </td>
                               <td>
-                                {item1.details.map((ii,ind)=>{
-                                  return <div className={style["chooseItem"]}>
-                                    <Radio label={ii.detailName}
-                                           isSelect={ii.state == 1}
-                                           handleClick={this.handleForRadio.bind(this,item.conceptId,details,idd,ind)}>
-                                      >
-                                    </Radio>
-                                  </div>
-                                })}
+                              {Array.isArray(item1.details)&&item1.isShow == '0'&&item1.details.map((ii,ind)=>{
+                                return ii.state == 1 && <div className={style["chooseItem"]}>
+                                          {ii.detailName}
+                                      </div>
+                              })}
+                              {Array.isArray(item1.details)&&item1.isShow != '0'&&item1.details.map((ii,ind)=>{
+                                return <div className={style["chooseItem"]}>
+                                        <Radio label={ii.detailName}
+                                                  isSelect={ii.state == 1}
+                                                  handleClick={this.handleForRadio.bind(this,item.conceptId,details,idd,ind)}>
+                                          </Radio>
+                                      </div>
+                              })}          
+                                
+
+                               
                               </td>
                             </tr>
                           }else if(item1.controlType==2){//输入框
                             return <tr>
                               <td>
-                                <span>{'请输入'+item1.name+':'}</span>
+                                <span>{item1.isShow == '0' ? item1.name+':':'请输入'+item1.name+':'}</span>
                               </td>
                               <td>
-                                <input type="text" placeholder="请输入"  value={item1.value} onKeyDown={this.handleReg.bind(this)} onInput={(e)=>this.handleInputformula(item.conceptId,details,idd,e)}/>
+                                {item1.isShow == '0' ? item1.value + ' ' +item1.uint : <input type="text" placeholder="请输入"  value={item1.value} onKeyDown={this.handleReg.bind(this)} onInput={(e)=>this.handleInputformula(item.conceptId,details,idd,e)}/>}
                               </td>
                               <td>
-                                <span>{item1.uint}</span>
+                                {item1.isShow != '0'&&<span>{item1.uint}</span>}  
                               </td>
 
                             </tr>

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

@@ -62,6 +62,7 @@
       max-width: 100%;
       overflow: hidden;
       text-overflow: ellipsis;
+      vertical-align: top;
     }
     .blue{
       color:#3B9ED0;

+ 14 - 105
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,8 +58,14 @@ 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 {setHighter,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
         const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
         const {importLis,ieVersion,hide} = this.state;
         // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -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}
@@ -227,6 +132,7 @@ class AssistCheck extends React.Component {
                             assistVal={assistVal}
                             windowHeight={windowHeight}
                             checkedListImport={checkedListImport}
+                            setHighter={setHighter}
                         >
                         </AddAssistCheck>
                     </div>
@@ -236,4 +142,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: 99;
+  z-index: 10;
   font-size: 12px;
   box-shadow: 0 10px 20px 0 #989DA3;
   border: 1px solid #dedede;

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

@@ -0,0 +1,48 @@
+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 {
+    constructor(props){
+      super(props);
+      this.getStyle=this.getStyle.bind(this);
+
+    }
+    getStyle(){
+        const {hideBtn} = this.props;
+        return hideBtn?'':style['fade'];
+    }
+    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 className={this.getStyle()}>
+                      <span>开启模板智能推送:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType(isOpen?'1':'0'):null}>
+                        <img src={isOpen?sopen:sclose} alt=""/>
+                        {isOpen?'开':'关'}
+                        </a>
+                    </p>
+                </div>
+                <div className={style["explain"]}>
+                    <p>说明:</p>
+                    <p>1.该设置只针对问诊模块中的“主诉”、“现病史”、“其他史”功能;</p>
+                    <p>2.慢病模式下,该模板智能推送的设置功能不可使用。</p>
+                </div>
+                {hideBtn?<div className={style['btn']} onClick={confirmType}><button>保存修改</button></div>:<div className={style['btn']} onClick={closeConfigModal}><button>&nbsp;&nbsp;关闭&nbsp;&nbsp;</button></div>}
+            </div>
+        </div>
+      </React.Fragment>,domNode)
+    }
+}
+
+export default ModeChange;

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

@@ -0,0 +1,98 @@
+@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;
+        .fade{
+          opacity: .4;
+        }
+      }
+      .explain{
+        margin: 50px 30px;
+        opacity: .5;
+        p{
+          font-size: 12px;
+          line-height: 20px;
+        }
+      }
+      .switch{
+        text-decoration: none;
+        color:inherit ;
+        img{
+          vertical-align: middle;
+          margin: 0 12px 0 20px;
+        }
+      }
+      .fade .switch{
+        cursor: auto;
+      }
+      .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;
+        }
+      }
+    }
+  }

+ 27 - 50
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,readMode} = this.props;
     const mode = this.state.mode;
     // 清空主诉常见症状
     clearCommS();
-    if(mode==typeConfig){
-      this.closeConfigModal()
+    if(mode==typeConfig&&typeConfig==readMode){
+      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);";
 }

+ 14 - 25
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){
@@ -47,7 +44,7 @@ class CheckBody extends Component{
     return false;
   }
   getLabels(){
-    const {data,showArr,saveText,selecteds,importLabel} = this.props;
+    const {data,showArr,saveText,selecteds,importLabel,setHighter} = this.props;
     let arr = [],list=[];
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
@@ -63,7 +60,7 @@ class CheckBody extends Component{
     if(showData){
       list = showData;
       arr = list.map((it,i)=>{
-        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel});
+        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
       });
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮
@@ -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:''}*/}
@@ -132,4 +118,7 @@ class CheckBody extends Component{
   }
 }
 
+CheckBody.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default CheckBody;

+ 14 - 9
src/components/ChronicInfo/index.jsx

@@ -242,10 +242,10 @@ class ChronicInfo extends React.Component{
     let obj = deepClone(calcuValues);
     let values = (obj&&obj[id])||deepClone(calcuContent);
     const txt = e.target.value;
-    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');       //处理中文输入法的情况
+    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d.]/g,'');       //处理中文输入法的情况
     obj[id] = values;
-    if(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g.test(txt)){
-      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');
+    if(/[\u4e00-\u9fa5]|[^\d.]/g.test(txt)){
+      e.target.value = txt.replace(/[\u4e00-\u9fa5]|[^\d.]/g,'');
     }
     this.setState({
       isCalculated:false,
@@ -408,14 +408,19 @@ class ChronicInfo extends React.Component{
                                     if(item.controlType==0){//单选
                                       return <tr>
                                         <td>
-                                          <span>{'请选择'+item.name+':'}</span>
+                                          <span>{item.isShow == '0' ? item.name+':' : '请选择'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          {Array.isArray(item.details)&&item.details.map((ii,ind)=>{
+                                        {Array.isArray(item.details)&&item.isShow == '0'&&item.details.map((ii,ind)=>{
+                                            return ii.state == 1 && <div className={style["chooseItem"]}>
+                                                      {ii.detailName}
+                                                  </div>
+                                          })}
+                                          {Array.isArray(item.details)&&item.isShow != '0'&&item.details.map((ii,ind)=>{
                                             return <div className={style["chooseItem"]}>
                                                     <Radio label={ii.detailName}
                                                              isSelect={ii.state == 1}
-                                                             handleClick={item.isShow == '0' ? '' : this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
+                                                             handleClick={this.handleForRadio.bind(this,v.conceptId,details,idd,ind)}>
                                                       </Radio>
                                                   </div>
                                           })}
@@ -424,13 +429,13 @@ class ChronicInfo extends React.Component{
                                     }else if(item.controlType==2){//输入框
                                       return <tr>
                                         <td>
-                                          <span>{'请输入'+item.name+':'}</span>
+                                          <span>{item.isShow == '0' ? item.name+':':'请输入'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          <input type="text" placeholder="请输入" readonly={item.isShow == '0'} value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>
+                                          {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入"  value={item.value} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
                                         </td>
                                         <td>
-                                          <span>{item.uint}</span>
+                                          {item.isShow != '0'&&<span>{item.uint}</span>}
                                         </td>
 
                                       </tr>

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

@@ -165,6 +165,7 @@
   .dis-name {
     position: relative;
     cursor: pointer;
+    border-bottom: 1px solid #1E1E1E
   }
   .info-img {
     position: absolute;
@@ -173,4 +174,14 @@
     left: 50%;
     margin-left: -7px;
     cursor: pointer;
+}
+.itemInp {
+  padding: 0 0 0 5px;
+  border:1px solid #E2E2E2;
+}
+.itemInp:focus {
+  border:1px solid #3B9ED0;
+}
+table {
+  line-height: 30px;
 }

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

@@ -2,6 +2,7 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import $ from 'jquery';
 import style from "./index.less";
+import {storageLocal} from "@utils/tools.js";
 /**
  * author: Liucf
  * 主诉常见症状下拉--修改为横铺多选(3.13)
@@ -33,7 +34,7 @@ class CommonSymptom extends Component{
   handleSelect(e,item){
     e.stopPropagation();
     let {select,ids,conceptId} = this.state;
-    const id = item.questionId
+    const id = item.questionId||item.id; //缓存localStorage中的数据有id
     const copid = item.conceptId
     if(conceptId.includes(copid)){
       conceptId.splice(conceptId.indexOf(copid),1);
@@ -88,8 +89,9 @@ class CommonSymptom extends Component{
       let itemBox = $('#mainSuit')[0];
       let divBox = $('#symptBox')[0];
       let listBox = $('#listBox')[0];
+      let hisBox = $('#his')[0];
       let operBox = $('#oper')[0];
-      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != operBox && e.target != divBox){
+      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != hisBox && e.target.parentNode != operBox && e.target != divBox ){
         this.setState({
           hide:true,
           select:[],
@@ -107,8 +109,17 @@ class CommonSymptom extends Component{
   render(){ 
     const {data} = this.props;
     const {hide} = this.state;
+    const mainSymp = storageLocal.get('mainSymp');
+    const mainHis = mainSymp?JSON.parse(mainSymp).reverse():[];
     return <div className={this.getClass()} contenteditable="false" id="symptBox" style={{'display':hide?'none':'block'}}>
       <ul className={style["listBox"]} id="listBox">
+        {mainHis.length>0?<ul className={style["his"]} id="his">
+          <p>最近输入症状:</p>
+          {mainHis.map((it)=>{
+            return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
+          })}
+        </ul>:''}
+        <p className={style['c-title']}>常见症状:</p>
         {data&&data.map((it)=>{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
         })}

+ 14 - 1
src/components/CommonSymptom/index.less

@@ -7,9 +7,22 @@
   .listBox{
     max-width: 460px;
   }
+  .his{
+      color: #3B9ED0;
+      border-bottom: 1px solid #EAEDF1;
+      p{
+        line-height: 32px;
+        padding-left: 15px;
+        color: #000;
+      }
+    }
+  .c-title{
+    margin: 10px 0;
+    text-indent: 15px;
+  }
   li{
     width: 85px;
-    line-height: 32px;
+    line-height: 30px;
     padding-left: 15px;
     margin-right: 5px;
     cursor: pointer;

+ 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;

+ 29 - 34
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({
@@ -44,13 +38,13 @@ class CurrentIll extends Component{
     const text = ev.target.innerText || ev.target.innerHTML;
     let {setDataTimer} = this.state; 
     let mainFinallyText = filterDataArr(mainText);
-    if(!mainFinallyText){
+    if(!mainFinallyText && !text){
       //弹窗提醒
       Notify.error("无法操作,请先输入主诉");
       this.setState({
         forbidInput:true
       })
-    }else if(!text) {//现病史框里没有内容时才设置模板
+    }else if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
       let num = moduleNum.num;//主诉使用了几个模板
       if(data.length==0 && !isChronic){
         clearTimeout(setDataTimer);
@@ -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,27 @@ 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){*/     //走慢病否,现病史消失滚动才出现bug修改
+   /* if(this.props.data&&this.props.data.length>0){
+      return ;
+    }
+      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===null||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 +153,7 @@ class CurrentIll extends Component{
   }
 }
 
+/*CurrentIll.contextTypes = {
+  scrollArea: React.PropTypes.object
+};*/
 export default CurrentIll;

+ 24 - 7
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) {
@@ -30,6 +28,7 @@ class DiagResultSearch extends Component {
         } else {
           if (e.target != diagSearch && e.target != addDiag && e.target.parentNode != addDiag && !$.contains(diagSearch, e.target)) {
             that.props.hideSearch();
+            that.props.setHighter(48)
           }
 
 
@@ -42,22 +41,40 @@ class DiagResultSearch extends Component {
 
   getSearchList(searchResult) {
     return <div className={style['search-result']}>
-
       {
         searchResult && searchResult.map((item) => {
-          return (<div key={item.id} className={style['search-result-item']}><DiagnosticItem title={true} item={item} clearInput={this.clearInput} type='search'/></div>)
+          return (<div key={item.id} className={style['search-result-item']}>
+            <DiagnosticItem setHighter={this.props.setHighter} title={true} item={item} clearInput={this.clearInput} type='search'/>
+          </div>)
         })
       }
     </div>
   }
 
   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={searchResult.length>6?true:false}
+                      style={{height:'257px'}}
+                      className={style["area"]}
+                      verticalContainerStyle={contStyle}
+                      verticalScrollbarStyle={barStyle}
+                      contentClassName="content">
           {this.getSearchList(searchResult)}
+          </ScrollArea>
         </SearchOption>
       </div>
     )

+ 4 - 4
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,9 +41,9 @@
 // }
 
 .search-result {
-    overflow-y: auto;
-    max-height: 225px;
-    min-height: 80px;
+    /*overflow-y: auto;
+    max-height: 225px;*/
+    // min-height: 80px;
 }
 
 .search-result-item {

+ 22 - 8
src/components/Diagnosis/index.jsx

@@ -1,10 +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 { getPageCoordinate,setPosition  } from '@utils/tools';
+import DiagResultSearch from '@containers/DiagResultSearch';
 import $ from 'jquery';
 
 class Diagnosis extends Component {
@@ -19,6 +17,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() {
@@ -29,25 +28,37 @@ class Diagnosis extends Component {
 
 
   showSearch() {
-    const { showSearch } = this.props
+    const { showSearch } = this.props;
     showSearch && showSearch()
   }
   hideSearch() {
-    const { hideSearch } = this.props
+    const { hideSearch } = this.props;
     hideSearch && hideSearch()
   }
   handleshowSearch(e) {
     this.props.show ? this.hideSearch() : this.showSearch()
     this.setState({ pageTop:getPageCoordinate(e).boxTop })
+    if(this.props.show){
+      this.props.setHighter(48)
+    }else{
+      setPosition(e,"#searchOption",this.props.setHighter)
+    }
   }
+  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>
+        <DiagnosticList refreshScroller={this.refreshScroller}></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} setHighter={this.props.setHighter} windowHeight={this.props.windowHeight} pageTop={this.state.pageTop} height={150}></DiagResultSearch>
         </div>
 
 
@@ -58,4 +69,7 @@ class Diagnosis extends Component {
   }
 }
 
+Diagnosis.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default Diagnosis;

+ 16 - 36
src/components/DiagnosticItem/index.jsx

@@ -25,11 +25,13 @@ class DiagnosticItem extends Component{
         this.getTips = this.getTips.bind(this)
     }
     confirm() {
+        this.props.setHighter&&this.props.setHighter(48)
         this.close();
         const diagType = 1;
         this.addDiagodal(diagType)
     }
     cancel() {
+        this.props.setHighter&&this.props.setHighter(48)
         this.close();
         const diagType = 2;
         this.addDiagodal(diagType)
@@ -62,42 +64,18 @@ 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();
+        this.context.scrollArea&&this.context.scrollArea.refresh();
+         //document.getElementById("diagnosisResult").scrollIntoView(true)
     }
     handleMouseEnterDrug() {
         this.setState({
@@ -146,5 +124,7 @@ class DiagnosticItem extends Component{
                 </span>)
     }
 }
-
+DiagnosticItem.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default DiagnosticItem;

+ 33 - 37
src/components/DiagnosticList/index.jsx

@@ -9,7 +9,7 @@ import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
 import store from '@store';
-import { initItemList ,setInitHistory} from '@store/async-actions/historyTemplates';
+import { initItemList ,setInitHistory,getHistempDetail} from '@store/async-actions/historyTemplates';
 import { pushAllDataList,inspectAndAssist ,deepClone} from '@utils/tools';
 import { dragBox } from '@utils/drag';
 import iconRadioDefault from '@common/images/icon-radio-default.png'
@@ -34,7 +34,8 @@ class DiagnosticList extends Component {
             disName:'',
             isAssessConfirm:false,
             hasOndel: false,
-            hasOnIndex: -1
+            hasOnIndex: -1,
+            activeItem:{}
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -108,40 +109,37 @@ 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,refreshScroller} = this.props;
         hideReferRecord && hideReferRecord();
-        if(typeConfig==0){//智能推送模式才自动填充
-            autoFillModules&&autoFillModules();
-        }
-        
+        autoFillModules&&autoFillModules();
+        setTimeout(function(){
+          refreshScroller()&&refreshScroller().scrollTop();
+        },100)
     }
-    referCase() {
-        const { hideHistoryCaseModal, items ,autoFillModules,typeConfig} = this.props
-        const {sign} = this.state;
+    referCase() {//确定
+        const { hideHistoryCaseModal, items ,autoFillModules,typeConfig} = this.props;
+        const {sign,activeItem} = this.state;
         hideHistoryCaseModal && hideHistoryCaseModal()
-        if (this.state.activeHistory === -1 && typeConfig==0) {//没有选择历史病例直接点确定
+        if (this.state.activeHistory === -1) {//没有选择历史病例直接点确定
             Notify.info("未选择历史病历,已默认展示慢病相关内容");
               const timer = setTimeout(function(){
                 autoFillModules && autoFillModules();
@@ -149,37 +147,35 @@ class DiagnosticList extends Component {
               },1000)
             return
         }
-        let baseList = store.getState();
+        // 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')       //引用
+        // let baseObj = items[this.state.activeHistory];
+        // pushAllDataList(baseObj.sign,'push',baseObj,'history')       //引用
+        store.dispatch(getHistempDetail(activeItem));
         this.props.getBilling();
         this.setState({
             activeHistory: -1,
-            sign:-1
+            sign:-1,
+            activeItem:{}
         })
     }
     closeHistoryCaseModal() {
         const { hideHistoryCaseModal ,autoFillModules,typeConfig} = this.props
         this.setState({
             activeHistory: -1,
-            sign:-1
+            sign:-1,
+            activeItem:{}
         })
         hideHistoryCaseModal && hideHistoryCaseModal()
-        if(typeConfig==0){//智能推送模式才自动填充
-            autoFillModules&&autoFillModules();
-        }
+        autoFillModules&&autoFillModules();
     }
     handleQuoteClick(item, index) {
         // const { handleQuoteClick } = this.props
         // handleQuoteClick && handleQuoteClick(item)
         this.setState({
             activeHistory: index,
-            sign:item.sign
+            sign:item.sign,
+            activeItem:item
         })
     }
     getHistoryCase() {
@@ -187,7 +183,7 @@ class DiagnosticList extends Component {
         return (<div className={style['history-info']}>
             {items.map((item, index) => {
                 return<div onClick={this.handleQuoteClick.bind(this, item, index)} style={this.state.activeHistory === index ? {color: '#3B9ED0'} : ''}>
-                    <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose} {item.inquiryDate}{item.sign==0?'(智能模式)':'(文本模式)'}
+                    <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose} {item.inquiryDate}
                 </div>
             })}
         </div>)
@@ -254,7 +250,7 @@ class DiagnosticList extends Component {
       })
     }
     render(){
-        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading} = this.props;
+        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller} = this.props;
         const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
@@ -286,7 +282,7 @@ class DiagnosticList extends Component {
                                     <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item)}}/>
                         </div>)
                     })}
-                     {treatment&&<Treat title={treatTitle}></Treat>}
+                     {treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
                      {showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
                                                title='管理和评估'
                                                icon={manageIcon}

+ 36 - 10
src/components/EMRContainer/index.jsx

@@ -11,45 +11,71 @@ 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 {
     constructor(props){
         super(props);
         this.$cont = React.createRef();
+        this.$div = React.createRef();
+        this.setHighter = this.setHighter.bind(this);
     }
     componentDidMount(){
         // 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";
+        this.$cont.current.style.minWidth = 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";
+            this.$cont.current.style.minWidth = width + "px";
           }
         });
     }
+
+    setHighter(ht){
+      // console.log(this.$div.current.scrollHeight);
+      if(this.$div.current){
+        this.$div.current.style.paddingBottom = ht+'px';
+      }
+    }
     render() {
-        return <div className={style['EMR-container']} ref={this.$cont} id="addScrollEvent">
+        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={1}
+                      horizontal={false}
+                      className={style["area"]}
+                      verticalContainerStyle={contStyle}
+                      verticalScrollbarStyle={barStyle}
+                      contentClassName="content">
             <InfoTitle></InfoTitle>
-            <div className={style['inner']}>
+            <div className={style['inner']} id="EmrContainer" ref={this.$div}>
                 <MainSuit></MainSuit>
                 <CurrentIll></CurrentIll>
                 <OtherHistory></OtherHistory>
                 <div>
-                  <CheckBody></CheckBody>
+                  <CheckBody setHighter={this.setHighter}></CheckBody>
                 </div>
-                <Inspect></Inspect>
-                <AssistCheck></AssistCheck>
-                <Diagnosis></Diagnosis>
+                <Inspect setHighter={this.setHighter}></Inspect>
+                <AssistCheck setHighter={this.setHighter}></AssistCheck>
+                <Diagnosis setHighter={this.setHighter}></Diagnosis>
                 <AdviceContainer></AdviceContainer>
             </div>
             <OperationContainer></OperationContainer>
+          </ScrollArea>
         </div>
     }
 }

+ 7 - 3
src/components/EMRContainer/index.less

@@ -1,9 +1,13 @@
 @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 ;
+  /*padding: 0px 0 10px 0 ;*/
   box-sizing: border-box;
   position: absolute;
   // min-width: 700px;
@@ -14,7 +18,7 @@
 }
 .inner{
   padding-top:20px;
-  padding-bottom: 20px;
+  padding-bottom: 48px;
 }
 .keep {
     position: absolute;

+ 2 - 2
src/components/Emergency/HisList/index.jsx

@@ -192,8 +192,8 @@ class HisList extends Component {
         <div className={style['filter-box']}>
           <span className={style['filter']}>筛选:</span>
           <span className={hasSecond==-1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,-1)}>默认</span>
-          <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有二次诊断</span>
-          <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有二次诊断</span>
+          <span className={hasSecond==1?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,1)}>有修正诊断</span>
+          <span className={hasSecond==0?`${style['condition']} ${style['select']}`:style['condition']} onClick={this.handleFilter.bind(this,0)}>没有修正诊断</span>
         </div>
       </div>
       <div className={style['list']}>

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

@@ -190,7 +190,7 @@ class EmergencyHis extends Component{
                   </p>:''}
                   <div className={style['add-diag']}>
                     <div>
-                      <span>添加二次诊断:</span>
+                      <span>添加修正诊断:</span>
                       <input className={style['add-inp']} 
                             ref={this.searInp}
                             onInput={(e) => { 
@@ -202,7 +202,7 @@ class EmergencyHis extends Component{
                             disabled={data.length==0?true:false}/>
                       <span className={this.getBtnStyle()} onClick={!valChange?this.handleAdd:''}>确认添加</span>
                     </div>
-                    <p className={style['add-tip']}>说明:二次诊断只会对导出数据有影响(只为AI建模使用)并不会对真实病历产生任何影响!</p>
+                    <p className={style['add-tip']}>说明:修正诊断只会对导出数据有影响(只为AI建模使用)并不会对真实病历产生任何影响!</p>
                   </div>
                 </div>
               </div>

+ 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;

+ 11 - 22
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,13 +124,14 @@
   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;
+  // padding-top: 20px;
   box-sizing: border-box;
   margin-left: -450px;
   // margin-top: -415px;
@@ -157,6 +145,7 @@
     width: 100%;
     max-height: 800px;
     position: relative;
+    top:10px;
     float: left;
     // position: absolute;
     // left: 50%;
@@ -168,16 +157,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{

+ 25 - 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) => {
@@ -67,6 +68,7 @@ class Inspect extends React.Component {
         }
       }
     });
+    this.props.setContext(this.context)
   }
   handleBindFileApi(){
     const {message} = this.props;
@@ -198,8 +200,15 @@ class Inspect extends React.Component {
       importLis:!flg
     })
   }
+  refreshScroller(){
+    //滚动条对象
+    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 {setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth, 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 +260,14 @@ 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}
+              setHighter={setHighter}
+              refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}
               handlePush={fetchPushInfos}
@@ -273,6 +285,7 @@ class Inspect extends React.Component {
               getInfomation={getInfomation}
               inspectVal={inspectVal}
               windowHeight={windowHeight}
+              windowWidth={windowWidth}
             >
             </AddInspect>
           </div>
@@ -300,4 +313,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: 99;
+        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;

+ 61 - 48
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
@@ -77,7 +71,10 @@ class MainSuit extends Component{
         }) 
       }
     }else{
-      if(datas.length==0 && !innerText.trim()){
+      window.event.cancelBubble = true;
+      // IE 默认会有一个<br>
+      // if(datas.length==0 && !innerText.trim()){
+      if(datas.length==0 && innerText == '<br>'){
         getCommonSymptoms && getCommonSymptoms();
         this.setState({
           symptom:true
@@ -91,7 +88,7 @@ class MainSuit extends Component{
     if(item.select.length>0){
       const {clearCommS,insertMain,getData} = this.props;
       // 获取主诉模板
-      getData && getData();
+      // getData && getData();
       // 让模板出现
       this.setState({
           symptom: false,
@@ -134,34 +131,23 @@ 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){
     const ev = e || window.event;
     const data = ev.target.innerText || ev.target.innerHTML;
-    const {getSearchData,searchData,datas,pushMessage,reTotalHide,saveText} = this.props;
+    const {getSearchData,searchData,datas,pushMessage,reTotalHide,saveText,clearSearch,CommonSymptoms,getCommonSymptoms} = this.props;
     const {overFlag,inpText} = this.state;
     reTotalHide && reTotalHide();//重置homePage中的控制项
     const that = this;
@@ -172,12 +158,13 @@ class MainSuit extends Component{
         ev.target.blur();
         return
       }
-      ev.target.innerText?(ev.target.innerText = data.substr(0,config.limited)):(ev.target.innerHTML = data.substr(0,config.limited));  //输入法内输入多个字再按enter的情况
       ev.target.blur();
-      
+      ev.target.innerText?(ev.target.innerText = data.substr(0,config.limited)):(ev.target.innerHTML = data.substr(0,config.limited));  //输入法内输入多个字再按enter的情况
+      // ev.target.blur();
       this.setState({
         inpText:data.substr(0,config.limited),
-        overFlag:true
+        overFlag:true,
+        symptom:false
       })
       return false;
     }
@@ -189,16 +176,38 @@ class MainSuit extends Component{
       return false;
     }
     // 有输入内容或搜索结果时关闭,否则显示
-    if(data && data.trim()||searchData.length>0){
+    // if(data && data.trim()||searchData.length>0){
+    if(data && data.trim()){
+      clearTimeout(this.state.timer);
+      const timer = setTimeout(function(){
+        pushMessage && pushMessage(data);
+        //调搜索接口 使用模板走EditableSpan里的搜索方法
+        getSearchData && getSearchData({inpStr:data,boxMark:1,itemType:0});
+      },config.delayTime);
       this.setState({
-        symptom:false
+        symptom:false,
+        timer
       })
     }else{
+      clearTimeout(this.state.timer);
+      // 内容为空-清空搜索数据-显示常见
+      clearSearch();
+      // 慢病流程下常见会被清空,所以要重新获取
+      if(CommonSymptoms.length == 0){
+        getCommonSymptoms && getCommonSymptoms();
+      }
       this.setState({
         symptom:true
       })
     }
-    clearTimeout(this.state.timer);
+
+    // IE11聚焦时也会触发change事件,导致常见症状下拉出不来
+    if(isIE() && data == '<br>'){
+      this.setState({
+        symptom:true
+      })
+    }
+    /*clearTimeout(this.state.timer);
     const timer = setTimeout(function(){
       pushMessage && pushMessage(data);
       //调搜索接口 使用模板走EditableSpan里的搜索方法
@@ -206,7 +215,7 @@ class MainSuit extends Component{
     },config.delayTime);
     this.setState({
       timer
-    });
+    });*/
 
   }
   //除主诉外 其他是否为空
@@ -243,11 +252,6 @@ class MainSuit extends Component{
     if(!isIE()){
       inner?(e.target.innerText=""):(e.target.innerHTML="")
       freeText && freeText(data.trim());
-      // 慢病模板获取:精确匹配"糖尿病复诊",储存慢病字段
-      /*let flg = this.ifClear();
-      if((data.trim()=='糖尿病复诊'||data.trim()=='糖尿病(复诊)'||data.trim()=='糖尿病(复诊)') && !flg){
-        saveChronic && saveChronic({name:'糖尿病',conceptId:21773});
-      }*/
     }else{
       if(datas.length==0){
         const ev = e || window.event;
@@ -257,22 +261,28 @@ class MainSuit extends Component{
       }
     }
     // 延时关闭常见症状下拉、清空搜索结果,不延时会影响选中
-      const clearTimer = setTimeout(function(){
+     /* const clearTimer = setTimeout(function(){
         clearSearch && clearSearch();
         clearTimeout(clearTimer);
-      },config.delayTime-200); 
+      },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 {saveChronic,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){      //文本模式
-      return <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
+    const mode = readMode===null||readMode===-1?type:readMode;
+    if(+mode===1){      //文本模式
+      return <Textarea title='主诉' boxMark='1' saveChronic={saveChronic} isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
     }
     return  <div className={style['main-suit']}>
       <ItemBox
@@ -294,4 +304,7 @@ class MainSuit extends Component{
   }
 }
 
+/*MainSuit.contextTypes = {
+  scrollArea: React.PropTypes.object
+};*/
 export default MainSuit;

+ 12 - 1
src/components/MedicalInfo/index.jsx

@@ -8,6 +8,7 @@ class MedicalInfo extends Component {
         super(props);
         this.$inp = React.createRef();
         this.$cont = React.createRef();
+      this.$ul = React.createRef();
         this.state={
           val:'',
           hasSearch: false,
@@ -21,6 +22,12 @@ class MedicalInfo extends Component {
     }
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
+        const that = this;
+        if(searchResult&&searchResult.length>0){
+          setTimeout(function(){
+            that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+          },100);
+        }
         return searchResult && searchResult.map((item) => {
           return <li key={item.conceptId}
                      title='点击查看详情'
@@ -81,6 +88,10 @@ class MedicalInfo extends Component {
         const height = getWindowInnerHeight()-170;
         this.$cont.current.style.height = height+"px";
       }
+      if(this.$ul.current){
+        const height = getWindowInnerHeight()-270;
+        this.$ul.current.style.height = height+"px";
+      }
     });
   }
   componentWillReceiveProps(){
@@ -103,7 +114,7 @@ class MedicalInfo extends Component {
               </div>
               {searchResult&&searchResult.length>0?<div className={style['result']}>
                     <p className={style['title']}>查询内容</p>
-                    <ul>
+                    <ul ref={this.$ul}>
                       {this.getSearchList()}
                     </ul>
               </div>:<p className={style['no-data']}>{hasSearch?'搜索中...':msg}</p>}

+ 5 - 2
src/components/MedicalInfo/index.less

@@ -56,10 +56,13 @@
         border: none;
     }
     .result{
-        padding: 78px 5px 0 0;
+        margin-top:78px;
+        padding: 0 5px 0 0;
         height: 100%;
-        overflow: auto;
         box-sizing: border-box;
+        ul{
+            overflow: auto;
+        }
         li{
             border-bottom:1px #CECECE solid;
             line-height: 30px;

+ 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} 

+ 13 - 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){
     //输入只有一个~或/时判断两边是否为合理数字,有多个为不合理
@@ -213,10 +195,19 @@ class NumberDrop extends Component{
       saveDoms&&saveDoms(that.$span);
     })
   }
+  componentWillReceiveProps(nextProps){
+    if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
+      return
+    }
+    this.setState({
+      placeholder:nextProps.placeholder
+    })
+  }
   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 +215,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 +224,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>
   }

+ 79 - 56
src/components/Operation/index.jsx

@@ -3,12 +3,13 @@ import style from "./index.less";
 import printImg from '@common/images/icon_print_blue.png';
 import preview from '@common/images/preview.png';
 import saveHistory from '@common/images/saveHistory.png';
+import cancelTag from '@common/images/icon_back.png';
 import PrintPreviewContainer from '@containers/PrintPreviewContainer';
 import PreviewContainer from '@containers/PreviewContainer';
 import { ConfirmModal, Notify } from '@commonComp';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
-import {getAllDataList,getAllDataStringList,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
+import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
 import {dragBox} from '@utils/drag';
 import store from '@store';
 import $ from 'jquery';
@@ -94,7 +95,7 @@ class Operation extends Component {
     let baseList = store.getState();
     let jsonData = getAllDataList(baseList);
     let jsonStr = getAllDataStringList(baseList);
-    let flg = isAllClear(jsonData,jsonStr,baseList);
+    let flg = isAllPartClear(jsonData,jsonStr,baseList);
     if(flg){
       this.setState({
         type: type,
@@ -154,68 +155,81 @@ class Operation extends Component {
     let jsonStr = getAllDataStringList(baseList);
     let whichSign = baseList.typeConfig.typeConfig;
     let tmpLis = baseList.tabTemplate.items;
-    let flg = isAllClear(jsonData,jsonStr,baseList)
+    let flg = isAllClear(jsonStr)
     if(!flg){
       Notify.info('模板数据不能为空')
       return false
     }
-    // console.log(jsonStr,'文本')
+    // console.log(jsonStr.chief,'文本')
     // console.log(jsonData,'结构')       //测试需要用到,不要删了
     // console.log(tmpLis,'接口返回的')
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
       // let dataJson = tmpLis[i].dataJson;
       // console.log(jsonStr.diag , JSON.parse(dataStr).diag)
-      if(whichSign == 0){
-        // console.log(filterDataArr(JSON.parse(jsonStr.present)) , filterDataArr(JSON.parse(JSON.parse(dataStr).present)))
-        if(
-          filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
-          filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
-          filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
-          filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
-          jsonStr.lis == JSON.parse(dataStr).lis &&
-          jsonStr.pacs == JSON.parse(dataStr).pacs &&
-          jsonStr.diag == JSON.parse(dataStr).diag &&
-          jsonStr.advice == JSON.parse(dataStr).advice
-          // JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
-          // JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
-          // JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
-          // JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
-          // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-          // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-          // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-          // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-          // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&    
-          // JSON.stringify(jsonData.mainSuitSelecteds) == JSON.stringify(JSON.parse(dataJson).mainSuitSelecteds) &&      
-          // JSON.stringify(jsonData.currentIllSelecteds) == JSON.stringify(JSON.parse(dataJson).currentIllSelecteds) &&     
-          // JSON.stringify(jsonData.otherHistorySelecteds) == JSON.stringify(JSON.parse(dataJson).otherHistorySelecteds) && 
-          // JSON.stringify(jsonData.checkBodySelecteds) == JSON.stringify(JSON.parse(dataJson).checkBodySelecteds) &&     
-          // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
-        ){
-          Notify.info('该模板已保存');
-          return false;
-        }
-      }else if(whichSign == 1){
-        if(
-          jsonStr.chief == JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')) && 
-          jsonStr.present == JSON.stringify(eval('('+JSON.parse(dataStr).present+')')) && 
-          jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
-          jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')')) &&
-          jsonStr.lis == JSON.parse(dataStr).lis &&
-          jsonStr.pacs == JSON.parse(dataStr).pacs &&
-          jsonStr.diag == JSON.parse(dataStr).diag &&
-          jsonStr.advice == JSON.parse(dataStr).advice
-          // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-          // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-          // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-          // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-          // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&        
-          // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
-        ){
-          Notify.info('该模板已保存');
-          return false;
-        }
+      if(
+        filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
+        filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
+        filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
+        filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+        jsonStr.lis == JSON.parse(dataStr).lis &&
+        jsonStr.pacs == JSON.parse(dataStr).pacs &&
+        jsonStr.diag == JSON.parse(dataStr).diag &&
+        jsonStr.advice == JSON.parse(dataStr).advice
+      ){
+        Notify.info('该模板已保存');
+        return false;
       }
+      // if(whichSign == 0){
+      //   // console.log(filterDataArr(JSON.parse(jsonStr.present)) , filterDataArr(JSON.parse(JSON.parse(dataStr).present)))
+      //   if(
+      //     filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
+      //     filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
+      //     filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
+      //     filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+      //     jsonStr.lis == JSON.parse(dataStr).lis &&
+      //     jsonStr.pacs == JSON.parse(dataStr).pacs &&
+      //     jsonStr.diag == JSON.parse(dataStr).diag &&
+      //     jsonStr.advice == JSON.parse(dataStr).advice
+      //     // JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
+      //     // JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
+      //     // JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
+      //     // JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
+      //     // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
+      //     // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
+      //     // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
+      //     // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
+      //     // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&    
+      //     // JSON.stringify(jsonData.mainSuitSelecteds) == JSON.stringify(JSON.parse(dataJson).mainSuitSelecteds) &&      
+      //     // JSON.stringify(jsonData.currentIllSelecteds) == JSON.stringify(JSON.parse(dataJson).currentIllSelecteds) &&     
+      //     // JSON.stringify(jsonData.otherHistorySelecteds) == JSON.stringify(JSON.parse(dataJson).otherHistorySelecteds) && 
+      //     // JSON.stringify(jsonData.checkBodySelecteds) == JSON.stringify(JSON.parse(dataJson).checkBodySelecteds) &&     
+      //     // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
+      //   ){
+      //     Notify.info('该模板已保存');
+      //     return false;
+      //   }
+      // }else if(whichSign == 1){
+      //   if(
+      //     jsonStr.chief == JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')) && 
+      //     jsonStr.present == JSON.stringify(eval('('+JSON.parse(dataStr).present+')')) && 
+      //     jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
+      //     jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')')) &&
+      //     jsonStr.lis == JSON.parse(dataStr).lis &&
+      //     jsonStr.pacs == JSON.parse(dataStr).pacs &&
+      //     jsonStr.diag == JSON.parse(dataStr).diag &&
+      //     jsonStr.advice == JSON.parse(dataStr).advice
+      //     // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
+      //     // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
+      //     // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
+      //     // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
+      //     // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&        
+      //     // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
+      //   ){
+      //     Notify.info('该模板已保存');
+      //     return false;
+      //   }
+      // }
     }
     return true;
   }
@@ -277,11 +291,16 @@ 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);
+      //更新滚动条
+      const that = this;
+      setTimeout(function(){
+        that.context.scrollArea&&that.context.scrollArea.refresh();
+      });
     } else if (type == 3) {
       if (this.state.title.trim() == '') {
         Notify.error('请输入模板名称')
@@ -323,12 +342,13 @@ class Operation extends Component {
   render() {
     const { showPrint, closePrint, showPreview, closePreview } = this;
     const { visible, preVisible,diagShow } = this.props.print;
-    const {winWidth} = this.props;
+    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>
+      <span className={style['preButton']} onClick={cancelDelTag}><img src={cancelTag} /> 还原标签</span>
       <span className={winWidth<=1082?`${style['saveButton']} ${style['minstyle']}`: style['saveButton']} onClick={() => { this.saveAll(1) }}>保存</span>
       <span className={winWidth<=1082?`${style['clearButton']} ${style['saveButton']} ${style['minstyle']}`:`${style['clearButton']} ${style['saveButton']}`} onClick={() => { this.clearAll(2) }}>清除</span>
       {visible?<PrintPreviewContainer visible={visible} onClose={closePrint} />:null}
@@ -352,4 +372,7 @@ class Operation extends Component {
   }
 }
 
+Operation.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default Operation;

+ 10 - 9
src/components/Operation/index.less

@@ -1,6 +1,7 @@
 @import "~@less/variables.less";
 .container {
-    padding-left: 80px;
+    .contentZIndex2;
+    padding-left: 20px;
     padding-top: 10px;
     position: fixed;
     bottom: 0;
@@ -51,28 +52,28 @@
         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;
         float: right;
         margin-right: 20px;
     }
-    .clearButton {
-        border: 1px solid #414141;
-        border-radius: 4px;
-        background-color: #fff;
-        color: #000;
-    }
     .minstyle{
         width: 60px;
         margin-left: 15px;
         margin-right: 10px;
         font-size: 13px;
     }
+    .clearButton {
+      border: 1px solid #414141;
+      border-radius: 4px;
+      background-color: #fff;
+      margin-left: 0;
+      margin-right: 0;
+      color: #000;
+    }
     .modal{
         position: fixed;
         left: 50%;

+ 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===null||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;

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

@@ -66,7 +66,7 @@ class DetailsModal extends Component {
                                         <span className={styles['details-content-title-name']}>{item.title}</span>
                                         <div className={styles['details-content-title-line']}></div>
                                     </div>
-                                    <div dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></div>
+                                    <pre dangerouslySetInnerHTML ={{__html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)}}></pre>
                                 </div>)
                             })}
                             

+ 18 - 3
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%;
     }
@@ -65,7 +67,15 @@
     height: 100%;
     padding: 0 180px 0 40px;
     overflow-y: auto;
-    line-height: 24px;
+    ul, ol {
+        padding: 0 0 0 15px;
+      }
+      ul li {
+        list-style: disc;
+      }
+      ol li{
+       list-style: decimal;
+     }
 }
 .content-menu-box {
     position: absolute;
@@ -120,4 +130,9 @@
     opacity: .6;
     filter:alpha(opacity=60);
     -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
-}
+}
+pre {
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    font-family: inherit;
+  }

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

@@ -45,7 +45,7 @@ class TipsMsg extends Component {
                             __html: item.title
                           }}
                         />
-                        <div
+                        <pre
                           dangerouslySetInnerHTML={{
                             __html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)
                           }}

+ 19 - 1
src/components/PushItems/TipsMsg/index.less

@@ -1,6 +1,19 @@
 @import "~@less/variables.less";
+@import "~@less/base.less";
+
 .tips{
-    border:1px solid #EAEDF1;
+  
+   ul, ol {
+     padding: 0 0 0 15px;
+   }
+   ul li {
+     list-style: disc;
+   }
+   ol li{
+    list-style: decimal;
+  }
+
+  border:1px solid #EAEDF1;
     .tips-title,h1{
       font-size: 14px;
       color: #000;
@@ -119,4 +132,9 @@
     img {
       display: none;
     }
+    pre {
+      white-space: pre-wrap;
+      word-wrap: break-word;
+      font-family: inherit;
+    }
   }

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

@@ -58,6 +58,7 @@ class PushItems extends Component {
 
   billing() {
     const { assay, check } = this.props.pushMessage;
+    const {EMRScrollCont} = this.props;
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
@@ -102,7 +103,11 @@ class PushItems extends Component {
       }
       store.dispatch(addAssistLabel(checkArr))
     }
-    if(checkedAssay.length > 0){
+    //滚动到底部
+    setTimeout(function(){
+      EMRScrollCont&&EMRScrollCont.scrollBottom();
+    },100);
+    /*if(checkedAssay.length > 0){
       document.getElementById("inspectResultData").scrollIntoView(true)
     }else{
       if(checkedCheck.length > 0){
@@ -110,7 +115,7 @@ class PushItems extends Component {
       }else{
         return;
       }
-    }
+    }*/
   }
 
   changeAssay(item) {

+ 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;
-  }
-}

+ 16 - 23
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,7 @@ class RadioDrop extends Component{
     this.state={
       editable:false,
       timer:null,
-      boxLeft:0,
-      boxTop:0,
-      tmpScroll:0,
-      tmpTop:0,
+      tmpDom:null
     };
     this.$cont = React.createRef();
     this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
@@ -75,30 +72,25 @@ class RadioDrop extends Component{
     handleSelect&&handleSelect({ikey,id:item.id,text,mainSaveText,value});
   }
   handleShow(e){
-    //e.stopPropagation();
+    // e.stopPropagation();
     const {handleShow,ikey,id,patId} = this.props;
     const that = this;
-    const timer = setTimeout(function(){
+    const timer = setTimeout(()=>{
       if (that.state.editable) {//如果处于编辑状态点击不显示下拉框
         return
       }else {
+        document.activeElement.blur()//chrome41有效,但是失去焦点的span仍能编辑
+        $(e.target).parent().prev().attr({"contentEditable":false})
+        this.setState({
+          tmpDom:e.target
+        })
         handleShow && handleShow({ikey,id:patId||id});
       }
     },300);
     
     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 +137,22 @@ 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;
+    const {tmpDom} = this.state
+    if(!show&&tmpDom){
+      $(tmpDom).parent().prev().attr({"contentEditable":true})
+    }
     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>
   }
 }

+ 14 - 25
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,12 +22,9 @@ 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
+      over:false,
+      tmpDom:null
     };
     this.$cont = React.createRef();
     this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
@@ -82,20 +79,21 @@ class RadioInpDrop extends Component{
     //e.stopPropagation();
     const {handleShow,ikey,id,patId} = this.props;
     const that = this;
-    const timer = setTimeout(function(){
+    const timer = setTimeout(()=>{
       if (that.state.editable) {//如果处于编辑状态点击不显示下拉框
         return
       }else {
+        document.activeElement.blur()//chrome41有效,但是失去焦点的span仍能编辑
+        $(e.target).parent().parent().prev().attr({"contentEditable":false})
+        this.setState({
+          tmpDom:e.target
+        })
         handleShow && handleShow({ikey,id:patId||id});
       }
     },300);
     
     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 +188,14 @@ 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;
+    const {tmpDom} = this.state
+    if(!show&&tmpDom){
+      $(tmpDom).parent().parent().prev().attr({"contentEditable":true})
+    }
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
            onBlur={this.handleEditLabel}
@@ -216,7 +205,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>
   }
 }

+ 12 - 1
src/components/ScaleSearch/index.jsx

@@ -8,6 +8,7 @@ class ScaleSearch extends Component {
     super(props);
     this.$inp = React.createRef();
     this.$cont = React.createRef();
+    this.$ul = React.createRef();
     this.state={
       val:'',
       hasSearch: false,
@@ -37,6 +38,12 @@ class ScaleSearch extends Component {
   }
   getSearchList() {
     const { searchResult } = this.props;
+    const that = this;console.log(getWindowInnerHeight()-270);
+    if(searchResult&&searchResult.length>0){
+      setTimeout(function(){
+        that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+      },100);
+    }
     return searchResult && searchResult.map((item) => {
       return <li key={item.conceptId}
                  title='点击查看详情'
@@ -96,6 +103,10 @@ class ScaleSearch extends Component {
         const height = getWindowInnerHeight()-170;
         this.$cont.current.style.height = height+"px";
       }
+      if(this.$ul.current){
+        const height = getWindowInnerHeight()-270;
+        this.$ul.current.style.height = height+"px";
+      }
     });
   }
   componentWillReceiveProps(){
@@ -118,7 +129,7 @@ class ScaleSearch extends Component {
           </div>
           {searchResult&&searchResult.length>0?<div className={style['result']}>
             <p className={style['title']}>查询内容</p>
-            <ul>
+            <ul ref={this.$ul}>
               {this.getSearchList()}
             </ul>
           </div>:<p className={style['no-data']}>{hasSearch?'搜索中...':msg}</p>}

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


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov