Kaynağa Gözat

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

zhouna 5 yıl önce
ebeveyn
işleme
64e17d9082
100 değiştirilmiş dosya ile 1250 ekleme ve 1262 silme
  1. 9 0
      newICSS.iml
  2. 1 0
      package.json
  3. 3 1
      src/common/components/Calendar/index.jsx
  4. 2 2
      src/common/components/Calendar/index.less
  5. 3 2
      src/common/components/ComplexModal/index.less
  6. 3 2
      src/common/components/ConfirmModal/index.less
  7. 2 2
      src/common/components/DelToast/index.less
  8. 3 14
      src/common/components/DropList/index.jsx
  9. 73 28
      src/common/components/EditableSpan/index.jsx
  10. 2 0
      src/common/components/EditableSpan/index.less
  11. 4 43
      src/common/components/InlineTag/index.jsx
  12. 1 1
      src/common/components/InspectCommon/index.less
  13. 15 4
      src/common/components/ItemBox/index.jsx
  14. 1 2
      src/common/components/ItemBox/index.less
  15. 4 1
      src/common/components/Loading/index.jsx
  16. 2 1
      src/common/components/Loading/index.less
  17. 2 1
      src/common/components/MiniToast/index.less
  18. 0 15
      src/common/components/Modal/body/ModalBody.jsx
  19. 0 10
      src/common/components/Modal/body/index.less
  20. 0 31
      src/common/components/Modal/footer/ModalFooter.jsx
  21. 0 31
      src/common/components/Modal/footer/index.less
  22. 0 38
      src/common/components/Modal/header/ModalHeader.jsx
  23. 0 46
      src/common/components/Modal/header/index.less
  24. 0 130
      src/common/components/Modal/index.jsx
  25. 0 31
      src/common/components/Modal/index.less
  26. 1 1
      src/common/components/Notify/index.less
  27. 5 6
      src/common/components/NumberPan/index.jsx
  28. 3 5
      src/common/components/NumberUnitPan/index.jsx
  29. 5 2
      src/common/components/SearchOption/index.jsx
  30. 1 2
      src/common/components/SearchOption/index.less
  31. 63 11
      src/common/components/Textarea/index.jsx
  32. 1 1
      src/common/components/Textarea/index.less
  33. 2 1
      src/common/components/WrapModalContainer/index.less
  34. 0 2
      src/common/components/index.js
  35. BIN
      src/common/images/btn-closed.png
  36. BIN
      src/common/images/btn-open.png
  37. BIN
      src/common/images/icon_back.png
  38. 7 1
      src/common/less/base.less
  39. 21 3
      src/common/less/variables.less
  40. 1 1
      src/components/AddAssistCheck/Textarea/index.less
  41. 52 8
      src/components/AddAssistCheck/index.jsx
  42. 3 3
      src/components/AddAssistCheck/index.less
  43. 2 2
      src/components/AddInspect/SlideExcel/index.jsx
  44. 7 3
      src/components/AddInspect/SlideExcel/index.less
  45. 45 15
      src/components/AddInspect/SlideSelect/index.jsx
  46. 11 8
      src/components/AddInspect/SlideSelect/index.less
  47. 60 11
      src/components/AddInspect/index.jsx
  48. 4 3
      src/components/AddInspect/index.less
  49. 14 10
      src/components/AssessResult/ChartItem/index.jsx
  50. 20 13
      src/components/AssessResult/ScaleItem/index.jsx
  51. 1 0
      src/components/AssessResult/index.less
  52. 14 105
      src/components/AssistCheck/index.jsx
  53. 2 3
      src/components/AssistCheck/index.less
  54. 48 0
      src/components/Banner/ModeChange/index.jsx
  55. 98 0
      src/components/Banner/ModeChange/index.less
  56. 32 52
      src/components/Banner/index.jsx
  57. 13 73
      src/components/Banner/index.less
  58. 14 25
      src/components/CheckBody/index.jsx
  59. 1 0
      src/components/CheckBody/index.less
  60. 40 18
      src/components/ChronicInfo/index.jsx
  61. 11 0
      src/components/ChronicInfo/index.less
  62. 13 2
      src/components/CommonSymptom/index.jsx
  63. 14 1
      src/components/CommonSymptom/index.less
  64. 3 3
      src/components/CopyRight/CopyModalSon/index.less
  65. 3 3
      src/components/CopyRight/DiscontentSon/index.less
  66. 1 13
      src/components/CopyRight/index.less
  67. 29 34
      src/components/CurrentIll/index.jsx
  68. 24 7
      src/components/DiagResultSearch/index.jsx
  69. 4 4
      src/components/DiagResultSearch/index.less
  70. 22 8
      src/components/Diagnosis/index.jsx
  71. 16 36
      src/components/DiagnosticItem/index.jsx
  72. 33 36
      src/components/DiagnosticList/index.jsx
  73. 36 10
      src/components/EMRContainer/index.jsx
  74. 7 3
      src/components/EMRContainer/index.less
  75. 6 4
      src/components/Emergency/HisList/index.jsx
  76. 5 1
      src/components/Emergency/HisList/index.less
  77. 15 16
      src/components/Emergency/index.jsx
  78. 3 3
      src/components/Emergency/index.less
  79. 14 25
      src/components/EmergencyProcedure/EmergencyModal/index.less
  80. 10 3
      src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx
  81. 92 35
      src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx
  82. 4 4
      src/components/EmergencyProcedure/EmergencyPart/index.jsx
  83. 2 2
      src/components/EmergencyProcedure/EmergencyPart/index.less
  84. 10 10
      src/components/EmergencyProcedure/emergency.js
  85. 2 3
      src/components/EmergencyProcedure/index.less
  86. 14 12
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  87. 5 4
      src/components/HistoryCaseContainer/HistoryList/index.less
  88. 1 1
      src/components/HistoryCaseContainer/index.less
  89. 1 1
      src/components/InfoTitle/index.jsx
  90. 1 1
      src/components/InfoTitle/index.less
  91. 25 9
      src/components/Inspect/index.jsx
  92. 6 4
      src/components/Inspect/index.less
  93. 61 48
      src/components/MainSuit/index.jsx
  94. 17 6
      src/components/MedicalInfo/index.jsx
  95. 5 2
      src/components/MedicalInfo/index.less
  96. 3 46
      src/components/MultSpread/index.jsx
  97. 1 0
      src/components/MultSpread/index.less
  98. 3 9
      src/components/Multiple/SlideItem/index.jsx
  99. 7 29
      src/components/Multiple/index.jsx
  100. 0 0
      src/components/Multiple/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"

+ 3 - 1
src/common/components/Calendar/index.jsx

@@ -114,7 +114,9 @@ class Calendar extends React.Component {
       second: this.state.select.second
     };
     this.setState({
-      select: info
+      select: info,
+      month:this.month,
+      year:this.year
     });
     // this.props.timeSure(Object.assign({}, info))
     this.props.handleChange(info);

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

+ 73 - 28
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();
@@ -62,6 +63,8 @@ class EditableSpan extends Component{
     const {handleChange,boxMark,i,handleSearch,value,mainSaveText,mainIds,handleClear} = this.props;
     const {labelVal,searchPre} = this.state;
     const text1 = e.target.innerText || e.target.innerHTML;
+    // e.newValue IE浏览器DOMCharacterDataModified监听
+    // const text1 = e.target.innerText || e.target.innerHTML || e.newValue;
     let mainText = filterDataArr(mainSaveText);//主诉字数
     if(+boxMark==1){
       if(mainText.length >= config.limited){
@@ -120,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) {
@@ -146,13 +149,13 @@ 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;
     //禁止回车事件
     if(ev.keyCode==13){return false;}
-    //backspace事件
-    if(ev.keyCode==8){
+    //backspace事件 和delete
+    if(ev.keyCode==8 || ev.keyCode==46){
       //用于对比backspace前后的值
       this.setState({
         preVal:innerVal
@@ -169,33 +172,66 @@ 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;
     let innerVal = target.innerText || target.innerHTML,ele,boxTop;
+    // 可编辑div不支持oninput事件,用此事件替代
+    /*if(isIE() && innerVal != preVal){
+      this.onChange(ev);
+    }*/
+    if(ev.keyCode==46){//delete
+      //判断nexObj
+      // 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});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
+        //如果后一个不是标签,则光标移到最前
+        if(nextObj && nextObj[0].nodeName !=="DIV"){
+          nextObj.focus();
+        }
+      }
+      //action里往后删除
+      if(innerVal == preVal){
+        let data = innerVal.trim();
+        if(nextObj && !config.punctuationReg.test(data) || data=='<br>'){
+          handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'del'});
+          // nextObj.focus();  
+          if(nextObj && nextObj[0] && nextObj[0].nodeName !=="DIV"){
+            // IE浏览器focus光标在最后,其他浏览器在最前
+            nextObj.focus();
+          }
+          /*this.setState({
+            index: null
+          })*/
+        }
+      }
+    }
+
     if(ev.keyCode==8){     
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
       // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
@@ -226,19 +262,21 @@ 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});
+          handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'backsp'});
           this.moveEnd(obj[0]);  
           this.setState({
             index: null
           })
         }
       }
-      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();
+      }
     }
     
   }
@@ -248,15 +286,22 @@ 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;
     if(value){
       this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
     }
     if(isIE()){
-      $(this.$span.current).onIe8Input(function(e){
+      // 左右移动没问题,但是输入过程中会失焦,并且有时光标在但是无法输入 
+      // $(this.$span.current)[0].addEventListener('DOMCharacterDataModified', function(e){that.onChange(e);}, false);
+      // 此方法会影响左右切换时光标消失
+      /*$(this.$span.current).onIe8Input(function(e){
         this.onChange(e)
-      },this);
+      },this);*/
     }
   }
   /*cancelSelect(e){//双击不选中
@@ -267,7 +312,6 @@ class EditableSpan extends Component{
         sel.removeAllRanges();
       }
     }*/
-
   getClass(){
     const {full,value,saveText,i} = this.props;
     const preSelected = saveText[i-1];
@@ -279,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 - 0
src/common/components/EditableSpan/index.less

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

+ 4 - 43
src/common/components/InlineTag/index.jsx

@@ -15,49 +15,16 @@ import {handleEnter} from '@utils/tools.js';
 class InlineTag extends Component {
   constructor(props){
     super(props);
-    this.$box = React.createRef();
     this.$span = React.createRef();
-    this.$pre = React.createRef();
-    this.$suf = React.createRef();
     this.state = {
-      editable:false,
       value:props.value||'',
       placeholder:props.placeholder||''
     };
-    this.changeToEdit = this.changeToEdit.bind(this);
-    this.changeToClick = this.changeToClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
     this.handleInput = this.handleInput.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
     this.handleFixClick = this.handleFixClick.bind(this);
   }
-  changeToEdit(e){
-    const {handledbClick,id} = this.props;
-    // 输入框有值才可以双击编辑
-    const text = this.$span.current.innerText;
-    if(!text.trim()){
-      return
-    }
-    this.setState({
-      editable:true
-    });
-    //埋点记录
-    handledbClick&&handledbClick({id});
-  }
-  changeToClick(e){
-    e.stopPropagation();
-    const {saveEditText,ikey} = this.props;
-    this.setState({
-      editable:false
-    });
-    saveEditText&&saveEditText({
-      changeVal:this.$span.current.innerText,
-      totalVal:this.$box.current.innerText,
-      prefix:this.$pre.current.innerText,
-      suffix:this.$suf.current.innerText,
-      ikey
-    });
-  }
   handleInput(e){       //输入时保存临时值,在修改灰显为黑色时判断用
     e.stopPropagation();
   }
@@ -125,24 +92,18 @@ class InlineTag extends Component {
   }
   render(){
     const {prefix,suffix} = this.props;
-    const {editable,placeholder,value} = this.state;
+    const {placeholder,value} = this.state;
     return <div className={this.getStyle()}
-                 onDoubleClick={this.changeToEdit}
-                 /*onClick={!editable?this.handleFixClick:''}*/
-                 onKeyDown={handleEnter}
-                 onBlur={this.changeToClick} 
-                 ref={this.$box} 
-                 contentEditable={editable}>
-                <span ref={this.$pre}>&nbsp;{prefix}</span>
+                onClick={this.handleFixClick}>
+                <span>{prefix}</span>
                 <span className={style['free-in']}
                       contentEditable={true}
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}
                       onFocus={this.handleFocus}
-                      /*onClick={e=>e.stopPropagation()}*/
                       onKeyDown={handleEnter}
                       ref={this.$span}>&nbsp;{value||placeholder}</span>
-                <span ref={this.$suf}>&nbsp;{suffix}</span>
+                <span>{suffix}</span>
             </div>;
     }
 }

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

+ 0 - 15
src/common/components/Modal/body/ModalBody.jsx

@@ -1,15 +0,0 @@
-import styles from "./index.less";
-
-const ModalBody = (props) => {
-  const  {overflow, children} = props;
-  let bodyStyle = {
-      overflowY: overflow ? "auto": "hide"
-  };
-  return (
-      <div className={styles['modal-body']} style={bodyStyle}>
-          {children ? children : <div className="paragraph"> </div>}
-      </div>
-  );
-}
-
-export default ModalBody;

+ 0 - 10
src/common/components/Modal/body/index.less

@@ -1,10 +0,0 @@
-@media print {
-    .modal-body{
-        overflow-y: visible!important;
-        page-break-after:always;
-    }
-}
-.modal-body {
-    padding: 10px 20px 0 20px;
-    height: 85%;
-}

+ 0 - 31
src/common/components/Modal/footer/ModalFooter.jsx

@@ -1,31 +0,0 @@
-import React, {Component} from "react";
-import classNames from 'classnames';
-
-import styles from "./index.less";
-
-
-class ModalFooter extends Component {
-
-
-    render() {
-        const {btnName, handleCancel, handleConfirm} = this.props;
-        const cancelClass = {
-            overflow: "hidden",
-            position: "relative",
-            'WebkitTransition':'color .2s linear,background-color .3s linear',
-            'transition': 'color .2s linear,background-color .3s linear',
-            'color':'#8e8e93',
-            'backgroundColor': 'transparent'
-        }
-        const btnClass = classNames(`${styles.btn} ${styles[btnName] || styles['primary']}`);
-
-        return (
-            <div className={styles['modal-footer']}>
-                <button className={btnClass} onClick={handleConfirm}>确定</button>
-                <button className={btnClass} style={cancelClass} onClick={handleCancel}>取消</button>
-            </div>
-        );
-    }
-}
-
-export default ModalFooter;

+ 0 - 31
src/common/components/Modal/footer/index.less

@@ -1,31 +0,0 @@
-
-.modal-footer {
-    position: absolute;
-    bottom: 20px;
-    right: 30px;
-}
-.primary {
-    overflow: hidden;
-    position: relative;
-    color: #fff;
-    background-color: #34c3ff;
-}
-
-.btn {
-    display: inline-block;
-    margin-bottom: 0;
-    font-weight: 400;
-    text-align: center;
-    vertical-align: middle;
-    outline: 0!important;
-    white-space: nowrap;
-    border: none;
-    -webkit-user-select: none;
-    -moz-user-select: none;
-    -ms-user-select: none;
-    user-select: none;
-    padding: 8px 12px;
-    font-size: 14px;
-    line-height: 1.42857143;
-    border-radius: 6px;
-}

+ 0 - 38
src/common/components/Modal/header/ModalHeader.jsx

@@ -1,38 +0,0 @@
-import React, {Component} from "react";
-import { findDOMNode } from 'react-dom';
-import classNames from 'classnames';
-import $ from 'jquery'
-
-import styles from "./index.less";
-
-class ModalHeader extends Component {
-    constructor(props) {
-        super(props);
-        this.handleClickClose = this.handleClickClose.bind(this);
-    }
-    handleClickClose() {
-        const {handleClose} = this.props;
-        if(handleClose) {
-            handleClose();
-        }
-		if($('#stateShow').length) {
-			$("#stateShow").css("display","none");
-		}
-		$(".src-modules-pageLeft-1SHS6").css("z-index","8")
-    }
-    render() {
-        const {title} = this.props;
-
-        return (
-            
-            <div className={styles['modal-header']}>
-                <button type="button" className={styles['close']} aria-label="Close" onClick={this.handleClickClose}>
-                    <span aria-hidden="true">X</span>
-                </button>
-                {title ? <h4 className={styles['title']}>{title}</h4>: null}
-            </div>
-        );
-    }
-}
-
-export default ModalHeader;

+ 0 - 46
src/common/components/Modal/header/index.less

@@ -1,46 +0,0 @@
-@import "~@less/variables.less";
-
-@media print{
-    .modal-header{
-        .close{
-            display: none;
-        }
-    }
-}
-
-.modal-header {
-    padding:0 20px;   
-    padding:10px 20px 0px 20px\0;
-    min-height: 40px;
-    line-height: 40px;
-    background: #e5e5e5;
-    border-top-left-radius: @border-radius;
-    border-top-right-radius: @border-radius;
-    .close{
-        outline: 0;
-        position: absolute;
-        right: 20px;
-        top: 10px;
-        font-size: 12px;
-        line-height: 1.66666667;
-        color: #272c36;
-        width: 20px;
-        padding: 0 4px;
-        background: none;
-        border-style: none;
-    }
-    .title {
-        display: block;
-        color: #272c36;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        width: 100%;
-        line-height: 0\0;  //ie8打印修正
-    }
-}
-@media screen and(-ms-high-contrast:active),(-ms-high-contrast:none) {
-    .modal-header{
-        padding:5px 20px 0px;
-    }
-}

+ 0 - 130
src/common/components/Modal/index.jsx

@@ -1,130 +0,0 @@
-/**
- * 模态框
- * Created by DELL on 2018/4/24.
- */
-import React, {Component} from "react";
-/*import PropTypes from 'prop-types';*/
-import { findDOMNode } from 'react-dom';
-import classNames from 'classnames';
-import {$$} from '@lib';
-
-// import $ from "jquery";
-import ModalHeader from "./header/ModalHeader.jsx";
-import ModalBody from "./body/ModalBody.jsx";
-import ModalFooter from "./footer/ModalFooter.jsx";
-
-import styles from "./index.less";
-
-/*const propTypes = {
-    autoResizeHeight: PropTypes.bool,
-    overflow: PropTypes.bool,
-    onClickCancel: PropTypes.func,
-    onClickConfirm: PropTypes.func,
-    onClickClose: PropTypes.func
-}
-const defaultProps = {
-    overflow: true,
-    autoResizeHeight: true
-};*/
-
-class Modal extends Component {
-    constructor(props) {
-        super(props);
-        this.state = {
-            modalStyle : {},
-            bodyStyles: {},
-            maxHeight: null,
-            overflow: null,
-            show: this.props.show || true
-        }
-        
-        this.handleConfirm = this.handleConfirm.bind(this);
-        this.handleCancel = this.handleCancel.bind(this);
-        this.handleClose = this.handleClose.bind(this);
-        
-        this.handleWindowResize = this.handleWindowResize.bind(this);
-        this.getStyles = this.getStyles.bind(this);
-    }
-    handleConfirm() {
-        this.setState({
-            show: false
-        });
-        const {onClickConfirm} = this.props;
-        onClickConfirm && onClickConfirm();
-    }
-    handleCancel() {
-        this.setState({
-            show: false
-        });
-        const {onClickCancel} = this.props;
-        onClickCancel && onClickCancel();
-        
-    }
-    handleClose() {
-
-        const that = this;
-        const {onClickClose} = this.props;
-        onClickClose && onClickClose(function () {
-            that.setState({
-                show: false
-            });
-        });
-    }
-    getStyles() {
-        const styles = {};
-        const {autoResizeHeight} = this.props;
-        if (autoResizeHeight) {
-            const excludeHeight = 150;
-            const contentHeight = $$.getHeight(window) - excludeHeight;
-
-            styles.bodyStyles = {
-              maxHeight: contentHeight
-            };
-        }
-        return styles;
-    }
-    handleWindowResize() {
-        this.setState(this.getStyles());
-    }
-    componentDidMount() {
-       this.setState(this.getStyles());
-       $$.$window.on("resize", this.handleWindowResize);
-    }
-    render() {
-        const {
-            width,
-            title,
-            overflow,
-            noFooter,
-            children
-        } = this.props;
-        
-        this.state.modalStyle= {
-            display: this.state.show ? "block" : "none",
-            padding: "0 20px"
-        };
-
-        let maxHeight = this.state.bodyStyles.maxHeight;
-        
-        let contentClass = classNames(`${styles['content']}`);
-        return (
-            <div style={this.state.modalStyle} ref={(ref) => {this.dialog = ref;}} >
-                <div className={styles['backdrop']}></div>
-                <div className={contentClass} style={{width,  height:maxHeight}} >
-                    <ModalHeader title={title||"title"} handleClose={this.handleClose}/>
-                    <ModalBody children={children} overflow={overflow}/>
-                    {noFooter ? null : <ModalFooter handleCancel={this.handleCancel} handleConfirm={this.handleConfirm}/>}
-                </div>
-            </div>
-        );
-    }
-}
-
-/*Modal.propTypes = propTypes;
-Modal.defaultProps = defaultProps;*/
-
-Modal.header = ModalHeader;
-Modal.body = ModalBody;
-Modal.footer = ModalFooter;
-
-export default Modal;

+ 0 - 31
src/common/components/Modal/index.less

@@ -1,31 +0,0 @@
-
-@import "~@less/variables.less";
-
-.backdrop {
-    position: fixed;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 0;
-    z-index: 1001;
-    background-color: #272c36;
-    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; /*IE8*/
-    // filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70);//兼容ie8及以下/
-    filter: alpha(opacity=60);  /*IE5、IE5.5、IE6、IE7*/
-    opacity: .6;
-}
-.content {
-    background: #fff;
-    height: 485px;
-    min-height: 400px;
-    width: 720px;
-    min-width: 666px;
-    margin: 0 auto;
-    margin-top: 65px;
-    overflow-y: auto;
-
-    position: relative;
-    max-width: 720px;
-    z-index: 1050;
-    border-radius: @border-radius;
-}

+ 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()} 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 {

+ 0 - 2
src/common/components/index.js

@@ -2,7 +2,6 @@ import Banner from "./Banner";
 import Button from "./Button";
 import Loading from "./Loading";
 import Message from "./Message";
-import Modal from "./Modal";
 import Radio from "./Radio/index";
 import CheckBtn from './CheckBtn';
 import InlineTag from './InlineTag';
@@ -28,7 +27,6 @@ import WrapModalContainer from "./WrapModalContainer";
 
 module.exports = {
     Banner,
-    Modal,
     Radio,
     CheckBtn,
     Loading,

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

+ 52 - 8
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,13 +31,17 @@ 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) { // Mark 1
+      if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
         this.setState({ date: false });
       }
       
@@ -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> : ''}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 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;

+ 14 - 10
src/components/AssessResult/ChartItem/index.jsx

@@ -24,10 +24,12 @@ class ChartItem extends Component {
     //近一周
     switch(type){
       case 'week':
-        for(let i=0;i<7;i++){
+        arr.push(...this.getDayHours(now,true,1));
+        for(let i=1;i<6;i++){
           temp=i*1000*60*60*24;
           arr.unshift(...this.getDayHours(now-temp,true));
-        }
+        };
+        arr.unshift(...this.getDayHours(now-6*1000*60*60*24,true,2));
         break;
       case 'month':
         for(let i=0;i<30;i++){
@@ -52,7 +54,7 @@ class ChartItem extends Component {
 
     return arr;
   }
-  getDayHours(time,isHour){
+  getDayHours(time,isHour,isLimit){
     const year = new Date(time).getFullYear();
     const month = new Date(time).getMonth()+1;
     const date = new Date(time).getDate();
@@ -60,9 +62,10 @@ class ChartItem extends Component {
     let arr=[],temp='';
     const str= year+'-'+(month<10?'0'+month:month)+'-'+(date<10?'0'+date:date);
     if(isHour){
-      for(let i=0;i<24;i++){
-        temp = hour-i>-1?hour-i:hour-i+24;
-        arr.unshift(str+" "+(temp<10?'0'+temp:temp)+":00:00");
+      const num = isLimit===1?hour+1:24;
+      for(let i=(isLimit===2?hour:0);i<num;i++){
+        //temp = hour-i>-1?hour-i:hour-i+24;
+        arr.push(str+" "+(i<10?'0'+i:i)+":00:00");
       }
       return arr;
     }else{
@@ -70,14 +73,14 @@ class ChartItem extends Component {
     }
   }
   rangChange(type,i){
-    const {initFn,handleChange,data,pindex} = this.props;
+    const {initFn,disName,handleChange,data,pindex} = this.props;
     const times = this.getXAxisArr(type);
     const startTime=times[0];
     const endTime=times[times.length-1];
     const range = [startTime,endTime];
     const temp=this.props.timeTypes;
     if(!data[startTime+endTime]){
-      initFn&&initFn({range,rangeType:type,index:i,pindex,getNew:false});
+      initFn&&initFn({range,disName,rangeType:type,index:i,pindex,getNew:false});
     }
     handleChange&&handleChange(Object.assign(temp,{[i]:type}));
   }
@@ -150,6 +153,7 @@ class Chart extends Component{
     let series = [],names=[],inx=-1;
     let myChart = echarts.init(document.getElementById(id) ,null, {renderer: 'svg'});
     let xAxisArr = [...xAxis];
+    const strNum = type=='week'?13:10;
     const interval = {
       week:23,
       month:4,
@@ -161,8 +165,8 @@ class Chart extends Component{
       let name='';
       it&&it.creatTime.map((x,i)=>{
         inx=xAxis.findIndex((a)=>{
-          name=x.substr(0,13);
-          return a.substr(0,13)==name;
+          name=x.substr(0,strNum);
+          return a.substr(0,strNum)==name;
         });     //日期对应横坐标的位置
         if(inx!=-1){
           if(type=='week'){

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

+ 32 - 52
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} from '@utils/tools.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,52 +41,44 @@ 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;
+    // 进入时默认展示当天的病例
     const item = {
-      current:1
+      current:1,
+      startDate:getCurrentDate(false)+' 00:00:00',
+      endDate:getCurrentDate(false)+' 23:59:59'
     }
     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"]}>
@@ -110,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;

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

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

+ 40 - 18
src/components/ChronicInfo/index.jsx

@@ -232,20 +232,20 @@ class ChronicInfo extends React.Component{
   }
   handleReg(e){   //只能输入数字和特殊符号
     //const hasDot = e.target.value.indexOf('.')!=-1;
-    const key = e.key;
-    if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      e.preventDefault();
-    }
+    // const key = e.key;
+    // if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
+    //   e.preventDefault();
+    // }
   }
   handleInputformula(id,calcuContent,i,e) {
     const {calcuValues} = this.state;
     let obj = deepClone(calcuValues);
     let values = (obj&&obj[id])||deepClone(calcuContent);
     const txt = e.target.value;
-    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d|.\/%*~]/g,'');       //处理中文输入法的情况
+    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,
@@ -352,21 +352,31 @@ class ChronicInfo extends React.Component{
       hasEnterImg: false
     })
   }
-  
+  getCritical(v) {
+    let hasCritical = false;
+    if(v.details) {
+      for (let i = 0; i < v.details.length; i++) {
+        if(v.details[i].type == 4) {
+          hasCritical = true
+        }
+      }
+    }
+    return hasCritical
+  }
   getDetail(){
     const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
     const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
     let list = data&&data.map((v,i)=>{
                     return <div className={style["list"]}>
                       {v.name?<p>
-                                <span>患者可能有</span>
+                                {this.getCritical(v) ? '':<span>患者可能有</span>}
                                 <span
-                                  className={style['dis-name']}
+                                  className={this.getCritical(v)?style['dis-name-no-line']: style['dis-name']}
                                   onMouseEnter={this.handleMouseEnterDrug.bind(this, i)}
                                   onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                                 >
                                   {v.name}
-                                  {<img className={style['info-img']}
+                                  {this.getCritical(v)?'':<img className={style['info-img']}
                                     style ={currentIndex === i  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}
@@ -376,7 +386,7 @@ class ChronicInfo extends React.Component{
                                 </span>
                                 {/* <img src={infoShow} className={style["infoPic"]} onClick={this.showInfo.bind(this,v.id)}/> */}
 
-                                :
+                                {this.getCritical(v)?'':''}
                               </p>:''}
                       {v.details&&v.details.map((it,j)=>{
                         if(it.type==1){
@@ -408,14 +418,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 +439,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>
@@ -488,6 +503,13 @@ class ChronicInfo extends React.Component{
     return list;
   }
   componentWillReceiveProps(next){
+    //计算公式可能结果弹窗关闭1916
+    if(!next.data||next.data.length==0){
+      this.setState({
+        formulaId:null,
+        optionId:null
+      });
+    }
     if(JSON.stringify(next.calcuValues)!=JSON.stringify(this.props.calcuValues)){
       this.setState({
         calcuValues:next.calcuValues

+ 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 - 36
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,8 +109,8 @@ 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)=>{
@@ -118,29 +119,27 @@ class DiagnosticList extends Component {
               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();
@@ -148,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() {
@@ -186,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>)
@@ -253,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;      //是否要显示管理评估
@@ -285,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;

+ 6 - 4
src/components/Emergency/HisList/index.jsx

@@ -58,18 +58,20 @@ class HisList extends Component {
     handleFilter&&handleFilter(obj);
   }
   handleFilter(flag){
-    const {handleFilter} = this.props;
+    const {handleFilter,detail} = this.props;
     const {hasSecond} = this.state;
     if(flag == hasSecond){return}
     this.setState({
       hasSecond:flag,
       all:false,
-      select:[]
+      select:[],
+      index:0
     })
     const obj = {
       flag:flag
     }
     handleFilter&&handleFilter(obj);
+    detail&&detail(0);
   }
 
   handleGetMore(){
@@ -190,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']}>

+ 5 - 1
src/components/Emergency/HisList/index.less

@@ -27,6 +27,10 @@
     // margin: 0 20px 8px;
     padding-top: 6px;
     position: relative;
+    img{
+      vertical-align: middle;
+      margin: 0 10px;
+    }
   }
   .filter-box{
     font-size: 12px;
@@ -84,7 +88,7 @@
       width: 14px;
       // height: 14px;
       position: absolute;
-      left: 0px;
+      left: 20px;
       top: 27px;
     }
     .more{

+ 15 - 16
src/components/Emergency/index.jsx

@@ -62,8 +62,8 @@ class EmergencyHis extends Component{
   }
 
   handleDownload(ids){//导出
-    const { getDownload } = this.props;
-    getDownload&&getDownload(ids)
+    const { getDownload ,info} = this.props;
+    getDownload&&getDownload({ids,info})
   }
   //搜索框输入
   handleInput(e){
@@ -104,28 +104,27 @@ class EmergencyHis extends Component{
     const {chooseItem,index,filtFlag,changeInd} = this.state;
     const {addSecond,data} = this.props;
     if(chooseItem.trim()){
+      // 在非默认筛选条件下添加二次诊断后重新调筛选接口
+      if(filtFlag !== -1){
+        if(filtFlag ==0){//无二次诊断添加后重置index
+          this.setState({
+            index:0,
+            changeInd:!changeInd //重置list中的index标识
+          })
+        }
+      }
       // 添加接口
       const item = {
         name:chooseItem,
         id:data[index].inquiryId
       }
-      addSecond&&addSecond(item);
+      addSecond&&addSecond({item,flag:filtFlag});
       this.searInp.current.value = "";
       this.setState({
         valChange:true,
         chooseItem:''
       });
     }
-    // 在非默认筛选条件下添加二次诊断后重新调筛选接口
-    if(filtFlag !== -1){
-      this.handleFilter({flag:filtFlag});
-      if(filtFlag ==0){//无二次诊断添加后重置index
-        this.setState({
-          index:0,
-          changeInd:!changeInd //重置list中的index标识
-        })
-      }
-    }
   }
 
   componentWillUnmount(){
@@ -143,7 +142,7 @@ class EmergencyHis extends Component{
     let baseObj = data[index];
     let dataJson,dataStr;
     if(baseObj){
-        dataJson = JSON.stringify(baseObj) == "{}" ? {} : JSON.parse(baseObj.dataJson);
+        // dataJson = JSON.stringify(baseObj) == "{}" ? {} : JSON.parse(baseObj.dataJson);
         dataStr = JSON.stringify(baseObj) == "{}" ? [] : baseObj.detailList;
     }
     const getAllDataStringList = () =>{           //获取所有模块文本的数据
@@ -191,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) => { 
@@ -203,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;

+ 14 - 25
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,26 +124,28 @@
   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;
+  // padding-top: 20px;
   box-sizing: border-box;
   margin-left: -450px;
-  // margin-top: -400px;
+  // margin-top: -415px;
   // height: 800px;
   // top: 50%;
   left: 50%;
-  top: 40px;
-  bottom: 40px;
+  top: 60px;
+  bottom: 60px;
   .emergencyImg{
     height: 100%;
     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;
 }

+ 10 - 3
src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx

@@ -75,6 +75,8 @@ class PartSec extends React.Component{
             <span>心包积液</span> 
             <img onClick={()=>{this.backSec()}} src={back} alt=""/>
           </div>
+          <div className={`${styles.emergencyBtn} ${styles.btn}`}>心外会诊</div>
+          <div className={`${styles.emergencyBtn} ${styles.btn}`}>心内会诊</div>
           <h4>{'判断是否心包填塞'}</h4>
           <div className={`${styles.goDownPub} ${styles.goDownY}`}>
             <span>是</span> 
@@ -97,6 +99,7 @@ class PartSec extends React.Component{
           <div className={`${styles.goDownPub} ${styles.goDownB}`}>
             <span>抢救室待床!</span>
           </div>
+          <br/>
           <div className={`${styles.goDownPub} ${styles.goDownN}`}>
             <span>否</span> 
           </div>
@@ -148,6 +151,9 @@ class PartSec extends React.Component{
             <img onClick={()=>{this.backSec(true)}} src={back} alt=""/>
           </div>
           <h4>{'结合症状体征是否危机生命是否濒死休克'}</h4>
+          {/* <h4 style={{"padding":"0"}}>{''}</h4> */}
+          <div className={`${styles.emergencyBtn} ${styles.btn}`} style={{"display":"inline-block","float":"right"}}>胸外科会诊</div>
+          <div style={{"clear":"both"}}></div>
           <div style={{display:reback?'block':'none'}} className={`${styles.nextWar} ${styles.next}`}>
             <span>是</span> 
             <i onClick={()=>{makeSureCom('',true,1,false)}}>确定</i>
@@ -214,7 +220,8 @@ class PartSec extends React.Component{
             <span>DDI阴性或TTE阴性</span> 
             <img onClick={()=>{this.backSec()}} src={back} alt=""/>
           </div>
-          <span className={styles.emergencyBtnS}>排除AD</span>
+          {/* <span className={styles.emergencyBtnS}>排除AD</span> */}
+          <h4>再次详细询问病史、查体,必要时行主动脉CTA</h4>
           <h4>请相关科室会诊寻找病因</h4>
         </React.Fragment>
       }
@@ -239,11 +246,11 @@ class PartSec extends React.Component{
   render(){
     const {data,idx} = this.props
     return <div className={`${styles.partSec} ${styles.partPub} clearfix`} style={{borderBottom:idx==1?'0':null}}>
-      {
+      {/* {
         data.select.map((item,idx)=>{
           return <div className={`${idx == 0&&data.select.length>1?styles.commonBtn:styles.emergencyBtn} ${styles.btn}`}>{item}</div>
         })
-      }
+      } */}
       <p>步骤2</p>
       {
         data.waring?<h4>{data.waring}</h4>:null

+ 92 - 35
src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx

@@ -203,7 +203,7 @@ class PartTrd extends React.Component {
         </div>
         {
           num ? <React.Fragment>
-            <span className={styles.emergencyBtnS}>急诊胸穿</span>
+            <span className={styles.emergencyBtnS}>急诊胸腔闭式引流</span>
             <p className={styles.warMessage}>抢救室待救</p>
           </React.Fragment> : <React.Fragment>
               <h4>判断肺压缩大于25%或小于25%</h4>
@@ -219,7 +219,7 @@ class PartTrd extends React.Component {
               </div>
               <div className={`${styles.hold}`}>
                 <span className={styles.holdLeft}>病情好转</span>
-                <span className={styles.holdRight}>门诊随访</span>
+                <span className={styles.holdRight}>胸外科随诊</span>
               </div>
             </React.Fragment>
         }
@@ -233,9 +233,10 @@ class PartTrd extends React.Component {
           </div>
           {
             num ? <React.Fragment>
+              <div className={`${styles.emergencyBtn} ${styles.btn}`}>呼吸科会诊</div>
               <h4>生命体征不稳定</h4>
               <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-                <span>根据病史、体征、PE评分判断病情</span>
+                <span>根据病史、体征、Well、Geneva肺栓塞评分判断病情</span>
               </div>
               <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                 <img src={down} alt="" />
@@ -255,8 +256,8 @@ class PartTrd extends React.Component {
               <div className={`${styles.goDownPub} ${styles.goDownB}`}>
                 <span>收入ICU</span>
               </div>
-              <h4>生命体征稳定建议检查CTPA(肺动脉造影)</h4>
-              <h4>建议检查肺动脉增强CT</h4>
+              <h4>生命体征稳定建议检查CTPA(CT肺动脉造影)</h4>
+              {/* <h4>建议检查肺动脉增强CT</h4> */}
               <div className={`${styles.hold}`}>
                 <span className={styles.holdLeft}>阳性</span>
                 <span className={styles.holdRight}>按肺栓塞治疗</span>
@@ -279,7 +280,8 @@ class PartTrd extends React.Component {
           </div>
           {
             num ? <React.Fragment>
-              <h4>建议检查CTPA(肺动脉造影)</h4>
+              <div className={`${styles.emergencyBtn} ${styles.btn}`}>呼吸科会诊</div>
+              <h4>建议检查CTPA(CT肺动脉造影)</h4>
               <div className={`${styles.hold}`}>
                 <span className={styles.holdLeft}>阳性</span>
                 <span className={styles.holdRight}>按肺栓塞治疗</span>
@@ -289,7 +291,7 @@ class PartTrd extends React.Component {
                 <span className={styles.holdRight}>请相关科室会诊寻找病因</span>
               </div>
             </React.Fragment> : <React.Fragment>
-                <span className={styles.emergencyBtnS}>排除肺栓塞</span>
+                {/* <span className={styles.emergencyBtnS}>排除肺栓塞</span> */}
                 <h4>请相关科室会诊寻找病因</h4>
               </React.Fragment>
           }
@@ -298,8 +300,11 @@ class PartTrd extends React.Component {
     } else if (idx == 5) {
       return <React.Fragment>
         <div className={`${styles.nextWar} ${styles.next}`}>
-          <span>立即检查CTA(血管造影)</span>
+          <span>立即检查主动脉CTA</span>
         </div>
+        
+        <div className={`${styles.emergencyBtn} ${styles.btn}`}>血管外科内会诊</div>
+        <div className={`${styles.emergencyBtn} ${styles.btn}`}>心外会诊</div>
         <h4>判断检查结果数据</h4>
         {
           trdShow ? <React.Fragment>
@@ -345,23 +350,23 @@ class PartTrd extends React.Component {
           {
             trdShow ? <React.Fragment>
               <div className={`${styles.nextWar} ${styles.next}`}>
-                <span>发病大于12小时</span>
-                <i onClick={() => { this.changeTrdShow(false, 1) }}>确定</i>
-              </div>
-              <div className={`${styles.nextCom} ${styles.next}`}>
                 <span>发病小于12小时</span>
                 <i onClick={() => { this.changeTrdShow(false, 0) }}>确定</i>
               </div>
+              <div className={`${styles.nextCom} ${styles.next}`}>
+                <span>发病大于12小时</span>
+                <i onClick={() => { this.changeTrdShow(false, 1) }}>确定</i>
+              </div>
             </React.Fragment> : <React.Fragment>
-                <div className={`${trdFlg ? styles.nextWar : styles.nextCom} ${styles.next}`}>
+                <div className={`${trdFlg ? styles.nextCom : styles.nextWar} ${styles.next}`}>
                   <span>{trdFlg ? '发病大于12小时' : '发病小于12小时'}</span>
                   <img onClick={() => { this.changeTrdShow(true, 1) }} src={back} alt="" />
                 </div>
-                <h4>{trdFlg ? '判断患者是否有急诊PCI指证' : '启动导管室、获取知情同意联系床位'}</h4>
+                <h4>{trdFlg ? '判断患者是否有急诊PCI指征' : ''}</h4>
                 {
                   trdFlg ? <React.Fragment>
                     <div className={`${styles.goDownPub} ${styles.goDownY}`}>
-                      <span>是</span>
+                      <span>是,有急诊PCI指征</span>
                     </div>
                     <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                       <img src={down} alt="" />
@@ -372,6 +377,18 @@ class PartTrd extends React.Component {
                     <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                       <img src={down} alt="" />
                     </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                      <span>{'家属同意-导管室直接运转'}</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                      <img src={down} alt="" />
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                      <span>{'控制D-B时间<90min'}</span>
+                    </div>
+                    <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                      <img src={down} alt="" />
+                    </div>
                     <div className={`${styles.goDownPub} ${styles.goDownB}`}>
                       <span>{'家属不同意或者导管室到达>60min'}</span>
                     </div>
@@ -382,16 +399,17 @@ class PartTrd extends React.Component {
                       <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
                     </div>
                     <br />
-                    <div className={styles.line}></div>
+                    <br />
+                    {/* <div className={styles.line}></div>
                     <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ color: '#2599ff', border: '1px solid #2599ff' }}>
                       <span>{'家属同意-导管室直接运转'}</span>
                     </div>
                     <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ border: '0' }}>
                       <span>{'控制D-B时间<90min'}</span>
-                    </div>
-                    <div className={styles.line} style={{ marginBottom: "-8px" }}></div>
+                    </div> */}
+                    {/* <div className={styles.line} style={{ marginBottom: "-8px" }}></div> */}
                     <div className={`${styles.goDownPub} ${styles.goDownN}`}>
-                      <span>否</span>
+                      <span>否,没有急诊PCI指征</span>
                     </div>
                     <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                       <img src={down} alt="" />
@@ -400,6 +418,24 @@ class PartTrd extends React.Component {
                       <span>收住ICU/CCU</span>
                     </div>
                   </React.Fragment> : <React.Fragment>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                        <span>{'启动导管室、获取知情同意联系床位'}</span>
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                        <img src={down} alt="" />
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                        <span>{'家属同意-导管室直接运转'}</span>
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                        <img src={down} alt="" />
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                        <span>{'控制D-B时间<90min'}</span>
+                      </div>
+                      <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                        <img src={down} alt="" />
+                      </div>
                       <div className={`${styles.goDownPub} ${styles.goDownB}`}>
                         <span>{'家属不同意或者导管室到达>60min'}</span>
                       </div>
@@ -410,13 +446,13 @@ class PartTrd extends React.Component {
                         <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
                       </div>
                       <br />
-                      <div className={styles.line}></div>
+                      {/* <div className={styles.line}></div>
                       <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ color: '#2599ff', border: '1px solid #2599ff' }}>
                         <span>{'家属同意-导管室直接运转'}</span>
                       </div>
                       <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ border: '0' }}>
                         <span>{'控制D-B时间<90min'}</span>
-                      </div>
+                      </div> */}
                     </React.Fragment>
                 }
               </React.Fragment>
@@ -427,8 +463,9 @@ class PartTrd extends React.Component {
           <h4>进一步诊疗</h4>
           <p>{'(STEMI处置时间<10min)'}</p>
           <h4>查血:检查心肌酶谱+Troponinl</h4>
-          <p style={{ color: "#000", lineHeight: "18px" }}>必要时可 Q1-4h 复查</p>
-          <p style={{ color: "#000", lineHeight: "18px" }}>判读结果同时结果回馈心内科会诊</p>
+          <p style={{ color: "#000", lineHeight: "18px" }}>必要时可 Q4-6h 复查</p>
+          {/* <p style={{ color: "#000", lineHeight: "18px" }}>判读结果同时结果回馈心内科会诊</p> */}
+          <div className={`${styles.commonBtn} ${styles.btn}`}>普通心内科会诊</div>
           <h4>判断检查结果是否异常</h4>
           {
             trdShow ? <React.Fragment>
@@ -473,7 +510,7 @@ class PartTrd extends React.Component {
                     {
                       (show0 && currentIdx==0) ? <React.Fragment>
                         <div className={`${styles.goDownPub} ${styles.goDownD}`}>
-                          <span>患者危机程度:极高危患者</span>
+                          <span>极高危患者</span>
                         </div>
                         <h4>治疗方案</h4>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`}>
@@ -482,6 +519,18 @@ class PartTrd extends React.Component {
                         <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                           <img src={down} alt="" />
                         </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'家属同意-导管室直接运转'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownB}`}>
+                          <span>{'控制D-B时间<90min'}</span>
+                        </div>
+                        <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
+                          <img src={down} alt="" />
+                        </div>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`}>
                           <span>{'家属不同意或者导管室到达>60min'}</span>
                         </div>
@@ -492,20 +541,20 @@ class PartTrd extends React.Component {
                           <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
                         </div>
                         <br />
-                        <div className={styles.line}></div>
+                        {/* <div className={styles.line}></div>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ color: '#2599ff', border: '1px solid #2599ff' }}>
                           <span>{'家属同意-导管室直接运转'}</span>
                         </div>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`} style={{ border: '0' }}>
                           <span>{'控制D-B时间<90min'}</span>
-                        </div>
+                        </div> */}
                       </React.Fragment> : (show1 && currentIdx==1) ? <React.Fragment>
                         <div className={`${styles.goDownPub} ${styles.goDownD}`}>
-                          <span>患者危机程度:高危患者</span>
+                          <span>高危患者</span>
                         </div>
                         <h4>治疗方案</h4>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-                          <span>{'推荐早期入治疗(<24h)'}</span>
+                          <span>{'推荐早期入治疗(<24h)'}</span>
                         </div>
                         <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                           <img src={down} alt="" />
@@ -521,11 +570,11 @@ class PartTrd extends React.Component {
                         </div>
                       </React.Fragment>: (show2&& currentIdx==2) ? <React.Fragment>
                         <div className={`${styles.goDownPub} ${styles.goDownD}`}>
-                          <span>患者危机程度:中危患者</span>
+                          <span>中危患者</span>
                         </div>
                         <h4>治疗方案</h4>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-                          <span>{'推荐入治疗(<72h)'}</span>
+                          <span>{'推荐入治疗(<72h)'}</span>
                         </div>
                         <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
                           <img src={down} alt="" />
@@ -541,7 +590,7 @@ class PartTrd extends React.Component {
                         </div>
                       </React.Fragment> :(currentIdx==3) ? <React.Fragment>
                         <div className={`${styles.goDownPub} ${styles.goDownD}`}>
-                          <span>患者危机程度:低危患者</span>
+                          <span>低危患者</span>
                         </div>
                         <h4>留观或收住心内科</h4>
                       </React.Fragment>:null
@@ -555,17 +604,25 @@ class PartTrd extends React.Component {
     }
   }
   render() {
-    const { idx, num } = this.props
+    const { idx, num ,trdNum } = this.props
+    console.log(idx, num ,trdNum)
     return <div className={`${styles.partTrd} ${styles.partPub}`}>
       {
-        idx == 3 && num == 1 ? <React.Fragment><div className={`${styles.emergencyBtn} ${styles.btn}`}>{this.state.select3[0]}</div><br /></React.Fragment>
+        idx == 3 && num == 1 ? <React.Fragment>
+          {/* <div className={`${styles.emergencyBtn} ${styles.btn}`}>{this.state.select3[0]}</div><br /> */}
+          </React.Fragment>
           : idx == 5 ? <React.Fragment>
-            <div className={`${styles.commonBtn} ${styles.btn}`}>{this.state.select5[1]}</div>
-            <div className={`${styles.emergencyBtn} ${styles.btn}`}>{this.state.select5[0]}</div>
+            {/* <div className={`${styles.commonBtn} ${styles.btn}`}>{this.state.select5[1]}</div>
+            <div className={`${styles.emergencyBtn} ${styles.btn}`}>{this.state.select5[0]}</div> */}
             <br />
           </React.Fragment> : null
       }
       <p>步骤3</p>
+      {/* commonBtn emergencyBtn */}
+      {
+        idx == 4 && trdNum == 0 ?<div className={`${styles.emergencyBtn} ${styles.btn}`}>紧急心内会诊</div>:null
+      }
+      
       {
         this.handleTrdPart()
       }

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

@@ -21,12 +21,12 @@ class EmergencyProcedure extends React.Component {
   componentDidMount(){
     const height = getWindowInnerHeight()-144;
     this.$cont.current.style.height = height+"px";
-    if(this.$cont.current){
-      windowEventHandler('resize', ()=>{
+    windowEventHandler('resize', ()=>{
+      if(this.$cont.current){
         const height = getWindowInnerHeight()-144;
         this.$cont.current.style.height = height+"px";
-      });
-    }
+      }
+    });
   }
   componentWillReceiveProps(nextState){
     if(nextState.idx != this.props.idx){

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

@@ -11,7 +11,7 @@
     h4 {
       color: #FF1D1D;
       font-size: 16px;
-      padding: 10px 0  5px 0;
+      padding: 10px 0;
       font-weight: bold;
       line-height: 20px;
     }
@@ -215,7 +215,7 @@
       line-height: 36px;
       padding: 0 18px;
       float: right;
-      border: 1px solid #818181;
+      // border: 1px solid #818181;
       border-radius: 4px;
       margin-top: 12px;
     }

+ 10 - 10
src/components/EmergencyProcedure/emergency.js

@@ -72,7 +72,7 @@ let data = [
       emergencyillname:'心包积液',
       idx:1,
       step1:{//步骤1
-        checks:'检查超声心动图',
+        checks:'进行全血细胞计数+血型鉴定、术前免疫、凝血功能、超声心动图等检查',
       },
       step2:{//步骤2
         waring:'',
@@ -157,7 +157,7 @@ let data = [
         checks:'听诊呼吸音是否减弱或消失',
       },
       step2:{//步骤2
-        waring:'检查X线或者CT检查',
+        waring:'进行全血细胞计数+血型鉴定、术前免疫、凝血功能、肺部B超、X线或者CT检查',
         tips:'',
         select:['胸外科会诊'],//按钮
         items:[
@@ -204,7 +204,7 @@ let data = [
                   },
                   {
                     message:'病情好转',
-                    result:'门诊随访',
+                    result:'胸外科随诊',
                     text:'',
                     link:''
                   }
@@ -228,7 +228,7 @@ let data = [
       emergencyillname:'肺栓塞',
       idx:3,
       step1:{//步骤1
-        checks:'立即检查D-二聚体+床旁超声心动图',
+        checks:'立即进行全血细胞计数+血型鉴定、术前免疫、凝血功能、D-二聚体、床旁超声心动图检查',
       },
       step2:{//步骤2
         waring:'判断血压是否正常或休克',
@@ -252,8 +252,8 @@ let data = [
                     link:''
                   },
                   {
-                    message:'生命体征稳定建议检查CTPA(肺动脉造影)',
-                    text:'建议检查肺动脉增强CT',
+                    message:'生命体征稳定建议检查CTPA(CT肺动脉造影)',
+                    text:'',
                     link:''
                   },
                   {
@@ -293,7 +293,7 @@ let data = [
             choose:[
               {
                 actionname:'评分高或DDI阳性',
-                description:'建议检查CTPA(肺动脉造影)',
+                description:'建议检查CTPA(CT肺动脉造影)',
                 links:[
                   {
                     message:'阳性',
@@ -313,7 +313,7 @@ let data = [
                 actionname:'评分低且DDI阴性',
                 links:[
                   {
-                    message:'排除肺栓塞',
+                    message:'',
                     text:'请相关科室会诊寻找病因'
                   }
                 ]
@@ -328,7 +328,7 @@ let data = [
       emergencyillname:'急性冠脉综合征',
       idx:4,
       step1:{//步骤1
-        checks:'立即检查18导联心电图',
+        checks:'立即检查12导联或18导联心电图',
       },
       step2:{//步骤2
         waring:'判断心电图ST段是否有异常!',
@@ -440,7 +440,7 @@ let data = [
       emergencyillname:'主动脉夹层',
       idx:5,
       step1:{//步骤1
-        checks:'立即检查D-二聚体+床旁超声心动图',
+        checks:'立即进行全血细胞计数+血型鉴定、术前免疫、凝血功能、D-二聚体、床旁超声心动图检查',
       },
       step2:{//步骤2
         waring:'判断DDI和TTE阴性或阳性!',

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

+ 14 - 12
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -11,8 +11,9 @@ 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';
 
 
 class HistoryCaseContainer extends React.Component {
@@ -54,21 +55,22 @@ class HistoryCaseContainer extends React.Component {
         activeId:idx,
         activeHis:tmpItems,
         dataStr:tmpItems.detailList||[],
-        dataJson:JSON.parse(tmpItems.dataJson)||{},
+        // dataJson:JSON.parse(tmpItems.dataJson)||{},
       })
     }
     makeSure(){
-        const {activeHis} = this.state
-        this.setState({visible:false})
-        store.dispatch(showHistory(false))
-        store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
-        pushAllDataList(activeHis.sign,'push',activeHis,'history')       //引用
+        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({
@@ -81,7 +83,7 @@ class HistoryCaseContainer extends React.Component {
         activeId:idx,
         activeHis:val,
         dataStr:val.detailList||[],
-        dataJson:JSON.parse(val.dataJson)||{},
+        // dataJson:JSON.parse(val.dataJson)||{},
       })
     }
     render(){

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

+ 17 - 6
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='点击查看详情'
@@ -53,7 +60,7 @@ class MedicalInfo extends Component {
       this.setState({
         val: '',
         hasSearch: false,
-        msg: ''
+        msg: '',
       });
       clearResult && clearResult();
     }
@@ -76,12 +83,16 @@ class MedicalInfo extends Component {
   componentDidMount(){
     const height = getWindowInnerHeight()-170;
     this.$cont.current.style.height = height+"px";
-    if(this.$cont.current){
-      windowEventHandler('resize', ()=>{
+    windowEventHandler('resize', ()=>{
+      if(this.$cont.current){
         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(){
     this.setState({
@@ -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;

+ 3 - 46
src/components/MultSpread/index.jsx

@@ -33,12 +33,8 @@ class MultSpread extends Component{
   constructor(props){
     super(props);
     this.state = {
-      editable: false,
       numDoms:[]
     };
-    this.$cont = React.createRef();
-    this.changeToEdit = this.changeToEdit.bind(this);
-    this.handleEdit = this.handleEdit.bind(this);
   }
   getClass(){
     const {saveText,ikey,showAdd} = this.props;
@@ -76,12 +72,11 @@ class MultSpread extends Component{
   }
   getLabels(){
     const {data,ikey,showArr,copyId,selecteds,boxMark} = this.props;
-    const {editable}= this.state;
     let show = false;
     let inx = '',count=0;
     const list = data.map((it,i)=>{
       inx=ikey+'-'+i;
-      show = editable?false:showArr&&showArr[inx];
+      show = showArr&&showArr[inx];
       switch (true){
         case +it.tagType===8:
           return it.name;
@@ -89,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}
@@ -109,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://带单位数字键盘
@@ -166,33 +157,6 @@ class MultSpread extends Component{
     });
     return list;
   }
-  changeToEdit(e){
-    const {name,copyId,ikey,placeholder,handleDbclick,saveText,prefix,suffix} = this.props;
-    const labelInx = tools.getLabelIndex(ikey);
-    const text = saveText&&saveText[+labelInx];
-    //clearTimeout(this.state.timer);//取消延时的单击事件
-    e.preventDefault();
-    if(text&&text.trim()) {//有选中值的标签才能双击编辑
-      this.setState({
-        editable: true
-      });
-      //失焦关闭编辑状态
-      setTimeout(()=>{
-        this.$cont.current.focus();
-      });
-      //双击埋点记录
-      handleDbclick && handleDbclick({id:copyId});
-    }
-  }
-  handleEdit(e){
-    const {saveEditText,ikey} = this.props;
-    if(!this.state.editable) return;
-    this.setState({
-      editable: false
-    });
-    let totalVal = e.target.innerText || e.target.innerHTML;
-    saveEditText && saveEditText({ikey,type:ikey.split("-")[0],totalVal});
-  }
   componentDidMount(){
     //挂载完成保存有加号的项目数据
     const {saveAddItem,fullData,copyId,showAdd} = this.props;
@@ -204,23 +168,16 @@ class MultSpread extends Component{
     }
   }
   getContClass(){
-    const {editable} = this.state;
     const {isImports,ikey,saveText} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     const orgBorder = isImports&&!text?style['orange-border']:'';
-    const edit = editable?style['blue-border']:'';
-    return classNames(edit,orgBorder);
+    return classNames(orgBorder);
   }
   render(){
     const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix} = this.props;
     return (<div className={this.getContClass()}
-                 style={{display:'inline-block'}}
-                 onDoubleClick={this.changeToEdit}
-                 ref = {this.$cont}
-                 contentEditable={this.state.editable}
-                 onBlur={this.handleEdit}
-                 onKeyDown={tools.handleEnter}>
+                 style={{display:'inline-block'}}>
       {textPrefix?<span>{textPrefix}</span>:''}
       <div className={this.getClass()}>
       {this.getLabels()}

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

@@ -1,6 +1,7 @@
 @import "~@less/variables.less";
 .container{
   .tag;
+  cursor: unset;
 }
 .cont{
   .no-tag;

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

+ 7 - 29
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});
       }
@@ -173,22 +153,20 @@ class Multiple extends react.Component{
     }
   }
   render(){
-    const {placeholder,value,show,data,handleConfirm,ikey,order,mainSaveText,handleHide,type} = this.props;
-    const {editable,boxTop,boxLeft,seleData,seleId} = this.state;
+    const {placeholder,value,show,data,hideTag} = this.props;
+    const {editable,seleData,seleId} = this.state;
     return <div className={style["container"]}>
       <div className={this.getClass()}
       ref={this.$div}
       onClick={this.handleShow}
-      onDoubleClick={this.changeToEdit}
+      onDoubleClick={hideTag?null:this.changeToEdit}
       onBlur={this.handleBlur}
       onInput={this.onChange}
-      onkeydown={handleEnter}
+      onKeyDown={handleEnter}
       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} 

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


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