Преглед изворни кода

Merge remote-tracking branch 'origin/testedMerge'

zhouna пре 5 година
родитељ
комит
2741a3a49c
100 измењених фајлова са 2257 додато и 496 уклоњено
  1. 1 2
      src/common/components/Banner/index.jsx
  2. 4 2
      src/common/components/ConfirmModal/index.jsx
  3. 6 4
      src/common/components/ConfirmModal/index.less
  4. 35 45
      src/common/components/EditableSpan/index.jsx
  5. 5 0
      src/common/components/EditableSpan/index.less
  6. 20 7
      src/common/components/InlineTag/index.jsx
  7. 11 3
      src/common/components/ItemBox/index.jsx
  8. 1 1
      src/common/components/ItemBox/index.less
  9. 7 7
      src/common/components/Textarea/index.jsx
  10. 2 1
      src/common/components/Textarea/index.less
  11. BIN
      src/common/images/edit1.png
  12. BIN
      src/common/images/edit2.png
  13. BIN
      src/common/images/icon2.png
  14. BIN
      src/common/images/mimi.png
  15. BIN
      src/common/images/prec.png
  16. 3 0
      src/common/less/base.less
  17. 15 0
      src/common/less/variables.less
  18. 2 2
      src/components/AddAssistCheck/AssistName/index.jsx
  19. 14 1
      src/components/AddAssistCheck/Textarea/index.jsx
  20. 2 9
      src/components/AddAssistCheck/index.jsx
  21. 2 21
      src/components/AddAssistCheck/index.less
  22. 75 0
      src/components/AddInspect/InspectName/index.jsx
  23. 256 0
      src/components/AddInspect/InspectName/index.less
  24. 4 4
      src/components/AddInspect/SlideExcel/index.less
  25. 16 3
      src/components/AddInspect/SlideSelect/index.jsx
  26. 26 4
      src/components/AddInspect/SlideSelect/index.less
  27. 2 1
      src/components/AddInspect/index.jsx
  28. 16 8
      src/components/Advice/Textarea/index.jsx
  29. 2 2
      src/components/Advice/index.jsx
  30. 4 4
      src/components/AssessResult/ChooseItem/index.jsx
  31. 15 10
      src/components/AssessResult/ScaleItem/index.jsx
  32. 3 3
      src/components/AssessResult/index.jsx
  33. 4 1
      src/components/AssistCheck/index.jsx
  34. 44 42
      src/components/Banner/ModeChange/index.jsx
  35. 8 3
      src/components/Banner/ModeChange/index.less
  36. 18 7
      src/components/Banner/index.jsx
  37. 15 3
      src/components/Banner/index.less
  38. 1 1
      src/components/BodyContainer/index.less
  39. 25 0
      src/components/CaseQuailty/index.jsx
  40. 6 0
      src/components/CaseQuailty/index.less
  41. 4 2
      src/components/CheckBody/index.jsx
  42. 5 0
      src/components/CheckBody/index.less
  43. 40 26
      src/components/ChronicInfo/index.jsx
  44. 4 31
      src/components/CommonSymptom/index.jsx
  45. 1 1
      src/components/CommonSymptom/index.less
  46. 6 15
      src/components/CurrentIll/index.jsx
  47. 1 1
      src/components/Diagnosis/index.jsx
  48. 2 2
      src/components/DiagnosticItem/index.jsx
  49. 1 1
      src/components/DiagnosticList/index.jsx
  50. 9 7
      src/components/InfoTitle/index.jsx
  51. 11 3
      src/components/InfoTitle/index.less
  52. 4 2
      src/components/Inspect/index.jsx
  53. 9 11
      src/components/MainSuit/index.jsx
  54. 1 1
      src/components/MedicalInfo/Filters/index.jsx
  55. 22 6
      src/components/MedicalInfo/index.jsx
  56. 15 7
      src/components/MultSpread/index.jsx
  57. 13 7
      src/components/Multiple/index.jsx
  58. 3 0
      src/components/Multiple/index.less
  59. 23 13
      src/components/NumberDrop/index.jsx
  60. 12 1
      src/components/NumberDrop/index.less
  61. 13 7
      src/components/NumberUnitDrop/index.jsx
  62. BIN
      src/components/Operation/Search/imgs/clear.png
  63. BIN
      src/components/Operation/Search/imgs/search.png
  64. 106 0
      src/components/Operation/Search/index.jsx
  65. 38 0
      src/components/Operation/Search/index.less
  66. 135 76
      src/components/Operation/index.jsx
  67. 57 17
      src/components/Operation/index.less
  68. 2 2
      src/components/OtherHistory/index.jsx
  69. 9 10
      src/components/PatInfo/index.jsx
  70. 4 3
      src/components/PatInfo/index.less
  71. BIN
      src/components/PreInIcss/RotateImg copy/img/closeImg.png
  72. BIN
      src/components/PreInIcss/RotateImg copy/img/imgBgActive.png
  73. BIN
      src/components/PreInIcss/RotateImg copy/img/nextImg.png
  74. BIN
      src/components/PreInIcss/RotateImg copy/img/plus.png
  75. BIN
      src/components/PreInIcss/RotateImg copy/img/prevImg.png
  76. BIN
      src/components/PreInIcss/RotateImg copy/img/reduce.png
  77. BIN
      src/components/PreInIcss/RotateImg copy/img/rotated.png
  78. 229 0
      src/components/PreInIcss/RotateImg copy/index.jsx
  79. 104 0
      src/components/PreInIcss/RotateImg copy/index.less
  80. BIN
      src/components/PreInIcss/RotateImg/img/closeImg.png
  81. BIN
      src/components/PreInIcss/RotateImg/img/imgBgActive.png
  82. BIN
      src/components/PreInIcss/RotateImg/img/nextImg.png
  83. BIN
      src/components/PreInIcss/RotateImg/img/plus.png
  84. BIN
      src/components/PreInIcss/RotateImg/img/prevImg.png
  85. BIN
      src/components/PreInIcss/RotateImg/img/reduce.png
  86. BIN
      src/components/PreInIcss/RotateImg/img/rotated.png
  87. 230 0
      src/components/PreInIcss/RotateImg/index.jsx
  88. 104 0
      src/components/PreInIcss/RotateImg/index.less
  89. 104 0
      src/components/PreInIcss/SliddleTgl/index.jsx
  90. 38 0
      src/components/PreInIcss/index.jsx
  91. 109 0
      src/components/PreInIcss/index.less
  92. 9 1
      src/components/PreviewBody/Inspect/index.jsx
  93. 2 0
      src/components/PreviewBody/index.jsx
  94. 14 0
      src/components/PreviewBody/index.less
  95. 74 29
      src/components/PushContainer/index.jsx
  96. 0 3
      src/components/PushItems/index.jsx
  97. 2 2
      src/components/PushItems/index.less
  98. 15 8
      src/components/RadioDrop/index.jsx
  99. 3 0
      src/components/RadioDrop/index.less
  100. 0 0
      src/components/RadioInpDrop/index.jsx

+ 1 - 2
src/common/components/Banner/index.jsx

@@ -3,8 +3,7 @@ import logo from '../../images/logoa.png'
 import setup from '../../images/setup.png';
 
 const Banner = (props) => {
-  const {src,text, children} = props;
-
+const {src,text, children} = props;
   return <div className={style['banner-wrapper']+" "+"clearfix"}>
        <div className={style['logo']}> <img src={logo}/><span >|&nbsp;&nbsp;智能辅助临床决策系统</span>
           <div className={style['buon']}><img className={style['st']} src={setup}/>设置</div>

+ 4 - 2
src/common/components/ConfirmModal/index.jsx

@@ -69,6 +69,7 @@ const defaultProps = {
     cancelBg: '#fff',
     width: '300px',
     height: '200px',
+    borderBtm:'0'
 };
 
 class ConfirmModal extends Component {
@@ -123,7 +124,8 @@ class ConfirmModal extends Component {
             height, 
             closable, 
             noFooter,
-            icon
+            icon,
+            borderBtm
         } = this.props;
         const marginLeft = -parseInt(width)/2
         const marginTop = -parseInt(height)/2
@@ -131,7 +133,7 @@ class ConfirmModal extends Component {
             <NewPortal visible={visible}>
                 <div className={styles['modal-wrapper']} id='confirm'>
                     <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, minHeight:height, marginTop:marginTop}}>
-                        <div className={styles['modal-title']} style={{background: titleBg}}>
+                        <div className={styles['modal-title']} style={{background: titleBg,borderBottom:borderBtm}}>
                             {icon?<img src={icon} className={styles['icon']}/>:''}
                             {title ? title : ''} 
                             {closable ? <img onClick={this.closeModal} className={styles['modal-close']} src = {close}/> : false}

+ 6 - 4
src/common/components/ConfirmModal/index.less

@@ -8,15 +8,16 @@
     margin: auto;
     border-radius: 5px;
     background: #fff;
-    overflow: hidden;
+    // overflow: hidden;
 }
 
 .modal-title {
     width: 100%;
-    height: 50px;
-    line-height: 50px;
+    height: 46px;
+    line-height: 46px;
     padding: 0 10px;
-    background: #e5e5e5
+    background: #e5e5e5;
+    border-radius: 5px 5px 0 0;
 }
 
 .icon{
@@ -27,6 +28,7 @@
 .modal-close {
     position: absolute;
     right: 0px;
+    top: 2px;
     width: 40px;
     height: 40px;
     cursor: pointer;

+ 35 - 45
src/common/components/EditableSpan/index.jsx

@@ -1,7 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import config from "@config/index";
-import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault,setFontColorSize} from '@utils/tools.js';
+import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault,setFontColorSize,moveEnd} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
 import classNames from 'classnames';
 
@@ -37,8 +37,9 @@ class EditableSpan extends Component{
     this.handleBlur = this.handleBlur.bind(this);
     this.handleKeydown = this.handleKeydown.bind(this);
     this.handleKeyup = this.handleKeyup.bind(this);
-    this.moveEnd = this.moveEnd.bind(this);
     this.handleClick = this.handleClick.bind(this);
+    this.selectStart = this.selectStart.bind(this);
+    this.selectEnd=this.selectEnd.bind(this);
   }
   handleFocus(e){
     e.stopPropagation();
@@ -49,7 +50,7 @@ class EditableSpan extends Component{
       setTimeout(function(){
         txt = that.$span.current.innerText||that.$span.current.innerHTML;
         that.$span.current.innerHTML = txt;
-        that.moveEnd($(that.$span.current)[0]);     //光标落到最后去
+        moveEnd($(that.$span.current)[0]);     //光标落到最后去
       });
     })
     
@@ -138,31 +139,6 @@ class EditableSpan extends Component{
     $(this.$span.current).off("paste");
   }
 
-  moveEnd(obj,flg) {
-    if(window.getSelection){//ie11 10 9 ff safari
-      setTimeout(() => {
-        obj.focus(); //解决ff不获取焦点无法定位问题
-        var range = window.getSelection();//创建range
-        range.selectAllChildren(obj);//range 选择obj下所有子内容
-        if(flg){
-          range.collapseToStart();//光标移至开头
-        }else{
-          range.collapseToEnd();//光标移至最后
-        }
-      }, 0);
-    }
-    else if (document.selection) {//ie10 9 8 7 6 5
-      var range = document.selection.createRange();//创建选择对象
-      range.moveToElementText(obj);//range定位到obj
-      if(flg){
-        range.collapse(true);//光标移至开头
-      }else{
-        range.collapse(false);//光标移至最后
-      }
-      range.select();
-    }
-  }
-
   handleKeydown(e){
     const ev = e||window.event;
     const {i} = this.props;
@@ -188,7 +164,7 @@ class EditableSpan extends Component{
       if(textIndex == 0){
         preventDefault(ev);
         if(obj){
-          obj[0]&&this.moveEnd(obj[0]);
+          obj[0]&&moveEnd(obj[0]);
         }
       }
     }
@@ -205,7 +181,7 @@ class EditableSpan extends Component{
     }
   }
   handleKeyup(e){
-    const {boxMark,handleKeydown,removeId,handleClear,removeSpan,handleChange} = this.props;
+    const {boxMark,handleKeydown,removeId,handleClear,removeSpan,handleChange,select_end} = this.props;
     const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -232,9 +208,9 @@ class EditableSpan extends Component{
         //如果后一个不是标签,则光标移到最前
         if(nextObj && nextObj[0].nodeName !=="DIV"){
           // nextObj.focus();
-          this.moveEnd(nextObj[0],1)
+          moveEnd(nextObj[0],1)
         }else{
-          this.moveEnd(preObj[0])
+          moveEnd(preObj[0])
         }
       }
       //action里往后删除
@@ -246,9 +222,9 @@ class EditableSpan extends Component{
             // IE浏览器focus光标在最后,其他浏览器在最前
             // nextObj.focus();
             if(boxMark==2&&this.props.data[index+1]&&this.props.data[index+1].flag==3){
-              this.moveEnd(nexObjN[0],1);
+              moveEnd(nexObjN[0],1);
             }else{
-              this.moveEnd(nextObj[0],1);
+              moveEnd(nextObj[0],1);
             }
           }
           /*this.setState({
@@ -256,23 +232,23 @@ class EditableSpan extends Component{
           })*/
         }else if(indexNum ==innerVal.length&&nexObj[0]&&nexObj[0].nodeName=="DIV"){//span最后一位后面为div标签
           handleKeydown&&handleKeydown({boxMark,i:index+1,text:data,flag:'del'});
-          this.moveEnd(nextObj[0]);
+          moveEnd(nextObj[0]);
         }else if(nexObj[0]&&nexObj[0].nodeName=="SPAN"){
           if(nexVal.length <= 1){//为空或者一个字delete时候
             removeId && removeId({boxMark,i:index+1,text:"",flag:'del'});
             handleClear && handleClear({boxMark});
-            this.moveEnd(nexObj[0])
+            moveEnd(nexObj[0])
           }else if(nexVal.length > 1){
             let tmpVal = nexVal.substr(1,data.length)
             handleChange&&handleChange({text1:tmpVal,boxMark,i:index+1});
             nexObj.html(tmpVal)
-            this.moveEnd(nexObj[0],1)
+            moveEnd(nexObj[0],1)
           }
         }
       }
     }
 
-    if(ev.keyCode==8){
+    if(ev.keyCode==8&&!select_end){
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
       // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
       let preObj = $(this.$span.current).prev();
@@ -281,7 +257,7 @@ class EditableSpan extends Component{
         removeId && removeId({boxMark,i:index,text:""});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
         if(preObj[0].nodeName !=="DIV"){
-          this.moveEnd(preObj[0]);
+          moveEnd(preObj[0]);
         }
       }
 
@@ -309,7 +285,7 @@ class EditableSpan extends Component{
           // let preObj = $(this.$span.current).prev();
           let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'backsp'});
-          this.moveEnd(obj[0]);
+          moveEnd(obj[0]);
           this.setState({
             index: null
           })
@@ -320,9 +296,9 @@ class EditableSpan extends Component{
             handleClear && handleClear({boxMark});
             if(preObj[0].nodeName !=="DIV"){
               if(boxMark==2){
-                this.moveEnd(preObj[0],1);
+                moveEnd(preObj[0],1);
               }else{
-                this.moveEnd(preObj[0]);
+                moveEnd(preObj[0]);
               }
             }
           }else{
@@ -330,7 +306,7 @@ class EditableSpan extends Component{
             handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
             preObj.html(tmpVal)
             if(preObj[0].nodeName !=="DIV"){
-              this.moveEnd(preObj[0]);
+              moveEnd(preObj[0]);
             }
           }
         }
@@ -359,8 +335,19 @@ class EditableSpan extends Component{
       this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
     }
   }
+  selectStart(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
+  selectEnd(){
+    const {i,setSelectArea,boxMark,select_start}= this.props;
+    if(select_start!==i){     //判断不能省,否则无法聚焦
+      setSelectArea({i,boxMark,dir:'end'});
+      window.getSelection().empty();
+    }
+  }
   getClass(){
-    const {full,value,saveText,i,preIsExt,afterIsExt} = this.props;
+    const {full,value,saveText,i,preIsExt,afterIsExt,mouseSelect} = this.props;
     const br = preIsExt&&!afterIsExt;       //最后一个体征标签
     const preSelected = saveText[i-1];
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
@@ -368,11 +355,12 @@ class EditableSpan extends Component{
     const ext = preIsExt?style['ext']:style['unselect'];
     const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const $span = this.$span.current;
     if(br&&$span&&!$span.innerText){
       this.$span.current.innerHTML='&nbsp;';
     }
-    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6));
+    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6),selectedArea);
   }
 
   render() {
@@ -382,6 +370,8 @@ class EditableSpan extends Component{
                  onInput={this.onChange}
                  onFocus={this.handleFocus}
                  onBlur={this.handleBlur}
+                 onmousedown={this.selectStart}
+                 onmouseup={this.selectEnd}
                  onkeydown={this.handleKeydown}
                  onclick={this.handleClick}
                  onkeyup={this.handleKeyup}></span>;

+ 5 - 0
src/common/components/EditableSpan/index.less

@@ -6,11 +6,16 @@
   min-width: 10px;
   // line-height: 2;
   min-height: 16px;//火狐需要
+  height: 25px;
   line-height: 22px;
   vertical-align: unset;
   text-align: left;
   padding-right: 1px;//火狐左右移动需要
   font-weight: bold;
+  &.selected-area{
+  background: #338fff;
+  color: #fff!important;
+}
 }
 .editable-br{
   .editable-span;

+ 20 - 7
src/common/components/InlineTag/index.jsx

@@ -77,19 +77,20 @@ class InlineTag extends Component {
     }
   }
   getStyle(){
-    const {hideTag,placeholder,isExtBlue} = this.props;
+    const {hideTag,placeholder,isExtBlue,mouseSelect} = this.props;
     const value = this.state.value;
     const ext = isExtBlue?style['ext']:'';//是否为体征
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(hideTag){//是否是多标签组合
       if(value){
-        return classNames(style['selected-no-tag'], setFontColorSize());
+        return classNames(style['selected-no-tag'], setFontColorSize(),selectedArea);
       }
-      return classNames(style['no-tag'],ext, setFontColorSize(2),'prefixUnsetColor');
+      return classNames(style['no-tag'],ext, setFontColorSize(2),'prefixUnsetColor',selectedArea);
     }
     if(!value||value.trim()==placeholder){//灰色标签
-      return classNames(style['gray'],ext, setFontColorSize(2));
+      return classNames(style['gray'],ext, setFontColorSize(2),selectedArea);
     }
-    return classNames(style['selected-tag'],ext, setFontColorSize());
+    return classNames(style['selected-tag'],ext, setFontColorSize(),selectedArea);
   }
   moveEnd(obj) {
     if(window.getSelection){//ie11 10 9 ff safari
@@ -108,6 +109,16 @@ class InlineTag extends Component {
   handleFixClick(){
     this.moveEnd(this.$span.current);
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
     this.$span.current.innerHTML=this.props.placeholder;
@@ -117,9 +128,11 @@ class InlineTag extends Component {
   render(){
     const {prefix,suffix,isExtBlue} = this.props;
     return <div className={this.getStyle()}
-                onClick={this.handleFixClick}>
+                onClick={this.handleFixClick}
+                onMouseUp={this.handleMouseUp.bind(this)}
+                onMouseDown={this.handleMouseDown.bind(this)}>
                 <span className="prefixUnset">{prefix}</span>
-                <span className={`${style['free-in']}`}
+                <span className={`${style['free-in']} prefixUnset`}
                       contentEditable={true}
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}

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

@@ -28,10 +28,11 @@ class ItemBox extends Component {
     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){
-    const {handleClick} = this.props;
+    e.stopPropagation();
+    const {handleClick,hideAllDrop} = this.props;
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
+    hideAllDrop&&hideAllDrop();
   }
   handleInput(e){
     const {handleChange,data} = this.props;
@@ -58,12 +59,19 @@ componentWillReceiveProps(nextP){
         that.context.scrollArea&&that.context.scrollArea.refresh();
       });
     }
+}
+setFontColorSize(){
+  const {data,saveText,title} = this.props;
+  if(data&&data.length==0&&saveText&&saveText[0]){
+    return setFontColorSize(2,7)
+  }
+  return setFontColorSize(2,5)
 }
   render(){
     const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"}>
       <div className={`${style["title"]} ${setFontColorSize(2,4)}` + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
-      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:'' } ${setFontColorSize(2,5)}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={editable?handleFocus:null} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
+      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:'' } ${this.setFontColorSize()}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={editable?handleFocus:null} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
         {fuzhen?children||fuzhen:children}
       </div>
     </div>

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

@@ -20,7 +20,7 @@
     min-height: 38px;
     margin:0 470px 0 60px;
     position: relative;
-    padding:5px;
+    padding:5px 12px 5px 5px;
     outline: none;
     border-bottom:1px @part-border-color dashed;
     color: #333;

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

@@ -2,7 +2,7 @@ import React, { Component } from "react";
 import style from "./index.less";
 import Notify from '../Notify';
 import config from '@config/index';
-import {isIE} from '@utils/tools.js';
+import {isIE,moveEnd} from '@utils/tools.js';
 import {getFeature} from '@store/async-actions/fetchModules';
 import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
 import store from '@store';
@@ -33,11 +33,11 @@ class Textarea extends Component {
       setTimeout(function(){
         txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
         that.$dom.current.innerHTML = txt;
-        that.moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
       });
     });
     //const {inpText} = this.state;console.log(inpText,boxMark,hasMain)
-    if(boxMark!='1'&&!hasMain&&!e.target.innerText){
+    if(boxMark!='1'&&boxMark!='2'&&!hasMain&&!e.target.innerText){
       //现病史、其他史无主诉且本身无内容是聚焦提示无法操作
       this.setState({
         editable:false
@@ -112,11 +112,11 @@ class Textarea extends Component {
     return flg;
   }
   handleBlur(e){
-    const {saveChronic} = this.props;
-    const text = e.target.innerText || e.target.innerHTML;
+    //const {saveChronic} = this.props;
+    //const text = e.target.innerText || e.target.innerHTML;
     //解除绑定事件
     $(this.$dom.current).off("paste");
-    getFeature(text).then((res)=>{
+    /*getFeature(text).then((res)=>{
       if(res.data.code==0){
         const result = res.data.data;
         // 慢病
@@ -127,7 +127,7 @@ class Textarea extends Component {
           }
         }
       }
-    })
+    })*/
   }
   handleKeydown(e){
     const {boxMark} = this.props;

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

@@ -17,7 +17,7 @@
   .content{
     // height:120px;
     min-height: 38px;
-    line-height: 22px;
+    line-height: 24px;
     margin-left: 60px;
     position: relative;
     padding:5px;
@@ -25,6 +25,7 @@
     border-bottom:1px @part-border-color dashed;
     margin-right: 470px;
     word-break: break-all;
+    font-weight: bold;
     textarea{
       width: 100%;
     }

BIN
src/common/images/edit1.png


BIN
src/common/images/edit2.png


BIN
src/common/images/icon2.png


BIN
src/common/images/mimi.png


BIN
src/common/images/prec.png


+ 3 - 0
src/common/less/base.less

@@ -126,4 +126,7 @@ html,body {
 :global(.specialpaceSize){
     margin-left: 74px !important;
 }
+:global(.fontWeight){
+    font-weight: bold !important;
+}
 

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

@@ -143,6 +143,13 @@
     /*width: 8px;*/
     display: inline-block;
   }
+  &.selected-area{
+     background: #338fff;
+    color: #fff!important;
+    span,div{
+      color: #fff!important;
+    }
+   }
  }
 .selected-tag{
   position: relative;//发热
@@ -151,7 +158,15 @@
   font-weight: bold;
   /*padding: 0 3px 0;*/
   border-bottom: 1px @border-color solid;
+  &.selected-area{
+    background: #338fff;
+    color: #fff!important;
+    span,div{
+      color: #fff!important;
+    }
+  }
 }
+
 .no-tag{
   display: inline-block;
   position: relative;

+ 2 - 2
src/components/AddAssistCheck/AssistName/index.jsx

@@ -22,9 +22,9 @@ class AssistName extends Component {
 		}
 	}
 	render() {
-		const { winWidth, name, getInfomation } = this.props;
+		const { winWidth, name, getInfomation,normal } = this.props;
 		return (
-				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto' }} ref={this.$assistName}>
+				<span className={`${styles.assistName} ${setFontColorSize(2)}`} style={{ width: winWidth < 1150 ? '120px' : 'auto',fontWeight:normal?'normal':'bold' }} ref={this.$assistName}>
 					<span className={styles.tagSpan} title={name}>
 						{name&&this.splitName(name)}:
             <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: name, position: 1, type: 6 })}></span>

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

@@ -2,7 +2,7 @@ import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
 import $ from 'jquery';
-import { setFontColorSize} from '@utils/tools';
+import { setFontColorSize,moveEnd} from '@utils/tools';
 
 class Textarea extends Component {
   constructor(props) {
@@ -66,6 +66,19 @@ class Textarea extends Component {
     }else{
       this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = '报告描述或意见'):(this.$dom.current.nextSibling.innerHTML = '报告描述或意见')
     }
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      });
+    })
+  }
+  componentWillUnmount(){
+    $(this.$dom.current).off("paste");
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
     this.textInput.current.previousSibling.focus();

+ 2 - 9
src/components/AddAssistCheck/index.jsx

@@ -59,7 +59,6 @@ class AddAssistCheck extends React.Component {
             })
           }
         }
-        
       }
     });
     const that = this;
@@ -203,13 +202,7 @@ class AddAssistCheck extends React.Component {
             {
               part.map((item, idx) => {
                 return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
-                  {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
-                    <span className={styles.tagSpan}>
-                      {item.name}:
-                      <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
-                    </span>
-                  </span> */}
-                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
+                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation} normal={true}></AssistName>
                   <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                     <ScrollArea speed={0.8}
                                 horizontal={false}
@@ -222,7 +215,7 @@ class AddAssistCheck extends React.Component {
                       <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                     </ScrollArea>
                   </div>
-                  <div className={`${styles.pointerFinger} ${setFontColorSize(2)}`}>
+                  <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
                     <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                   </div>
                 </li>)

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

@@ -55,7 +55,7 @@
       width: 260px;
       position: absolute;
       right: 0;
-      top: 10px;
+      bottom: 10px;
       p {
         font-size: unset;
         span {
@@ -72,40 +72,22 @@
         background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAANtJREFUOBHFU90RwiAMDj3H8FV3KQ4AxwAO5QQwgbvoY90DQ+/gUpogXj3bF/L75ctXANj7c85pY0zMPKy1U7bLmQqG4hFjwPIL8UEp9aI+UOxFotcRZ3MALEmu8I+xWoGk2VpiQqhoWneSmoXZvfWehaubsVgBoGxdxb93EekhdbVyKjWh5iNSvcUYjxJIK57WxN5rCOE+13E/scWCy2WMzLC81haTTzlkOONtf6I4KTM8SFPTWqjLicujZk/v/ZnLdV9ZrpmLiQwlBhwIjWVAjStOG6+NpsA/s99BMkpktdAgdAAAAABJRU5ErkJggg==') no-repeat;
       }
 
-      /* a {
-                img {
-                  width: 13px;
-                  height: 13px;
-                  // margin-bottom: 11px;
-                  cursor: pointer;
-                  display: inline-block;
-                  position: absolute;
-                  // right: -4px;
-                  right: 3px;
-                  top: 2px;
-                }
-            } */
-
       p {
         display: inline-block;
         margin: 0 6px;
         vertical-align: top;
-
         span {
           border-bottom: 1px dashed #333;
           box-sizing: border-box;
           margin-right: 0;
           display: inline-block;
-          // width: 140px;
         }
       }
     }
 
     .assistName {
-      // height: 20px;
-      // line-height: 20px;
       box-sizing: border-box;
-      float: left;
+      // float: left;
       position: relative;
       span {
         font-size: unset;
@@ -192,7 +174,6 @@
 .tagSpan {
   position: relative;
   cursor: default;
-  font-weight: bold;
 }
 
 .tagSpan:hover {

+ 75 - 0
src/components/AddInspect/InspectName/index.jsx

@@ -0,0 +1,75 @@
+import React, { Component } from "react";
+import styles from "./index.less";
+import edit1 from "@common/images/edit1.png";
+import edit2 from "@common/images/edit2.png";
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
+class InspectName extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+      isEdit: false,
+      value:''
+    };
+    this.handleInput = this.handleInput.bind(this)
+    this.handleBlur = this.handleBlur.bind(this)
+    this.handleEdit = this.handleEdit.bind(this)
+  }
+  componentDidMount(){
+    const {item} = this.props
+    this.setState({
+      value:item.inpValue,
+      isEdit:item.inpValue?true:false
+    });
+    if(this.refs.iptTip){
+      this.refs.iptTip.getDOMNode().value = item.inpValue
+    }
+  }
+  handleEdit(){
+    this.setState({
+      isEdit:true
+    },()=>{
+      this.refs.iptTip.getDOMNode().focus()
+    })
+  }
+  handleBlur(){
+    let val = this.state.value
+    if (val) return
+    this.setState({
+      isEdit:false
+    })
+  }
+  handleInput(e){
+    const {setTipValue,idx} = this.props
+    this.setState({
+      value:e.target.value
+    })
+    this.props.setTipValue(idx,e.target.value)
+  }
+  render(){
+    const {item,getInfomation,idx,handleLabelSub} = this.props
+    return item.show ? <p className={styles.staticTagActive}>
+        <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </span>
+        {
+          item.inpValue||this.state.isEdit?<div title={this.state.value} className={styles.iptTipWrap} onClick={this.handleEdit}>
+            <input 
+            ref="iptTip"
+            onBlur={this.handleBlur}
+            onInput={this.handleInput}
+            className={styles.iptValue}
+            type="text"/>
+            <span></span>
+          </div>:<span className={styles.iptValueBtn} onClick={this.handleEdit}>点击备注</span>
+        }
+    </p>:
+    <p >
+        <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>handleLabelSub(e,item.questionId,idx)}>
+          {item.name}
+          <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+        </i>
+    </p>
+  }
+}
+export default InspectName;

+ 256 - 0
src/components/AddInspect/InspectName/index.less

@@ -0,0 +1,256 @@
+@import "~@less/variables.less";
+.slideLi {
+    // cursor: pointer;
+    // color: #767676;
+    position: relative;
+    padding: 10px 0px 10px 0;
+    border-bottom:1px dashed #989DA3;
+    margin-top: 5px;
+    i {
+        font-style: normal;
+        display: inline-block;
+        vertical-align: top;
+        padding-top: 3px;
+        &:before {
+            content: '\300C';
+        }
+        &:after {
+            content: '\300D';
+        }
+    }  
+    &>p {
+        cursor: pointer;
+        color: #767676;
+        display: inline-block;
+        position: relative;
+        vertical-align: top;
+    } 
+    .partDel {
+        width: 15px;
+        height: 15px;
+        margin-bottom: 11px;
+        cursor: pointer;
+        display: inline-block;
+        position: absolute;
+        right: -4px;
+        top: 0px;
+        background: @closeIcon;
+        background-color: #fff;
+        background-size: 100% 100%;
+    }
+}
+.slideLi:hover{
+    background:#F2F2F2;
+    border-radius: 4px;
+       .partDel{
+        background: @closeHor;
+        background-color: #fff;
+        background-size: 100% 100%;
+      } 
+}
+.staticTagActive {
+    cursor: pointer;
+    color: #333;
+    // display: inline-block;
+    position: relative;
+    vertical-align: top;
+    padding: 2px 10px 10px 10px;
+    box-sizing: border-box;
+    width: 100%;
+    float: left;
+    span {
+        border-bottom: 1px solid #666666 ;
+    }
+}
+
+.staticTag {
+    cursor: pointer;
+    // color: #767676;
+    color: @blue;
+    padding-top: 10px;
+    display: inline-block;
+    position: relative;
+    /* &:before {
+        content: '\300C';
+    }
+    &:after {
+        content: '\300D';
+    } */
+}
+.table {
+    color: #000;
+    width: 100%;
+    tr {
+        line-height: 18px;
+        height: 18px;
+        width: 100%;
+        font-size: unset;
+        td {
+          cursor: default;
+          padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
+        }
+    }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
+}
+
+.searchResult {
+    .searchResultT {
+        img {
+            float: right;
+        }
+    }
+}
+
+.excelDataLists {
+    position: relative;
+    background-color: #f1f1f1;
+    border: 1px solid #ccc;
+    .close {
+        width: 13px;
+        height: 13px;
+        position: absolute;
+        top: -5px;
+        right: -5px;
+        z-index: 30;
+        background-color: #fff;
+        border-radius: 50%;
+    }
+    .excelDataLis {
+        padding: 2px 0px;
+        border-bottom: 1px dashed #989DA3;
+        .excelDataTitle {
+            display: inline-block;
+            width: 20%;
+            vertical-align: top;
+            padding-left: 10px;
+            float: left;
+        }
+        table {
+            width: 80%;
+            tr {
+                height: 16px;
+                line-height: 16px;
+                width: 100%;
+            }
+            td {
+                text-align: left;
+                padding-top: 6px;
+                cursor: default;
+            }
+            .excelUnit {
+                width: auto;
+                margin-left: 5px;
+            }
+        }
+    }
+}
+.center {
+    text-align: center;
+    font-size: 16px;
+    padding-top: 10px;
+    padding-bottom: 50px;
+}
+.slides {
+  background-color: #EDEDED;
+  text-align: center;
+  height: 28px;
+  line-height: 28px;
+  margin: 10px 0 8px 0;
+  cursor: pointer;
+  span {
+    color:#7d7d7d;
+  }
+  img{
+    vertical-align: middle;
+  }
+  .num {
+    color: @blue;
+  }
+}
+.imgInfo {
+  position: relative;
+}
+.imgInfo, .imgInfo1 {
+  width: 15px;
+  height: 17px;
+  border-bottom: 0 none !important;
+  background: url('../img/info2.png') no-repeat center center;
+  background-size: 100% auto; 
+  position: absolute;
+  top: -10px;
+  left: 50%;
+  margin-left: -8px;
+  display: none;
+  cursor: pointer;
+}
+.imgInfo1 {
+    top: -13px;
+  }
+  .imgInfo:hover, .imgInfo1:hover {
+    background: url('../img/info3.png') no-repeat center center;
+    background-size: 100% auto; 
+  }
+.tagSpan {
+  display: inline-block;
+  position: relative;
+}
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
+.tagSpan:hover {
+    .imgInfo, .imgInfo1 {
+        display: block;
+      }
+}
+.iptValue {
+    width: 100px;
+    color: #3B9ED0;
+    font-size: 12px;
+    margin-left: 10px;
+    background-color: #EDF8FF;
+    padding: 0 16px 0 3px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
+}
+.iptTipWrap {
+    display: inline-block;
+    position: relative;
+    span {
+        display: inline-block;
+        width: 10px;
+        height: 11px;
+        background: url('../../../common/images/edit1.png') no-repeat;
+        position: absolute;
+        right: 3px;
+        top: 5px;
+        border-bottom: 0;
+    }
+}
+.iptTipWrap:hover {
+    span {
+        background: url('../../../common/images/edit2.png') no-repeat;
+    }
+}

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

@@ -41,7 +41,7 @@
 
 .table {
   color: #000;
-  width: 80%;
+  width: 100%;
   // display: inline-block;
   tr {
     line-height: 18px;
@@ -102,15 +102,14 @@
     padding: 2px 0px;
     border-bottom: 1px dashed #989DA3;
     .excelDataTitle {
-        display: inline-block;
-        width: 20%;
+        width: 100%;
         vertical-align: top;
         padding-left: 10px;
         float: left;
         color: #000;
     }
     table {
-        width: 80%;
+        width: 100%;
         tr {
             height: 16px;
             line-height: 16px;
@@ -119,6 +118,7 @@
         td {
             text-align: left;
             padding-top: 6px;
+            padding-left: 10px;
             cursor: default;
         }
         .excelUnit {

+ 16 - 3
src/components/AddInspect/SlideSelect/index.jsx

@@ -7,6 +7,7 @@ import slideDown from "@common/images/slide-down.png";
 import $ from 'jquery';
 import date1 from '../img/date1.png';
 import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
 
 class SlideSelect extends Component {
   constructor(props) {
@@ -94,7 +95,7 @@ class SlideSelect extends Component {
     })*/
   }
   render() {
-    const {windowWidth,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
+    const {windowWidth,handleFillShow,setTipValue,setHighter,refreshScroller,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 = {}
@@ -122,7 +123,16 @@ class SlideSelect extends Component {
     const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
     return (
       <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
-        {
+        <InspectName 
+          item={item} 
+          handleLabelSub={this.handleLabelSub} 
+          idx={idx} 
+          getInfomation={getInfomation} 
+          refreshScroller={refreshScroller} 
+          setHighter={setHighter} 
+          setTipValue={setTipValue}
+          handleFillShow={handleFillShow}></InspectName>
+        {/* {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
@@ -130,6 +140,9 @@ class SlideSelect extends Component {
                   {item.name}
                   <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
+                {
+                  item.inpValue?<input className={styles.iptValue} type="text"/>:<span className={styles.iptValueBtn}>点击备注</span>
+                }
             </p>:
             <p >
                 <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
@@ -137,7 +150,7 @@ class SlideSelect extends Component {
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
-        }
+        } */}
 
         {
           item.details && item.details.map((val)=>{

+ 26 - 4
src/components/AddInspect/SlideSelect/index.less

@@ -51,12 +51,12 @@
 .staticTagActive {
     cursor: pointer;
     color: #333;
-    display: inline-block;
+    // display: inline-block;
     position: relative;
     vertical-align: top;
-    padding: 2px 10px;
+    padding: 2px 10px 10px 10px;
     box-sizing: border-box;
-    width: 20%;
+    width: 100%;
     float: left;
     span {
         border-bottom: 1px solid #666666 ;
@@ -79,7 +79,7 @@
 }
 .table {
     color: #000;
-    width: 80%;
+    width: 100%;
     tr {
         line-height: 18px;
         height: 18px;
@@ -94,6 +94,10 @@
           }
         }
     }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
 }
 
 .searchResult {
@@ -209,4 +213,22 @@
     .imgInfo, .imgInfo1 {
         display: block;
       }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
 }

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

@@ -330,7 +330,7 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const {setHighter,refreshScroller, getInfomation,setTipValue, 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={
@@ -403,6 +403,7 @@ class Inspect extends React.Component {
                   handleConfirm={handleConfirm}
                   getInfomation={getInfomation}
                   setHighter={setHighter}
+                  setTipValue={setTipValue}
                 ></SlideSelect>
               })
             }

+ 16 - 8
src/components/Advice/Textarea/index.jsx

@@ -1,7 +1,7 @@
 import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
-import {setFontColorSize} from '@utils/tools';
+import {setFontColorSize,moveEnd} from '@utils/tools';
 import $ from 'jquery';
 
 class Textarea extends Component {
@@ -20,7 +20,6 @@ class Textarea extends Component {
     e.stopPropagation();
     const {handleChangeAssistValue,idx,handlePush} = this.props;
     const text =  e.target.textContent.trim() ? e.target.innerHTML : ''
-    const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text);
    
   }
@@ -32,13 +31,8 @@ class Textarea extends Component {
   }
   componentWillReceiveProps(next){
     const {isRead, typeConfig} = this.props;
-    // if(next.isRead != isRead && next.value!=this.props.value){      //value对比解决复诊不显示bug
-    //   next.value ? this.$dom.current.innerText = next.value :  this.$dom.current.innerText = next.value 
-    //   // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
-    // }
     if(next.isRead != isRead && next.value || next.isRead != isRead && next.value!=this.props.value){      //value对比解决复诊不显示bug
       next.value ? this.$dom.current.innerHTML = next.value :  this.$dom.current.innerHTML = '' 
-      // this.$dom.current.innerText?(this.$dom.current.innerText = next.value||''):(this.$dom.current.innerHTML = next.value||'');
     }
     if(next.typeConfig != typeConfig) {
       this.$dom.current.innerText = '' 
@@ -52,8 +46,22 @@ class Textarea extends Component {
       // this.$dom.current.innerText ? (this.$dom.current.innerText = value) : (this.$dom.current.innerHTML = value)
     //   this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = ''):(this.$dom.current.nextSibling.innerHTML = '')
     }
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+      });
+      setTimeout(function(){
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      },200)
+    })
+  }
+  componentWillUnmount(){
+    $(this.$dom.current).off("paste");
   }
- 
   render() {
     return (
       <div>

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

@@ -61,7 +61,7 @@ class Advice extends Component{
 
   render(){
     const {advice} = this.props.pushMessage;
-    const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp, typeConfig} = this.props
+    const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp, typeConfig,hideAllDrop} = this.props
     let scheme = advice.scheme && advice.scheme.map((item0, index0) => {
       return <p>
         {item0.treatment.map((item1, index1) => {
@@ -77,7 +77,7 @@ class Advice extends Component{
       </p>
     })
     return  <div id="adviceBox" className={`${'mainsuit-box'} ${style['main-suit']}`}>
-      <ItemBox title='医嘱' editable={false} border={true} marginTop="10px">
+      <ItemBox title='医嘱' editable={false} border={true} marginTop="10px" hideAllDrop={hideAllDrop}>
         <div className={`${style['billing']} ${setFontColorSize(2)}`}>
           {advice.assay && advice.assay.length > 0 || advice.check && advice.check.length > 0 ? <h1>开单项目</h1> : ''}
             {advice.assay && <span className={style['treat-input']}> {advice.assay}</span>}

+ 4 - 4
src/components/AssessResult/ChooseItem/index.jsx

@@ -45,9 +45,9 @@ class ChooseItem extends Component {
                                 <Radio label={i.detailName}
                                        value={i.detailName}
                                        disabled={disabled}
-                                       isSelect={selecteds&&selecteds[it.name]==i.detailName}
+                                       isSelect={selecteds&&selecteds[it.name]==i.detailName||(Object.keys(selecteds||{}).length===0&&i.state==1)}
                                        handleClick={this.handleRadio.bind(this,it.name,i.detailName)}></Radio>
-                                {i.state?<i>(智能推荐)</i>:''}
+                                {/*{i.state?<i>(智能推荐)</i>:''}*/}
                               </div>;
                     }else{
                       return <div className={style['choose-item']}>
@@ -55,9 +55,9 @@ class ChooseItem extends Component {
                                           value={i.detailName}
                                           label={i.detailName}
                                           disabled={disabled}
-                                          isSelect={selecteds&&selecteds[it.name]&&selecteds[it.name].includes(i.detailName)}
+                                          isSelect={(selecteds&&selecteds[it.name]&&selecteds[it.name].includes(i.detailName))||(Object.keys(selecteds||{}).length===0&&i.state==1)}
                                           handleClick={this.handleCheckbox.bind(this,it.name,i.detailName)}/>
-                                {i.state?<i>(智能推荐)</i>:''}
+                                {/*{i.state?<i>(智能推荐)</i>:''}*/}
                               </div>;
                     }
                   })}

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

@@ -83,6 +83,7 @@ class ScaleItem extends Component {
     }
   }
   handleInputformula(id,calcuContent,i,e) {
+    const { calcuResult,handleCalcu } = this.props;
     const {calcuValues} = this.state;
     let obj = deepClone(calcuValues);
     let values = (obj&&obj[id])||deepClone(calcuContent);
@@ -96,6 +97,7 @@ class ScaleItem extends Component {
       isCalculated:false,
       calcuValues:obj
     });
+    handleCalcu&&handleCalcu(id,values,calcuResult);
   }
   handleForRadio(id,calcuContent,i,fidx){//计算公式
     const { calcuValues } = this.state;
@@ -135,8 +137,8 @@ class ScaleItem extends Component {
   }
   calcuFormula(item) { //计算公式计算
     const { calcuResult,handleCalcu } = this.props;
-    const {formulaId,calcuValues} = this.state;
-    let it=calcuValues&&calcuValues[formulaId];
+    const {calcuValues,formulaId} = this.state;
+    let it=calcuValues&&deepClone(calcuValues[formulaId]);
     let allHasInfo = true;
     for (let i = 0; i < it.length; i++) {
       if(it[i].controlType == 2) {  //输入框类型的有没有填值
@@ -155,14 +157,16 @@ class ScaleItem extends Component {
         }
       }
     }
-    item.content.details = calcuValues[formulaId];
+    const itemCopy = deepClone(item)
+    itemCopy.content.details = calcuValues[formulaId]
+    // item.content.details = calcuValues[formulaId];
     if(allHasInfo) { //所有都有值,则计算
       let results = deepClone(calcuResult);
-      getFormulaResult({type:2,data:item}).then((res)=>{
+      getFormulaResult({type:2,data:itemCopy}).then((res)=>{
         if(+res.data.code==0){
           const result = res.data.data.result;
           results[formulaId] = result;
-          handleCalcu&&handleCalcu(calcuValues,results);
+          handleCalcu&&handleCalcu(formulaId,calcuValues[formulaId],results);
           this.setState({
             isCalculated:true
           });
@@ -176,10 +180,9 @@ class ScaleItem extends Component {
   }
   getDetailItems(item,i){
     let arr = [],temp='';
-    const {indexs,result,formulaResult,disabled,calcuResult} = this.props;
-    const {optionId,formulaId,radioVal,calcuValues} = this.state;
+    const {indexs,result,formulaResult,disabled,calcuValues,calcuResult} = this.props;
+    const {optionId,formulaId,radioVal} = this.state;
     const possible=result&&result.possible;
-
     item.details.map((its,j)=>{
       let it=its;
       if(indexs[i]&&indexs[i].includes(j)){
@@ -194,6 +197,7 @@ class ScaleItem extends Component {
         }else if(its.type==2){      //计算公式
           const showRes = calcuResult&&calcuResult[item.conceptId]||it.content.result;
           const details = calcuValues&&calcuValues[item.conceptId]||it.content.details;
+
           const cresult = showRes&&showRes[1]&&showRes[1].text;
                     temp = <div className={style['results']}>
                     <span>计算公式结果:</span>
@@ -233,6 +237,7 @@ class ScaleItem extends Component {
                               </td>
                             </tr>
                           }else if(item1.controlType==2){//输入框
+                            
                             return <tr>
                               <td>
                                 <span>{item1.isShow == '0' ? item1.name+':':'请输入'+item1.name+':'}</span>
@@ -279,10 +284,10 @@ class ScaleItem extends Component {
                           {it.content.details&&it.content.details.map((lis,ind)=>{
                             return <div className={style["chooseItem"]}>
                               <Radio label={lis.detailName}
-                                     isSelect={radioVal&&radioVal[item.conceptId]==lis.detailName}
+                                     isSelect={radioVal&&radioVal[item.conceptId]==lis.detailName||(Object.keys(radioVal).length===0&&lis.state==1)}
                                      handleClick={this.handleRadio.bind(this,lis,item,i)}>
                               </Radio>
-                              {lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
+                              {/*{lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}*/}
                             </div>
                           })}
                         </div>

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

@@ -91,14 +91,14 @@ class AssessResult extends Component {
       chartTimeTypes:Object.assign(chartTimeTypes,{[i]:selects})
     });
   }
-  handleCalcu(values,ret){
+  handleCalcu(id,values,ret){
     const {saveCalcuValue,saveCalcuResult}=this.props;
     this.setState({
       calcuResult:ret,
-      calcuValues:values
+      calcuValues:{[id]:values}
     });
     saveCalcuResult&&saveCalcuResult(ret);
-    saveCalcuValue&&saveCalcuValue(values);
+    saveCalcuValue&&saveCalcuValue(values, id);
   }
   componentWillUnmount(){
     //点确定关闭弹窗时把参数传到父组件去

+ 4 - 1
src/components/AssistCheck/index.jsx

@@ -64,7 +64,9 @@ class AssistCheck extends React.Component {
 
   }
     render(){
-        const {setHighter,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,hideAllDrop} = this.props;
         const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
         const {importLis,ieVersion,hide} = this.state;
         // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -108,6 +110,7 @@ class AssistCheck extends React.Component {
                 </div>
                 <ItemBox 
                     className={styles.title}
+                    hideAllDrop={hideAllDrop}
                     title={'辅检'}
                     editable={false}
                     border={true}

+ 44 - 42
src/components/Banner/ModeChange/index.jsx

@@ -34,59 +34,61 @@ class ModeChange extends Component {
               <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"]}>
+                <div className="scroller">
+                  <div className={style["oper"]}>
                     <p className={this.getStyle()}>
                       <span>开启模板智能推送:</span>
                       <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',isOpen?1:0):null}>
                         <img src={isOpen?sopen:sclose} alt=""/>
                         {isOpen?'开':'关'}
-                        </a>
+                      </a>
                     </p>
-                  <p className={this.getStyle(1)}>
-                    <span>开启一般情况默认值:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config1',general?1:0):null}>
-                      <img src={general?sclose:sopen} alt=""/>
-                      {general?'关':'开'}
-                    </a>
-                  </p>
-                  <p className={this.getStyle(1)+" "+style['big-marb']}>
-                    <span>开启其他史默认值:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config2',ohis?1:0):null}>
-                      <img src={ohis?sclose:sopen} alt=""/>
-                      {ohis?'关':'开'}
-                    </a>
-                  </p>
-                  <p className={this.getStyle()}>
-                    <span>默认字体大小:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',0):null}>
-                      <img src={fontsize?radio_on:radio_off} alt=""/>
-                      标准
-                    </a>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',1):null}>
-                      <img src={fontsize?radio_off:radio_on} alt=""/>
-                      增大
-                    </a>
-                  </p>
-                  <p className={this.getStyle()}>
-                    <span>默认字体颜色:</span>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',0):null}>
-                      <img src={color?radio_on:radio_off} alt=""/>
-                      标准
-                    </a>
-                    <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',1):null}>
-                      <img src={color?radio_off:radio_on} alt=""/>
-                      增黑
-                    </a>
-                  </p>
-                </div>
-                <div className={style["explain"]}>
+                    <p className={this.getStyle(1)}>
+                      <span>开启一般情况默认值:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config1',general?1:0):null}>
+                        <img src={general?sclose:sopen} alt=""/>
+                        {general?'关':'开'}
+                      </a>
+                    </p>
+                    <p className={this.getStyle(1)+" "+style['big-marb']}>
+                      <span>开启其他史默认值:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config2',ohis?1:0):null}>
+                        <img src={ohis?sclose:sopen} alt=""/>
+                        {ohis?'关':'开'}
+                      </a>
+                    </p>
+                    <p className={this.getStyle()}>
+                      <span>默认字体大小:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',0):null}>
+                        <img src={fontsize?radio_on:radio_off} alt=""/>
+                        标准
+                      </a>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',1):null}>
+                        <img src={fontsize?radio_off:radio_on} alt=""/>
+                        增大
+                      </a>
+                    </p>
+                    <p className={this.getStyle()}>
+                      <span>默认字体颜色:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',0):null}>
+                        <img src={color?radio_on:radio_off} alt=""/>
+                        标准
+                      </a>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',1):null}>
+                        <img src={color?radio_off:radio_on} alt=""/>
+                        增黑
+                      </a>
+                    </p>
+                  </div>
+                  <div className={style["explain"]}>
                     <p>说明:</p>
                     <p>1、智能推送模式只针对问诊模块中的“主诉”、“现病史”、“其他史”展示科室模版功能;</p>
                     <p>2、慢病模式下,该模版智能推送的设置功能不可用;</p>
                     <p>3、一般情况默认值:神清、精神可、胃纳可、睡眠可、二遍无殊、体重无明显减轻;</p>
                     <p>4、其他史默认值:既往史无殊、过敏史无殊、个人史无殊;</p>
-                    <p>5、标准字号:</p>
-                    <p>6、标准字体颜色:</p>
+                    <p>5、病历书写模块,字体大小标准为14px,增大为18px;</p>
+                    <p>6、病历书写模块,字体颜色标准为灰黑色,增黑为全黑色;</p>
+                  </div>
                 </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>

+ 8 - 3
src/components/Banner/ModeChange/index.less

@@ -15,11 +15,12 @@
     .content {
       .maskContentZIndex1;
       position: fixed;
-      top: 100px;
+      top: 50%;
       width: 45%;
       min-width: 450px;
-      left:50%;
-      margin-left: -216px;
+      left:27%;
+      margin-top:-265px;
+      /*margin-left: -216px;*/
       min-height: 284px;
       background: #fff;
       .oper{
@@ -29,6 +30,10 @@
           &.big-marb{
             margin-bottom: 20px;
           }
+          span{
+            display: inline-block;
+            width: 140px;
+          }
         }
         .fade{
           opacity: .4;

+ 18 - 7
src/components/Banner/index.jsx

@@ -3,14 +3,18 @@ import { connect } from "react-redux";
 import style from "./index.less";
 import ReactDom from "react-dom";
 import logo from "../../common/images/logoa.png";
+import prec from "../../common/images/prec.png";
 import setup from "../../common/images/setup.png";
 import emergIcon from '../../common/images/emergency.png'
 import {Notify} from '@commonComp';
 import Emergency from '@containers/Emergency';
+import PreInIcss from '@containers/PreInIcss';
 import {getAllHis} from '@store/async-actions/fetchModules.js';
 import {timestampToTime,getCurrentDate} from '@utils/tools.js';
 import {dragBox} from '@utils/drag';
 import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
+import { GET_PREC_LIST,SET_PREC_SHOW } from "@store/types/preIcss";
+import {getPreMsg} from '@store/async-actions/preIcss';
 import ModeChange from './ModeChange'
 
 class Banner extends Component {
@@ -103,7 +107,7 @@ class Banner extends Component {
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther} = this.props;
+    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
     const {emergencyBox} = this.state;
     const {showConfigModal, changeType, confirmType} = this;
     const domNode = document.getElementById('root');
@@ -113,13 +117,17 @@ class Banner extends Component {
         <img src={logo} />
         <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]}>
-          {ifShow==1&&deptName=='急诊科'?<div className={style["buon1"]} onClick={this.showHisModal}>
+          {ifShow==1&&deptName=='急诊科'?<div className={`${style["buon1"]} ${style["buon2"]}`} onClick={this.showHisModal}>
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
-                      本科室近期全部病历
+                      <i>本科室近期全部病历</i>
                     </div>:''}
+          <div className={style.prec} onClick={()=>preShow(show)}>
+            <img className={style["st"]} src={prec} alt="预问诊"/>
+            <i> 预问诊信息</i>
+          </div>
           <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
-            设置
+            <i> 设置</i>
           </div>
         </div>
         {visible&& <ModeChange
@@ -137,7 +145,7 @@ class Banner extends Component {
             </div>
           </React.Fragment>
           , domNode):''}
-        
+        {show?<PreInIcss></PreInIcss>:null}
       </div>
     );
   }
@@ -148,7 +156,8 @@ const mapStateToProps = function(state){
   const {message} = state.patInfo;
   return {
     ifShow:sysConfig.general_show,
-    deptName:message.selfDeptName
+    deptName:message.selfDeptName,
+    show:state.preIcss.preShow
   }
 }
 
@@ -162,7 +171,9 @@ const mapDispatchToProps = function(dispatch){
         type: CLEAR_COMSYMPTOMS
       })
     },
+    preShow(show){
+      show?dispatch({type:SET_PREC_SHOW}):getPreMsg()
+    }
   }
 }
-// export default Banner;
 export default connect(mapStateToProps,mapDispatchToProps)(Banner);

+ 15 - 3
src/components/Banner/index.less

@@ -7,11 +7,10 @@
     height: 50px;
 
     border-bottom: 10px solid #e4e6e7;
-    position: fixed;          //页面布局调整
+    position: absolute;          //页面布局调整
     width: 100%;
     top: 0;
     // z-index: 202;
-
     img{
       vertical-align: middle;
       margin: 0 10px 2px 18px;
@@ -33,7 +32,20 @@
         .buon1{
           display: inline-block;
           cursor: pointer;
-          margin-left: 10px;
+          font-weight: bold;
+        }
+        .buon2 {
+          margin-right: 20px;
+        }
+        .prec {
+          display: inline-block;
+          margin-right: 20px;
+          cursor: pointer;
+        }
+        i {
+          position: relative;
+          top: 1px;
+          font-weight: bold;
         }
     }
     .st{

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

@@ -4,6 +4,6 @@
   }
 }*/
 .container{
-  padding: 50px 10px 0 10px;
+  padding: 50px 8px 0 10px;
   position: relative;
 }

+ 25 - 0
src/components/CaseQuailty/index.jsx

@@ -0,0 +1,25 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import {windowEventHandler,getWindowInnerHeight} from '@utils/tools'
+
+class CaseQuailty extends Component {
+  constructor(props) {
+    super(props);
+    this.$cont = React.createRef();
+  }
+  componentDidMount(){
+    const height = getWindowInnerHeight()-149;
+    this.$cont.current.style.height = height+"px";
+    windowEventHandler('resize', ()=>{
+      if(this.$cont.current){
+        const height = getWindowInnerHeight()-149;
+        this.$cont.current.style.height = height+"px";
+      }
+    });
+  }
+  render() {
+    return <div className={style["caseQuailty"]} ref={this.$cont}>敬请期待...</div>;
+  }
+}
+
+export default CaseQuailty;

+ 6 - 0
src/components/CaseQuailty/index.less

@@ -0,0 +1,6 @@
+.caseQuailty{
+  text-align: center;
+  padding-top: 50px;
+  font-size: 16px;
+  color: gray;
+}

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

@@ -7,6 +7,7 @@ import {getPageCoordinate,windowEventHandler,isIE,filterDataArr} from '@utils/to
 import $ from "jquery";
 import showImg from "../../common/images/show.png";
 import hideImg from "../../common/images/close.png";
+import rePushIcon from '../../common/images/icon2.png';
 import config from '@config/index';
 
 class CheckBody extends Component{
@@ -110,9 +111,10 @@ class CheckBody extends Component{
     });
   }
   render(){
-    const {searchData,totalHide,data,saveText} = this.props;
+    const {searchData,totalHide,rePush,hasMain,isEmpty,isChronic,hideAllDrop} = this.props;
     const {boxLeft,boxTop} = this.state;
-    return <ItemBox title='查体' handleClick={this.handleClick}>
+    return <ItemBox title='查体' handleClick={this.handleClick} hideAllDrop={hideAllDrop}>
+      {!isEmpty&&!isChronic?<img className={style['refresh']} src={rePushIcon} title='重新加载' onClick={!hasMain&&isEmpty?null:rePush}/>:''}
         {this.getLabels()}
         {/*{showMoreBtn?more:''}*/}
         {searchData && searchData.length>0?<SearchDrop data={searchData} show={!totalHide} left={boxLeft} top={boxTop} onSelect={this.handleSearchSelect}></SearchDrop>:''}

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

@@ -13,4 +13,9 @@
     vertical-align: text-top;
     width: 15px;
   }
+}
+.refresh{
+  position: absolute;
+  right: 0;
+  top: 9px;
 }

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

@@ -146,7 +146,7 @@ class ChronicInfo extends React.Component{
   // 量表明细-关闭,isClose是否是点击关闭按钮
   closeTable(isClose){
     const {scaleParam} = this.state;
-    const {showHide} = this.props;
+    const {showHide,chronicMagItem} = this.props;
     if(!showHide.isPop){
       //量表结果,判断需要计算并且dom中有值才能加入病例记录
       // innerHTML 兼容FF26
@@ -155,7 +155,7 @@ class ChronicInfo extends React.Component{
         Notify.info("请先计算量表结果!");
         return ;
       }
-      !isClose&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);
+      !isClose&&chronicMagItem&&this.handleAddAssessItem(scaleParam.v,scaleParam.i,scaleParam.j);   //是慢病流程才能加入病例
       this.setState({
         scaleParam:{}
       });
@@ -228,24 +228,27 @@ class ChronicInfo extends React.Component{
     addAssessItem(v,pIndex,i);
   }
   addFormula(it,v,pIndex,i){
-    const {chronicMagItem} = this.props;
+    const {chronicMagItem, setCalcuInfo} = this.props;
     this.closeFormula(it);
-    chronicMagItem&&this.handleAddAssessItem(v,pIndex,i);
+    const itCopy = deepClone(it)
+    const vCopy = deepClone(v)
+    setCalcuInfo && setCalcuInfo(v.conceptId,itCopy.content.details,itCopy.content.result)
+    chronicMagItem&&this.handleAddAssessItem(vCopy,pIndex,i);
   }
-  handleInputformula(id,calcuContent,i,e) {
-    const {calcuValues} = this.state;
-    let obj = deepClone(calcuValues);
-    let values = (obj&&obj[id])||deepClone(calcuContent);
+  handleInputformula(id,calcuContent,i,j,idd,cres,e) {
+    // const {calcuValues} = this.state;
+    const {calcuResult,calcuValues,setCalcuInfo,data,setChronicPush} = this.props;
+    const dataCopy = deepClone(data)
+      let obj = deepClone(dataCopy[i].details[j].content.details);
+    let values = deepClone(obj);
     const txt = e.target.value;
-    values[i].value = txt.replace(/[\u4e00-\u9fa5]|[^\d.]/g,'');       //处理中文输入法的情况
-    obj[id] = values;
+    values[idd].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,
-      calcuValues:obj
-    });
+  
+    dataCopy[i].details[j].content.details = values
+    setChronicPush&&setChronicPush(dataCopy)
   }
   handleForRadio(id,calcuContent,i,fidx){//计算公式
     const { calcuValues } = this.state;
@@ -274,6 +277,12 @@ class ChronicInfo extends React.Component{
   confirmOption(parent,pIndex,i){//可能结果确定
     const {radioVal,possible} = this.state;
     const {savePossibleResult,chronicMagItem} = this.props;
+    if(Object.keys(radioVal).length===0){     //初始状态,可能有推荐选项
+      const defaulted = parent.details[i].content.details.filter((it)=>+it.state===1);
+      if(defaulted.length>0){
+        radioVal[parent.conceptId] = defaulted[0].detailName;
+      }
+    }
     this.setState({
       possible:Object.assign({},possible,radioVal),
       radioVal:Object.assign({},possible,radioVal),//不设置radioVal只有最近一次选中的值
@@ -289,11 +298,10 @@ class ChronicInfo extends React.Component{
       radioVal:Object.assign({},obj.radioVal),//不设置radioVal只有最近一次选中的值
     })
   }
-  calcuFormula(id,it) { //计算公式计算
-    const { calcuFormula } = this.props;
+  calcuFormula(id,it,i,j) { //计算公式计算
+    const {calcuFormula, data } = this.props;
     let item = deepClone(it);
-    const values = this.state.calcuValues;
-    const calcuValues = Object.keys(values).length&&values[id]?values[id]:item.content.details;
+    const calcuValues = item.content.details
     let allHasInfo = true;
     for (let i = 0; i < calcuValues.length; i++) {
       if(calcuValues[i].controlType == 2) {  //输入框类型的有没有填值
@@ -319,7 +327,7 @@ class ChronicInfo extends React.Component{
         data: item,
         disId: id
       };
-      calcuFormula(param);
+      calcuFormula(param,data,i, j);
       this.setState({
         isCalculated:true
       });
@@ -398,9 +406,15 @@ class ChronicInfo extends React.Component{
                                 </span>
                               </p>
                         }else if(it.type==2){
-                          const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
+                          //如果保存过,则使用保存内容
+                          // const cres = calcuResult&&calcuResult[v.conceptId]||it.content.result;
+                          //每次都取最新推送内容
+                          const cres = it.content.result || [];
                           const result = cres&&cres[1]&&cres[1].text;
-                          const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
+                          //如果保存过,则使用保存内容
+                          // const details = calcuValues&&calcuValues[v.conceptId]||it.content.details;
+                          //每次都取最新推送内容
+                          const details = it.content.details || [];
                           return <div className={style["marTop"]}>
                             <span className={style["limit"]}>
                               计算公式结果:
@@ -443,7 +457,7 @@ class ChronicInfo extends React.Component{
                                           <span>{item.isShow == '0' ? item.name+':':'请输入'+item.name+':'}</span>
                                         </td>
                                         <td>
-                                          {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入"  value={item.value} 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} onInput={this.handleInputformula.bind(this,v.conceptId,details,i,j,idd,cres)}/>}
                                         </td>
                                         <td>
                                           {item.isShow != '0'&&<span>{item.uint}</span>}
@@ -453,7 +467,7 @@ class ChronicInfo extends React.Component{
                                     }
                                 })}
                                 </table>
-                                <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.conceptId,it)}>计算</div>
+                                <div className={style["forMulBtn"]} onClick={this.calcuFormula.bind(this,v.conceptId,it,i,j)}>计算</div>
                                 <table>
                                   {cres && Array.isArray(cres) &&cres.map((itemResult, resultIndex) => {
                                     return <tr>
@@ -482,16 +496,16 @@ class ChronicInfo extends React.Component{
                                 show={optionId&&optionId==v.conceptId?true:false}
                                 close={this.closeOption}
                                 confirm={this.confirmOption.bind(this,v,i,j)}
-                                footer={radioVal[v.conceptId]?true:false}>
+                                footer={true}>
                                 <div className={style["infoOption"]}>
                                   <span>{it.content.name?it.content.name+':':''}</span>
                                   {it.content.details&&it.content.details.map((lis,ind)=>{
                                     return <div className={style["chooseItem"]}>
                                       <Radio label={lis.detailName}
-                                               isSelect={radioVal[v.conceptId]==lis.detailName}
+                                               isSelect={radioVal[v.conceptId]==lis.detailName||(Object.keys(radioVal).length===0&&lis.state==1)}
                                                handleClick={this.handleRadio.bind(this,lis,v)}>
                                         </Radio>
-                                        {lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}
+                                        {/*{lis.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}*/}
                                     </div>
                                   })}
                                 </div>

+ 4 - 31
src/components/CommonSymptom/index.jsx

@@ -26,7 +26,6 @@ class CommonSymptom extends Component{
     this.handleSelect = this.handleSelect.bind(this);
     this.handleClear = this.handleClear.bind(this);
     this.handleConfirm = this.handleConfirm.bind(this);
-    this.handleOuter = this.handleOuter.bind(this);
   }
   getClass(){
     let isHide = this.props.show?'':style['hide'];
@@ -34,7 +33,7 @@ class CommonSymptom extends Component{
   }
 
   handleSelect(e,item){
-    // e.stopPropagation();
+    e.stopPropagation();
     let {select,ids,conceptId} = this.state;
     const id = item.questionId||item.id; //缓存localStorage中的数据有id
     const copid = item.conceptId
@@ -56,7 +55,7 @@ class CommonSymptom extends Component{
         ids.push(id);
       }
       conceptId.push(copid);
-      select.push(item);
+      select.push(Object.assign(item,{id:item.questionId}));
     }
     this.setState({
       select,
@@ -86,37 +85,11 @@ class CommonSymptom extends Component{
     onSelect&&onSelect({select,ids,conceptId});
   }
 
-  handleOuter(e){
-    e.stopPropagation();
-    let itemBox = $('#mainSuit')[0]; //主诉框
-    if(this.div.current.contains(e.target) || e.target == itemBox){
-      this.setState({
-        hide:false
-      })
-    }else{
-      this.setState({
-        hide:true,
-        select:[],
-        ids:[],
-        conceptId:[]
-      })
-    }
-  }
-
-  componentDidMount() {
-    window.addEventListener('click', this.handleOuter);
-  }
-
-  componentWillUnmount() {
-    window.removeEventListener('click', this.handleOuter);
-  }
-
   render(){ 
-    const {data} = this.props;
-    const {hide} = this.state;
+    const {data,isCurrent} = this.props;
     const mainSymp = storageLocal.get('mainSymp');
     const mainHis = mainSymp?JSON.parse(mainSymp).reverse():[];
-    return <div className={this.getClass()} contenteditable="false" style={{'display':hide?'none':'block'}} ref={this.div} onClick={this.handleOuter}>
+    return <div className={this.getClass()} contenteditable="false" style={{left:isCurrent?"auto":undefined}} ref={this.div}>
       <ul className={style["listBox"]}>
         {mainHis.length>0?<ul className={style["his"]}>
           <div className='clearfix'>

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

@@ -6,7 +6,7 @@
   padding: 5px;
   white-space: pre-wrap;
   .listBox{
-    max-width: 460px;
+    width: 460px;
   }
   .his{
       color: #3B9ED0;

+ 6 - 15
src/components/CurrentIll/index.jsx

@@ -33,18 +33,18 @@ class CurrentIll extends Component{
   handleFocus(e){
     // 判断主诉是否为空
     const {mainData,mainText,setData,moduleNum,mainIds,mainTailIds,data,changeEditIll,editClear,symptomFeature,isChronic} = this.props;
-    const that = this;
+    //const that = this;
     const ev = e || window.event;
     const text = ev.target.innerText || ev.target.innerHTML;
-    let {setDataTimer} = this.state; 
-    let mainFinallyText = filterDataArr(mainText);
+    let {setDataTimer} = this.state;
+    /*let mainFinallyText = filterDataArr(mainText);
     if(!mainFinallyText && !text){
       //弹窗提醒
       Notify.error("无法操作,请先输入主诉");
       this.setState({
         forbidInput:true
       })
-    }else if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
+    }else */if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
       let num = moduleNum.num;//主诉使用了几个模板
       if(data.length==0 && !isChronic){
         clearTimeout(setDataTimer);
@@ -114,18 +114,8 @@ 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 {hasMain,readMode,fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
+    const {hideAllDrop,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;
     const mode = readMode===null||readMode===-1?type:readMode;
@@ -145,6 +135,7 @@ class CurrentIll extends Component{
       handleFocus={this.handleFocus}
       handleChange={forbidInput?this.onchange:''}
       handleClick={this.handleClick}
+      hideAllDrop={hideAllDrop}
       handleBlur={this.handleBlur}>
         {data.length>0?this.getInlineTag():(saveText[0]?saveText[0]:'')}
       </ItemBox>

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

@@ -52,7 +52,7 @@ class Diagnosis extends Component {
   }
   render() {
     return (<div id="diagnosisResult">
-      <ItemBox id="diagnosis" title='诊断' boxHeight='auto' titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
+      <ItemBox id="diagnosis" title='诊断' boxHeight='auto' hideAllDrop={this.props.hideAllDrop} titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
         <DiagnosticList refreshScroller={this.refreshScroller}></DiagnosticList>
         <div style={{ marginLeft: '10px', position: 'relative',color:'#000' }}>
           <Add showText="添加诊断结果" handleClick={this.handleshowSearch} id="addDiag" height="50px" />

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

@@ -64,11 +64,11 @@ class DiagnosticItem extends Component{
         getTips && getTips({id:item.id,type:7,name: item.name, position: 1});
     }
     addDiagodal(diagType){
-        const {item, isChronicMag} = this.props;
+        const {item, isChronicMag,mode} = this.props;
         item.type = diagType;
          const {  addDiagnostic, clearInput, hideSearch } = this.props;
 
-         if(item.type == 2) {
+         if(item.type == 2&&mode=='0') {      //文本模式不走慢病
              isChronicMag(item);
          }
          addDiagnostic&&addDiagnostic(item);

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

@@ -315,7 +315,7 @@ class DiagnosticList extends Component {
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           治疗方案
                                     </span>
-                                    {isChronic?<span className={style['assess']}
+                                    {isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
                                     </span>:''}

+ 9 - 7
src/components/InfoTitle/index.jsx

@@ -52,13 +52,15 @@ class InfoTitle extends Component {
     render() {
         const {disVisible,copyVisible,winWidth,loading} = this.props;
         const {le} = this.state;
-        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>
-            </div>
-            <div className={style["health"]} >
-                <span><img src={health} />&nbsp;健康档案</span>
+        return <div className={style['title-wrapper']}  style={{left:le}}>
+            <PatInfoContainer />
+            <div className={style['activeWrap']}>
+                <div className={style["operations"]} onClick={this.showHistoryBox}>
+                    <span><img src={historyCase} />&nbsp;历史病历</span>
+                </div>
+                <div className={style["health"]} >
+                    <span><img src={health} />&nbsp;健康档案</span>
+                </div>
             </div>
             <HistoryCases></HistoryCases>
             <Loading show={loading}/>

+ 11 - 3
src/components/InfoTitle/index.less

@@ -11,15 +11,23 @@
   top: 50px;
   right: 470px;
   min-width: 548px;
+  padding-right: 122px;
+  .activeWrap {
+    position: absolute;
+    right: 0;
+    top: 0;
+    width: 122px;
+    line-height: 28px;
+  }
 }
 .operations, .health{
   float: left;
 //   border: 1px @border-color solid; 
-  height: 61px;
-  width: 12%;
+  // height: 61px;
+  width: 122px;
   border-left: 0px solid #fff;
   text-align: center;
-  line-height: 61px;
+  // line-height: 61px;
   color: @blue;
   span{
     cursor: pointer;

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

@@ -208,7 +208,7 @@ class Inspect extends React.Component {
 
   }
   render() {
-    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 {hideAllDrop,setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, 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")){//动态绑定只绑定一次
@@ -221,7 +221,7 @@ class Inspect extends React.Component {
         <div className={styles.top}>
           <span id="inspectResultData" className={setFontColorSize(2,5)}>化验结果数据</span>
           {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0 ? 'none' : 'block' }}>
+          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0||hospitalMsg.import_way_lis ==undefined ? 'none' : 'block' }}>
             {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
             <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
             {/* {0没有,1本地,2医院,3本地和医院} */}
@@ -256,6 +256,7 @@ class Inspect extends React.Component {
           </div>
         </div>
         <ItemBox
+          hideAllDrop={hideAllDrop}
           className={styles.title}
           title={'化验'}
           editable={false}
@@ -286,6 +287,7 @@ class Inspect extends React.Component {
               inspectVal={inspectVal}
               windowHeight={windowHeight}
               windowWidth={windowWidth}
+              setTipValue={setTipValue}
             >
             </AddInspect>
           </div>

+ 9 - 11
src/components/MainSuit/index.jsx

@@ -45,20 +45,18 @@ class MainSuit extends Component{
 
 
   handleFocus(e){
-    //e.stopPropagation();
-    const {getCommonSymptoms,datas,clearDiagnose} = this.props;
+    const {getCommonSymptoms,datas,clearDiagnose,handleShow} = this.props;
     let innerText = e.target.innerText || e.target.innerHTML;//兼容火狐43
     clearDiagnose&&clearDiagnose();//清除复诊数据
     if(!isIE()){//IE会触发onfocus和onblur事件
       if(!innerText.trim()){//有内容就走搜索接口
         getCommonSymptoms && getCommonSymptoms();
+        handleShow&&handleShow({ikey:'common'});
         this.setState({
-          symptom:true,
           inpText:innerText
         })    
       }else{
         this.setState({
-          symptom:false,
           inpText:innerText
         }) 
       }
@@ -68,9 +66,6 @@ class MainSuit extends Component{
       // if(datas.length==0 && !innerText.trim()){
       if(datas.length==0 && innerText == '<br>'){
         getCommonSymptoms && getCommonSymptoms();
-        this.setState({
-          symptom:true
-        })  
       }
     }
     
@@ -127,6 +122,8 @@ class MainSuit extends Component{
 
 
   handleClick(e){
+    const {handleShow} = this.props;
+    handleShow&&handleShow({ikey:'common'});
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
     //搜索框位置
     const ele = document.activeElement;
@@ -272,15 +269,15 @@ class MainSuit extends Component{
       }
   }*/
   render(){
-    const {saveChronic,readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide} = this.props;
-    const {symptom,boxLeft,boxTop} = this.state;
+    const {readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,showArr} = this.props;
+    const {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;
     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 <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
     }
     return  <div className={style['main-suit']}>
       <ItemBox
@@ -293,11 +290,12 @@ class MainSuit extends Component{
       handleClick={this.handleClick} 
       handleBlur={this.handleBlur}
       data={datas}
+      saveText={saveText}
       boxId="mainSuit">
         {''}{datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
       </ItemBox>
       {/*没有推送结果就不显示*/}
-      {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
+      {symptomFlag && !searchFlag&&datas.length===0 ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&showArr['common']} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
     </div>
   }
 }

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

@@ -19,7 +19,7 @@ class Filters extends Component {
     })
   }
   render() {
-    return <div className={style["filters"]}>
+    return <div className={style["filters"]} id='medicalInfoFilter'>
               {this.drawItem()}
             </div>
 

+ 22 - 6
src/components/MedicalInfo/index.jsx

@@ -22,19 +22,28 @@ class MedicalInfo extends Component {
         this.getSearchList = this.getSearchList.bind(this);
         this.handleEnter = this.handleEnter.bind(this);
         this.handleTypeCheck = this.handleTypeCheck.bind(this);
+        this.showScale=this.showScale.bind(this);
+    }
+    showScale(item){
+      const {scaleInfo,getScale,showScaleFn} = this.props;
+      if(scaleInfo&&scaleInfo[item.conceptId]){
+        showScaleFn&&showScaleFn(item);
+      }else{
+        getScale(item);
+      }
     }
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-278+'px';
+            if(that.$ul.current)that.$ul.current.style.height = getWindowInnerHeight()-278+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
           return <li key={item.conceptId}
                      title='点击查看详情'
-                     onClick={() => getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName,position:0,showName:item.name})}>
+                     onClick={()=>+item.type===21?this.showScale(item):getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName,position:0,showName:item.name})}>
             <span>{item.name}</span>
             <i>( {item.libTypeName} )</i>
             {item.retrievalName?<p>• {item.retrievalName}</p>:''}
@@ -106,12 +115,12 @@ class MedicalInfo extends Component {
     });
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-148;
+    const height = getWindowInnerHeight()-149;
     this.$cont.current.style.height = height+"px";
     this.props.getFilters();
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-148;
+        const height = getWindowInnerHeight()-149;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
@@ -120,10 +129,17 @@ class MedicalInfo extends Component {
       }
     });
   }
-  componentWillReceiveProps(){
+  componentWillReceiveProps(next){
     this.setState({
       hasSearch: false
     });
+    //点清空恢复初始状态
+    if(this.props.clearSearch!==next.clearSearch){
+      this.clear();
+      this.setState({
+        typeChecks:['0']
+      });
+    }
   }
     render() {
         const {searchResult,filterList} = this.props;
@@ -132,7 +148,7 @@ class MedicalInfo extends Component {
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
                 <p className={style['cont']}>
-                  <input placeholder="医学知识搜索" type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
+                  <input placeholder="医学知识搜索" id='medicalInfoSearch' type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
                   {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                   <button onClick={this.search}>搜索</button>
                 </p>

+ 15 - 7
src/components/MultSpread/index.jsx

@@ -9,7 +9,7 @@ import addIcon from '@images/addItem.png';
 import addIcon1 from '@images/addItem2.png';
 import style from "./index.less";
 import tools from '@utils/tools';
-import {setFontColorSize} from '@utils/tools';
+import {setFontColorSize,handleMouseUp} from '@utils/tools';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
 
 
@@ -48,13 +48,14 @@ class MultSpread extends Component{
     this.setBMIstate = this.setBMIstate.bind(this);
   }
   getClass(){
-    const {saveText,ikey,showAdd,isExtBlue} = this.props;
+    const {saveText,ikey,showAdd,isExtBlue,mouseSelect} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     //const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd,setFontColorSize(isExtBlue?2:!!text?'':1));
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return classNames(isSelected,hasAdd,setFontColorSize(!!text?'2,6':isExtBlue?2:1),selectedArea);
   }
   saveDoms(it){
     const doms = this.state.numDoms;
@@ -239,6 +240,10 @@ class MultSpread extends Component{
     });
     return list;
   }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //挂载完成保存有加号的项目数据
     const {saveAddItem,fullData,copyId,showAdd} = this.props;
@@ -250,17 +255,20 @@ class MultSpread extends Component{
     }
   }
   getContClass(){
-    const {isImports,ikey,saveText,isExtBlue} = this.props;
+    const {isImports,ikey,saveText,isExtBlue,mouseSelect} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     const ext = !text&&isExtBlue?style['ext']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
-    return classNames(orgBorder,ext);
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return classNames(orgBorder,ext,selectedArea);
   }
   render(){
-    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue} = this.props;
+    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue,select_start,i,boxMark} = this.props;
     return (<div className={this.getContClass()}
-                 style={{display:'inline-block'}}>
+                 style={{display:'inline-block'}}
+                 onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+                 onMouseDown={this.handleMouseDown.bind(this)}>
         {textPrefix?<span className="prefixUnset">{textPrefix}</span>:''}
         <div className={this.getClass()}>
           {this.getLabels()}

+ 13 - 7
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,setFontColorSize} from '@utils/tools.js';
+import {handleEnter,isIE,filterArr,deepClone,filterDataArr,setFontColorSize,handleMouseUp} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import SlideItem from "./SlideItem";
 import config from '@config/index.js';
@@ -37,10 +37,11 @@ class Multiple extends react.Component{
   }
 
   getClass(){
-    const {show,value,hideTag,isImports,isExtBlue} = this.props;
+    const {show,value,hideTag,isImports,isExtBlue,mouseSelect} = this.props;
     const orgBorder = isImports&&!value?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
     const editBorder = this.state.editable?style['blue-border']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
@@ -48,14 +49,14 @@ class Multiple extends react.Component{
     }
     if(value){
       if(hideTag){
-          return classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:''))
+          return classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:''),selectedArea)
         }
-      return classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize());
+      return classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize(),selectedArea);
     }else{
       if(hideTag){
         return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor')
       }
-      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1),selectedArea);
     }
     // if(value){
       //   return hideTag?classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:'')):classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize());
@@ -160,7 +161,10 @@ class Multiple extends react.Component{
     handleConfirm&&handleConfirm(params);
     handleHide&&handleHide();
   }
-
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    !this.state.editable&&setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     if(isIE()){
       $(this.$div.current).onIe8Input(function(e){
@@ -169,7 +173,7 @@ class Multiple extends react.Component{
     }
   }
   render(){
-    const {placeholder,value,show,data,hideTag} = this.props;
+    const {placeholder,value,show,data,hideTag,select_start,i,boxMark} = this.props;
     const {editable,seleData,seleId} = this.state;
     return <div className={style["container"]}>
       <div className={this.getClass()}
@@ -179,6 +183,8 @@ class Multiple extends react.Component{
       onBlur={this.handleBlur}
       onInput={this.onChange}
       onKeyDown={handleEnter}
+      onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+      onMouseDown={this.handleMouseDown.bind(this)}
       contentEditable={editable}>{value||placeholder}</div>
       <div className={this.getListClass()} contentEditable="false">
         <SlideItem

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

@@ -8,6 +8,9 @@
   line-height: 20px;
   &.ext{
     color: @extBlue!important;
+    &.selected-area{
+      color: #fff!important;
+    }
   }
 }
 

+ 23 - 13
src/components/NumberDrop/index.jsx

@@ -2,7 +2,7 @@ import React,{Component} from 'react';
 import className from 'classnames';
 import {NumberPan,Notify} from '@commonComp';
 import style from './index.less';
-import {setFontColorSize} from '@utils/tools'
+import {setFontColorSize,handleMouseUp} from '@utils/tools'
 /***
  * author:zn@2018-11-19
  * 接收参数:
@@ -154,10 +154,10 @@ class NumberDrop extends Component{
   }
   numInpBlur(e){        //数字框失焦,保存值到store中
     e.stopPropagation();
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,show,formulaCode} = this.props;
-    /*if(show){      //修改清空后第一次点击键盘不触发click事件bug--失焦placehoder消失,弃用
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,formulaCode} = this.props;
+    if(!this.$span.current){      //操作为连续选中删除后,不做验证2830
       return;
-    }*/
+    }
     //输入超出合理范围或输入不是数字提示且清空
     const needCompare=min!=undefined&&max!=undefined;
     const txt = e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');//e.target.innerText.trim();
@@ -198,22 +198,30 @@ class NumberDrop extends Component{
     handleHide&&handleHide();
   }
   getClasses(nospecial){         //整个标签是否有值的状态
-    const {hideTag,placeholder,isImports,isExtBlue,isSelectAll} = this.props;
+    const {hideTag,placeholder,isImports,isExtBlue,isSelectAll,mouseSelect} = this.props;
     const val = this.state.value;
     const isSelected = val&&val!=placeholder?style['selected']:style['container'];
     const orgBorder = isImports&&!(val&&val!=placeholder)?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
     const noTag = hideTag?style['no-tag']:'';
-    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(isExtBlue?2:val?2:isSelectAll?2:1));
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return className(isSelected,noTag,orgBorder,ext,setFontColorSize(val||isSelectAll?'2,6':isExtBlue?2:1),selectedArea);
   }
   getSpanClass(nospecial){       //将被替换的文字选中状态显示
-    const {isSelectAll} = this.props;
+    const {isSelectAll,isExtBlue,show,mouseSelect} = this.props;
+    const val = this.state.value;
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const cls = this.props.show?style['blued']:style['nol'];
-    return cls+' '+setFontColorSize(nospecial?'':2);
+    // return cls+' '+setFontColorSize(nospecial?'':2);
+    return className(show?style['blued']:(style['nol'],setFontColorSize(val?'2,6':isSelectAll?'2,6':isExtBlue?2:1)),selectedArea)
   }
   stopBubble(e){
     e.stopPropagation();
   }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark,show}= this.props;
+    !show&&setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
     const spanWidth = window.getComputedStyle(this.$span.current).width;
@@ -245,13 +253,15 @@ class NumberDrop extends Component{
     });
   }
   render(){
-    const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode,nospecial,isSelectAll,isExtBlue} = this.props;
+    const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode,nospecial,isSelectAll,isExtBlue,select_start,i,boxMark} = this.props;
     const val = formulaCode==="BMI_RES"?(+bmi===Infinity||isNaN(bmi)?'':bmi):value;
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses(nospecial)}
                 style={{position:'relative'}}
-                onClick={allClick?this.handleNumClick:null}>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)}`}>{prefix}</span>
+                onClick={allClick?this.handleNumClick:null}
+                onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+                onMouseDown={this.handleMouseDown.bind(this)}>
+      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{prefix}</span>
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}
             contentEditable={true}
@@ -260,9 +270,9 @@ class NumberDrop extends Component{
             onkeyup={this.handleKeyDowm}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
-            className={this.getSpanClass(nospecial)}
+            className={`${this.getSpanClass(nospecial)}`}
             >&nbsp;{val||placeholder}</span>
-      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)}`}>{suffix}</span>
+      <span className={`${setFontColorSize(val?'':isSelectAll?2:isExtBlue?2:1)} prefixUnset`}>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
                  noString={formulaCode?true:false}
                  onClose={handleHide}

+ 12 - 1
src/components/NumberDrop/index.less

@@ -2,7 +2,14 @@
 .container{
   .tag;
   &.ext{
-    color: @extBlue!important;
+    color: @extBlue;
+  }
+  &.selected-area{
+    background: #338fff;
+    color: #fff!important;
+    span{
+      color: #fff!important;
+    }
   }
   line-height: 22px;
   .blued{
@@ -29,6 +36,10 @@
   .blued{
     background: @blue;
     color: #fff;
+    font-size: unset;
+  }
+  .nol {
+    color: unset;
   }
   .nol,.blued{
     min-width:10px;

+ 13 - 7
src/components/NumberUnitDrop/index.jsx

@@ -3,7 +3,7 @@ import className from 'classnames';
 import {NumberUnitPan} from '@commonComp';
 import style from './index.less';
 import config from '@config/index.js';
-import {filterArr,handleEnter,isIE,filterDataArr,setFontColorSize} from '@utils/tools.js';
+import {filterArr,handleEnter,isIE,filterDataArr,setFontColorSize,handleMouseUp} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import $ from 'jquery';
 /***
@@ -67,35 +67,41 @@ class NumberUnitDrop extends Component{
     });
     handleHide&&handleHide();
   }
-
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   getClasses(){         //整个标签是否有值的状态
-    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const {value,hideTag,show,isImports,isExtBlue,mouseSelect} = this.props;
     const inpValue = this.state.value;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const isSelected = value||inpValue?style['selected']:style['container'];
     const orgBorder = isImports&&!(value||inpValue)?style['orange-border']:'';
     const noTag = hideTag?style['no-tag']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
     if(value){
-      return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(isExtBlue?2:''));
+      return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(isExtBlue?2:''),selectedArea);
     }else{
       if(isExtBlue){
-        return classNames(isSelected,noTag,blueBorder,orgBorder, setFontColorSize(2),'prefixUnsetColor');
+        return classNames(isSelected,noTag,blueBorder,orgBorder, setFontColorSize(2),'prefixUnsetColor',selectedArea);
       }else{
-        return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(1));
+        return className(isSelected,noTag,blueBorder,orgBorder,setFontColorSize(1),selectedArea);
       }
     }
   }
 
   render(){
-    const {placeholder,prefix,suffix,show,value,handleHide,hideTag,isExtBlue} = this.props;
+    const {placeholder,prefix,suffix,show,value,handleHide,select_start,i,boxMark} = this.props;
     const {editable,hasSelect} = this.state;
     return <div className={this.getClasses()}
                 ref={this.$cont}
+                onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+                onMouseDown={this.handleMouseDown.bind(this)}
                 onClick={this.handleNumClick}>
       <span ref = {this.$pre} className="prefixUnset">{prefix?prefix+' ':prefix}</span>
       <span ref = {this.$span}

BIN
src/components/Operation/Search/imgs/clear.png


BIN
src/components/Operation/Search/imgs/search.png


+ 106 - 0
src/components/Operation/Search/index.jsx

@@ -0,0 +1,106 @@
+import React from 'react';
+import styles from './index.less';
+import clear from './imgs/clear.png';
+import search from './imgs/search.png';
+import config from '@config/index';
+import $ from 'jquery';
+/**
+ * 前提条件父元素有定位
+ * visible  搜索显示隐藏
+ * handleChangeValue  函数参数为输入框的value值
+ */
+class SearchList extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            val:'',
+            border:'',
+            show:false,
+            timer:null
+        }
+        this.textInput = React.createRef();
+        this.handleClearVal = this.handleClearVal.bind(this);
+        this.handleFocus = this.handleFocus.bind(this);
+        this.handleBlur = this.handleBlur.bind(this);
+    }
+    componentDidMount(){
+      this.props.handleChangeValue('');
+    //   this.textInput.current.focus();
+      const {windowHeight,pageTop,height,refreshScroller} = this.props;
+    }
+    handleClearVal(){
+        const { handleChangeValue } = this.props;
+        this.textInput.current.value = '';
+        this.textInput.current.focus();
+        this.setState({
+            val:'',
+            show:false
+        });
+        handleChangeValue('');
+    }
+    handleInput(e){
+      const { handleChangeValue,handleChangeIpt } = this.props;
+        clearTimeout(this.state.timer);
+        let timer = setTimeout(()=>{
+            clearTimeout(this.state.timer);
+            if(e.target.value.trim() == ''){
+                this.setState({
+                    show:false
+                })
+                return  handleChangeValue('');
+            }
+            this.setState({
+                val:e.target.value,
+                show:true
+            })
+            handleChangeValue(e.target.value);
+            handleChangeIpt(e.target.value);
+        },config.delayTime);
+        this.setState({
+            timer
+        });
+    }
+    handleFocus(){
+      if(this.state.val.trim() != ''){
+        return;
+      }else{
+          this.setState({border:true})
+      }
+    }
+    handleBlur(){
+      this.setState({border:false,val:''})
+    }
+    componentWillReceiveProps(next){
+        if(next.value&&(next.value != this.props.value)){
+            this.textInput.current.value = next.value;
+        }
+    }
+    render() {
+        const { children,visible } = this.props;
+        const { show } = this.state;
+        return (
+            <div id="searchOption" className={styles.search}>
+                <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
+                <input
+                    className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
+                    type="text"
+                    maxLength="30"
+                    ref={this.textInput}
+                    onFocus={this.handleFocus}
+                    onBlur={this.handleBlur}
+                    onInput={(e) => { 
+                        this.handleInput(e)
+                    }}
+                    onPropertyChange={(e) => {  // 兼容ie
+                        this.handleInput(e)
+                    }}
+                    placeholder="搜索"
+                />
+                <div className={styles.autoList}>
+                    {children}
+                </div>
+            </div>
+        )
+    }
+}
+export default SearchList;

+ 38 - 0
src/components/Operation/Search/index.less

@@ -0,0 +1,38 @@
+@import "~@less/variables.less";
+
+.search {
+    .contentZIndex1;
+    width: 240px;
+    box-sizing: border-box;
+    position: relative;
+    background-color: #fff;
+    display: inline-block !important;
+    margin-right: 20px;
+
+    input {
+        width: 100%;
+        height: 30px;
+        line-height: 30px;
+        padding: 0 30px 0 10px;
+        box-sizing: border-box;
+        border: 1px solid #ccc;
+    }
+    .border {
+        // border: 1px solid @blue;
+    }
+    .borderNone {
+        border: 1px solid #ccc;
+    }
+    img {
+        position: absolute;
+        top: 5px;
+    }
+    .clearVal{
+        cursor: pointer;
+        right: 5px;
+    }
+}
+
+.hide {
+    display: none;
+}

+ 135 - 76
src/components/Operation/index.jsx

@@ -7,9 +7,11 @@ import cancelTag from '@common/images/icon_back.png';
 import PrintPreviewContainer from '@containers/PrintPreviewContainer';
 import PreviewContainer from '@containers/PreviewContainer';
 import { ConfirmModal, Notify } from '@commonComp';
+import Search from './Search';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
-import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
+import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory,checkDeptContent} from '@utils/tools';
+
 import {dragBox} from '@utils/drag';
 import store from '@store';
 import $ from 'jquery';
@@ -28,6 +30,8 @@ class Operation extends Component {
       zIndex:40,
       sex:'3',
       le:'',
+      deptId:'',//科室id
+      value:''
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -37,6 +41,8 @@ class Operation extends Component {
     this.clearAll = this.clearAll.bind(this);
     this.saveHis = this.saveHis.bind(this);
     this.keypress = this.keypress.bind(this);
+    this.setDeptId = this.setDeptId.bind(this);
+    this.handleChangeIpt = this.handleChangeIpt.bind(this);
   }
 
   showPrint() {
@@ -87,7 +93,6 @@ class Operation extends Component {
         oKBg: '#3B9ED0',
         msg: <p className={style['msg']}>是否保存该病历?</p>
       })
-      
       this.props.diagShowTmp(true)
     }
   }
@@ -96,7 +101,9 @@ class Operation extends Component {
     let jsonData = getAllDataList(baseList);
     let jsonStr = getAllDataStringList(baseList);
     let flg = isAllPartClear(jsonData,jsonStr,baseList);
-    if(flg){
+    const tpVal = $("#templateSearch").val();   //模板是否有搜索条件未清空
+    const mdVal = $("#medicalInfoSearch").val();    //知识是否有搜索条件未清空
+    if(flg||tpVal||mdVal){
       this.setState({
         type: type,
         okText: '清除',
@@ -129,73 +136,72 @@ class Operation extends Component {
   }
   saveHis(type) {
     const { diagShowTmp } = this.props;
-    let flg = this.getAllData();
-    if(flg){
-      this.setState({
-        title: '',
-        sex:'3',
-        type: type,
-        okText: '保存',
-        borderColor: '#3B9ED0',
-        okColor: '#fff',
-        oKBg: '#3B9ED0',
-        msg: this.changeTitle()
-      })
-      diagShowTmp(true)
-    }
-  }
-  getAllData(){
     let baseList = store.getState();
-    let jsonData = getAllDataList(baseList);
     let jsonStr = getAllDataStringList(baseList);
-    let whichSign = baseList.typeConfig.mode;
-    let tmpLis = baseList.tabTemplate.items;
-    let flg = isAllClear(jsonStr)
+    let tmpLis = [];
+    let flg = isAllClear(jsonStr);
     if(!flg){
-      Notify.info('模板数据不能为空')
-      return false
+      Notify.info('模板数据不能为空');
+      return false;
     }
-    // console.log(jsonStr.chief,'文本')
-    // console.log(jsonData,'结构')       //测试需要用到,不要删了
-    // console.log(tmpLis,'接口返回的')
-    for(let i = 0;i <tmpLis.length;i++){
-      let dataStr = tmpLis[i].preview;
-      if(
-        filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
-        filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
-        filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
-        filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
-        jsonStr.lis == JSON.parse(dataStr).lis &&
-        jsonStr.pacs == JSON.parse(dataStr).pacs &&
-        jsonStr.diag == JSON.parse(dataStr).diag &&
-        jsonStr.advice == JSON.parse(dataStr).advice
-      ){
-        Notify.info('该模板已保存');
-        return false;
+    if(!this.props.admin){
+      tmpLis = baseList.tabTemplate.items;
+      for(let i = 0;i <tmpLis.length;i++){
+        let dataStr = tmpLis[i].preview;
+        if(
+          filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
+          filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
+          filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
+          filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+          jsonStr.lis == JSON.parse(dataStr).lis &&
+          jsonStr.pacs == JSON.parse(dataStr).pacs &&
+          jsonStr.diag == JSON.parse(dataStr).diag &&
+          jsonStr.advice == JSON.parse(dataStr).advice
+        ){
+          Notify.info('该模板已保存');
+          return false;
+        }
       }
     }
-    return true;
+    this.setState({
+      title: '',
+      sex:'3',
+      type: type,
+      okText: '保存',
+      borderColor: '#3B9ED0',
+      okColor: '#fff',
+      oKBg: '#3B9ED0',
+      msg: this.changeTitle()
+    })
+    diagShowTmp(true)
   }
   changeTitle() {
     return <div className={style['box']}>
-      <input className={style['ipt']}
-        placeholder="请输入模板名称"
-        type="text"
-        maxLength='30'
-        onInput={(e) => {
-          this.handleInput(e)
-        }}
-        onPropertyChange={(e) => {  // 兼容ie
-          this.handleInput(e)
-        }}
-        onKeyPress={e => this.keypress(e)}
-      />
-      <div className={style['line']}></div>
+      {/* <div className={style.titleTip}></div> */}
       <div className={style['iptWrap']}>
-        <p>请选择模板性别归属(错误引用,显示可能有误)</p>
-        <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
-        <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
-        <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
+        <div className={style.name}>
+          <span>模板名称:</span>
+          <input className={style['ipt']}
+            placeholder="请输入模板名称"
+            type="text"
+            maxLength='30'
+            onInput={(e) => {
+              this.handleInput(e)
+            }}
+            onPropertyChange={(e) => {  // 兼容ie
+              this.handleInput(e)
+            }}
+            onKeyPress={e => this.keypress(e)}
+          />
+        </div>
+        <div className={style.male}>
+          <span>性别归属:</span>
+          <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
+          <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
+          <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
+          <span style={{paddingRight:0,color:'#777777'}}>(注:错误引用,显示可能有误)</span>
+        </div>
+        {/* <p>请选择模板性别归属(错误引用,显示可能有误)</p> */}
       </div>
     </div>
   }
@@ -227,8 +233,8 @@ class Operation extends Component {
     }
   }
   makeSure() {
-    const { save, clear, saveDataAll,diagShowTmp ,chronicMagItem,chronicDesease} = this.props;
-    const { type } = this.state;
+    const { save, clear, saveDataAll,saveDataAlls,diagShowTmp ,chronicMagItem,chronicDesease,admin} = this.props;
+    const { type,deptId,sex,title } = this.state;
     if (type == 1) {
       diagShowTmp(false)
       this.setState({ title: '' })
@@ -248,8 +254,35 @@ class Operation extends Component {
       if (this.state.title.trim() == '') {
         Notify.error('请输入模板名称')
         return;
+      }else if(admin&&deptId == ''){
+        Notify.error('请选择科室')
+        return;
+      }
+      if(admin){
+        let baseList = store.getState();
+        let tmpLis = baseList.tabTemplate.adminItems||[];
+        let jsonStr = getAllDataStringList(baseList);
+        for(let i = 0;i <tmpLis.length;i++){
+          let dataStr = tmpLis[i].preview;
+          if(
+            filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
+            filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
+            filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
+            filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
+            jsonStr.lis == JSON.parse(dataStr).lis &&
+            jsonStr.pacs == JSON.parse(dataStr).pacs &&
+            jsonStr.diag == JSON.parse(dataStr).diag &&
+            jsonStr.advice == JSON.parse(dataStr).advice&&
+            deptId == tmpLis[i].hospitalDeptId
+          ){
+            Notify.info('该模板已保存');
+            return false;
+          }
+        }
+        saveDataAlls(title,sex,deptId);
+      }else{
+        saveDataAll(title,sex);
       }
-      saveDataAll(this.state.title,this.state.sex);
     }
   }
   closeDiagBox(){
@@ -257,21 +290,22 @@ class Operation extends Component {
     const { type } = this.state;
     if (type == 3){
       diagShowTmp(false)
-      this.setState({ title: '' })
+      this.setState({ title: '',deptId:"",value:"" })
     }else{
       diagShowTmp(false)
-      this.setState({ title: '' }) 
+      this.setState({ title: '',deptId:"",value:"" }) 
     }
   }
+  setDeptId(id,name){
+    this.props.handleClearValue()
+    this.setState({
+      deptId :id,
+      value:name
+    })
+  }
   componentWillReceiveProps(next){//监听滚动事件
     const that = this;
     if(next.winWidth <= 1024){
-      /*$(document).on('scroll',function(){
-        let left = -($(document).scrollLeft() - 10) + 'px';
-        that.setState({
-          le:left
-        })
-      })*/
       $(window).scroll(function(){
         let scrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
         let left = -(scrollLeft - 10) +'px';
@@ -281,12 +315,16 @@ class Operation extends Component {
       })
     }
   }
-
+  handleChangeIpt(val){
+    this.setState({
+      value:val
+    })
+  }
   render() {
-    const { showPrint, closePrint, showPreview, closePreview } = this;
+    const { showPrint, closePrint, showPreview, closePreview,handleChangeIpt } = this;
     const { visible, preVisible,diagShow } = this.props.print;
-    const {winWidth,cancelDelTag} = this.props;
-    const {zIndex,type,le} = this.state;
+    const {winWidth,cancelDelTag,departLis,handleChangeValue,admin} = this.props;
+    const {zIndex,type,le,value} = this.state;
     return <div className={style['container']} style={{left:le}}>
       <span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
       <span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
@@ -304,12 +342,33 @@ class Operation extends Component {
         cancel={() => {this.closeDiagBox()}}
         okText={this.state.okText}
         height={type==3?228:200}
-        width={type==3?400:300}
+        width={type==3?545:300}
         okBorderColor={this.state.borderColor}
         okColor={this.state.okColor}
         oKBg={this.state.oKBg}
+        borderBtm={type==3?'1px solid #f5f5f5':null}
+        title={type==3?'保存病历模板':null}
       >
         {this.state.msg}
+        {
+          admin&&type==3?<div className={style.department}>
+              <span>科室归属:</span>
+                <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true}>
+                {
+                  departLis.length>0&&value&&<ul className={style.departLis}>
+                    {
+                      departLis.map((item,idx)=>{
+                        return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
+                          {item.conceptDeptName}
+                        </li>
+                      })
+                    }
+                  </ul>
+                }
+                </Search>
+              <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
+          </div>:null
+        }
       </ConfirmModal>
     </div>;
   }

+ 57 - 17
src/components/Operation/index.less

@@ -117,10 +117,18 @@
     }
 }
 .iptWrap {
-  width: 320px;
+   padding: 0 15px;
   line-height: 18px;
-  margin: 10px auto;
-  text-align: center;
+  margin: 18px auto;
+  text-align: left;
+  .name {
+      text-align: left;
+      input {
+          border: 1px solid #CCCCCC;
+          padding: 5px 10px;
+          width: 240px;
+      }
+  }
   p {
     text-align: left;
     font-size: 12px;
@@ -130,7 +138,7 @@
   span {
     display: inline-block;
     cursor: pointer;
-    padding-right: 24px;
+    padding-right: 20px;
     font-size: 14px;
     i {
       color: #6b6969;
@@ -149,23 +157,55 @@
     padding-bottom: 50px;
 }
 .box {
-    padding-top: 10px;
     box-sizing: border-box;
-    height: 110px;
+    height: 88px;
 }
-.ipt {
-    font-size: 16px;
-    width: 320px;
-    height: 20px;
-    line-height: 18px;
-    display: block;
-    margin: 0 auto;
+
+.department {
+    position: relative;
     text-align: left;
+    padding: 0 0 30px 16px;
+    span {
+        padding-right: 20px;
+    }
+}
+.male {
+    padding: 15px 0;
 }
 .line {
-    width: 332px;
     height: 1px;
-    margin: 8px auto 0 auto;
-    background: #D8D8D8;
+    background-color: #979797;
+    position: relative;
+    top: -2px;
 }
-
+.titleTip {
+    position: absolute;
+    top:15px;
+    left: 20px;
+}
+.departLis {
+    position: absolute;
+    top: 29px;
+    left: 0;
+    max-height: 200px;
+    overflow: auto;
+    background-color: #fff;
+    width: 240px;
+    // box-shadow: 0 10px 20px 0 #989DA3;
+    border: 1px solid #dedede;
+    li {
+        height: 36px;
+        line-height: 36px;
+        padding: 0 30px;
+        padding-top: 0;
+        box-sizing: border-box;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        border: 1px solid transparent;
+        cursor: pointer;
+    }
+    li:hover {
+        border: 1px solid #3B9ED0;
+    }
+}

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

@@ -56,7 +56,7 @@ class OtherHistory extends Component{
     this.getData();
   }
   render(){
-    const {readMode,hasMain,totalHide,searchData,isRead,type,fetchPushInfos,handleInput,saveText} = this.props;
+    const {readMode,hasMain,hideAllDrop,searchData,isRead,type,fetchPushInfos,handleInput,saveText} = this.props;
     const {boxLeft,boxTop} = this.state;
     const mode = readMode===null||readMode===-1?type:readMode;
     //智能模式有数据时不切换文本,文本模式有数据时不切换智能
@@ -70,7 +70,7 @@ class OtherHistory extends Component{
                        hasMain={hasMain}/>;
     }
     return  <div>
-      <ItemBox title='其他史' isRead={isRead} handleClick={this.handleClick}>
+      <ItemBox title='其他史' isRead={isRead} handleClick={this.handleClick} hideAllDrop={hideAllDrop}>
         {this.getLabels()}
         {searchData && searchData.length>0?<SearchDrop data={searchData} show={true} top={boxTop} left={boxLeft} onSelect={this.handleSearchSelect}></SearchDrop>:''}
       </ItemBox>

+ 9 - 10
src/components/PatInfo/index.jsx

@@ -12,19 +12,18 @@ class PatInfo extends Component {
 
   render(){
     const {message} = this.props.patInfo;
-    const {sizeFlag} = this.props;
-     return <table className={sizeFlag?`${style["table"]} ${style["newSize"]}`:style["table"]}>
+     return <table className={style["table"]}>
       <tr>
-        <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'卡号:' + (message.patientIdNo && message.patientIdNo)}>卡号:{message.patientIdNo && message.patientIdNo}</td>
-        <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={sizeFlag&&message.patientName&&message.patientName.length>3?message.patientName:''}>姓名:{sizeFlag&&message.patientName && message.patientName.length>3?message.patientName.slice(0,3)+'...':message.patientName}</td>
-        <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`}>年龄:{message.patientAge && message.patientAge}</td>
-        <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`}>性别:{message.patientSex && message.patientSex}</td>
+        <td key='1' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'卡号:' + (message.patientIdNo||'')}>卡号:{message.patientIdNo}</td>
+        <td key='2' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'姓名:' + (message.patientName||'')}>姓名:{message.patientName}</td>
+        <td key='3' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'年龄:'+(message.patientAge||'')}>年龄:{message.patientAge}</td>
+        <td key='4' className={`${style.tdBorderB} ${style.tdBorderR}`} title={'性别:'+(message.patientSex||'')}>性别:{message.patientSex}</td>
       </tr>
       <tr>
-        <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}} title={'就诊时间:'+(message.systemTime&&message.systemTime.substring(0, 10))}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
-        <td key='6' className={`${style.tdBorderR}`}>科室:{message.hospitalDeptName && message.hospitalDeptName}</td>
-        <td key='7' className={`${style.tdBorderR}`} title={sizeFlag&&message.doctorName&&message.doctorName.length>3?message.doctorName:''}>医生:{sizeFlag&&message.doctorName && message.doctorName.length>3?message.doctorName.slice(0,3)+'...':message.doctorName}</td>
-        <td key='8' className={`${style.tdBorderR}`} title={'门诊号:'+(message.recordId && message.recordId)}>门诊号:{message.recordId && message.recordId}</td>
+        <td key='5' className={`${style.tdBorderR}`} style={{whiteSpace: 'nowrap'}} title={'就诊时间:'+(message.systemTime&&message.systemTime.substring(0, 10)||'')}>就诊时间:{message.systemTime&&message.systemTime.substring(0, 10)}</td>
+        <td key='6' className={`${style.tdBorderR}`} title={'科室:'+(message.hospitalDeptName||'')}>科室:{message.hospitalDeptName}</td>
+        <td key='7' className={`${style.tdBorderR}`} title={'医生:'+(message.doctorName||'')}>医生:{message.doctorName}</td>
+        <td key='8' className={`${style.tdBorderR}`} title={'门诊号:'+(message.recordId||'')}>门诊号:{message.recordId}</td>
       </tr>
     </table>;
   }

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

@@ -1,6 +1,6 @@
 @import "~@less/variables.less";
 .table{
-  width: 76%;
+  width: 100%;
 //   border:1px @border-color solid;
   float: left;
   td{
@@ -13,14 +13,14 @@
   }
   .tdBorderB {
     border-bottom: 1px solid @person-table-color;
-    max-width: 180px;
+    max-width: 110px;
     overflow: hidden;
     white-space: nowrap;
     text-overflow: ellipsis;
   }
   .tdBorderR {
     border-right: 1px solid @person-table-color;
-    max-width: 180px;
+    max-width: 110px;
     overflow: hidden;
     white-space: nowrap;
     text-overflow: ellipsis;
@@ -32,5 +32,6 @@
     font-size: 13px;
     white-space: nowrap;
     text-overflow: ellipsis;
+    max-width: 110px;
   }
 }

BIN
src/components/PreInIcss/RotateImg copy/img/closeImg.png


BIN
src/components/PreInIcss/RotateImg copy/img/imgBgActive.png


BIN
src/components/PreInIcss/RotateImg copy/img/nextImg.png


BIN
src/components/PreInIcss/RotateImg copy/img/plus.png


BIN
src/components/PreInIcss/RotateImg copy/img/prevImg.png


BIN
src/components/PreInIcss/RotateImg copy/img/reduce.png


BIN
src/components/PreInIcss/RotateImg copy/img/rotated.png


+ 229 - 0
src/components/PreInIcss/RotateImg copy/index.jsx

@@ -0,0 +1,229 @@
+import React, { Component } from "react";
+import $ from "jquery";
+import style from "./index.less";
+import ReactDom from "react-dom";
+import closeImg from "./img/closeImg.png";
+import imgBgActive from "./img/imgBgActive.png";
+import plus from "./img/plus.png";
+import reduce from "./img/reduce.png";
+import nextImg from "./img/nextImg.png";
+import prevImg from "./img/prevImg.png";
+import rotated from "./img/rotated.png";
+import {imgDragMove} from '@utils/drag';
+
+class RotateImg extends Component {
+  constructor(props){
+    super(props);
+    this.state={
+      de:0,
+      current:0,
+      length:0,
+      imgWidth:'auto',
+      imgHeight:'auto',
+      mgLeft:'',
+      mgTop:'',
+      left:'50%',
+      top:'50%'
+    }
+    this.handlePrev = this.handlePrev.bind(this)
+    this.handleNext = this.handleNext.bind(this)
+    this.handleRotate = this.handleRotate.bind(this)
+    this.handlePlus = this.handlePlus.bind(this)
+    this.handleReduce = this.handleReduce.bind(this)
+  }
+  componentWillReceiveProps(next){
+    console.log(next.windowHeight,this.props.windowHeight)
+  }
+  componentDidMount(){
+    imgDragMove('add')
+    const { idx,imgLis } = this.props;
+    let currentImg = imgLis[idx];
+    let width = currentImg.width,height = currentImg.height;
+    if(width>height){
+      if(width > 750){
+        width=750
+        height=height*750/width
+      }
+    }else{
+      if(height > 750){
+        height = 750
+        width = width*750/height
+      }
+    }
+    this.setState({
+      current:idx,
+      length:imgLis.length,
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2
+    })
+  }
+  getStyle(){
+    const { imgDetail,idx,imgLis } = this.props;
+    let currentImg = imgLis[this.state.current];
+    let width = currentImg.width,height = currentImg.height;
+    let isLorR = width > height;
+    return {
+      width:width,
+      height:height,
+      marginLeft:-width/2,
+      marginTop:-height/2
+    }
+  }
+  handleNext(){
+    this.props.setMove(false)
+    const { imgLis,isMove } = this.props;
+    let tmpIdx = this.state.current;
+    let tmpLen = this.state.length,width,height;
+    if(tmpIdx == tmpLen-1){
+      width = imgLis[0].width
+      height = imgLis[0].height
+    }else{
+      width = imgLis[tmpIdx+1].width
+      height = imgLis[tmpIdx+1].height
+    }
+    if(width>height){
+      if(width > 750){
+        width=750
+        height=height*750/width
+      }
+    }else{
+      if(height > 750){
+        height = 750
+        width = width*750/height
+      }
+    }
+    let imgDom = this.refs.rotateImg.getDOMNode();
+    $(imgDom).css({
+      left:'50%',
+      top:'50%'
+    })
+    this.setState({
+      current:tmpIdx == tmpLen-1?0:(tmpIdx+1),
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2,
+      de:0
+    })
+  }
+  handlePrev(){
+    const { imgLis } = this.props;
+    let tmpIdx = this.state.current;
+    let tmpLen = this.state.length,width,height;
+    if(tmpIdx == 0){
+      width = imgLis[tmpLen-1].width
+      height = imgLis[tmpLen-1].height
+    }else{
+      width = imgLis[tmpIdx-1].width
+      height = imgLis[tmpIdx-1].height
+    }
+    if(width>height){
+      if(width > 750){
+        width=750
+        height=height*750/width
+      }
+    }else{
+      if(height > 750){
+        height = 750
+        width = width*750/height
+      }
+    }
+    let imgDom = this.refs.rotateImg.getDOMNode();
+    $(imgDom).css({
+      left:'50%',
+      top:'50%'
+    })
+    this.setState({
+      current:tmpIdx == 0?tmpLen-1:tmpIdx-1,
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2,
+      de:0
+    })
+    this.props.setMove(false)
+  }
+  handlePlus(){
+    const {imgWidth,imgHeight,isMove} = this.state;
+    if(this.props.isMove){
+      this.setState({
+        imgWidth:1.2*imgWidth,
+        imgHeight:1.2*imgHeight
+      })
+      return;
+    }
+    this.setState({
+      imgWidth:1.2*imgWidth,
+      imgHeight:1.2*imgHeight,
+      mgLeft:-imgWidth*1.2/2,
+      mgTop:-imgHeight*1.2/2
+    })
+  }
+  handleReduce(){
+    const {imgWidth,imgHeight} = this.state;
+    if(this.props.isMove){
+      this.setState({
+        imgWidth:imgWidth*0.8,
+        imgHeight:imgHeight*0.8
+      })
+      return;
+    }
+    this.setState({
+      imgWidth:imgWidth*0.8,
+      imgHeight:imgHeight*0.8,
+      mgLeft:-imgWidth*0.8/2,
+      mgTop:-imgHeight*0.8/2
+    })
+  }
+  handleRotate(flg){
+    let deg = this.state.de;
+    if(flg){
+      deg = deg-90
+    }else{
+      deg = deg-0+90
+    }
+    this.setState({
+      de:deg
+    })
+  }
+
+  render() {
+    const { imgLis,handleClose } = this.props;
+    const { current,imgWidth,imgHeight,mgLeft,mgTop,de,left,top } = this.state;
+
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style.preImgWrap}>
+      <div className={style.modal} onClick={handleClose}></div>
+      <div className={style.mainWrap}>
+        <div className={style.imgWrap} id="previewWrapper">
+            <img className={style.rotateImg}
+              id="drugImg"
+              ref="rotateImg" 
+              src={imgLis[current].originalImage} 
+              style={{
+                width:imgWidth+'px',
+                height:imgHeight+'px',
+                marginLeft:mgLeft+'px',
+                marginTop:mgTop+'px',
+                transform:"rotate(" + de + "deg)",
+                left:left,
+                top:top,
+              }}
+              alt="预览图片"/>
+          <div className={style.activeBar}>
+            <img className={style.plus} src={plus} onClick={this.handlePlus} alt="图片放大"/>
+            <img className={style.reduce} src={reduce} onClick={this.handleReduce} alt="图片缩小"/>
+            <img className={style.rotate} src={rotated} onClick={this.handleRotate} alt="图片旋转"/>
+          </div>
+          <img src={closeImg} onClick={handleClose} className={style.close} alt="close"/>
+        </div>
+          <img src={nextImg} className={style.next} onClick={this.handleNext} alt="下一张"/>
+          <img src={prevImg} className={style.prev} onClick={this.handlePrev} alt="上一张"/>
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default RotateImg;

+ 104 - 0
src/components/PreInIcss/RotateImg copy/index.less

@@ -0,0 +1,104 @@
+.preImgWrap {
+  .modal {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 100;
+    width: 100%;
+    height: 100%;
+    background-color: #000;
+    opacity: 0.6;
+    filter: alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  }
+  .imgWrap {
+    // margin-left: -500px;
+    // left: 50%;
+    // width: 1000px;
+    // top: 7%;
+    // bottom: 7%;
+    // height: 86%;
+    z-index: 100;
+    position: fixed;
+    width: 750px;
+    height: 750px;
+    left: 50%;
+    top: 50%;
+    margin-left: -375px;
+    margin-top: -375px;
+    background-color: #fff;
+    overflow: hidden;
+    .close {
+      position: absolute;
+      right: 20px;
+      top: 20px;
+      cursor: pointer;
+    }
+    .imgDiv {
+      position: absolute;
+      width: 750px;
+      height: 750px;
+      left: 50%;
+      top: 50%;
+      margin-left: -375px;
+      margin-top: -375px;
+      overflow: hidden;
+    }
+    .rotateImg {
+      position: absolute;
+      cursor: move;
+      // left: 50%;
+      // top: 50%;
+      // transform: translateX(-50%) translateY(-50%);
+    }
+    .activeBar {
+      width: 400px;
+      height: 40px;
+      background-color: #9B979A;
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      margin-left: -200px;
+      border-radius: 4px 4px 0 0;
+      text-align: center;
+      // display: none;
+      img {
+        margin: 10px 0px;
+        padding: 3px 20px;
+        cursor: pointer;
+      }
+      
+      .rotate {
+    
+      }  
+      .plus,.reduce {
+        border-right: 1px solid #7A7779;
+      }  
+    }
+  }
+  .mainWrap {
+    position: absolute;
+    width: 900px;
+    height: 900px;
+    left: 50%;
+    top: 50%;
+    margin-left: -450px;
+    margin-top: -450px;
+    .next {
+      cursor: pointer;
+      position: absolute;
+      z-index: 102;
+      top: 50%;
+      margin-top: -20px;
+      right: 0;
+    }
+    .prev {
+      cursor: pointer;
+      position: absolute;
+      z-index: 102;
+      top: 50%;
+      margin-top: -20px;
+      left: 0;
+    }
+  }
+}

BIN
src/components/PreInIcss/RotateImg/img/closeImg.png


BIN
src/components/PreInIcss/RotateImg/img/imgBgActive.png


BIN
src/components/PreInIcss/RotateImg/img/nextImg.png


BIN
src/components/PreInIcss/RotateImg/img/plus.png


BIN
src/components/PreInIcss/RotateImg/img/prevImg.png


BIN
src/components/PreInIcss/RotateImg/img/reduce.png


BIN
src/components/PreInIcss/RotateImg/img/rotated.png


+ 230 - 0
src/components/PreInIcss/RotateImg/index.jsx

@@ -0,0 +1,230 @@
+import React, { Component } from "react";
+import $ from "jquery";
+import style from "./index.less";
+import ReactDom from "react-dom";
+import closeImg from "./img/closeImg.png";
+import imgBgActive from "./img/imgBgActive.png";
+import plus from "./img/plus.png";
+import reduce from "./img/reduce.png";
+import nextImg from "./img/nextImg.png";
+import prevImg from "./img/prevImg.png";
+import rotated from "./img/rotated.png";
+import {imgDragMove} from '@utils/drag';
+
+class RotateImg extends Component {
+  constructor(props){
+    super(props);
+    this.state={
+      de:0,
+      current:0,
+      length:0,
+      imgWidth:'auto',
+      imgHeight:'auto',
+      mgLeft:'',
+      mgTop:'',
+      left:'50%',
+      top:'50%'
+    }
+    this.handlePrev = this.handlePrev.bind(this)
+    this.handleNext = this.handleNext.bind(this)
+    this.handleRotate = this.handleRotate.bind(this)
+    this.handlePlus = this.handlePlus.bind(this)
+    this.handleReduce = this.handleReduce.bind(this)
+  }
+  componentDidMount(){
+    imgDragMove('add')
+    const { idx,imgLis,windowHeight } = this.props;
+    let currentImg = imgLis[idx];
+    let scaleHeight = windowHeight*0.8;
+    let width = currentImg.width,height = currentImg.height;
+    if(width>height){
+      if(width > scaleHeight){
+        height=scaleHeight/width*height
+        width=scaleHeight
+      }
+    }else{
+      if(height > scaleHeight){
+        width = scaleHeight/height*width
+        height = scaleHeight
+      }
+    }
+    this.setState({
+      current:idx,
+      length:imgLis.length,
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2
+    })
+  }
+  handleNext(){
+    this.props.setMove(false)
+    const { imgLis,isMove,windowHeight } = this.props;
+    let scaleHeight = windowHeight*0.8;
+    let tmpIdx = this.state.current;
+    let tmpLen = this.state.length,width,height;
+    if(tmpIdx == tmpLen-1){
+      width = imgLis[0].width
+      height = imgLis[0].height
+    }else{
+      width = imgLis[tmpIdx+1].width
+      height = imgLis[tmpIdx+1].height
+    }
+    if(width>height){
+      if(width > scaleHeight){
+        height=scaleHeight/width*height
+        width=scaleHeight
+      }
+    }else{
+      if(height > scaleHeight){
+        width = scaleHeight/height*width
+        height = scaleHeight
+      }
+    }
+    let imgDom = this.refs.rotateImg.getDOMNode();
+    $(imgDom).css({
+      left:'50%',
+      top:'50%'
+    })
+    this.setState({
+      current:tmpIdx == tmpLen-1?0:(tmpIdx+1),
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2,
+      de:0
+    })
+  }
+  handlePrev(){
+    const { imgLis,windowHeight } = this.props;
+    let scaleHeight = windowHeight*0.8;
+    let tmpIdx = this.state.current;
+    let tmpLen = this.state.length,width,height;
+    if(tmpIdx == 0){
+      width = imgLis[tmpLen-1].width
+      height = imgLis[tmpLen-1].height
+    }else{
+      width = imgLis[tmpIdx-1].width
+      height = imgLis[tmpIdx-1].height
+    }
+    if(width>height){
+      if(width > scaleHeight){
+        height=scaleHeight/width*height
+        width=scaleHeight
+      }
+    }else{
+      if(height > scaleHeight){
+        width = scaleHeight/height*width
+        height = scaleHeight
+      }
+    }
+    let imgDom = this.refs.rotateImg.getDOMNode();
+    $(imgDom).css({
+      left:'50%',
+      top:'50%'
+    })
+    this.setState({
+      current:tmpIdx == 0?tmpLen-1:tmpIdx-1,
+      imgWidth:width,
+      imgHeight:height,
+      mgLeft:-width/2,
+      mgTop:-height/2,
+      de:0
+    })
+    this.props.setMove(false)
+  }
+  handlePlus(){
+    const {imgWidth,imgHeight,isMove} = this.state;
+    if(this.props.isMove){
+      this.setState({
+        imgWidth:1.2*imgWidth,
+        imgHeight:1.2*imgHeight
+      })
+      return;
+    }
+    this.setState({
+      imgWidth:1.2*imgWidth,
+      imgHeight:1.2*imgHeight,
+      mgLeft:-imgWidth*1.2/2,
+      mgTop:-imgHeight*1.2/2
+    })
+  }
+  handleReduce(){
+    const {imgWidth,imgHeight} = this.state;
+    if(this.props.isMove){
+      this.setState({
+        imgWidth:imgWidth*0.8,
+        imgHeight:imgHeight*0.8
+      })
+      return;
+    }
+    this.setState({
+      imgWidth:imgWidth*0.8,
+      imgHeight:imgHeight*0.8,
+      mgLeft:-imgWidth*0.8/2,
+      mgTop:-imgHeight*0.8/2
+    })
+  }
+  handleRotate(flg){
+    let deg = this.state.de;
+    let tmpWidth = this.state.imgWidth;
+    let tmpHeight = this.state.imgHeight;
+    if(flg){
+      deg = deg-90
+    }else{
+      deg = deg-0+90
+    }
+    this.setState({
+      // imgWidth:tmpHeight,
+      // imgHeight:tmpWidth,
+      // mgLeft:-tmpHeight/2,
+      // mgTop:-tmpWidth/2,
+      de:deg
+    })
+  }
+
+  render() {
+    const { imgLis,handleClose,windowHeight } = this.props;
+    const { current,imgWidth,imgHeight,mgLeft,mgTop,de,left,top } = this.state;
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style.preImgWrap}>
+      <div className={style.modal} onClick={handleClose}></div>
+      <div className={style.mainWrap}>
+        <div className={style.imgWrap}
+          id="previewWrapper"
+          style={{
+            width:0.8*windowHeight+'px',
+            height:0.8*windowHeight+'px',
+            marginLeft:-0.8*windowHeight/2+'px',
+            marginTop:-0.8*windowHeight/2+'px'
+          }}>
+            <img className={style.rotateImg}
+              id="drugImg"
+              ref="rotateImg" 
+              data-deg={de}
+              src={imgLis[current].originalImage} 
+              style={{
+                width:imgWidth+'px',
+                height:imgHeight+'px',
+                marginLeft:mgLeft+'px',
+                marginTop:mgTop+'px',
+                transform:"rotate(" + de + "deg)",
+                left:left,
+                top:top,
+              }}
+              alt="预览图片"/>
+          <div className={style.activeBar}>
+            <img className={style.plus} src={plus} onClick={this.handlePlus} alt="图片放大"/>
+            <img className={style.reduce} src={reduce} onClick={this.handleReduce} alt="图片缩小"/>
+            <img className={style.rotate} src={rotated} onClick={this.handleRotate} alt="图片旋转"/>
+          </div>
+          <img src={closeImg} onClick={handleClose} className={style.close} alt="close"/>
+        </div>
+          <img src={nextImg} className={style.next} onClick={this.handleNext} alt="下一张"/>
+          <img src={prevImg} className={style.prev} onClick={this.handlePrev} alt="上一张"/>
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default RotateImg;

+ 104 - 0
src/components/PreInIcss/RotateImg/index.less

@@ -0,0 +1,104 @@
+.preImgWrap {
+  .modal {
+    position: fixed;
+    left: 0;
+    top: 0;
+    z-index: 100;
+    width: 100%;
+    height: 100%;
+    background-color: #000;
+    opacity: 0.6;
+    filter: alpha(opacity=60);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=60);";
+  }
+  .imgWrap {
+    // margin-left: -500px;
+    // left: 50%;
+    // width: 1000px;
+    // top: 7%;
+    // bottom: 7%;
+    // height: 86%;
+    z-index: 100;
+    position: fixed;
+    width: 750px;
+    height: 750px;
+    left: 50%;
+    top: 50%;
+    margin-left: -375px;
+    margin-top: -375px;
+    background-color: #fff;
+    overflow: hidden;
+    .close {
+      position: absolute;
+      right: 20px;
+      top: 20px;
+      cursor: pointer;
+    }
+    .imgDiv {
+      position: absolute;
+      width: 750px;
+      height: 750px;
+      left: 50%;
+      top: 50%;
+      margin-left: -375px;
+      margin-top: -375px;
+      overflow: hidden;
+    }
+    .rotateImg {
+      position: absolute;
+      cursor: move;
+      // left: 50%;
+      // top: 50%;
+      // transform: translateX(-50%) translateY(-50%);
+    }
+    .activeBar {
+      width: 400px;
+      height: 40px;
+      background-color: #9B979A;
+      position: absolute;
+      bottom: 0;
+      left: 50%;
+      margin-left: -200px;
+      border-radius: 4px 4px 0 0;
+      text-align: center;
+      // display: none;
+      img {
+        margin: 10px 0px;
+        padding: 3px 20px;
+        cursor: pointer;
+      }
+      
+      .rotate {
+    
+      }  
+      .plus,.reduce {
+        border-right: 1px solid #7A7779;
+      }  
+    }
+  }
+  .mainWrap {
+    position: absolute;
+    width: 900px;
+    height: 900px;
+    left: 50%;
+    top: 50%;
+    margin-left: -450px;
+    margin-top: -450px;
+    .next {
+      cursor: pointer;
+      position: absolute;
+      z-index: 102;
+      top: 50%;
+      margin-top: -20px;
+      right: 0;
+    }
+    .prev {
+      cursor: pointer;
+      position: absolute;
+      z-index: 102;
+      top: 50%;
+      margin-top: -20px;
+      left: 0;
+    }
+  }
+}

+ 104 - 0
src/components/PreInIcss/SliddleTgl/index.jsx

@@ -0,0 +1,104 @@
+import React, { Component } from "react";
+import RotateImg from "../RotateImg";
+import style from "../index.less";
+import mimi from '@common/images/mimi.png';
+import down from "@common/images/show.png";
+import up from "@common/images/close.png";
+import {imgDragMove} from '@utils/drag';
+
+class SlideTgl extends Component {
+  constructor(props){
+    super(props);
+    this.state={
+      height:"",
+      slide:false,//展开收起显示隐藏
+      slideToggle:false,
+      text:'展开',
+      tgl:true,//展开收起文本设置
+      imgList:[],
+      idx:'',
+      imgShow:false
+    }
+    this.slideDown = this.slideDown.bind(this)
+    this.prePrecImg = this.prePrecImg .bind(this)
+    this.handleClose = this.handleClose .bind(this)
+  }
+  componentDidMount() {
+    setTimeout(() => {
+      let height = this.refs.current.getDOMNode().offsetHeight;
+      this.setState({
+        height:height,
+        slide:height>24?true:false,
+        slideToggle:height>24?true:false
+      })
+    }, 0);
+  }
+  slideDown(flg){
+    this.setState({
+      tgl:flg,
+      slide:flg
+    })
+  }
+  prePrecImg(imgs,idx,imgShow){
+    let imgLis = imgs&&imgs||[];
+    for(let i = 0;i < imgLis.length;i++){
+      let size = imgLis[i].originalImage.split('?')[1].split('&');
+      let width = size[0].split('=')[1];
+      let height = size[1].split('=')[1];
+      imgLis[i].width = width;
+      imgLis[i].height = height;
+    }
+    this.setState({
+      imgList:imgLis,
+      idx,
+      imgShow
+    })
+  }
+  handleClose(){
+    imgDragMove('del')
+    this.props.setMove(false)
+    this.setState({
+      imgShow:false
+    })
+  }
+  render() {
+    const { item,showPre,isMove,setMove,windowHeight } = this.props;
+    return <li>
+    <div className={style.current} ref="current" style={{height:this.state.slide?'18px':'auto'}}>
+      <p className={style.curStyle}><span>现病史:</span>{item.detail.xbs}</p>
+      {item.detail.qts?<div className={style.slideTgl}><span>其他史:</span>{item.detail.qts}</div>:null}
+      {item.detail.supplement?<div className={style.slideTgl}><span>补充内容:</span>{item.detail.supplement}</div>:null}
+      {item.detail.imageList?<p className={style.last}>最近一次报告:</p>:null}
+      {item.detail.imageList?<div className={`${style.preImg} clearfix`}>
+        {
+          item.detail&&item.detail.imageList.map((part,idx)=>{
+            return <div className={style.img}>
+              <img className={style.report} src={part.originalImage} alt=""/>
+              <img className={style.mimi} onClick={()=>this.prePrecImg(item.detail.imageList,idx,true)} src={mimi} alt=""/>
+            </div>
+          })
+        }
+      </div>:null}
+      {this.state.slideToggle&&!this.state.slide?<p className={style.slidesx} onClick={()=>this.slideDown(true)}>
+        收起
+        <img src={up} alt="收起"/>  
+      </p>:null}
+    </div>
+      {this.state.slideToggle&&this.state.slide?<p className={style.slidesx} onClick={()=>{this.slideDown(false)}}>
+        展开
+        <img src={down} alt="展开"/>
+      </p>:null}
+      <div className={style.pushPre} onClick={()=>showPre(item)}>引用</div>
+      {this.state.imgShow?<RotateImg
+        imgShow={this.state.imgShow}
+        imgLis={this.state.imgList}
+        isMove = {isMove}
+        windowHeight = {windowHeight}
+        setMove = {setMove}
+        handleClose={this.handleClose}
+        idx={this.state.idx}></RotateImg>:null}
+  </li>
+  }
+}
+
+export default SlideTgl;

+ 38 - 0
src/components/PreInIcss/index.jsx

@@ -0,0 +1,38 @@
+import React, { Component } from "react";
+import ReactDom from "react-dom";
+import style from "./index.less";
+import close from '@common/images/icon_close.png';
+import SlideTgl from "./SliddleTgl";
+
+class PreIcss extends Component {
+  constructor(props){
+    super(props)
+  }
+  render() {
+    const { show,data,windowHeight,showPreModal,showPre,isMove,setMove } = this.props;
+    const domNode = document.getElementById('root');
+    return ReactDom.createPortal(<div className={style['preInIcss']}>
+      <div className={style.title}>
+          <span>患者预问诊信息</span>
+          <img src={close} alt="关闭" onClick={showPreModal}/>
+        </div>
+      <div className={style.scrollWrap} style={{height:windowHeight-100+'px'}}>
+        {
+          data.map((item,index)=>{
+            return <div className={style.mainPre}>
+              <ul>
+                <li><span>预问诊录入时间:</span>{item.gmtModified}</li>
+                <li><span>录入选择医院:</span>{item.sonHospitalName?item.sonHospitalName:item.hospitalName}</li>
+                <li><span>科室:</span>{item.hospitalDeptName}</li>
+                <li><span>主诉:</span>{item.detail.chiefComplaint}</li>
+                <SlideTgl windowHeight={windowHeight} showPre={showPre} item={item} isMove={isMove} setMove={setMove}></SlideTgl>
+              </ul>
+            </div>
+          })
+        }
+      </div>
+    </div>,domNode)
+  }
+}
+
+export default PreIcss;

+ 109 - 0
src/components/PreInIcss/index.less

@@ -0,0 +1,109 @@
+.preInIcss {
+  z-index: 20;
+  position: fixed;
+  top: 50px;
+  bottom: 10px;
+  width: 450px;
+  right: 10px;
+  background-color: #fff;
+  overflow: hidden;
+  .scrollWrap {
+    overflow: auto;
+    height: 100%;
+    padding-bottom: 30px;
+  }
+  .title {
+    height: 40px;
+    line-height: 40px;
+    position: relative;
+    padding-left: 20px;
+    border-bottom: 1px solid #979797;
+    span {
+      font-size: 16px;
+    }
+    img {
+      position: absolute;
+      right: 10px;
+      top: 8px;
+      cursor: pointer;
+    }
+  }
+  .mainPre {
+    padding: 15px 20px 15px 20px;
+    font-size: 14px;
+    border-bottom: 5px solid #f5f5f5;
+    li {
+      // line-height: 18px;
+      padding: 5px 0;
+      span {
+        color: #000;
+        font-weight: bold;
+      }
+      .current {
+        // height: 24px;
+        overflow: hidden;
+      }
+      .curStyle {
+        padding: 0 0 5px 0;
+        line-height: 18px;
+      }
+      .slideTgl {
+        line-height: 18px;
+        padding: 5px 0;
+      }
+      .last {
+        font-weight: bold;
+        line-height: 18px;
+        padding: 5px 0;
+      }
+      .preImg {
+        .img {
+          width: 120px;
+          height: 145px;
+          float: left;
+          margin-right: 10px;
+          margin-top: 10px;
+          border: 1px solid #ccc;
+          overflow: hidden;
+          position: relative;
+          .report {
+            width: 100%;
+          }
+          .mimi {
+            position: absolute;
+            bottom: 8px;
+            right: 8px;
+            width: 15px;
+            cursor: pointer;
+          }
+        }
+        .img:nth-child(3n+3){
+          margin-right: 0;
+        }
+      }
+    }
+  }
+  .slidesx {
+    cursor: pointer;
+    color: #58ACD7;
+    text-align: right;
+    img {
+      width: 15px;
+      height: 15px;
+      position: relative;
+      top: 2px;
+    }
+  }
+  .pushPre {
+    width: 50px;
+    height: 26px;
+    line-height: 26px;
+    background-color: #3B9ED0;
+    border-radius: 4px;
+    color: #fff;
+    text-align: center;
+    font-size: 12px;
+    margin-top: 15px;
+    cursor: pointer;
+  }
+}

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

@@ -35,7 +35,15 @@ const PreviewInspect = (props) => {
           dataJson&&dataJson.labelList && dataJson.labelList.map((item, idx) => {
             return <table style={{ margin: '8px 0', width: '100%' }}>
               {
-                item.show?<tr className={style.assistTableTrFst}><td><span> {item.name} </span></td></tr>:
+                item.show?<tr className={style.assistTableTrFst}>
+                  <td colSpan='4'>
+                    <span> {item.name} </span> 
+                    <p style={{display:item.inpValue?'inline-block':'none'}}>
+                      ({item.inpValue})
+                      <i></i>
+                    </p>
+                    </td>
+                </tr>:
                 <tr className={style.assistTableTrFstExcel}><td><span>「{item.name}」</span></td></tr>
               }
               {

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

@@ -7,6 +7,7 @@ import PreviewInspect from './Inspect';
 import ItemPart from './ItemPart';
 import $ from "jquery";
 import AssessResultHis from '@containers/AssessResultHis';
+import { dragBox } from '@utils/drag';
 
 class PreviewBody extends Component {
   constructor(props) {
@@ -39,6 +40,7 @@ class PreviewBody extends Component {
       return false;
     } else {
       this.onPrint();
+      dragBox('previewPrintWrapper','previewPrintStatic','del')
       this.props.save(true)
     }
   }

+ 14 - 0
src/components/PreviewBody/index.less

@@ -82,9 +82,23 @@ table{
 .assistTableTrFst {
   font-size: 14px;
   line-height: 1.5;
+  .ediName {
+    width: 100%;
+  }
   span {
     border-bottom: 1px solid #666666;
   }
+  p {
+    display: inline-block;
+    margin-left: 10px;   
+    color: #3B9ED0;
+    font-size: 12px;
+    margin-left: 10px;
+    background-color: #EDF8FF;
+    padding: 0 5px;
+    max-width: 490px;
+    float: right;
+  }
 }
 .assistTableTdFst {
   width: 32%;

+ 74 - 29
src/components/PushContainer/index.jsx

@@ -1,8 +1,8 @@
 import React, { Component } from 'react';
 import style from './index.less';
 import { Tab, ConfirmModal, Notify } from '@commonComp';
-import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow } from '@store/actions/tabTemplate';
-import { initItemList, delItem, delBatchItem, changeTitleAsync, setPageView } from '@store/async-actions/tabTemplate';
+import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin } from '@store/actions/tabTemplate';
+import { initItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin } from '@store/async-actions/tabTemplate';
 import { connect } from "react-redux";
 import store from '@store';
 import { billing } from '@store/async-actions/pushMessage';
@@ -12,7 +12,8 @@ import PushItemsContainer from '@containers/PushItemsContainer';
 import { pushAllDataList, getWindowInnerHeight, didPushParamChange } from '@utils/tools';
 import CopyRightContainer from "@containers/CopyRightContainer";
 import MedicalInfoContainer from '@containers/MedicalInfoContainer';
-import ScaleSearchContainer from '@containers/ScaleSearchContainer';
+import CaseQuailty from "../CaseQuailty";
+
 class PushContainer extends Component {
   constructor(props) {
     super(props);
@@ -21,14 +22,14 @@ class PushContainer extends Component {
       tabs: [{
         title: '辅助信息',
         disabled: true
-      }, {
+      },
+        {
+          title: '病历质控',
+        }, {
         title: '模板',
       },
       {
         title: '医学知识',
-      },
-      {
-        title: '全部量表',
       }
       ],
       visible: false,
@@ -42,6 +43,7 @@ class PushContainer extends Component {
       oKBg: '',
       okColor: 'red',
       num: 0,          //计数
+      deptId:'',       //科室id
     }
     this.$cont = React.createRef();
     this.itemList = null;
@@ -50,7 +52,9 @@ class PushContainer extends Component {
     this.handleTemplateDel = this.handleTemplateDel.bind(this)
     this.handleTitleChange = this.handleTitleChange.bind(this)
     this.handleAllCheckbox = this.handleAllCheckbox.bind(this)
+    this.handleAllCheckboxAdmin = this.handleAllCheckboxAdmin.bind(this)
     this.handleMangerTemplate = this.handleMangerTemplate.bind(this)
+    this.handleMangerTemplateAdmin = this.handleMangerTemplateAdmin.bind(this)
     this.handleDelList = this.handleDelList.bind(this)
     this.makeSure = this.makeSure.bind(this)
     this.handleClose = this.handleClose.bind(this);
@@ -68,7 +72,7 @@ class PushContainer extends Component {
    * @param {tab组件切换id} id
    */
   handleActiveClick(id) {
-    if (id == '1') {
+    if (id == '2') {
       store.dispatch(initItemList(1,0));
     }
     store.dispatch(tabChange(id))
@@ -118,7 +122,7 @@ class PushContainer extends Component {
   delDiv() {
     return <p className={style['center']}>确认删除模板?</p>
   }
-  onchange(value) {
+  onchange(value,deptId) {
     this.setState({
       title: value
     }, () => {
@@ -159,13 +163,14 @@ class PushContainer extends Component {
    * 改变模板标题
    * @param {模板id和模板title} obj
    */
-  handleTitleChange(id, text) {
+  handleTitleChange(id, text,deptId) {
     store.dispatch(changeVisible(true))
     this.setState({
       type: 3,
       currId: id,
       title: text,
       text: text,
+      deptId: deptId,
       okText: '保存',
       okBorderColor: '#3B9ED0',
       okColor: '#fff',
@@ -177,6 +182,22 @@ class PushContainer extends Component {
     })
   }
 
+  handleAllCheckboxAdmin() {        //全.反选
+    let tmpFlg = this.props.allCheckedAdmin;
+    if (this.props.checkItemsAdmin.length < this.props.adminItems.length && this.props.allCheckedAdmin) {
+      tmpFlg = false;
+    } else if (this.props.checkItemsAdmin.length == this.props.adminItems.length && !this.props.allCheckedAdmin) {
+      tmpFlg = true;
+    }  //两种特殊情况处理
+    store.dispatch(allCheckedAdmin(!tmpFlg))
+  }
+
+  handleMangerTemplateAdmin() {      //管理
+    let tmpFlg = this.props.allCheckShowAdmin;
+    store.dispatch(allCheckedAdmin(false))
+    store.dispatch(allCheckedShowAdmin(!tmpFlg))
+  }
+
   handleAllCheckbox() {        //全.反选
     let tmpFlg = this.props.allChecked;
     if (this.props.checkItems.length < this.props.items.length && this.props.allChecked) {
@@ -210,10 +231,18 @@ class PushContainer extends Component {
   
   makeSure() {
     if (this.state.type == 1) {
-      store.dispatch(delItem(this.state.id))
+      if(this.props.admin){
+        store.dispatch(delItemAdmin(this.state.id))
+      }else{
+        store.dispatch(delItem(this.state.id))
+      }
       store.dispatch(changeVisible(false))
     } else if (this.state.type == 2) {
-      store.dispatch(delBatchItem(this.props.checkItems))
+      if(this.props.admin){
+        store.dispatch(delBatchItemAdmin(this.props.checkItemsAdmin))
+      }else{
+        store.dispatch(delBatchItem(this.props.checkItems))
+      }
       store.dispatch(changeVisible(false))
     } else if (this.state.type == 3) {
       if (this.state.title == this.state.text) {
@@ -221,24 +250,26 @@ class PushContainer extends Component {
         Notify.success('标题修改成功');
         return;
       }
+      if ((this.state.title).trim() == '') {
+        Notify.info('请输入模板名称');
+        return;
+      }
       let tempObj = {
         id: this.state.currId,
-        title: this.state.title
+        title: this.state.title,
+        deptId:this.state.deptId
+      }
+      if(this.props.admin){
+        store.dispatch(changeTitleAsyncAdmin(tempObj))
+      }else{
+        store.dispatch(changeTitleAsync(tempObj))
       }
-      store.dispatch(changeTitleAsync(tempObj))
     } else if (this.state.type == 4) {        //模板引入
-      const { items } = this.props;
-      store.dispatch(setPageView(this.state.id))
-      // items && items.map((part) => {
-      //   if (this.state.id == part.id) {
-      //     let typeConfig = part.type;
-      //     // store.dispatch(keepPushData(part, 'part'))//引用数据的存储,用于保存模板是判断数据是否变化
-      //     // pushAllDataList(typeConfig, 'push', part, 'template')//引用
-      //     // if (didPushParamChange()) {
-      //       // store.dispatch(billing())
-      //     // }
-      //   }
-      // })
+      if(this.props.admin){
+        store.dispatch(setPageViewAdmin(this.state.id))
+      }else{
+        store.dispatch(setPageView(this.state.id))
+      }
       store.dispatch(changeVisible(false))
     }
   }
@@ -246,7 +277,7 @@ class PushContainer extends Component {
     store.dispatch(changeVisible(false));
   }
   render() {
-    const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow } = this.props;
+    const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin,clearSearch } = this.props;
     return <div className={style["container"]} ref={this.$cont} >
       <Tab tabs={this.state.tabs}
         activeId={activeId}
@@ -254,12 +285,20 @@ class PushContainer extends Component {
       >
         <TemplateContainer activeId={activeId}>
           <PushItemsContainer></PushItemsContainer>
+          <CaseQuailty></CaseQuailty>
           <TemplateItems
             items={items}
+            clearSearch={clearSearch}
+            adminItems={adminItems}
+            admin={admin}
+            handleAllCheckboxAdmin={this.handleAllCheckboxAdmin}
+            handleMangerTemplateAdmin={this.handleMangerTemplateAdmin}
             current={current}
             hasMore={hasMore}
             checkItems={checkItems}
+            checkItemsAdmin={checkItemsAdmin}
             allCheckShow={allCheckShow}
+            allCheckShowAdmin={allCheckShowAdmin}
             handleContentClick={this.handleContentClick}
             handleTemplateDel={this.handleTemplateDel}
             handleTitleChange={this.handleTitleChange}
@@ -270,7 +309,6 @@ class PushContainer extends Component {
             templateSearch={this.templateSearch}
           ></TemplateItems>
           <MedicalInfoContainer></MedicalInfoContainer>
-          <ScaleSearchContainer></ScaleSearchContainer>
         </TemplateContainer>
       </Tab>
       <ConfirmModal
@@ -290,9 +328,11 @@ class PushContainer extends Component {
   }
 }
 
-const mapStateToProps = (state) => {
+const mapStateToProps = (state) => {//console.log(state)
   return {
     items: state.tabTemplate.items,
+    adminItems: state.tabTemplate.adminItems,
+    admin: state.homePage.admin,
     current: state.tabTemplate.current,
     hasMore: state.tabTemplate.hasMore,
     activeId: state.tabTemplate.activeId,
@@ -301,6 +341,11 @@ const mapStateToProps = (state) => {
     visible: state.tabTemplate.visible,
     showMsg: state.tabTemplate.showMsg,
     allCheckShow: state.tabTemplate.allCheckShow,
+
+    allCheckedAdmin: state.tabTemplate.allCheckedAdmin,
+    allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
+    checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
+    clearSearch:state.print.clearSearch,
   }
 }
 

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

@@ -138,7 +138,6 @@ class PushItems extends Component {
   componentDidMount() {
     const height = getWindowInnerHeight() - 190;
     this.$cont.current.style.height = height + "px";
-
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
         const height = getWindowInnerHeight() - 190;
@@ -287,7 +286,6 @@ class PushItems extends Component {
             hideTips = {this.hideTips}
             showAllName = {showAllName}
             tipsDetails = {tipsDetails}/>}
-            
             {
               (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure hideAllDrop={hideAllDrop} windowHeight={windowHeight} data={dataLis[setPushEmergencyIdx]} idx={setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
             }
@@ -295,5 +293,4 @@ class PushItems extends Component {
     );
   }
 }
-
 export default PushItems;

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

@@ -49,7 +49,7 @@
       h1{
         font-size: 14px;
         color: #000;
-        padding: 4px 15px;
+        padding: 8px 15px;
         background: #FAEBEC;
         font-weight: bold;
         img {
@@ -119,6 +119,6 @@
   color: #979797;
   text-align: center;
   position: absolute;
-  bottom: -10px;
+  bottom: 0px;
 }
 

+ 15 - 8
src/components/RadioDrop/index.jsx

@@ -1,5 +1,5 @@
 import React,{Component} from 'react';
-import {handleEnter,windowEventHandler,setFontColorSize} from '@utils/tools.js';
+import {handleEnter,windowEventHandler,setFontColorSize,handleMouseUp} from '@utils/tools.js';
 import {DropList} from '@commonComp';
 import classNames from 'classnames';
 import style from "./index.less";
@@ -34,12 +34,13 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   getClass(){
-    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const {value,hideTag,show,isImports,isExtBlue,mouseSelect} = this.props;
     const ext = isExtBlue?style['ext']:'';
     const orgBorder = isImports?style['orange-border']:'';      //橙色框高亮
     const editBorder = this.state.editable?style['blue-border']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
-      $(this.$cont.current).addClass(style['borderd']);
+      $(this.$cont.current).addClass(style['borderd'],);
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
@@ -48,14 +49,14 @@ class RadioDrop extends Component{
     // }
     if(value){
       if(hideTag){
-        return classNames(style['no-tag'],ext,setFontColorSize(isExtBlue?2:''));
+        return classNames(style['no-tag'],ext,setFontColorSize(isExtBlue?2:''),selectedArea);
       }
-      return classNames(style['selected-tag'],ext,editBorder,setFontColorSize());
+      return classNames(style['selected-tag'],ext,editBorder,setFontColorSize(),selectedArea);
     }else{
       if(hideTag){
-        return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor')
+        return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor',)
       }
-      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1));
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1),selectedArea);
     }
   }
   handleSelect(item){
@@ -148,8 +149,12 @@ class RadioDrop extends Component{
     })
     handleDbclick&&handleDbclick({id:patId||id});
   }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    !this.state.editable&&setSelectArea({i,boxMark,dir:'start'});
+  }
   render(){
-    const {data,placeholder,show,value,hideTag,boxMark} = this.props;
+    const {data,placeholder,show,value,hideTag,boxMark,select_start,i} = this.props;
     const {tmpDom} = this.state
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})
@@ -161,6 +166,8 @@ class RadioDrop extends Component{
            onDoubleClick={hideTag?null:this.handledbClick}
            onFocus={(e)=>{e.stopPropagation()}}
            onClick={(e)=>this.handleShow(e,true)}
+           onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+           onMouseDown={this.handleMouseDown.bind(this)}
            onKeyDown={handleEnter}>
         {value||placeholder}
       </div>

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

@@ -17,6 +17,9 @@
   color:@placeholder-color;
   &.ext{
     color: @extBlue!important;
+    &.selected-area{
+    color: #fff!important;
+  }
   }
 }
 .tag:before{

+ 0 - 0
src/components/RadioInpDrop/index.jsx


Неке датотеке нису приказане због велике количине промена