Просмотр исходного кода

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

zhouna 5 лет назад
Родитель
Сommit
17f5f212b1
100 измененных файлов с 1287 добавлено и 578 удалено
  1. 1 1
      src/common/components/ComplexModal/index.less
  2. 1 1
      src/common/components/ConfirmModal/index.jsx
  3. 41 58
      src/common/components/EditableSpan/index.jsx
  4. 14 3
      src/common/components/EditableSpan/index.less
  5. 23 10
      src/common/components/InlineTag/index.jsx
  6. 4 0
      src/common/components/InlineTag/index.less
  7. 3 2
      src/common/components/NumberPan/index.jsx
  8. 9 1
      src/common/components/NumberPan/index.less
  9. 1 1
      src/common/components/NumberUnitPan/index.jsx
  10. 1 1
      src/common/components/NumberUnitPan/index.less
  11. BIN
      src/common/components/SearchBox/imgs/clear.png
  12. BIN
      src/common/components/SearchBox/imgs/search.png
  13. 161 0
      src/common/components/SearchBox/index.jsx
  14. 59 0
      src/common/components/SearchBox/index.less
  15. 4 4
      src/common/components/Textarea/index.jsx
  16. 3 1
      src/common/components/index.js
  17. BIN
      src/common/images/addItem2.png
  18. 8 3
      src/common/less/variables.less
  19. 37 0
      src/components/AddAssistCheck/AssistName/index.jsx
  20. 7 1
      src/components/AddAssistCheck/Textarea/index.jsx
  21. 3 2
      src/components/AddAssistCheck/Textarea/index.less
  22. 72 24
      src/components/AddAssistCheck/index.jsx
  23. 1 1
      src/components/AddAssistCheck/index.less
  24. 3 3
      src/components/AddInspect/SlideExcel/index.jsx
  25. 1 0
      src/components/AddInspect/SlideExcel/index.less
  26. 5 5
      src/components/AddInspect/SlideSelect/index.jsx
  27. 1 0
      src/components/AddInspect/SlideSelect/index.less
  28. 17 7
      src/components/AddInspect/index.jsx
  29. 3 3
      src/components/Advice/Textarea/index.jsx
  30. 2 2
      src/components/AssessResult/ScaleItem/index.jsx
  31. 2 3
      src/components/AssistCheck/index.jsx
  32. 3 1
      src/components/CheckBody/index.jsx
  33. 13 12
      src/components/ChronicInfo/index.jsx
  34. 3 2
      src/components/ChronicInfo/index.less
  35. 32 27
      src/components/CommonSymptom/index.jsx
  36. 1 1
      src/components/CopyRight/index.less
  37. 10 8
      src/components/DiagResultSearch/index.jsx
  38. 3 2
      src/components/DiagnosticItem/index.jsx
  39. 15 3
      src/components/DiagnosticItem/index.less
  40. 47 7
      src/components/DiagnosticList/index.jsx
  41. 16 0
      src/components/DiagnosticList/index.less
  42. 0 1
      src/components/EMRContainer/index.jsx
  43. 1 0
      src/components/Emergency/index.less
  44. 1 0
      src/components/EmergencyProcedure/EmergencyModal/index.less
  45. 2 2
      src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx
  46. 4 4
      src/components/EmergencyProcedure/EmergencyPart/PartTrd/index.jsx
  47. 3 3
      src/components/EmergencyProcedure/emergency.js
  48. 0 3
      src/components/HistoryCaseContainer/HistoryList/index.jsx
  49. 2 0
      src/components/HistoryCaseContainer/HistoryList/index.less
  50. 2 2
      src/components/HistoryCaseContainer/index.jsx
  51. 13 7
      src/components/MainSuit/index.jsx
  52. 8 7
      src/components/MedicalInfo/index.jsx
  53. 1 1
      src/components/MedicalInfo/index.less
  54. 84 6
      src/components/MultSpread/index.jsx
  55. 4 0
      src/components/MultSpread/index.less
  56. 3 2
      src/components/Multiple/index.jsx
  57. 6 0
      src/components/Multiple/index.less
  58. 64 23
      src/components/NumberDrop/index.jsx
  59. 20 0
      src/components/NumberDrop/index.less
  60. 1 1
      src/components/NumberUnitDrop/index.jsx
  61. 2 59
      src/components/Operation/index.jsx
  62. 1 1
      src/components/Preview/index.jsx
  63. 2 1
      src/components/Preview/index.less
  64. 2 2
      src/components/PreviewBody/ItemPart/index.jsx
  65. 3 1
      src/components/PreviewBody/index.jsx
  66. 1 1
      src/components/PreviewBody/index.less
  67. 1 1
      src/components/PrintPreview/index.jsx
  68. 2 1
      src/components/PrintPreview/index.less
  69. 18 18
      src/components/PushContainer/index.jsx
  70. 1 1
      src/components/PushContainer/index.less
  71. 3 1
      src/components/PushItems/DetailsModal/index.less
  72. 21 22
      src/components/PushItems/PushDiag/index.jsx
  73. 17 1
      src/components/PushItems/PushDiag/index.less
  74. 12 5
      src/components/PushItems/RecommendInspect/index.jsx
  75. 2 0
      src/components/PushItems/RecommendInspect/index.less
  76. 4 4
      src/components/PushItems/TipsMsg/index.jsx
  77. 2 0
      src/components/PushItems/TipsMsg/index.less
  78. 7 14
      src/components/PushItems/index.jsx
  79. 10 3
      src/components/PushItems/index.less
  80. 8 6
      src/components/RadioDrop/index.jsx
  81. 7 0
      src/components/RadioDrop/index.less
  82. 23 89
      src/components/RadioInpDrop/index.jsx
  83. 4 0
      src/components/RadioInpDrop/index.less
  84. 7 7
      src/components/ScaleSearch/index.jsx
  85. 1 2
      src/components/ScaleSearch/index.less
  86. 34 20
      src/components/ScaleTable/index.jsx
  87. 66 13
      src/components/SpreadDrop/index.jsx
  88. 16 1
      src/components/SpreadDrop/index.less
  89. 3 2
      src/components/TemplateItems/TemplateItem/index.less
  90. 68 7
      src/components/TemplateItems/index.jsx
  91. 55 8
      src/components/TemplateItems/index.less
  92. 16 13
      src/components/TimeInterval/index.jsx
  93. 2 1
      src/components/Treat/AdverseReactions/index.jsx
  94. 1 0
      src/components/Treat/DrugHistory/LastDrug/index.jsx
  95. 5 9
      src/components/Treat/DrugTreat/index.jsx
  96. 5 0
      src/components/Treat/DrugTreat/index.less
  97. 1 1
      src/components/Treat/FollowUp/Textarea/index.jsx
  98. 2 1
      src/components/Treat/FollowUp/Textarea/index.less
  99. 3 0
      src/components/TreatDesc/DrugInfo/index.less
  100. 0 0
      src/components/TreatDesc/index.jsx

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

@@ -3,7 +3,7 @@
 .container {
   // position: relative;
   // padding-top: 40px;  //改为绝对定位,拖拽元素不在监听document,改为这个
- .maskZIndex;
+ .maskContentZIndex1;
   position: absolute;
   width: 100%;
   height: 100%;

+ 1 - 1
src/common/components/ConfirmModal/index.jsx

@@ -130,7 +130,7 @@ class ConfirmModal extends Component {
         return (
             <NewPortal visible={visible}>
                 <div className={styles['modal-wrapper']} id='confirm'>
-                    <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, height:height, marginTop:marginTop}}>
+                    <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, minHeight:height, marginTop:marginTop}}>
                         <div className={styles['modal-title']} style={{background: titleBg}}>
                             {icon?<img src={icon} className={styles['icon']}/>:''}
                             {title ? title : ''} 

+ 41 - 58
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} from '@utils/tools.js';
+import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
 import classNames from 'classnames';
 
@@ -41,6 +41,15 @@ class EditableSpan extends Component{
   }
   handleFocus(e){
     e.stopPropagation();
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$span.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$span.current.innerText||that.$span.current.innerHTML;
+        that.$span.current.innerHTML = txt;
+      });
+    })
     const {mainSaveText,full,setFocusIndex,i,boxMark,value}= this.props;
     let mainText = filterDataArr(mainSaveText);//主诉字数
     if(+boxMark==3||+boxMark==4){         //主诉为空,且第一次聚焦其他史查体时提示且不可输入
@@ -60,7 +69,7 @@ class EditableSpan extends Component{
   }
   onChange(e){
     e.stopPropagation();
-    const {handleChange,boxMark,i,handleSearch,value,mainSaveText,mainIds,handleClear} = this.props;
+    const {handleChange,boxMark,i,handleSearch,noSearch,mainSaveText,mainIds,handleClear} = this.props;
     const {labelVal,searchPre} = this.state;
     const text1 = e.target.innerText || e.target.innerHTML;
     // e.newValue IE浏览器DOMCharacterDataModified监听
@@ -69,7 +78,7 @@ class EditableSpan extends Component{
     if(+boxMark==1){
       if(mainText.length >= config.limited){
         if(text1.length > labelVal.length){
-          e.target.innerText = labelVal;
+          e.target.innerHTML = labelVal;    //innerHTML兼容FF26
           Notify.info(config.limitText);
           return
         }else if(text1.length == labelVal.length){
@@ -85,10 +94,12 @@ class EditableSpan extends Component{
     this.setState({
       labelVal:text1
     });
-    
+
     const that = this;
     handleChange&&handleChange({text1,boxMark,i});
-
+    if(noSearch){
+      return;
+    }
     //延迟搜索
     clearTimeout(this.state.timer);
     const timer = setTimeout(function(){
@@ -98,12 +109,10 @@ class EditableSpan extends Component{
       clearTimeout(that.state.timer);
       temp = newText.replace(searchPre,'');
       isEnd = !(newText.indexOf(searchPre)>0);
-      search = temp.replace(/[(^\s*)|(\s*$)|(^\,*)|(\,*$)]/g,'');
-      // if(!search&&searchPre){
+      search = temp.replace(config.regPreAndAft,'');
       if(!temp&&searchPre&&newText){
         search = searchPre;
       }
-      //console.log(labelVal,'旧:',searchPre,'新:',newText,'搜索:',search);
       if(config.punctuationReg.test(search)){    //只有标点符号时不搜索
         handleSearch&&handleSearch({text:search,isEnd,boxMark,mainIds});
       }else{//只有标点符号时要清空搜索结果
@@ -120,16 +129,9 @@ class EditableSpan extends Component{
   }
 
   handleBlur(e){//为了阻止冒泡事件
-    const {boxMark,handleClear,handleChange,i} = this.props;
     e.stopPropagation();
-    // 延时清空搜索结果,不延时会影响选中
-    /*clearTimeout(this.state.clearTimer);
-    const clearTimer = setTimeout(function(){
-      handleClear && handleClear({boxMark})
-    },config.delayTime);
-    this.setState({
-      clearTimer
-    });*/
+    //解除绑定事件
+    $(this.$span.current).off("paste");
   }
 
   moveEnd(obj) {
@@ -168,31 +170,23 @@ class EditableSpan extends Component{
       let preObj = $(this.$span.current).prev();
       let obj = preObj[0]&&preObj[0].nodeName=="DIV"?preObj.prev():preObj;
       if(textIndex == 0){
-        if(ev.preventDefault){//阻止默认事件
-          ev.preventDefault();
-        }else{
-          ev.returnValue=false;
-        }
+        preventDefault(ev);
         if(obj){
           this.moveEnd(obj[0]);
-        } 
+        }
       }
     }
     if(ev.keyCode==39){//向右
       let nextObj = $(this.$span.current).next();
       let obj = nextObj[0]&&nextObj[0].nodeName=="DIV"?nextObj.next():nextObj;
       if(textIndex == textLength || textLength==undefined || (textIndex == 0 && textLength==1)){
-        if(ev.preventDefault){//阻止默认事件
-          ev.preventDefault();
-        }else{
-          ev.returnValue=false;
-        }
+        preventDefault(ev);
         if(obj){
           obj.focus();
         }
       }
     }
-  }  
+  }
   handleKeyup(e){
     const {boxMark,handleKeydown,removeId,handleClear,removeSpan} = this.props;
     const {preVal,index} = this.state;
@@ -232,7 +226,7 @@ class EditableSpan extends Component{
       }
     }
 
-    if(ev.keyCode==8){     
+    if(ev.keyCode==8){
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
       // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
       let preObj = $(this.$span.current).prev();
@@ -243,17 +237,16 @@ class EditableSpan extends Component{
           this.moveEnd(preObj[0]);
         }
       }
-      
+
       if(innerVal !== preVal){
-        
-      }
-      else{
+
+      }else{
         // 中英文数字和下划线--单独删除标签
         /*const reg = new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_])");
         if(index!==0 && reg.test(innerVal)){
           let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
           delSingleLable && delSingleLable({boxMark,i:index});
-          this.moveEnd(obj[0]);  
+          this.moveEnd(obj[0]);
           this.setState({
             index: null
           })
@@ -267,7 +260,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]);  
+          this.moveEnd(obj[0]);
           this.setState({
             index: null
           })
@@ -278,7 +271,7 @@ class EditableSpan extends Component{
         removeSpan();
       }
     }
-    
+
   }
   componentWillReceiveProps(next){
     const isRead = this.props.isRead;
@@ -291,34 +284,24 @@ class EditableSpan extends Component{
   }
   componentDidMount(){
     const {value} = this.props;
-    const that = this;
     if(value){
       this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
     }
-    if(isIE()){
-      // 左右移动没问题,但是输入过程中会失焦,并且有时光标在但是无法输入 
-      // $(this.$span.current)[0].addEventListener('DOMCharacterDataModified', function(e){that.onChange(e);}, false);
-      // 此方法会影响左右切换时光标消失
-      /*$(this.$span.current).onIe8Input(function(e){
-        this.onChange(e)
-      },this);*/
-    }
   }
-  /*cancelSelect(e){//双击不选中
-    if(document.selection&&document.selection.empty){
-        document.selection.empty();
-      }else if (window.getSelection) {
-        var sel=window.getSelection();
-        sel.removeAllRanges();
-      }
-    }*/
   getClass(){
-    const {full,value,saveText,i} = this.props;
+    const {full,value,saveText,i,preIsExt,afterIsExt} = this.props;
+    const br = preIsExt&&!afterIsExt;       //最后一个体征标签
     const preSelected = saveText[i-1];
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
-    //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则灰显
-    const unselect = value.match(config.punctuationReg)||preSelected?'':style['unselect'];
-    return classNames(style['editable-span'],isFull,unselect);
+    //有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则查体中,有体征标记显示蓝色,否则灰显
+    const ext = preIsExt?style['ext']:style['unselect'];
+    const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
+    const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const $span = this.$span.current;
+    if(br&&$span&&!$span.innerText){
+      this.$span.current.innerHTML='&nbsp;';
+    }
+    return classNames(style['editable-span'],isFull,unselect,hasBr);
   }
 
   render() {

+ 14 - 3
src/common/components/EditableSpan/index.less

@@ -2,19 +2,30 @@
 .editable-span{
   display: inline-block;
   outline: none;
-  word-break: break-word;
+  word-break: break-all;
   min-width: 10px;
   // line-height: 2;
   min-height: 16px;//火狐需要
-  line-height: 16px;
+  line-height: 22px;
   vertical-align: middle;
   text-align: left;
   padding-right: 1px;//火狐左右移动需要
 }
+.editable-br{
+  .editable-span;
+  display: inline;
+}
+.editable-br:after{
+  content: "\A";
+  white-space: pre;
+}
 .full{
   width: 100%;
-  line-height: 100%;
+  line-height: 22px;
 }
 .unselect{
   color: @placeholder-color;
+}
+.ext{
+  color: @extBlue;
 }

+ 23 - 10
src/common/components/InlineTag/index.jsx

@@ -1,7 +1,6 @@
 import React, { Component } from "react";
 import style from "./index.less";
 import classNames from 'classnames';
-import {handleEnter} from '@utils/tools.js';
 /***
  * 标签组件
  * author:zn@2018-11-08
@@ -27,10 +26,14 @@ class InlineTag extends Component {
   }
   handleInput(e){       //输入时保存临时值,在修改灰显为黑色时判断用
     e.stopPropagation();
+    const value = e.target.innerText||e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');//兼容firefox26
+    this.setState({
+      value:value
+    })
   }
   handleBlur(e){         //鼠标离开是保存值到store中
     e.stopPropagation(); //不阻止会触发外层div的失焦事件
-    const value = e.target.innerText;
+    const value = e.target.innerText||e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');;
     const {handleInput,ikey,prefix,suffix,placeholder} = this.props;
     if(!value.trim()){
       this.setState({
@@ -46,7 +49,7 @@ class InlineTag extends Component {
   }
   handleFocus(e){
     e.stopPropagation();
-    const text = e.target.innerText || e.target.innerHTML;
+    const text = e.target.innerText || e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');;
     const {placeholder} = this.props;
     if(text.trim()==placeholder){
       this.setState({
@@ -55,16 +58,17 @@ class InlineTag extends Component {
     }
   }
   getStyle(){
-    const {hideTag,placeholder} = this.props;
-    const value = this.$span.current&&this.$span.current.innerText.trim();
+    const {hideTag,placeholder,isExtBlue} = this.props;
+    const value = this.state.value;
+    const ext = isExtBlue?style['ext']:'';
     if(hideTag){
       if(value){
         return classNames(style['selected-no-tag']);
       }
-      return style['no-tag'];
+      return classNames(style['no-tag'],ext);
     }
     if(!value||value.trim()==placeholder){
-      return classNames(style['gray']);
+      return classNames(style['gray'],ext);
     }
     return style['selected-tag'];
   }
@@ -90,9 +94,18 @@ class InlineTag extends Component {
     const spanWidth = window.getComputedStyle(this.$span.current).width;
     this.$span.current.style.minWidth=spanWidth;
   }
+  componentWillReceiveProps(nextProps){
+    if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
+      return
+    }
+    this.setState({
+      placeholder:nextProps.placeholder,
+      value:nextProps.value
+    })
+  }
   render(){
-    const {prefix,suffix} = this.props;
-    const {placeholder,value} = this.state;
+    const {prefix,suffix,value} = this.props;
+    const {placeholder} = this.state;
     return <div className={this.getStyle()}
                 onClick={this.handleFixClick}>
                 <span>{prefix}</span>
@@ -101,7 +114,7 @@ class InlineTag extends Component {
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}
                       onFocus={this.handleFocus}
-                      onKeyDown={handleEnter}
+                      onClick={(e)=>{e.stopPropagation();}}
                       ref={this.$span}>&nbsp;{value||placeholder}</span>
                 <span>{suffix}</span>
             </div>;

+ 4 - 0
src/common/components/InlineTag/index.less

@@ -14,6 +14,9 @@
 }
 .gray{
    .tag;
+  &.ext{
+    color: @extBlue;
+  }
  }
 .free-in{
   display: inline-block;
@@ -22,4 +25,5 @@
   text-align: center;
   /*border-bottom: 1px @placeholder-color solid;*/
   outline: none;
+  word-break: break-all;
 }

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

@@ -59,6 +59,7 @@ class NumberPan extends Component{
   }
   render(){
     const select = this.handleSelect;
+    const noString=this.props.noString;
     const domNode = document.getElementById('root');
     return <div className={style['panBox']}
                 style={this.getStyle()}
@@ -70,7 +71,7 @@ class NumberPan extends Component{
           <td><button onMouseUp={select}>1</button></td>
           <td><button onMouseUp={select}>2</button></td>
           <td><button onMouseUp={select}>3</button></td>
-          <td><button onMouseUp={select}>/</button></td>
+          <td><button className={noString?style['disabled']:''} onMouseUp={noString?null:select}>/</button></td>
         </tr>
         <tr>
           <td><button onMouseUp={select}>4</button></td>
@@ -87,7 +88,7 @@ class NumberPan extends Component{
         <tr>
           <td><button onMouseUp={select}>.</button></td>
           <td><button onMouseUp={select}>0</button></td>
-          <td><button onMouseUp={select}>~</button></td>
+          <td><button className={noString?style['disabled']:''} onMouseUp={noString?null:select}>~</button></td>
           <td><button onMouseUp={this.handleClose.bind(this)} className={style['confirm']}>确定</button></td>
         </tr>
       </table>

+ 9 - 1
src/common/components/NumberPan/index.less

@@ -5,10 +5,17 @@
 }
 .pan{
   width: 280px;
-  
+  line-height: unset;
   td{
     width: 68px;
     height:44px;
+    .disabled{
+      opacity: .4;
+      cursor: not-allowed;
+    }
+    .disabled:hover{
+      border: none;
+    }
   }
   button{
     border:1px #fff solid;
@@ -28,6 +35,7 @@
     padding-left: 14px;
     font-size: 14px;
     line-height: normal;
+    bottom: 0;    /*覆盖其他样式*/
   }
   .imgN{
     text-align: right;

+ 1 - 1
src/common/components/NumberUnitPan/index.jsx

@@ -107,7 +107,7 @@ class NumberUnitPan extends Component{
           <td><span onClick={this.handleSelect}>0</span></td>
           <td><span onClick={this.handleSelect}>~</span></td>
           <td><span onClick={this.handleSelect}>/</span></td>
-          <td onClick={(e)=>e.stopPropagation()}></td>
+          <td><span onClick={this.handleSelect}>秒</span></td>
           <td className={style['imgN']}><img src={backspace} onClick={this.handleBack.bind(this)} /></td>
         </tr>
         <tr>

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

@@ -26,7 +26,7 @@
   }
    .imgN{
     text-align: right;
-    vertical-align: middle;
+    vertical-align: bottom;
     padding-right: 8px;
     cursor: pointer;
   } 

BIN
src/common/components/SearchBox/imgs/clear.png


BIN
src/common/components/SearchBox/imgs/search.png


+ 161 - 0
src/common/components/SearchBox/index.jsx

@@ -0,0 +1,161 @@
+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 classNames from 'classnames';
+import SearchDrop from '@components/SearchDrop';
+import ScrollArea from 'react-scrollbar';
+/**
+ * 主诉“添加症状”下拉中的:搜索框(含结果下拉)
+ * 接收参数:
+ * show:上级下拉是否隐藏,用于componentWillReceiveProps中
+ */
+class SearchBox extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+          showBox:false, //显示搜索结果
+          border:'',
+          showClear:false, //显示清空icon
+          timer:null
+        }
+        this.textInput = React.createRef();
+        this.handleClearVal = this.handleClearVal.bind(this);
+        this.handleFocus = this.handleFocus.bind(this);
+        this.handleBlur = this.handleBlur.bind(this);
+        this.clickIcon = this.clickIcon.bind(this);
+        this.handleSearchSelect = this.handleSearchSelect.bind(this);
+        this.reset = this.reset.bind(this);
+    }
+    handleClearVal(){
+        const { clearSearch } = this.props;
+        this.textInput.current.value = '';
+        this.textInput.current.focus();
+        this.setState({
+          showClear:false
+        });
+        clearSearch&&clearSearch();
+    }
+    handleSearchSelect(e,item){
+      e.stopPropagation();
+      e.preventDefault();
+      const {clearSearch,onSelect} = this.props;
+      onSelect(item);//上一级的“确定”事件
+      clearSearch&&clearSearch();
+      this.textInput.current.value = "";
+    }
+    handleInput(e){
+      e.stopPropagation();
+      e.preventDefault();
+      const { getSearchData ,mainIds,clearSearch,pushIds} = this.props;
+      const ids = [...mainIds,...pushIds];
+        clearTimeout(this.state.timer);
+        let timer = setTimeout(()=>{
+            clearTimeout(this.state.timer);
+            if(e.target.value.trim() == ''){
+              this.setState({
+                showClear:false
+              });
+              clearSearch();
+              return
+            }
+            this.setState({
+              showClear:true
+            })
+            getSearchData && getSearchData({inpStr:e.target.value.replace('<br>',''),boxMark:1,itemType:0,mainIds:ids});
+        },config.delayTime);
+        this.setState({
+          timer
+        });
+    }
+    handleFocus(e){//聚焦时边框变蓝色
+      e.stopPropagation();
+      e.preventDefault();
+      this.setState({border:true})
+    }
+    handleBlur(e){
+      e.stopPropagation();
+      e.preventDefault();
+      this.setState({border:false})
+    }
+    clickIcon(){
+      this.setState({showBox:true})
+      setTimeout(()=>{
+        this.textInput.current.focus();
+      },0)
+    }
+    // 重置事件
+    reset(){
+      const { clearSearch } = this.props;
+      clearSearch();
+      this.textInput.current.value = "";
+      this.setState({
+        showBox:false,
+        border:false,
+        showClear:false
+      })
+    }
+    componentDidMount(){
+      this.props.onRef(this);
+    }
+    componentWillReceiveProps(next){
+      // 隐藏时,清空搜索框内文字,清空搜索结果,隐藏搜索框
+      if(!next.show && next.show != this.props.show){
+        this.reset();
+      }
+    }
+    render() {
+        const { mainSearchData } = this.props;
+        const { showClear ,border, showBox} = this.state;
+        const showBd = showBox?styles['borderNone']:'';//显示边框
+        const borderCor = border?styles['border']:''; //蓝色边框
+        const isShow = showBox?styles['show']:styles['hide']; //是否显示输入框
+        let litext = '';
+        const contStyle={
+          opacity:'0.4',
+          right:'0',
+          top:'1px',
+          zIndex:'15',
+          width:'14px',
+          background:'#f1f1f1'};
+        const barStyle={background:'#777',width:'100%'};
+        return (
+            <div className={classNames(styles['search'])} onClick={this.clickIcon} onBlur={(e)=>{e.stopPropagation();}}>
+                <img className={styles.searchVal} src={search} alt="搜索"/>
+                <img style={{display:showClear?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
+                <input
+                    className={classNames(isShow,borderCor,showBd)}
+                    type="text"
+                    maxLength="30"
+                    ref={this.textInput}
+                    onFocus={this.handleFocus}
+                    onBlur={this.handleBlur}
+                    onInput={(e) => { 
+                      this.handleInput(e)
+                    }}
+                    onPropertyChange={(e) => {  // 兼容ie
+                      this.handleInput(e)
+                    }}
+                />
+                {mainSearchData&&mainSearchData.length>0 ? <div className={styles.autoList}>
+                    <ScrollArea speed={0.8}
+                      horizontal={false}
+                      stopScrollPropagation={mainSearchData.length>6?true:false}
+                      style={{maxHeight:'180px'}}
+                      verticalContainerStyle={contStyle}
+                      verticalScrollbarStyle={barStyle}
+                      contentClassName="content">
+                      <ul>
+                        {mainSearchData&&mainSearchData.map((it)=>{
+                          litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
+                          return <li key={it.conceptId} onClick={(e)=>this.handleSearchSelect(e,it)} title={litext}>{litext}</li>
+                        })}
+                      </ul>
+                    </ScrollArea>
+                  </div>:''}
+            </div>
+        )
+    }
+}
+export default SearchBox;

+ 59 - 0
src/common/components/SearchBox/index.less

@@ -0,0 +1,59 @@
+@import "~@less/variables.less";
+
+.search {
+    .contentZIndex1;
+    width: 316px;
+    height: 50px;
+    padding: 8px;
+    box-sizing: border-box;
+    position: relative;
+    background-color: #fff;
+    margin-left: 78px;
+    .autoList {
+      position: absolute;
+      width: 300px;
+      background: #fff;
+      border: 1px solid #ccc;
+        margin-top: 10px;
+       ul{
+        li:hover{
+          border: 1px solid #3B9ED0;
+        }
+      } 
+    }
+    input {
+        width: 100%;
+        height: 34px;
+        line-height: 34px;
+        padding: 0px 32px;
+        margin-bottom: -10px;
+        box-sizing: border-box;
+    }
+    input::ms-clear{
+        display: none;
+    }
+    .border {
+        border: 1px solid @blue !important;
+    }
+    .borderNone {
+        border: 1px solid #979797;
+    }
+    img {
+        position: absolute;
+        top: 15px;
+    }
+    .searchVal {
+        left: 14px;
+        cursor: pointer;
+    }
+    .clearVal{
+        cursor: pointer;
+        right: 18px;
+    }
+}
+.show {
+    display:block;
+}
+.hide {
+    display: none;
+}

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

@@ -69,7 +69,7 @@ class Textarea extends Component {
         inpText:text.substr(0,config.limited),
         overFlag:true
       });
-      handleInput&&handleInput({text:text.substr(0,config.limited)});
+      handleInput&&handleInput({text:text.substr(0,config.limited).replace('<br>','')});
       return;
     }
     /*if(boxMark=='3'&&!hasMain){
@@ -81,8 +81,8 @@ class Textarea extends Component {
       overFlag:false
     })
 
-    //存值到store
-    handleInput&&handleInput({text});
+    //存值到store  FF26 会有一个<br>
+    handleInput&&handleInput({text:text.replace('<br>','')});
     //右侧推送--延时推送
     clearTimeout(stimer);
     let timer = setTimeout(function(){
@@ -103,7 +103,7 @@ class Textarea extends Component {
   }
   handleBlur(e){
     const {saveChronic} = this.props;
-    const text = e.target.innerText;
+    const text = e.target.innerText || e.target.innerHTML;
     getFeature(text).then((res)=>{
       if(res.data.code==0){
         const result = res.data.data;

+ 3 - 1
src/common/components/index.js

@@ -24,6 +24,7 @@ import DelToast from "./DelToast";
 import TailInlineTag from "./TailInlineTag";
 import Footer from "./Footer";
 import WrapModalContainer from "./WrapModalContainer";
+import SearchBox from "./SearchBox";
 
 module.exports = {
     Banner,
@@ -52,5 +53,6 @@ module.exports = {
     MiniToast,
     TailInlineTag,
     Footer,
-    WrapModalContainer
+    WrapModalContainer,
+    SearchBox
 };

BIN
src/common/images/addItem2.png


+ 8 - 3
src/common/less/variables.less

@@ -4,6 +4,7 @@
 @cyan: #00bcd4;
 @blue: #3B9ED0;
 @red:#ff0000;
+@extBlue:#71A9FE;
 @tab-color:#3B9ED0;
 
 @ipt-color:#E9F5FA;
@@ -139,7 +140,7 @@
    display: inline-block;
    position: relative;
   /* margin-right: 5px;*/
-   padding: 0 3px 3px 0;
+   padding: 0 3px 3px 2px;
    color: @placeholder-color;
   cursor: pointer;
   &:before{
@@ -165,7 +166,7 @@
   position: relative;
   /*margin-right: 5px;
   padding: 0 3px 0;*/
-  color: unset!important;
+  color: unset;
   border:none!important;
   &:before,&:after{
   content: ''!important;
@@ -176,7 +177,11 @@
 .hide{
   display: none!important;
 }
-
+.ellipsis {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
 .llStyle{
   box-shadow: 0 10px 20px 0 #989DA3;
   // filter:progid:DXImageTransform.Microsoft.Shadow(color='#989DA3',Direction=125,Strength=6);

+ 37 - 0
src/components/AddAssistCheck/AssistName/index.jsx

@@ -0,0 +1,37 @@
+import React, { Component } from "react";
+import styles from "../index.less";
+import $ from 'jquery';
+import { windowEventHandler } from '@utils/tools';
+
+class AssistName extends Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+
+		};
+		this.$assistName = React.createRef();
+		this.splitName = this.splitName.bind(this);
+	}
+	splitName(name){
+		let wid = this.props.winWidth;
+		if(name.length>15 && wid>1150){
+			let tmpStr = name.substr(0,15)
+			return tmpStr+'...'
+		}else{
+			return name
+		}
+	}
+	render() {
+		const { winWidth, name, getInfomation } = this.props;
+		return (
+				<span className={styles.assistName} style={{ width: winWidth < 1150 ? '120px' : 'auto' }} 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>
+					</span>
+				</span>
+		);
+	}
+}
+
+export default AssistName;

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

@@ -18,7 +18,10 @@ class Textarea extends Component {
   }
   handleInput(e){
     const {handleChangeAssistValue,idx,handlePush} = this.props;
-    const text = e.target.innerText || e.target.innerHTML;
+    const text = (e.target.innerHTML || e.target.innerText);
+    $(e.target).find('img').remove();
+    this.context.scrollArea.scrollBottom();       //避免滚动条上移不见
+    // e.target.innerHTML = e.target.textContent
     const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text,idx);
     //右侧推送--延时推送
@@ -80,4 +83,7 @@ class Textarea extends Component {
     );
   }
 }
+Textarea.contextTypes = {
+  scrollArea: React.PropTypes.object
+};
 export default Textarea;

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

@@ -1,7 +1,7 @@
 .divTextarea {
-  overflow-y: auto;
+  /*overflow-y: auto;*/
   overflow-x: hidden;
-  max-height: 100px;
+  /*max-height: 100px;*/
   border-bottom: 1px dashed #333;
   box-sizing: border-box;
   min-height: 21px;
@@ -14,6 +14,7 @@
   // z-index: 10;
   word-break: break-all;
   word-wrap:break-word;
+  padding-right: 6px;
 }
 .textWap {
   overflow: hidden;

+ 72 - 24
src/components/AddAssistCheck/index.jsx

@@ -3,6 +3,7 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
+import AssistName from './AssistName';
 import { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
 
@@ -27,6 +28,7 @@ class AddAssistCheck extends React.Component {
     this.handleCancel = this.handleCancel.bind(this)
     this.timeSure = this.timeSure.bind(this)
   }
+  
   componentDidMount() {
     $(document).click((event) => {
       let _con = $('#searchWrapAssist');   // 设置目标区域
@@ -35,24 +37,38 @@ class AddAssistCheck extends React.Component {
       let _del = document.getElementById("delBox");   // 删除弹窗
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
-      if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
-        if(this.state.show){
-          this.props.setHighter(48)
+      if(!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭)
+          if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+            if (this.state.show) {
+              this.props.setHighter(48)
+            }
+            this.setState({show: false});
+          }
+          if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
+            this.setState({date: false});
+          }
+          if($(event.target).attr("contenteditable")||event.target.textContent == '报告描述或意见'){
+            this.setState({date: false});
+          }
+        if(_del){
+          if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
+            this.setState({
+              visible: false,
+              id: null,
+              activeName:''
+            })
+          }
         }
-        this.setState({ show: false });
-      }
-      if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
-        this.setState({ date: false });
+        
       }
-      
-      if(_del){
-        if($(event.target).attr('id') != 'assiClose' &&!event.target.isEqualNode(_close) && !event.target.isEqualNode(_del)  && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)){
-          this.setState({
-            visible: false,
-            id: null,
-            activeName:''
-          })
-        }
+    });
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
       }
     });
     getCurrentDate(1);
@@ -169,6 +185,17 @@ class AddAssistCheck extends React.Component {
   getAssistLabel() {
     const { assistLabel,checkedListImport, handleChangeAssistValue, handleChangeDate, isRead, handlePush, winWidth,getInfomation,assistList } = this.props;
     const { visible,activeName,id,date } = this.state;
+    //出现滚动条时阻止滚动冒泡,未出现时不阻止,否则外部滚动条滚不动
+    const showedBar = $("#datePick .scrollbar-container").length===1;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'1',
+      width:'8px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    $(".TextareaRsize").css({marginTop:0})
     return <React.Fragment>
       {
         checkedListImport.map((part,index)=>{
@@ -176,14 +203,24 @@ 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.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
                     <span className={styles.tagSpan}>
                       {item.name}:
-                      <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                      <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                     </span>
-                  </span>
+                  </span> */}
+                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
                   <div className={styles.textareaWrap}>
-                    <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                    <ScrollArea speed={0.8}
+                                horizontal={false}
+                                stopScrollPropagation={showedBar?true:false}
+                                style={{maxHeight:'100px'}}
+                                className={styles["area"]}
+                                verticalContainerStyle={contStyle}
+                                verticalScrollbarStyle={barStyle}
+                                contentClassName="content">
+                      <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                    </ScrollArea>
                   </div>
                   <div className={styles.pointerFinger}>
                     <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
@@ -219,14 +256,25 @@ class AddAssistCheck extends React.Component {
               }
             }
             return (item.disabled?null:<li className={`${styles.assistLists} ${styles.clearfix}`}>
-              <span className={styles.assistName} style={{ width: winWidth < 1200 ? '120px' : 'auto' }}>
+              {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':(winWidth-987)+'px' }}> */}
+              {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
                 <span className={styles.tagSpan}>
                   {item.name}:
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
                 </span>
-              </span>
+              </span> */}
+              <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
               <div className={styles.textareaWrap}>
+                <ScrollArea speed={0.8}
+                            horizontal={false}
+                            stopScrollPropagation={showedBar?true:false}
+                            style={{maxHeight:'100px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content TextareaRsize">
                 <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
+                </ScrollArea>
               </div>
               <div className={styles.pointerFinger}>
                 <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
@@ -253,7 +301,7 @@ class AddAssistCheck extends React.Component {
           })
         }
       </ul>
-    </React.Fragment> 
+    </React.Fragment>
   }
   render() {
     const { handleChangeValue, list,assistVal,windowHeight,assistList, refreshScroller } = this.props;

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

@@ -105,7 +105,7 @@
     }
 
     .textareaWrap {
-      padding-right: 250px;
+      padding-right: 245px;
       width: 100%;
     }
   }

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

@@ -38,7 +38,7 @@ class SlideExcel extends Component {
         <span className={styles.excelDataTitle}>
           <span className={styles.tagSpan}>
             {item.menus}
-            <span className={styles.imgInfo} onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
+            <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: item.lisExcelItem[0].uniquemealName || '', type: 12, position: 1 })}></span>
           </span>
         </span>
         <table className={styles.table}>
@@ -47,7 +47,7 @@ class SlideExcel extends Component {
               <td style={{ width: '30%' }}>
                 <span className={styles.tagSpan}>
                   {value.itemName}
-                  <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                 </span>
               </td>
               <td style={{ width: '20%' }}>
@@ -66,7 +66,7 @@ class SlideExcel extends Component {
                 <td style={{ width: '30%' }}>
                   <span className={styles.tagSpan}>
                     {value.itemName}
-                    <span className={styles.imgInfo1} onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
+                    <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={() => getInfomation({ name: value.uniqueName || '', type: 12, position: 1 })}></span>
                   </span>
                 </td>
                 <td style={{ width: '20%' }}>

+ 1 - 0
src/components/AddInspect/SlideExcel/index.less

@@ -175,6 +175,7 @@
   }
 }
 .tagSpan {
+  display: inline-block;
   position: relative;
 }
 .tagSpan:hover {

+ 5 - 5
src/components/AddInspect/SlideSelect/index.jsx

@@ -121,20 +121,20 @@ class SlideSelect extends Component {
     const listLen = currentData.details&&currentData.details.length;
     const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
     return (
-      <li key={item.questionId} className={styles.slideLi}> 
+      <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
         {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
                 <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo1} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
                 <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
-                  <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
+                  <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
         }
@@ -156,7 +156,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -174,7 +174,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
+                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:val.uniqueName || '', position: 1, type: 12})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}

+ 1 - 0
src/components/AddInspect/SlideSelect/index.less

@@ -189,6 +189,7 @@
     background-size: 100% auto; 
   }
 .tagSpan {
+  display: inline-block;
   position: relative;
 }
 .tagSpan:hover {

+ 17 - 7
src/components/AddInspect/index.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { SearchOption, InspectCommon, Calendar, Notify, ConfirmModal, Add, DelToast } from '@commonComp';
 import SlideExcel from './SlideExcel';
 import SlideSelect from './SlideSelect';
-import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate,setPosition} from '@utils/tools';
+import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
 import styles from './index.less';
 import ScrollArea from 'react-scrollbar';
 import store from '@store';
@@ -88,7 +88,7 @@ class Inspect extends React.Component {
       let _impClose = $('#impClose')[0];         // 导入删除按钮
       let _addClose = $('#addClose')[0];         // 添加删除按钮
       let _closeTil = $('#delTit')[0];   // 弹窗标题
-      if (searchOption) {
+      if (searchOption&&!this.isBar) {//onMousedown的目标为滚动条时,添加弹窗不关闭
         if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
           if(this.state.show){
             this.props.setHighter(48)
@@ -96,7 +96,7 @@ class Inspect extends React.Component {
           this.setState({ show: false });
         }
       }
-      if (inspectFill) {
+      if (inspectFill&&!this.isBar) {//onMousedown的目标为滚动条时,子项弹窗不关闭
         if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
           if(this.state.showFill){
             this.props.setHighter(48)
@@ -105,7 +105,7 @@ class Inspect extends React.Component {
         }
       }
 
-      if (_del) {
+      if (_del&&!this.isBar) {//onMousedown的目标为滚动条时,删除弹窗不关闭
         if (!event.target.isEqualNode(_impClose) && !event.target.isEqualNode(_addClose) && !event.target.isEqualNode(_del) && event.target.parentNode != _del && !event.target.isEqualNode(_closeTil)) {
           this.setState({
             id: null,
@@ -114,6 +114,15 @@ class Inspect extends React.Component {
         }
       }
     });
+    const that = this;
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
+      }
+    });
     // this.setState({ dateTime: getCurrentDate(1) })
   }
   componentWillReceiveProps(nextProps) {
@@ -126,8 +135,7 @@ class Inspect extends React.Component {
     this.props.setHighter(48)
   }
   handleChangeDate(info) {
-    // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
-    let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')+' '+info.hour.toString().padStart(2,'0')+':'+info.minute.toString().padStart(2,'0')+':'+info.second.toString().padStart(2,'0');
+    let date = getCalendarDate(info);
     this.setState({ dateTime: date, date: false })
   }
   handleSearchShow(e) {
@@ -308,7 +316,9 @@ class Inspect extends React.Component {
   }
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
+    if(min == null&&max == null||min == undefined&&max == undefined||min == ''&&max == ''){
+      dom = getStatusImg(0, value, 1)
+    }else if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
       if (isNaN(value)) {//输入的不是数据
         dom = getStatusImg(1, value, 1)
       } else if (value <= min) {//下降

+ 3 - 3
src/components/Advice/Textarea/index.jsx

@@ -18,7 +18,7 @@ class Textarea extends Component {
   handleInput(e){
     e.stopPropagation();
     const {handleChangeAssistValue,idx,handlePush} = this.props;
-    const text =  e.target.innerHTML;
+    const text =  e.target.textContent.trim() ? e.target.innerHTML : ''
     const stimer = this.state.timer;
     handleChangeAssistValue&&handleChangeAssistValue(text);
    
@@ -57,13 +57,13 @@ class Textarea extends Component {
     return (
       <div>
         <div 
-            style={{outline: 'none'}}
+            style={{outline: 'none',minHeight:'20px'}}
             contenteditable={true}
             ref={this.$dom}
             onInput={this.handleInput}
             onKeyUp={this.handleInput}
             onkeydown={(e) => {e.stopPropagation()}}
-        ></div>
+        > </div>
       </div>
     );
   }

+ 2 - 2
src/components/AssessResult/ScaleItem/index.jsx

@@ -7,7 +7,7 @@ import level1 from "@common/images/级别1.png";
 import checkIcon from '@common/images/check.png';
 import {ComplexModal,MiniToast,Radio} from '@commonComp';
 import Notify from '@commonComp/Notify';
-import {deepClone} from '@utils/tools';
+import {deepClone,preventDefault} from '@utils/tools';
 import { getFormulaResult } from '@store/async-actions/fetchModules'
 /**
  * 来源于页面选择
@@ -79,7 +79,7 @@ class ScaleItem extends Component {
   handleReg(e){   //只能输入数字和特殊符号
     const key = e.key;
     if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-      e.preventDefault();
+      preventDefault(e);
     }
   }
   handleInputformula(id,calcuContent,i,e) {

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

@@ -10,7 +10,6 @@ import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
 import { host, prefix } from '@utils/config.js';
 
-
 class AssistCheck extends React.Component {
   constructor(props){
         super(props);
@@ -30,7 +29,7 @@ class AssistCheck extends React.Component {
         this.closeInIcss=this.closeInIcss.bind(this)
         this.onClose=this.onClose.bind(this)
         this.handleImportExcel=this.handleImportExcel.bind(this)
-    this.refreshScroller = this.refreshScroller.bind(this);
+        this.refreshScroller = this.refreshScroller.bind(this);
     }
     handleImportExcel() {
       this.inputRef.click();
@@ -115,7 +114,7 @@ class AssistCheck extends React.Component {
                     marginTop={'20px'}
                 >
                     <div style={{padding:'10px',boxSizing:'border-box'}} >
-                        <AddAssistCheck 
+                        <AddAssistCheck
                             handleChangeValue={handleChangeValue}
                             refreshScroller={this.refreshScroller}
                             list={list}

+ 3 - 1
src/components/CheckBody/index.jsx

@@ -60,7 +60,9 @@ class CheckBody extends Component{
     if(showData){
       list = showData;
       arr = list.map((it,i)=>{
-        return chooseType({item:it,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
+        const preIsExt = list[i-1]&&list[i-1].specFlag===4?true:false;//前一个标签是否为体征标签
+        const afterIsExt = list[i+1]&&list[i+1].specFlag===4?true:false;//后一个标签是否为体征标签
+        return chooseType({item:it,preIsExt,afterIsExt,boxMark,i,showArr,saveText,selecteds,importLabel,setHighter});
       });
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮

+ 13 - 12
src/components/ChronicInfo/index.jsx

@@ -12,6 +12,7 @@ import infoShow from '@common/images/info-show.png';
 import infoMove from '@common/images/info-move.png';
 import ScaleTable from '@containers/ScaleTable';
 import {deepClone} from '@utils/tools';
+import className from 'classnames';
 import $ from 'jquery';
 import config from '@config/index';
 
@@ -148,7 +149,8 @@ class ChronicInfo extends React.Component{
     const {showHide} = this.props;
     if(!showHide.isPop){
       //量表结果,判断需要计算并且dom中有值才能加入病例记录
-      const res = this.$result.current&&this.$result.current.innerText;
+      // innerHTML 兼容FF26
+      const res = this.$result.current&&(this.$result.current.innerText||this.$result.current.innerHTML);
       if(!isClose&&(this.$result.current&&!res)){
         Notify.info("请先计算量表结果!");
         return ;
@@ -230,13 +232,6 @@ class ChronicInfo extends React.Component{
     this.closeFormula(it);
     chronicMagItem&&this.handleAddAssessItem(v,pIndex,i);
   }
-  handleReg(e){   //只能输入数字和特殊符号
-    //const hasDot = e.target.value.indexOf('.')!=-1;
-    // const key = e.key;
-    // if(key!='Backspace'&&((/[^\d|.\/%*~]/.test(key)))){
-    //   e.preventDefault();
-    // }
-  }
   handleInputformula(id,calcuContent,i,e) {
     const {calcuValues} = this.state;
     let obj = deepClone(calcuValues);
@@ -366,7 +361,12 @@ class ChronicInfo extends React.Component{
   getDetail(){
     const {data,formulaResult,calcuResult,chronicMagItem} = this.props;
     const {formulaId,optionId,possible,radioVal,calcuValues,currentIndex,hasEnterImg} = this.state;
+    /*let names = [];*/
     let list = data&&data.map((v,i)=>{
+                    /*if(this.getCritical(v)&&names.includes(v.name)){    //重复项
+                      return '';
+                    }
+                    names.push(v.name);*/
                     return <div className={style["list"]}>
                       {v.name?<p>
                                 {this.getCritical(v) ? '':<span>患者可能有</span>}
@@ -377,6 +377,7 @@ class ChronicInfo extends React.Component{
                                 >
                                   {v.name}
                                   {this.getCritical(v)?'':<img className={style['info-img']}
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === i  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === i ?(hasEnterImg ? infoMove : infoShow ): infoShow}
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}
@@ -442,7 +443,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} onKeyDown={this.handleReg.bind(this)} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
+                                          {item.isShow == '0' ? item.value + ' ' +item.uint : <input type="text" className={style['itemInp']} placeholder="请输入"  value={item.value} onInput={this.handleInputformula.bind(this,v.conceptId,details,idd)}/>}
                                         </td>
                                         <td>
                                           {item.isShow != '0'&&<span>{item.uint}</span>}
@@ -499,7 +500,7 @@ class ChronicInfo extends React.Component{
                         }
                       })}
                     </div>
-                  })
+                  });
     return list;
   }
   componentWillReceiveProps(next){
@@ -542,10 +543,10 @@ class ChronicInfo extends React.Component{
                                 handleConfirm={this.comfirnTable}/>;
     if(data&&data.length>0){
       return <div className={style["tips"]} style={{marginBottom:'15px'}}>
-        <div className={`${style["tips-title"]} ${style["chronic"]}`} onClick={this.slideToggle}>
+        <div className={className(style["tips-title"],style["chronic"],"clearfix")} onClick={this.slideToggle}>
           <div className={style["tips-name"]}>
             <img src={chronicPic} />
-            <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}<span className={style["redTips"]}>(页面信息有更新可能影响评估结果)</span></h2>
+            <h2>{chronicMagItem&&chronicMagItem.name||chronicDesease&&chronicDesease.name||'病情提示'}<span className={style["redTips"]}>(根据病人病历情况进行的动态提示和评估)</span></h2>
           </div>
           <div className={style['toggle-btn']}>
             <img src={slideUp?down:up} alt="展开/收起"/>

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

@@ -13,7 +13,8 @@
     background: rgba(242,150,91,0.1);
     .tips-name{
       width: 238px;
-      display: inline-block;
+      float: left;
+      /*display: inline-block;*/
       img {
         float:left;
         margin-top: 0px;
@@ -49,7 +50,7 @@
       }
     }
     .toggle-btn{
-      display: inline-block;
+      /*display: inline-block;*/
       float: right;
       cursor: pointer;
     }

+ 32 - 27
src/components/CommonSymptom/index.jsx

@@ -22,9 +22,11 @@ class CommonSymptom extends Component{
       hide:false,
       conceptId:[]
     }
+    this.div = React.createRef();
     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'];
@@ -32,7 +34,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
@@ -70,7 +72,7 @@ class CommonSymptom extends Component{
     return '';
   }
   handleClear(e){
-    e.stopPropagation();
+    // e.stopPropagation();
     this.setState({
       select:[],
       ids:[],
@@ -78,32 +80,35 @@ class CommonSymptom extends Component{
     })
   }
   handleConfirm(e){
-    e.stopPropagation();
+    // e.stopPropagation();
     const {onSelect} = this.props;
     const {select,ids,conceptId} = this.state;
     onSelect&&onSelect({select,ids,conceptId});
   }
 
-  componentDidMount(){
-    $(document).click((e)=>{     
-      let itemBox = $('#mainSuit')[0];
-      let divBox = $('#symptBox')[0];
-      let listBox = $('#listBox')[0];
-      let hisBox = $('#his')[0];
-      let operBox = $('#oper')[0];
-      if(e.target != itemBox && e.target.parentNode != divBox && e.target.parentNode != listBox && e.target.parentNode != hisBox && e.target.parentNode != operBox && e.target != divBox ){
-        this.setState({
-          hide:true,
-          select:[],
-          ids:[],
-          conceptId:[]
-        })
-      }else{
-        this.setState({
-          hide:false
-        })
-      }
-    })
+  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(){ 
@@ -111,9 +116,9 @@ class CommonSymptom extends Component{
     const {hide} = this.state;
     const mainSymp = storageLocal.get('mainSymp');
     const mainHis = mainSymp?JSON.parse(mainSymp).reverse():[];
-    return <div className={this.getClass()} contenteditable="false" id="symptBox" style={{'display':hide?'none':'block'}}>
-      <ul className={style["listBox"]} id="listBox">
-        {mainHis.length>0?<ul className={style["his"]} id="his">
+    return <div className={this.getClass()} contenteditable="false" style={{'display':hide?'none':'block'}} ref={this.div} onClick={this.handleOuter}>
+      <ul className={style["listBox"]}>
+        {mainHis.length>0?<ul className={style["his"]}>
           <p>最近输入症状:</p>
           {mainHis.map((it)=>{
             return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
@@ -124,7 +129,7 @@ class CommonSymptom extends Component{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
         })}
       </ul>
-      <div className={style['oper']} id="oper">
+      <div className={style['oper']}>
         <span className={style['clear']} onClick={this.handleClear}>清空选项</span>
         <span className={style['confirm']} onClick={this.handleConfirm}>确定</span>
       </div>

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

@@ -10,7 +10,7 @@
     text-align: center;
   }
     .copy{
-      padding: 10px 20px 20px 20px;
+      padding: 10px 20px 10px 20px;
       font-size: 12px;
       span {
         border: 1px solid #f00;

+ 10 - 8
src/components/DiagResultSearch/index.jsx

@@ -23,20 +23,22 @@ class DiagResultSearch extends Component {
       var addDiag = $('#addDiag')[0];
       var confirm = $('#confirm')[0];
       if (diagSearch) {
-        if (confirm) {
-
-        } else {
+        if (!confirm&&!that.isBar) {//onMousedown的目标为滚动条时,删除弹窗不关闭
           if (e.target != diagSearch && e.target != addDiag && e.target.parentNode != addDiag && !$.contains(diagSearch, e.target)) {
             that.props.hideSearch();
             that.props.setHighter(48)
           }
-
-
         }
-
       }
-
-    })
+    });
+    document.addEventListener('mousedown',function(e){
+      //onMousedown的目标为滚动条时,标签填写单不关闭
+      if(e.target.className=='scrollbar'){
+        that.isBar = true;
+      }else{
+        that.isBar = false;
+      }
+    });
   }
 
   getSearchList(searchResult) {

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

@@ -102,14 +102,15 @@ class DiagnosticItem extends Component{
         const { visible,hasEnterItem,hasEnterImg } = this.state
         const { item, title, type } = this.props
         return (<span className={style['diag-item']} >
-                    <span className={`${style['diag-name']} ${type == 'search' ? style['diag-name-search'] : ''}`} 
+                    <span className={`${style['diag-name']}`} 
                           title = {title && item.name + (item.showType === 2 || item.showType === 3 ? '('+ item.retrievalName+')': '')}
                           onMouseEnter={this.handleMouseEnterDrug.bind(this)}
                           onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
                           onClick={() =>{this.chooseDiagodal(item)}}
                           >
-                        {item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}
+                        <p className={`${style['diag-name-box']} ${type == 'search'?style['diag-name-search']:style['diag-name-disSelect']}`}>{item.name} {item.retrievalName ? '('+ item.retrievalName+')': ''}</p>
                         {type== 'disSelect' &&<img className={style['info-img']}  
+                                title='点击i图标可查看详细说明'
                                 style ={hasEnterItem  ? {display: "inline-block"} : {display: "none"}}
                                 src={hasEnterImg ? infoMove : infoShow} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}

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

@@ -1,9 +1,9 @@
 .confirm-info {
-    height: 70px;
+    min-height: 70px;
     font-size: 16px;
-    line-height: 16px;
+    line-height: 20px;
     text-align: center;
-    padding: 10px 30px;
+    padding: 10px 20px 20px;
 }
 .diag-item {
     display: inline-block;
@@ -14,6 +14,18 @@
     text-overflow: ellipsis;
     white-space: nowrap;
 }
+.diag-name-box {
+    display: inline-block;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.diag-name-search {
+    max-width: 250px;
+}
+.diag-name-disSelect {
+    max-width: 340px;
+}
 .diag-name {
     position: relative;
     display: inline-block;

+ 47 - 7
src/components/DiagnosticList/index.jsx

@@ -5,6 +5,8 @@ import del_on from './img/delete-on.png'
 import diagUp from './img/diagUp.png'
 import diagDown from './img/diagDown.png'
 import manageIcon from '@common/images/manage.png';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
 import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
 import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
@@ -35,7 +37,9 @@ class DiagnosticList extends Component {
             isAssessConfirm:false,
             hasOndel: false,
             hasOnIndex: -1,
-            activeItem:{}
+            activeItem:{},
+            hasEnterItem: -1,
+            hasEnterImg: false
         }
         this.deleteItem = this.deleteItem.bind(this);
         this.cancel = this.cancel.bind(this);
@@ -103,10 +107,10 @@ class DiagnosticList extends Component {
             treatTitle: item.name
         })
     } 
-    handleClickDiag(item) {
+    handleClickDiag(item,noTips,noDetails,noNotify) {
         const { getTips } = this.props;
         // getTips && getTips(item);
-        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1});
+        getTips && getTips({id:item.conceptId, type:7, name: item.name, position: 1},noTips,noDetails,noNotify);
     }
     referRecord() {
         const { hideReferRecord, showHistoryCaseModal ,chronicMagItem,hisTemplates,autoFillModules,typeConfig} = this.props;
@@ -237,6 +241,7 @@ class DiagnosticList extends Component {
         this.props.getBilling();
       }
     }
+   
     handleEnterDel(index) {
       this.setState({
         hasOnIndex: index,
@@ -249,9 +254,29 @@ class DiagnosticList extends Component {
         hasOndel: false
       })
     }
+    handleMouseEnterDrug(index) {
+      this.setState({
+          hasEnterItem: index, 
+      })
+    }
+    handleMouseLeaveDrug() {
+      this.setState({
+          hasEnterItem: -1, 
+      })
+    }
+    handleMouseEnterImg() {
+      this.setState({
+        hasEnterImg: true
+      })
+    }
+    handleMouseLeaveImg() {
+      this.setState({
+        hasEnterImg: false
+      })
+    }
     render(){
-        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller} = this.props;
-        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex} = this.state;
+        const { list, treatment, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth} = this.props;
+        const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg} = this.state;
         const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
         let isChronic = false;      //是否要显示管理评估
         const footer = <Footer print={true}
@@ -264,11 +289,26 @@ class DiagnosticList extends Component {
                         const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
                            || (item.drugHistory && item.drugHistory['慢病用药内容'] &&  item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] &&  item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
                         isChronic = chronicMagItem&&item.type==2&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
-                        return (<div draggable={true} className={style['diag-box'] + ' clearfix'}  key={item.conceptId} >
+                        return (<div draggable={true} className={style['diag-box'] + ' clearfix'} id="diagListBox" key={item.conceptId} >
                                     {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
                                     {list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
                                     <span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
-                                    <span className={style['diag-name']} onClick={()=>{this.handleClickDiag(item)}}>{item.name}<span></span></span> 
+                                    <span className={style['diag-name']} 
+                                       onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
+                                       onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                                    >
+                                      <span   className={style['diag-name-box']} style={{maxWidth: windowWidth > 1024 ?windowWidth-900 +'px':'130px'}} onClick={this.handleClickDiag.bind(this,item,false,true,false)}>
+                                        {item.name}
+                                      </span>
+                                      <img className={style['info-img']}  
+                                          title='点击i图标可查看详细说明'
+                                          style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
+                                          src={hasEnterImg ? infoMove : infoShow} 
+                                          onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                                          onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
+                                          onClick={this.handleClickDiag.bind(this,item,false,false,false)}
+                                      />
+                                    </span> 
                                     {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>}
                                     <span className={style['treat']}
                                           // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}

+ 16 - 0
src/components/DiagnosticList/index.less

@@ -50,6 +50,7 @@
 
 
 .diag-name {
+   
     margin-left: 10px;
     border-bottom: 1px solid #666;
     box-sizing: border-box;
@@ -58,6 +59,12 @@
     font-weight: bold;
     cursor: pointer;
 }
+.diag-name-box {
+    .ellipsis;
+    display: inline-block;
+    line-height: 16px;
+    // max-width: 220px;
+}
 
 .diag-up, .diag-down {
     position: relative;
@@ -167,4 +174,13 @@
             margin-right: 5px;
         }
     }
+}
+.info-img {
+    position: absolute;
+    width: 15px;
+    top: -14px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+    z-index: 2;
 }

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

@@ -79,5 +79,4 @@ class EMRContainer extends Component {
         </div>
     }
 }
-
 export default EMRContainer;

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

@@ -49,6 +49,7 @@
     vertical-align: top;
     position: relative;
     padding-top: 57px;
+    padding-bottom:70px;
     .no-data{
       font-size: 18px;
       position: absolute;

+ 1 - 0
src/components/EmergencyProcedure/EmergencyModal/index.less

@@ -49,6 +49,7 @@
     background-color: #fff;
     box-shadow: 0 10px 20px 0 #989DA3;
     border: 1px solid #dedede;
+    z-index: 1;
     i {
       width: 0;
       height: 0;

+ 2 - 2
src/components/EmergencyProcedure/EmergencyPart/PartSec/index.jsx

@@ -91,7 +91,7 @@ class PartSec extends React.Component{
             <img src={down} alt=""/>
           </div>
           <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-            <span>穿刺分析对症治疗</span>
+            <span>穿刺分析对症治疗</span>
           </div>
           <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
             <img src={down} alt=""/>
@@ -125,7 +125,7 @@ class PartSec extends React.Component{
             <img src={down} alt=""/>
           </div>
           <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-            <span>穿刺分析对症治疗</span>
+            <span>穿刺分析对症治疗</span>
           </div>
           <div className={`${styles.goDownPub} ${styles.goDownImg}`}>
             <img src={down} alt=""/>

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

@@ -396,7 +396,7 @@ class PartTrd extends React.Component {
                       <img src={down} alt="" />
                     </div>
                     <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-                      <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
+                      <span>{'排除禁忌后考虑立即溶栓(D-B <30min)'}</span>
                     </div>
                     <br />
                     <br />
@@ -443,7 +443,7 @@ class PartTrd extends React.Component {
                         <img src={down} alt="" />
                       </div>
                       <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-                        <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
+                        <span>{'排除禁忌后考虑立即溶栓(D-B <30min)'}</span>
                       </div>
                       <br />
                       {/* <div className={styles.line}></div>
@@ -538,7 +538,7 @@ class PartTrd extends React.Component {
                           <img src={down} alt="" />
                         </div>
                         <div className={`${styles.goDownPub} ${styles.goDownB}`}>
-                          <span>{'排除禁忌后考虑立即溶栓(D-D <30min)'}</span>
+                          <span>{'排除禁忌后考虑立即溶栓(D-B <30min)'}</span>
                         </div>
                         <br />
                         {/* <div className={styles.line}></div>
@@ -605,7 +605,7 @@ class PartTrd extends React.Component {
   }
   render() {
     const { idx, num ,trdNum } = this.props
-    console.log(idx, num ,trdNum)
+    // console.log(idx, num ,trdNum)
     return <div className={`${styles.partTrd} ${styles.partPub}`}>
       {
         idx == 3 && num == 1 ? <React.Fragment>

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

@@ -95,7 +95,7 @@ let data = [
                     link:''
                   },
                   {
-                    message:'穿刺分析对症治疗',
+                    message:'穿刺分析对症治疗',
                     text:'肺栓塞救治流程',
                     link:''
                   },
@@ -125,7 +125,7 @@ let data = [
                     link:''
                   },
                   {
-                    message:'穿刺分析对症治疗',
+                    message:'穿刺分析对症治疗',
                     text:'',
                     link:''
                   },
@@ -157,7 +157,7 @@ let data = [
         checks:'听诊呼吸音是否减弱或消失',
       },
       step2:{//步骤2
-        waring:'进行全血细胞计数+血型鉴定、术前免疫、凝血功能、肺部B超、X线或者CT检查',
+        waring:'进行全血细胞计数+血型鉴定、术前免疫、凝血功能、肺部B超、胸部X线或者胸部CT检查',
         tips:'',
         select:['胸外科会诊'],//按钮
         items:[

+ 0 - 3
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -65,9 +65,6 @@ class HistoryCaseContainer extends React.Component {
         //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
         //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
         store.dispatch(getHistempDetail(activeHis));
-        if(didPushParamChange()){
-          store.dispatch(billing());
-        }
         const {handleQuoteClick} = this.props;
         handleQuoteClick&&handleQuoteClick();
         dragBox('hisWrapMove','closeHis','del');

+ 2 - 0
src/components/HistoryCaseContainer/HistoryList/index.less

@@ -11,6 +11,7 @@
     height: 86%;
     background-color: #fff;
     overflow: hidden;
+    // padding-bottom:20px;
     .close {
         position: absolute;
         top: 0;
@@ -105,6 +106,7 @@
         overflow: auto;
         height: 100%;
         padding-top: 40px;
+        padding-bottom:20px;
         // top: 42px;
 
         float: left;

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

@@ -16,7 +16,7 @@ class HistoryCaseContainer extends React.Component {
         const { visible,showHistoryCases,showHistoryBox,items,handleCaseClick,handleQuoteClick,handleSortClick,activeHistory,preInfo } = this.props;
         const domNode = document.getElementById('root');
         return ReactDom.createPortal(
-              showHistoryCases?<div className={styles.historyCaseWrap}>
+              showHistoryCases?<React.Fragment>
                 <div className={styles.maskHistory} onClick={this.showHistoryBox}></div>
                 <HistoryList 
                     items={items}
@@ -28,7 +28,7 @@ class HistoryCaseContainer extends React.Component {
                     handleSortClick={handleSortClick}
                     preInfo={preInfo}
                 ></HistoryList>
-            </div>:null
+            </React.Fragment>:null
         ,domNode)
     }
 }

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

@@ -115,6 +115,9 @@ class MainSuit extends Component{
       return
     }
     if(datas.length==0){//没有使用模板时点击搜索结构要展开模板
+      // FF26 清空输入的值 bug2283
+      const mainBox = document.getElementById('mainSuit');
+      mainBox.innerHTML = "";
       insertSearch &&insertSearch({item,span});
       this.setState({
         search: false,
@@ -159,7 +162,8 @@ class MainSuit extends Component{
         return
       }
       ev.target.blur();
-      ev.target.innerText?(ev.target.innerText = data.substr(0,config.limited)):(ev.target.innerHTML = data.substr(0,config.limited));  //输入法内输入多个字再按enter的情况
+      // ev.target.innerText?(ev.target.innerText = data.substr(0,config.limited)):(ev.target.innerHTML = data.substr(0,config.limited));  //输入法内输入多个字再按enter的情况
+      //console.log(333,data,ev)
       // ev.target.blur();
       this.setState({
         inpText:data.substr(0,config.limited),
@@ -182,7 +186,8 @@ class MainSuit extends Component{
       const timer = setTimeout(function(){
         pushMessage && pushMessage(data);
         //调搜索接口 使用模板走EditableSpan里的搜索方法
-        getSearchData && getSearchData({inpStr:data,boxMark:1,itemType:0});
+        // FF26 会多一个<br>
+        getSearchData && getSearchData({inpStr:data.replace('<br>',''),boxMark:1,itemType:0});
       },config.delayTime);
       this.setState({
         symptom:false,
@@ -231,10 +236,10 @@ class MainSuit extends Component{
     const {freeText,saveText,datas,clearSearch,getSymptomFeature,currentData,saveChronic} = this.props;
     const that = this;
     let data = this.state.inpText;
-    const inner = e.target.innerText;
+    const inner = e.target.innerText || e.target.innerHTML ;
     //分词-现病史没有模板的时候才去获取
     if(inner.trim() && currentData&&currentData.length==0){
-      getFeature(inner).then((res)=>{
+      getFeature(inner.replace('<br>','')).then((res)=>{
         if(res.data.code==0){
           const result = res.data.data;
           // 慢病
@@ -250,12 +255,13 @@ class MainSuit extends Component{
       })
     }
     if(!isIE()){
-      inner?(e.target.innerText=""):(e.target.innerHTML="")
-      freeText && freeText(data.trim());
+      // inner?(e.target.innerText=""):(e.target.innerHTML="")
+      e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="");
+      freeText && freeText(data.trim().replace('<br>',''));
     }else{
       if(datas.length==0){
         const ev = e || window.event;
-        const data = ev.target.innerText;
+        const data = ev.target.innerText || ev.target.innerHTML;
         // freeText && freeText(data.trim());
         freeText && freeText(data);
       }

+ 8 - 7
src/components/MedicalInfo/index.jsx

@@ -8,7 +8,7 @@ class MedicalInfo extends Component {
         super(props);
         this.$inp = React.createRef();
         this.$cont = React.createRef();
-      this.$ul = React.createRef();
+        this.$ul = React.createRef();
         this.state={
           val:'',
           hasSearch: false,
@@ -25,7 +25,7 @@ class MedicalInfo extends Component {
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+            that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
@@ -62,6 +62,7 @@ class MedicalInfo extends Component {
         hasSearch: false,
         msg: '',
       });
+      
       clearResult && clearResult();
     }
   }
@@ -78,18 +79,19 @@ class MedicalInfo extends Component {
         hasSearch: false,
         msg:''
       });
+      this.$inp.current.focus();
       clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });
@@ -105,9 +107,8 @@ class MedicalInfo extends Component {
         return (
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
-                <p className={style['title']}>医学知识搜索</p>
                 <p className={style['cont']}>
-                  <input type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
+                  <input placeholder="医学知识搜索" 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>

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

@@ -56,7 +56,7 @@
         border: none;
     }
     .result{
-        margin-top:78px;
+        margin-top:46px;
         padding: 0 5px 0 0;
         height: 100%;
         box-sizing: border-box;

+ 84 - 6
src/components/MultSpread/index.jsx

@@ -6,6 +6,7 @@ import RadioInpDrop from "@containers/RadioInpDrop";
 import InlineTag from '@containers/InlineTag';
 import Multiple from '@containers/Multiple';
 import addIcon from '@images/addItem.png';
+import addIcon1 from '@images/addItem2.png';
 import style from "./index.less";
 import tools from '@utils/tools';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
@@ -33,8 +34,16 @@ class MultSpread extends Component{
   constructor(props){
     super(props);
     this.state = {
-      numDoms:[]
+      numDoms:[],
+      tall:0,       //升高
+      weight:0,     //体重
+      bmi:'',        //BMI
+      wrBmi:false,      //是否无效bmi值,是则要清空身高体重,不能用判断bmi是否为空来判断,因为初始就是为空
     };
+    this.setBMIParam = this.setBMIParam.bind(this);
+    this.setBMI = this.setBMI.bind(this);
+    this.isBMIUseable = this.isBMIUseable.bind(this);
+    this.setBMIstate = this.setBMIstate.bind(this);
   }
   getClass(){
     const {saveText,ikey,showAdd} = this.props;
@@ -70,8 +79,64 @@ class MultSpread extends Component{
     const doms = this.state.numDoms;
     doms[i+1]&&this.moveEnd(doms[i+1].current)
   }
+  isBMIUseable(name,val){
+    const {tall,weight} = this.state;
+    //身高不能为0,否则分母为0,身高体重任何一个为空,则BMI清空
+    if((name==='tall'&&(!val||!weight))||(name==='weight'&&(!tall||!val))){
+      return false;
+    }
+    return true;
+  }
+  setBMIParam(name,val){        //设置bmi相关数据,身高、体重
+    const {tall,weight} = this.state;
+    const useable = this.isBMIUseable(name,val);
+    this.setState({
+      [name]:val
+    });
+    if(useable){
+      const result = name==='tall'?weight/Math.pow(val/100,2):val/Math.pow(tall/100,2);
+      this.setState({
+        bmi:result.toFixed(1),
+        wrBmi:false
+      })
+    }else{
+      this.setState({
+        bmi:'',
+        wrBmi:false
+      })
+    }
+  }
+  setBMI(val){
+    //手动修改BMI赋值,且身高体重清空
+    if(val===this.state.bmi){     //聚焦但未修改时
+      return ;
+    }
+    this.setState({
+      bmi:val,
+      wrBmi:true,
+      tall:0,
+      weight:0
+    });
+  }
+  setBMIstate(item){
+    //回读时bmi相关state赋值
+    const map={
+      BMI_SG:'tall',
+      BMI_TZ:'weight',
+      BMI_RES:'bmi',
+    };
+    const st = this.state;
+    const key = map[item.formulaCode];
+    //回读BMI相关项有值时,state赋值
+    if(key&&st[key]!==item.value){
+      this.setState({
+        [key]:item.value
+      });
+    }
+  }
   getLabels(){
-    const {data,ikey,showArr,copyId,selecteds,boxMark} = this.props;
+    const {data,ikey,showArr,copyId,selecteds,boxMark,isExtBlue} = this.props;
+    const {wrBmi,bmi} = this.state;
     let show = false;
     let inx = '',count=0;
     const list = data.map((it,i)=>{
@@ -84,6 +149,7 @@ class MultSpread extends Component{
           const list = it.questionDetailList&&it.questionDetailList.length>0?it.questionDetailList:it.questionMapping;
           return <RadioDrop data={list}
                             boxMark={boxMark}
+                            isExtBlue={isExtBlue}
                             placeholder={it.name}
                             show={show}
                             value = {it.value}
@@ -96,6 +162,7 @@ class MultSpread extends Component{
           return <Multiple data={dataList}
                            ikey={inx}
                            placeholder={it.name}
+                           isExtBlue={isExtBlue}
                            value={it.value}
                            copyType={it.copyType}
                            selecteds={selecteds ?selecteds[i]:[]}
@@ -109,6 +176,7 @@ class MultSpread extends Component{
                                suffix={it.labelSuffix}
                                placeholder={it.name}
                                boxMark={ikey.substr(0,1)}
+                               isExtBlue={isExtBlue}
                                id={it.id}
                                show={show}
                                ikey={inx}
@@ -119,18 +187,26 @@ class MultSpread extends Component{
           return <InlineTag prefix={it.labelPrefix}
                             suffix={it.labelSuffix}
                             placeholder={it.name}
+                            isExtBlue={isExtBlue}
                             value={it.value}
                             id={it.id}
                             ikey={inx} hideTag={true}></InlineTag>;
         case +it.controlType===7:
           const min = it.minValue;//!=null&&it.minValue!=undefined?it.minValue-1:undefined;
           const max = it.maxValue;//!=null&&it.maxValue!=undefined?+it.maxValue+1:undefined;
+          this.setBMIstate(it);
           return <NumberDrop prefix={it.labelPrefix}
                              suffix={it.labelSuffix}
                              placeholder={it.name}
+                             isExtBlue={isExtBlue}
                              //inputRef = {this['$inp'+(count++)]}
                              saveDoms={this.saveDoms.bind(this)}
                              reFocus={this.setNextFocus.bind(this)}
+                             setBMI={this.setBMI}
+                             formulaCode={it.formulaCode}
+                             wrBmi={wrBmi}
+                             bmi={bmi}
+                             setBMIParam={this.setBMIParam}
                              num = {count++}
                              min={min}
                              max={max}
@@ -148,6 +224,7 @@ class MultSpread extends Component{
                              show={showArr&&showArr[inx]}
                              value = {it.value}
                              boxMark={boxMark}
+                             isExtBlue={isExtBlue}
                              id={it.id}
                              ikey={inx}
                              hideTag={true}></RadioInpDrop>;
@@ -168,21 +245,22 @@ class MultSpread extends Component{
     }
   }
   getContClass(){
-    const {isImports,ikey,saveText} = this.props;
+    const {isImports,ikey,saveText,isExtBlue} = 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);
+    return classNames(orgBorder,ext);
   }
   render(){
-    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix} = this.props;
+    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue} = this.props;
     return (<div className={this.getContClass()}
                  style={{display:'inline-block'}}>
       {textPrefix?<span>{textPrefix}</span>:''}
       <div className={this.getClass()}>
       {this.getLabels()}
       {textSuffix?<span>{textSuffix}</span>:''}
-      {showAdd?<img src={addIcon} alt="添加血压项"
+      {showAdd?<img src={isExtBlue?addIcon1:addIcon} alt="复制该项"
                     className={style['add-icon']}
                     onClick={()=>addLabelItem({ikey,copyId})}/>:''}
     </div>

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

@@ -1,6 +1,10 @@
 @import "~@less/variables.less";
+.ext>div{
+    color: @extBlue;
+}
 .container{
   .tag;
+  padding: 0 3px 0 2px;
   cursor: unset;
 }
 .cont{

+ 3 - 2
src/components/Multiple/index.jsx

@@ -37,8 +37,9 @@ class Multiple extends react.Component{
   }
 
   getClass(){
-    const {show,value,hideTag,isImports} = this.props;
+    const {show,value,hideTag,isImports,isExtBlue} = this.props;
     const orgBorder = isImports&&!value?style['orange-border']:'';
+    const ext = isExtBlue?style['ext']:'';
     if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
@@ -47,7 +48,7 @@ class Multiple extends react.Component{
     if(value){
       return hideTag?classNames(style['hide-tag'],orgBorder):classNames(style['selected-tag'],orgBorder);
     }
-    return hideTag?'':classNames(style['tag'],orgBorder);
+    return hideTag?'':classNames(style['tag'],orgBorder,ext);
   }
 
   getListClass(){

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

@@ -9,6 +9,9 @@
 .tag,.selected-tag{
   cursor: pointer;
   line-height: 20px;
+  &.ext{
+    color: @extBlue!important;
+  }
 }
 
 .selected-tag{
@@ -21,4 +24,7 @@
   padding: 0;
   color: @text-color;
   line-height: 22px;
+  &.ext{
+    color: @extBlue;
+  }
 }

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

@@ -17,6 +17,7 @@ class NumberDrop extends Component{
     super(props);
     this.state={
       /*editable:false,      //标签是否可输入*/
+      value:props.value||'',
       timer:null,
       sltTimer:null,
       blurTimer:null,
@@ -30,13 +31,14 @@ class NumberDrop extends Component{
     this.handleNumFocus = this.handleNumFocus.bind(this);
     this.handleKeyDowm = this.handleKeyDowm.bind(this);
     this.beyondArea = this.beyondArea.bind(this);
+    this.emitBMIData = this.emitBMIData.bind(this);
   }
   select(text){        //选中键盘上数字事件
     //placeholder修改后,第一次点击键盘触发blur后onClick不触发,原因未知,改为onMouseup可触发
     let timer = null;
     clearTimeout(this.state.sltTimer);
     clearTimeout(this.state.blurTimer);
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,formulaCode} = this.props;
     const needCompare=min!=undefined&&max!=undefined;
     if(!text){
       this.setState({
@@ -62,26 +64,45 @@ class NumberDrop extends Component{
       });
     }
 
-    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText,formulaCode});
+    //BMI相关数据上传
+    this.emitBMIData(text);
+  }
+  emitBMIData(text){
+    //手动修改BMI相关值时数据上传
+    const {setBMIParam,formulaCode,setBMI} = this.props;
+    if(formulaCode==="BMI_RES"){
+      setBMI&&setBMI(text);
+    }
+    if(text!==0&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
+      const map={
+        BMI_SG:'tall',
+        BMI_TZ:'weight'
+      };
+      setTimeout(function(){
+        setBMIParam&&setBMIParam(map[formulaCode],text);
+      });
+    }
   }
   beyondArea(){
-    const {handleSelect,ikey,suffix,prefix,mainSaveText} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,formulaCode} = this.props;
     Notify.info("输入数值不符合规范,请重新输入!");
-    handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText});
+    handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText,formulaCode});
+    this.emitBMIData('');
     this.setState({
       placeholder:this.props.placeholder,
       hasSelect:false
     });
   }
-  handleNumFocus(e){       //数字框可编辑状态下聚集事件,处理是否显示下拉等
-    const {placeholder} = this.state;
+  handleNumFocus(e){
+    /*const {placeholder} = this.state;
     const val = e.target.innerText.trim();
     //console.log(33,e.target.innerText,placeholder,e.target.innerText.trim() == placeholder)
     if(val!=''&&val == placeholder){
       this.setState({
         placeholder:''
       });
-    }
+    }*/
     e.stopPropagation();
   }
   handleKeyDowm(e){
@@ -93,14 +114,15 @@ class NumberDrop extends Component{
   }
   handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
     e.stopPropagation();
-    const {show,handleShow,ikey,id,patId,handleHide,value} = this.props;
+    const {show,handleShow,ikey,id,patId,handleHide} = this.props;
     if(show) {
       handleHide && handleHide();
       return;
     }else{
       this.$span.current.focus();
       this.setState({
-        hasSelect:false
+        hasSelect:false,
+        placeholder:''      //火狐26placeholder点击不隐藏bug修改
       });
       handleShow&&handleShow({ikey,id:patId||id});
     }
@@ -131,13 +153,13 @@ class NumberDrop extends Component{
   }
   numInpBlur(e){        //数字框失焦,保存值到store中
     e.stopPropagation();
-    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,show} = this.props;
+    const {handleSelect,ikey,suffix,prefix,mainSaveText,min,max,show,formulaCode} = this.props;
     /*if(show){      //修改清空后第一次点击键盘不触发click事件bug--失焦placehoder消失,弃用
       return;
     }*/
     //输入超出合理范围或输入不是数字提示且清空
     const needCompare=min!=undefined&&max!=undefined;
-    const txt = e.target.innerText.trim();
+    const txt = e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');//e.target.innerText.trim();
     const isFine = this.validSymbols(txt,min,max);      //有~或/时是否合理
     const hasSymbol = /[\/|\~]/g.test(txt);           //是否有~或/
     const singleFine = (!isNaN(+txt)&&!needCompare)||(!isNaN(+txt)&&needCompare&&parseFloat(min)<=parseFloat(txt)&&parseFloat(txt)<=parseFloat(max));   //无~或/时是否合理
@@ -148,7 +170,7 @@ class NumberDrop extends Component{
 
     //输入为空时显示placeholder
     const timer = setTimeout(()=>{
-      if(!e.target.innerText.trim()){
+      if(!e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'')){
         this.setState({
           placeholder:this.props.placeholder
         });
@@ -158,27 +180,33 @@ class NumberDrop extends Component{
       blurTimer:timer
     });
 
-    const val = e.target.innerText.trim();
+    const val = e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');//e.target.innerText.trim();
     const {placeholder} = this.state;
     let text = val===placeholder?'':val;
     //e.target.innerText = '';      //避免出现重复输入值
-    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText});
+    handleSelect&&handleSelect({ikey,text,suffix,prefix,mainSaveText,formulaCode});
+    this.emitBMIData(text);
   }
   handleSpanInp(e){   //数字框输入事件
     e.stopPropagation();
+    const txt = e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');
+    this.setState({
+      value:txt
+    });
     const {handleHide} = this.props;
     handleHide&&handleHide();
   }
   getClasses(){         //整个标签是否有值的状态
-    const {hideTag,placeholder,value,isImports} = this.props;
-    const val = value;
+    const {hideTag,placeholder,isImports,isExtBlue} = 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);
+    return className(isSelected,noTag,orgBorder,ext);
   }
   getSpanClass(){       //将被替换的文字选中状态显示
-    const cls = this.props.show?style['blued']:'';
+    const cls = this.props.show?style['blued']:style['nol'];
     return cls;
   }
   stopBubble(e){
@@ -196,15 +224,27 @@ class NumberDrop extends Component{
     })
   }
   componentWillReceiveProps(nextProps){
+    //BMI存值
+    const {formulaCode,bmi,suffix,prefix,ikey,handleSelect,mainSaveText,wrBmi} = this.props;
+    if(formulaCode==="BMI_RES"&&nextProps.bmi!==bmi){
+      handleSelect&&handleSelect({ikey,text:nextProps.bmi,suffix,prefix,mainSaveText,formulaCode});
+    }
+    //手动修改BMI时身高体重清空
+    if(wrBmi!==nextProps.wrBmi&&(formulaCode==="BMI_SG"||formulaCode==="BMI_TZ")){
+      handleSelect&&handleSelect({ikey,text:'',suffix,prefix,mainSaveText,formulaCode});
+    }
+
     if((nextProps.placeholder == this.props.placeholder)&&(nextProps.value == this.props.value)){
       return
     }
     this.setState({
-      placeholder:nextProps.placeholder
-    })
+      placeholder:nextProps.placeholder,
+      value:nextProps.value
+    });
   }
   render(){
-    const {prefix,suffix,show,value,handleHide,allClick} = this.props;
+    const {prefix,suffix,show,value,handleHide,allClick,bmi,formulaCode} = this.props;
+    const val = formulaCode==="BMI_RES"?(+bmi===Infinity||isNaN(bmi)?'':bmi):value;
     const {placeholder,hasSelect} = this.state;
     return <div className={this.getClasses()}
                 style={{position:'relative'}}
@@ -215,13 +255,14 @@ class NumberDrop extends Component{
             contentEditable={true}
             style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
-            onKeyUp={this.handleKeyDowm}
+            onkeyup={this.handleKeyDowm}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
             className={this.getSpanClass()}
-            >&nbsp;{value||placeholder}</span>
+            >&nbsp;{val||placeholder}</span>
       <span>{suffix}</span>
       <NumberPan handleSelect={this.select.bind(this)}
+                 noString={formulaCode?true:false}
                  onClose={handleHide}
                  show={show}
                  toClear={!hasSelect}/>

+ 20 - 0
src/components/NumberDrop/index.less

@@ -1,10 +1,22 @@
 @import "~@less/variables.less";
 .container{
   .tag;
+  &.ext{
+    color: @extBlue!important;
+  }
+  line-height: 22px;
   .blued{
     background: @blue;
     color: #fff;
   }
+  .nol,.blued{
+    min-width:10px;
+    height: 22px;
+    vertical-align: bottom;
+    display:inline-block;
+    text-align:center;
+    word-break:break-all;
+  }
 }
 .selected{
   .selected-tag;
@@ -18,4 +30,12 @@
     background: @blue;
     color: #fff;
   }
+  .nol,.blued{
+    min-width:10px;
+    display:inline-block;
+    text-align:center;
+    word-break:break-all;
+    height: 22px;
+    /*vertical-align: bottom;*/
+  }
 }

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

@@ -92,7 +92,7 @@ class NumberUnitDrop extends Component{
       <span ref = {this.$pre}>{prefix?prefix+' ':prefix}</span>
       <span ref = {this.$span}
             onKeyDown={handleEnter}
-            style={{cursor:editable?'text':'pointer'}}>{value||placeholder}</span>
+            style={{cursor:editable?'text':'pointer',wordBreak:'break-all'}}>{value||placeholder}</span>
       <span ref = {this.$suf}>{suffix?' '+suffix:suffix}</span>
       <NumberUnitPan handleSelect={(obj)=>this.select(obj)}
                  onClose={handleHide}

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

@@ -118,13 +118,8 @@ class Operation extends Component {
     })
   }
   handleInput(e){
-    let val = e.target.value
-    if(e.target.value.length > 30){
-        e.target.value = val.substring(0,30)
-        this.onchange(val.substring(0,30))
-    }else{
-        this.onchange(e.target.value)
-    }
+    let val = (e.target.value).substring(0,30)
+    this.onchange(val)
   }
   keypress(event) {
     let e = event?event:window.event;
@@ -165,8 +160,6 @@ class Operation extends Component {
     // console.log(tmpLis,'接口返回的')
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
-      // let dataJson = tmpLis[i].dataJson;
-      // console.log(jsonStr.diag , JSON.parse(dataStr).diag)
       if(
         filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
         filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
@@ -180,56 +173,6 @@ class Operation extends Component {
         Notify.info('该模板已保存');
         return false;
       }
-      // if(whichSign == 0){
-      //   // console.log(filterDataArr(JSON.parse(jsonStr.present)) , filterDataArr(JSON.parse(JSON.parse(dataStr).present)))
-      //   if(
-      //     filterDataArr(JSON.parse(jsonStr.chief)) == filterDataArr(eval('('+JSON.parse(dataStr).chief+')')) && 
-      //     filterDataArr(JSON.parse(jsonStr.present)) == filterDataArr(eval('('+JSON.parse(dataStr).present+')')) && 
-      //     filterDataArr(JSON.parse(jsonStr.other)) == filterDataArr(eval('('+JSON.parse(dataStr).other+')')) && 
-      //     filterDataArr(JSON.parse(jsonStr.vital)) == filterDataArr(eval('('+JSON.parse(dataStr).vital+')')) &&
-      //     jsonStr.lis == JSON.parse(dataStr).lis &&
-      //     jsonStr.pacs == JSON.parse(dataStr).pacs &&
-      //     jsonStr.diag == JSON.parse(dataStr).diag &&
-      //     jsonStr.advice == JSON.parse(dataStr).advice
-      //     // JSON.stringify(jsonData.chief) == JSON.stringify(JSON.parse(dataJson).chief) &&    
-      //     // JSON.stringify(jsonData.checkedListImport) == JSON.stringify(JSON.parse(dataJson).checkedListImport) &&    
-      //     // JSON.stringify(jsonData.present) == JSON.stringify(JSON.parse(dataJson).present)  &&     
-      //     // JSON.stringify(jsonData.other) == JSON.stringify(JSON.parse(dataJson).other) &&
-      //     // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-      //     // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-      //     // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-      //     // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-      //     // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&    
-      //     // JSON.stringify(jsonData.mainSuitSelecteds) == JSON.stringify(JSON.parse(dataJson).mainSuitSelecteds) &&      
-      //     // JSON.stringify(jsonData.currentIllSelecteds) == JSON.stringify(JSON.parse(dataJson).currentIllSelecteds) &&     
-      //     // JSON.stringify(jsonData.otherHistorySelecteds) == JSON.stringify(JSON.parse(dataJson).otherHistorySelecteds) && 
-      //     // JSON.stringify(jsonData.checkBodySelecteds) == JSON.stringify(JSON.parse(dataJson).checkBodySelecteds) &&     
-      //     // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
-      //   ){
-      //     Notify.info('该模板已保存');
-      //     return false;
-      //   }
-      // }else if(whichSign == 1){
-      //   if(
-      //     jsonStr.chief == JSON.stringify(eval('('+JSON.parse(dataStr).chief+')')) && 
-      //     jsonStr.present == JSON.stringify(eval('('+JSON.parse(dataStr).present+')')) && 
-      //     jsonStr.other == JSON.stringify(eval('('+JSON.parse(dataStr).other+')')) && 
-      //     jsonStr.vital == JSON.stringify(eval('('+JSON.parse(dataStr).vital+')')) &&
-      //     jsonStr.lis == JSON.parse(dataStr).lis &&
-      //     jsonStr.pacs == JSON.parse(dataStr).pacs &&
-      //     jsonStr.diag == JSON.parse(dataStr).diag &&
-      //     jsonStr.advice == JSON.parse(dataStr).advice
-      //     // JSON.stringify(jsonData.vital) == JSON.stringify(JSON.parse(dataJson).vital) && 
-      //     // JSON.stringify(jsonData.lis) == JSON.stringify(JSON.parse(dataJson).lis) &&  
-      //     // JSON.stringify(jsonData.pacs) == JSON.stringify(JSON.parse(dataJson).pacs) &&     
-      //     // JSON.stringify(jsonData.diag) == JSON.stringify(JSON.parse(dataJson).diag) &&    
-      //     // JSON.stringify(jsonData.advice) == JSON.stringify(JSON.parse(dataJson).advice) &&        
-      //     // JSON.stringify(jsonData.addItems) == JSON.stringify(JSON.parse(dataJson).addItems)
-      //   ){
-      //     Notify.info('该模板已保存');
-      //     return false;
-      //   }
-      // }
     }
     return true;
   }

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

@@ -25,7 +25,7 @@ class Preview extends Component {
         <div className={style['shade']} onClick={onClose}></div>
         <div className={style['modal']} id="previewWrapper">
           <div id="previewStatic" className={`${style['close']} drag-title`}>预览</div>
-          <img src={close} onClick={onClose} />
+          <img className={style.closeImg} src={close} onClick={onClose} />
           <PreviewBody
               preInfo={preInfo}
               dataJson={dataJson}

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

@@ -23,6 +23,7 @@
     bottom: 7%;
     height: 86%;
     overflow: hidden;
+    padding-bottom: 20px;
     padding-top: 45px;
   }
   .close { 
@@ -34,7 +35,7 @@
     width: 100%;
     top: 0;
   }
-  img{
+  img.closeImg{
     cursor: pointer;
     position: absolute;
     right: 10px;

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

@@ -9,8 +9,8 @@ const ItemPart = (props) => {
       type === 2?
       <td className={style['patInfoSec']}>
         {
-          dataStr && dataStr != '' && dataStr.split(';').map((item) => {
-            return <div className={style.checkAssist}>{item}</div>
+          dataStr && dataStr != '' && dataStr.split('^;').map((item) => {
+            return <div className={style.checkAssist} dangerouslySetInnerHTML={{__html:item}}></div>
           })
         }
       </td>:

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

@@ -52,7 +52,9 @@ class PreviewBody extends Component {
   }
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
+    if(min == null&&max == null||min == undefined&&max == undefined||min == ''&&max == ''){
+      dom = getStatusImg(0, value, 1)
+    }else if (!isNaN(min) && !isNaN(max)) {//有最大值最小值
       if (isNaN(value)) {//输入的不是数据
         dom = getStatusImg(1, value, 1)
       } else if (value <= min) {//下降

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

@@ -5,7 +5,6 @@
   height: 100%;
   top:0px;
   width: 820px;
-  padding-bottom: 100px;
   box-sizing: border-box;
   .contents {
     position: relative;
@@ -24,6 +23,7 @@ table{
   .patInfoFst .patInfoSec{
     padding: 9px 5px 8px 0px;
     line-height: 20px;
+    word-break: break-all;
   }
   .patInfoFst .patInfoSec:first-child{
     text-align: right;    

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

@@ -27,7 +27,7 @@ class PrintPreview extends Component {
                 <div className={style['shade']} onClick={onClose}></div>
                 <div className={style['modal']} id="previewPrintWrapper">
                     <div id="previewPrintStatic" className={`${style['close']} drag-title`}>打印</div>
-                    <img src={close} onClick={onClose} />
+                    <img className={style.closeImg} src={close} onClick={onClose} />
                     <PreviewBody
                         preInfo={preInfo}
                         dataJson={dataJson}

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

@@ -24,6 +24,7 @@
       height: 86%;
       overflow: hidden;
       padding-top: 45px;
+      padding-bottom: 20px;
     }
     .close { 
       padding:  0 15px;
@@ -34,7 +35,7 @@
       width: 100%;
       top: 0;
     }
-    img{
+    .closeImg{
       cursor: pointer;
       position: absolute;
       top: 10px;

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

@@ -54,18 +54,22 @@ class PushContainer extends Component {
     this.handleDelList = this.handleDelList.bind(this)
     this.makeSure = this.makeSure.bind(this)
     this.handleClose = this.handleClose.bind(this);
+    this.templateSearch = this.templateSearch.bind(this);
   }
   componentDidMount() {
     // const height = getWindowInnerHeight()-160;
     // this.$cont.current.style.height = height+"px";
   }
+  templateSearch(name){
+    store.dispatch(initItemList(1,name));
+  }
   /**
    * 
    * @param {tab组件切换id} id
    */
   handleActiveClick(id) {
     if (id == '1') {
-      store.dispatch(initItemList(1));
+      store.dispatch(initItemList(1,0));
     }
     store.dispatch(tabChange(id))
   }
@@ -130,13 +134,8 @@ class PushContainer extends Component {
     }
   }
   handleInput(e) {
-    let val = e.target.value
-    if (e.target.value.length > 30) {
-      e.target.value = val.substring(0, 30)
-      this.onchange(val.substring(0, 30))
-    } else {
-      this.onchange(e.target.value)
-    }
+    let val = (e.target.value).substring(0, 30)
+    this.onchange(val)
   }
   changeTitle() {
     return <div className={style['box']}>
@@ -230,16 +229,16 @@ class PushContainer extends Component {
     } 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())
-          }
-        }
-      })
+      // 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())
+      //     // }
+      //   }
+      // })
       store.dispatch(changeVisible(false))
     }
   }
@@ -268,6 +267,7 @@ class PushContainer extends Component {
             handleMangerTemplate={this.handleMangerTemplate}
             handleAllCheckbox={this.handleAllCheckbox}
             handleClickGetMore={this.handleClickGetMore}
+            templateSearch={this.templateSearch}
           ></TemplateItems>
           <MedicalInfoContainer></MedicalInfoContainer>
           <ScaleSearchContainer></ScaleSearchContainer>

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

@@ -11,7 +11,7 @@
   // top: 50px;
   // bottom: 10px;
   // right: 10px;
-  padding-bottom:50px;
+  padding-bottom:30px;
   border-left: 10px #e4e6e7 solid;
 }
 .title{

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

@@ -6,7 +6,7 @@
     height: 100%;
     left: 0;
     top: 0;
-  
+    line-height: 20px;
     img {
         max-width: 100%;
     }
@@ -72,9 +72,11 @@
       }
       ul li {
         list-style: disc;
+        list-style-position: inside;
       }
       ol li{
        list-style: decimal;
+       list-style-position: inside;
      }
 }
 .content-menu-box {

+ 21 - 22
src/components/PushItems/PushDiag/index.jsx

@@ -3,7 +3,7 @@ import style from './index.less';
 import DiagnosticItem from '@containers/DiagnosticItem'
 import showImg from "@common/images/show.png";
 import hideImg from "@common/images/close.png";
-
+import $ from 'jquery'
 
 /***
  * 接收参数:
@@ -18,8 +18,10 @@ class PushDiag extends Component {
     constructor(props) {
         super(props)
         this.state = {
-            showMore: true,
+            domH:'',
+            showSlide:true
         }
+        this.$ide = React.createRef()
         this.handleShow = this.handleShow.bind(this)
     }
     componentWillMount() {
@@ -27,37 +29,34 @@ class PushDiag extends Component {
             moreNum: this.props.maxShowNum
         })
     }
-
-    handleShow(ItemNum) {
+    componentDidMount(){
+        let domH = this.$ide.current.offsetHeight
+        this.setState({
+            domH:domH
+        })
+    }
+    handleShow() {
         this.setState({
-            showMore: !this.state.showMore
-        },()=>{
-            this.setState({
-                moreNum: this.state.showMore ?  this.props.maxShowNum : ItemNum
-            })
+            showSlide:!this.state.showSlide
         })
     }
 
     render() {
-        const { icon, title, titleBg,  diagList, maxShowNum } = this.props
-        const { showMore,moreNum } = this.state
+        const { icon, title, titleBg,  diagList } = this.props
+        const { domH,showSlide } = this.state
         let ItemNum = 0;
         return (<div className={style['push-diag-wrapper']}>
             <h1 className={style['push-diag-title']} style={{background:titleBg}}><img className={style['push-diag-icon']} src={icon} />{title}</h1>
-            <div className={style['push-diag-box']}>
-                {maxShowNum ? diagList.map((item, index) => {
-                    ItemNum = ItemNum + item.name.length + 1;
-                    if (ItemNum <= moreNum) {
+            <div className={`${style['push-diag-box']} ${domH>55&&showSlide?style['push-diag-more-slide-d']:style['push-diag-more-slide-u']}`} ref={this.$ide}>
+                {
+                    diagList.map((item, index) => {
+                        ItemNum = ItemNum + item.name.length + 1;
                         return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
-                    }
-                }) : diagList.map((item, index) => {
-                return <div key={item.id} className={style['push-diag-item']}><DiagnosticItem item={item} type='disSelect'/></div>
-                })}
-                {ItemNum > maxShowNum && <div onClick={() => this.handleShow(ItemNum)} className={style['push-diag-more']}>{showMore ? ' 更多': '收起'}<img className={style['push-diag-more-icon']} src={showMore ? showImg : hideImg}/></div>}
+                    })
+                }
+                {domH>55&&<div onClick={() => this.handleShow()} className={`${style['push-diag-more']} ${showSlide?style['push-diag-more-d']:style['push-diag-more-u']}`}>{showSlide ? ' 更多': '收起'}<img className={style['push-diag-more-icon']} src={showSlide ? showImg : hideImg}/></div>}
 
             </div>
-            
-            
         </div>)
     }
 } 

+ 17 - 1
src/components/PushItems/PushDiag/index.less

@@ -14,7 +14,8 @@
     margin-right: 5px;
 }
 .push-diag-box {
-    padding: 0 0 15px 15px;
+    padding: 5px 0 15px 15px;
+    position: relative;
 }
 .push-diag-item {
     display: inline-block;
@@ -29,6 +30,13 @@
     clear: both;
     margin-top: 10px;
     margin-right: 9px;
+}
+.push-diag-more-d {
+    position: absolute;
+    right: 0;
+    top: 5px;
+}
+.push-diag-more-u {
     float: right;
 }
 .push-diag-box:after{display:block;clear:both;content:"";visibility:hidden;height:0}
@@ -37,4 +45,12 @@
     width: 10px;
     height: 10px;
     position: relative;
+}
+.push-diag-more-slide-d {
+    padding-right: 55px;
+    overflow: hidden;
+    height: 44px;
+}
+.push-diag-more-slide-u {
+    height: auto;
 }

+ 12 - 5
src/components/PushItems/RecommendInspect/index.jsx

@@ -8,7 +8,7 @@ class RecommendInspect extends Component {
     constructor(props) {
         super(props)
         this.state = {
-            showAll: false,
+            showAll: false
         }
         this.renderItem = this.renderItem.bind(this)
     }
@@ -20,14 +20,14 @@ class RecommendInspect extends Component {
     
     renderItem(item) {
       const { changeFlag } = this.props
-      return <span>
+      return <span className={style['itemLabelBox']} title={item.name}>
           <input
             id={item.id + item.name}
             onChange={() =>changeFlag(item)}
             type="checkbox"
             checked={item.checked}
           />
-          <label for={item.id + item.name}>{item.name}</label>
+          <label  for={item.id + item.name}>{item.name}</label>
       </span>
     }
 
@@ -40,9 +40,16 @@ class RecommendInspect extends Component {
       let firstLineNum = 0;   //第一行字数
       let secondLineNum = 0;      //第二行字数
       const listHide = list.map((item, index) => {
-        firstLineNum = firstLineNum + item.name.length + 2;
+        let itemNameLen =  item.name.length
+        if(itemNameLen > 24) {
+          itemNameLen = 24
+        }
+        firstLineNum = firstLineNum + itemNameLen + 2;
         if (firstLineNum > 26) {
-          secondLineNum = secondLineNum + item.name.length + 2; 
+          if(itemNameLen > 18) {
+            itemNameLen = 18
+          }
+          secondLineNum = secondLineNum + itemNameLen + 2; 
           if(secondLineNum > 20) {
             return;
           } else {

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

@@ -17,10 +17,12 @@
             line-height: 26px;
             padding: 0px 0px 0px 0px;
             span{
+              .ellipsis;
               font-size: 14px;
               line-height: 14px;
               display: inline-block;
               margin: 6px;
+              max-width: 280px;
               cursor: pointer;
               input[type='checkbox']{
                 float: left;

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

@@ -38,8 +38,8 @@ class TipsMsg extends Component {
               </div>
               {tips.details &&
                 tips.details.map((item, index) => {
-                  return (
-                      <div>
+                 return (
+                  item.position&&item.position.indexOf('1') > -1&&<div>
                         <div
                           dangerouslySetInnerHTML={{
                             __html: item.title
@@ -50,11 +50,11 @@ class TipsMsg extends Component {
                             __html: item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix)
                           }}
                         />
-                        {item.isReason === 1 && (
+                        {/* {item.isReason === 1 && (
                           <div className={style["warn"]}>
                             {tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '1')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '1').description}
                           </div>
-                        )}
+                        )} */}
                       </div>
                   );
                 })}

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

@@ -8,9 +8,11 @@
    }
    ul li {
      list-style: disc;
+     list-style-position: inside;
    }
    ol li{
     list-style: decimal;
+    list-style-position: inside;
   }
 
   border:1px solid #EAEDF1;

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

@@ -12,7 +12,7 @@ import DiagnosticItem from "@containers/DiagnosticItem";
 import store from "@store";
 import {addLabel} from '@store/actions/inspect';
 import {addAssistLabel} from '@store/actions/assistCheck';
-import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
+import {windowEventHandler,getCurrentDate,getWindowInnerHeight,didPushParamChange} from '@utils/tools'
 import {ConfirmModal} from '@commonComp';
 import ChronicInfo from '@containers/ChronicInfo';//慢病推送模块
 import RecommendInspect from './RecommendInspect';
@@ -29,7 +29,6 @@ class PushItems extends Component {
       moreCheck: false,
       show:true,
       showAssess:false,      //评估弹窗
-      idx:''
     };
 
     this.showMore = this.showMore.bind(this);
@@ -127,7 +126,7 @@ class PushItems extends Component {
   }
 
   showTips() {
-    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;console.log(this.props)
+    const { getTipsDetails, showTipsDetailsModal, clickDiag } = this.props;
     getTipsDetails && getTipsDetails({name: clickDiag.name, type: clickDiag.type,position:0});
     //showTipsDetailsModal && showTipsDetailsModal()
   }
@@ -137,21 +136,18 @@ class PushItems extends Component {
   }
 
   componentDidMount() {
-    const height = getWindowInnerHeight() - 200;
+    const height = getWindowInnerHeight() - 190;
     this.$cont.current.style.height = height + "px";
 
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight() - 200;
+        const height = getWindowInnerHeight() - 190;
         this.$cont.current.style.height = height + "px";
       }
     });
   }
-
   setDataIdx(index){
-    this.setState({
-      idx:index+''
-    })
+    this.props.setDataIdx&&this.props.setDataIdx(index)
   }
   render() {
     const {
@@ -199,7 +195,6 @@ class PushItems extends Component {
                 icon={doubtImg}
                 title="初步诊断"
                 diagList={doubt}
-                maxShowNum={24}
               />
             )}
             {possible && possible.length > 0 && (
@@ -208,7 +203,6 @@ class PushItems extends Component {
                 icon={possibleImg}
                 title="可能诊断"
                 diagList={possible}
-                maxShowNum={24}
               />
             )}
             {likely && likely.length > 0 && (
@@ -217,7 +211,6 @@ class PushItems extends Component {
                 icon={likelyImg}
                 title="鉴别诊断"
                 diagList={likely}
-                maxShowNum={24}
               />
             )}
             <div className={style["diagnose"]}>
@@ -280,15 +273,15 @@ class PushItems extends Component {
               tipsDiscalimer = {tipsDiscalimer}
             ></TipsMsg>
           </div>
+         {tipsDiscalimer.data && <div  className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
         </div>
-        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data &&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2')&&tipsDiscalimer.data.data.find(item => item.disclaimerCode == '2').description}}></div>}
         {showTipsDetails && <DetailsModal  
             showTipsDetails = {showTipsDetails}
             hideTips = {this.hideTips}
             tipsDetails = {tipsDetails}/>}
             
             {
-              (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure hideAllDrop={hideAllDrop} windowHeight={windowHeight} data={dataLis[this.state.idx]||dataLis[setPushEmergencyIdx]} idx={this.state.idx||setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
+              (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure hideAllDrop={hideAllDrop} windowHeight={windowHeight} data={dataLis[setPushEmergencyIdx]} idx={setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
             }
       </div>
     );

+ 10 - 3
src/components/PushItems/index.less

@@ -1,10 +1,11 @@
 @import "~@less/variables.less";
 .push-content-wrapper{
   // padding-top: 50px;
-  padding: 0px 15px;
+  padding: 0px 15px 40px;
   line-height: 20px; 
   width: @push-width;
   overflow: hidden;
+  position: relative;
   .push-content {
     width: 436px;
     overflow-y: auto;
@@ -109,9 +110,15 @@
   
 }
 .disTips {
-  padding: 10px 20px 0;
-  font-size: 10px;
+  padding: 0px 20px 0px 10px;
+  height: 32px;
+  line-height: 16px;
+  overflow-y: auto;
+  background: #fff;
+  font-size: 12px;
   color: #979797;
   text-align: center;
+  position: absolute;
+  bottom: 0;
 }
 

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

@@ -34,21 +34,21 @@ class RadioDrop extends Component{
     this.handleEditLabel = this.handleEditLabel.bind(this);
   }
   getClass(){
-    const {value,hideTag,placeholder,show,isImports} = this.props;
-    const blueBorder = this.state.editable?style['blue-border']:'';
-    const orgBorder = isImports?style['orange-border']:'';
+    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const ext = isExtBlue?style['ext']:'';
+    const orgBorder = isImports?style['orange-border']:'';      //橙色框高亮
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
     if(hideTag){
-      return style['no-tag'];
+      return classNames(style['no-tag'],ext);
     }
     if(value){
-      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
+      return style['selected-tag'];
     }
-    return classNames(style['tag'],orgBorder);
+    return classNames(style['tag'],orgBorder,ext);
   }
   handleSelect(item){
     const {handleSelect,ikey,mainSaveText,value} = this.props;
@@ -115,6 +115,8 @@ class RadioDrop extends Component{
    // 更改标签的value值
     const ev = e || window.event;
     let changeVal = ev.target.innerText || ev.target.innerHTML;
+    //fireFox括号删完有<br>2270
+    changeVal=changeVal=="<br>"?'':changeVal;
     if(!this.isIE){
       ev.target.innerText?(ev.target.innerText = ''):(ev.target.innerHTML = '');
     }

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

@@ -7,10 +7,17 @@
 .tag,.selected-tag,.no-tag{
   display: inline-block;
   cursor: pointer;
+  word-break: break-all;
   /*line-height: 20px;*/
 }
+.no-tag{
+  color:inherit;
+}
 .tag{
   color:@placeholder-color;
+  &.ext{
+    color: @extBlue!important;
+  }
 }
 .tag:before{
   content: '[';

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

@@ -20,37 +20,32 @@ class RadioInpDrop extends Component{
   constructor(props){
     super(props);
     this.state={
-      editable:false,
-      timer:null,
       texts:props.vals||{0:props.value||props.placeholder},
       over:false,
-      tmpDom:null
     };
     this.$cont = React.createRef();
     this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
     this.handleSelect = this.handleSelect.bind(this);
     this.handleShow = this.handleShow.bind(this);
-    this.handledbClick = this.handledbClick.bind(this);
-    this.handleEditLabel = this.handleEditLabel.bind(this);
     this.parseInputDom = this.parseInputDom.bind(this);
     this.handleInnerInp = this.handleInnerInp.bind(this);
   }
   getClass(){
-    const {value,hideTag,placeholder,show,isImports} = this.props;
-    const blueBorder = this.state.editable?style['blue-border']:'';
-    const orgBorder = isImports&&!value?style['orange-border']:'';
+    const {value,hideTag,show,isImports,isExtBlue} = this.props;
+    const orgBorder = isImports&&!value?style['orange-border']:'';    //查体,是否橙色框高亮
+    const ext = isExtBlue?style['ext']:'';      //查体,是否是体征
     if(show){
       $(this.$cont.current).addClass(style['borderd']);
     }else{
       $(this.$cont.current).removeClass(style['borderd']);
     }
     if(hideTag){
-      return style['no-tag'];
+      return classNames(style['no-tag'],ext);
     }
     if(value){
-      return blueBorder?classNames(style['selected-tag'],blueBorder):style['selected-tag'];
+      return style['selected-tag'];
     }
-    return classNames(style['tag'],orgBorder);
+    return classNames(style['tag'],orgBorder,ext);
   }
   handleSelect(item){
     const {handleSelect,ikey,value,placeholder,mainSaveText} = this.props;
@@ -76,25 +71,11 @@ class RadioInpDrop extends Component{
     handleSelect&&handleSelect({ikey,id:item.id,values:vals,mainSaveText,value});
   }
   handleShow(e){
-    //e.stopPropagation();
+    e.stopPropagation();
     const {handleShow,ikey,id,patId} = this.props;
-    const that = this;
-    const timer = setTimeout(()=>{
-      if (that.state.editable) {//如果处于编辑状态点击不显示下拉框
-        return
-      }else {
-        document.activeElement.blur()//chrome41有效,但是失去焦点的span仍能编辑
-        $(e.target).parent().parent().prev().attr({"contentEditable":false})
-        this.setState({
-          tmpDom:e.target
-        })
-        handleShow && handleShow({ikey,id:patId||id});
-      }
-    },300);
-    
-    this.setState({
-      timer,
-    });
+    document.activeElement.blur()//chrome41有效,但是失去焦点的span仍能编辑
+    handleShow && handleShow({ikey,id:patId||id});
+
     windowEventHandler('scroll',()=>{      //弹窗跟随滚动条滚动或者关闭弹窗
       let scrollYs = $("#addScrollEvent")[0].scrollTop;
       this.setState({
@@ -102,49 +83,6 @@ class RadioInpDrop extends Component{
       })
     },$("#addScrollEvent")[0])
   }
-  /*componentDidMount(){    //默认值选中
-    const {data,ikey,handleSelect} = this.props;
-    const selected = data.find((it)=>{
-      return it.selected === undefined&&+it.defaultSelect===1;
-    });
-    if(selected){
-      // const text = selected.labelPrefix+selected.name+selected.labelSuffix;
-      const text = selected.name;
-      handleSelect&&handleSelect({ikey,id:selected.id,text});
-    }
-  }*/
-  handleEditLabel(e){
-    e.stopPropagation();
-    if(!this.state.editable){     //ie8点开下拉未选值存值bug修改
-      return;
-    }
-    const {ikey,boxMark,handleLabelEdit} = this.props;
-    this.setState({
-      editable:false
-    });  
-   // 更改标签的value值
-    const ev = e || window.event;
-    let changeVal = ev.target.innerText || ev.target.innerHTML;
-    if(!this.isIE){
-      ev.target.innerText?(ev.target.innerText = ''):(ev.target.innerHTML = '');
-    }
-    handleLabelEdit && handleLabelEdit({ikey,changeVal,type:boxMark});
-  }
-  handledbClick(e){
-    const {value,id,handleDbclick,patId} = this.props;
-    clearTimeout(this.state.timer);//取消延时的单击事件
-    //e.preventDefault();
-    if(value&&value.trim()) {//有选中值的标签才能双击编辑
-      this.setState({
-        editable: true
-      });
-    };
-    //失焦关闭编辑状态
-    setTimeout(()=>{
-      e.target.focus();
-    })
-    handleDbclick&&handleDbclick({id:patId||id});
-  }
   handleInnerInp(i,val){
     const {ikey,boxMark,handleSaveInp,mainSaveText} = this.props;
     let vals = this.state.texts; 
@@ -183,7 +121,7 @@ class RadioInpDrop extends Component{
     for(let i in texts){
       temp = texts[i];
       if(typeof temp=='object'){
-        list.push(<InputComp handleInp={this.handleInnerInp} editable={true} index={i} value={temp.value} over={over}></InputComp>);
+        list.push(<InputComp handleInp={this.handleInnerInp} index={i} value={temp.value} over={over}></InputComp>);
       }else{
         list.push(<span>&nbsp;{temp}</span>);
       }
@@ -191,17 +129,10 @@ class RadioInpDrop extends Component{
     return list;
   }
   render(){
-    const {data,show,vals,placeholder,hideTag} = this.props;
-    const {tmpDom} = this.state
-    if(!show&&tmpDom){
-      $(tmpDom).parent().parent().prev().attr({"contentEditable":true})
-    }
+    const {data,show,vals,placeholder} = this.props;
     return <div className={style['container']} ref = {this.$cont}>
       <div className={this.getClass()}
-           onBlur={this.handleEditLabel}
-           contentEditable={this.state.editable}
-           onDoubleClick={hideTag?null:this.handledbClick}
-           onClick={(e)=>this.handleShow(e,true)}
+           onClick={(e)=>this.handleShow(e)}
            onKeyDown={handleEnter}>
         {vals?this.parseInputDom():<span>{placeholder}</span>}
       </div>
@@ -219,28 +150,31 @@ class InputComp extends Component{
   }
   handleBlur(e){
     e.stopPropagation();
-    const text = e.target.innerText;
+    // FF26 只有innerHTML
+    const text = e.target.innerText || e.target.innerHTML;
     const {handleInp,index,value} = this.props;
-    e.target.innerText = '';
-    handleInp(index,text);
+    e.target.innerText?(e.target.innerText = ''):(e.target.innerHTML = '');
+    // FF26 会把&nbsp; 也获取到
+    handleInp(index,text.replace('&nbsp;',''));
   }
   componentWillReceiveProps(next){
     if(next.over&&!this.props.over){
       const inp = this.$inp.current;
       const value = this.props.value;
       setTimeout(function(){
-        inp.innerText = value;
+        inp.innerText?(inp.innerText = ''):(inp.innerHTML = '');
+        inp.innerText?(inp.innerText = value):(inp.innerHTML = value);
       })
     }
   }
   render(){
-    const {editable,value} = this.props;
-    return editable?<span contentEditable={true}
+    const {value} = this.props;
+    return <span contentEditable={true}
                           ref={this.$inp}
                  className={style['inner-inp']}
                  onClick={(e)=>{e.stopPropagation()}}
                  onFocus={(e)=>{e.stopPropagation()}}
-                 onBlur={this.handleBlur}>&nbsp;{value}</span>:<span>&nbsp;{value}</span>
+                 onBlur={this.handleBlur}>&nbsp;{value}</span>
   }
 }
 

+ 4 - 0
src/components/RadioInpDrop/index.less

@@ -7,6 +7,9 @@
 .tag,.selected-tag,.no-tag{
   display: inline-block;
   cursor: pointer;
+  &.ext{
+    color: @extBlue;
+  }
   /*line-height: 20px;*/
 }
 .tag{
@@ -26,4 +29,5 @@
   display:inline-block;
   min-width:30px;
   text-align:center;
+  word-break: break-all;
 }

+ 7 - 7
src/components/ScaleSearch/index.jsx

@@ -38,10 +38,10 @@ class ScaleSearch extends Component {
   }
   getSearchList() {
     const { searchResult } = this.props;
-    const that = this;console.log(getWindowInnerHeight()-270);
+    const that = this;
     if(searchResult&&searchResult.length>0){
       setTimeout(function(){
-        that.$ul.current.style.height = getWindowInnerHeight()-270+'px';
+        that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
       },100);
     }
     return searchResult && searchResult.map((item) => {
@@ -93,18 +93,19 @@ class ScaleSearch extends Component {
       hasSearch: false,
       msg:''
     });
+    this.$inp.current.focus();
     clearResult&&clearResult();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-170;
+    const height = getWindowInnerHeight()-148;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-170;
+        const height = getWindowInnerHeight()-148;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-270;
+        const height = getWindowInnerHeight()-248;
         this.$ul.current.style.height = height+"px";
       }
     });
@@ -120,9 +121,8 @@ class ScaleSearch extends Component {
     return (
         <div className={style['search-cont']} ref={this.$cont}>
           <div className={style['search-box']}>
-            <p className={style['title']}>量表搜索</p>
             <p className={style['cont']}>
-              <input type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
+              <input type="text" placeholder="量表搜索" 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>

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

@@ -52,7 +52,7 @@
     border: none;
   }
   .result{
-    margin-top:78px;
+    margin-top:46px;
     padding: 0 5px 0 0;
     height: 100%;
     overflow: auto;
@@ -80,7 +80,6 @@
       }
       .scale-name{
         display: inline-block;
-        max-width: 320px;
         line-height: 22px;
       }
       button{

+ 34 - 20
src/components/ScaleTable/index.jsx

@@ -74,28 +74,41 @@ class ScaleTable extends React.Component{
     }
     if(rows){
       for(let j=0; j<rows.length; j++){
-        let row = rows[j].row;
-        let required = rows[j].required;
         let rowsId = rows[j].indexId;
-        // 必填项处理
-        if(required==1&&rowsId==indexId){
-          for(let k=0;k < row.length; k++){
-            row[k].isSelect = true;
-            if(row[k].name==name){
-              details = row[k].details;
-              // break;
-            }
-          }
-        }else{
-          for(let k=0;k < row.length; k++){
-            if(row[k].name==name){
-              details = row[k].details;
+        if(rowsId==indexId){
+          let row = rows[j].row;
+          let required = rows[j].required; //必填
+          let metux = rows[j].metux; //互斥
+          if(required==1){ // 必填项处理
+            for(let k=0;k < row.length; k++){
               row[k].isSelect = true;
-              break;
+              if(metux == 1){//互斥,把其他的清空
+                let detList = row[k].details;
+                for(let f=0; f<detList.length; f++){
+                  detList[f].select = 0;
+                }
+              }
+              if(row[k].name==name){
+                details = row[k].details;
+                // break;
+              }
+            }
+          }else{
+            for(let k=0;k < row.length; k++){
+              if(metux == 1){//互斥,把其他的清空
+                let detList = row[k].details;
+                for(let f=0; f<detList.length; f++){
+                  detList[f].select = 0;
+                }
+              }
+              if(row[k].name==name){
+                details = row[k].details;
+                row[k].isSelect = true;
+                break;
+              }
             }
           }
-        }
-        
+        }   
       }
     }
     if(details){
@@ -343,7 +356,8 @@ class ScaleTable extends React.Component{
     const {tableId,formulaResult,comfirnFlag} = this.props;
     const scaleResult = scaleResult1 || formulaResult&&formulaResult[tableId]; //量表计算结果
     // const datas = valueData&&valueData.group?valueData:'';
-    const datas = valueData;
+    // const datas = valueData;
+    const datas = JSON.parse(JSON.stringify(valueData));
     let content;
     if(valueData&&valueData.scaleType==1){//计分
       content =  datas&&datas.group&&datas.group.map((v,i)=>{
@@ -363,7 +377,7 @@ class ScaleTable extends React.Component{
                               {item.details&&item.details.map((vv,ii)=>{
                                 return <div className={style['item']}>
                                         <Radio label={vv.detailName+'('+vv.score+')'}
-                                           isSelect={vv.select==1||selecteds[item.name]==vv.detailName}
+                                           isSelect={vv.select==1}
                                            handleClick={this.handleRadio.bind(this,v.groupName,item.name,vv,it.indexId)}>
                                         </Radio>
                                         {vv.state==1?<span className={style['recomand']}>(智能推荐)</span>:''}

+ 66 - 13
src/components/SpreadDrop/index.jsx

@@ -5,6 +5,7 @@ import style from './index.less';
 import {setPosition,deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds,getPageCoordinate} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import ScrollArea from 'react-scrollbar';
+import SearchBox from '@containers/SearchBox'
 import $ from 'jquery';
 /****
  * 标签组合下拉,选中的项目展开
@@ -200,7 +201,7 @@ class SpreadDrop extends Component{
     this.clearState();
   }
   handleConfirm(e){
-    e.stopPropagation();
+    // e.stopPropagation();
     const {handleConfirm,ikey,type,tagType,order,mainSaveText,copyType,value,mainData} = this.props;
     const params = Object.assign({},this.state,{ikey,type,tagType,order,mainSaveText,copyType,value,mainData});
     delete params.tmpDom;       //避免上面deepClone selecteds报错
@@ -209,7 +210,7 @@ class SpreadDrop extends Component{
     //点确定后隐藏弹窗
     this.props.handleHide();
   }
-  handleSelect(item,isExclu,joint,listIndex,selected){//console.log(item,selected)
+  handleSelect(item,isExclu,joint,listIndex,selected){
     let {withOn,withs,noneOn,exclusion,exists,nowOn,nones,noneIds,ban} = this.state;
     /*if(this.props.selecteds)
     console.log(exists,this.props.selecteds.exists,exists===this.props.selecteds.exists)*/
@@ -330,9 +331,10 @@ class SpreadDrop extends Component{
     });
   }
   getClass(){
-    const {isImports,show,value} = this.props;
+    const {isImports,show,value,isExtBlue} = this.props;
     const blueBorder = this.state.editable?style['blue-border']:'';
     const orgBorder = isImports&&!value?style['orange-border']:'';
+    const ext = isExtBlue?style['ext']:'';
     if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
@@ -341,7 +343,7 @@ class SpreadDrop extends Component{
     if(value){
       return classNames(style['selected-tag'],blueBorder);
     }
-    return classNames(style['tag'],orgBorder);
+    return classNames(style['tag'],orgBorder,ext);
   }
 
   componentDidMount(){
@@ -358,8 +360,9 @@ class SpreadDrop extends Component{
     }
   }*/
   render(){
-    const {placeholder,value,show,data,order} = this.props;
+    const {placeholder,value,show,data,order,type,tagType,ikey,pos} = this.props;
     const {tmpDom,left} = this.state
+    const clickIndx = ikey.split('-')[1];//展开下拉的index
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})
     }
@@ -378,7 +381,7 @@ class SpreadDrop extends Component{
         onInput={this.onChange}
         onkeydown={handleEnter}
         >{value||placeholder}</div>
-          <ListItems parDiv={this.$list} data={data} order={order} left={left}
+          <ListItems parDiv={this.$list} pos={pos} data={data} order={order} left={left} boxMark={type} tagType={tagType}
              show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
       </div>
   }
@@ -388,6 +391,7 @@ class ListItems extends Component{
   constructor(props){
     super(props);
     this.$cont = React.createRef();
+    this.clickConfirm = this.clickConfirm.bind(this);
   }
   getLabels(){
     const {data,handleSelect} = this.props;
@@ -395,6 +399,7 @@ class ListItems extends Component{
     let isSpecialPos = false;       //是否特殊位置(单行在上面,如无殊)
     let isExclu = false;      //是否与其他互斥
     let isRadio;      //是否为单选列,默认多选列
+    let isSingle = data.length == 1?true:false; //是否为单列,无伴的情况
     const list = data&&data.map((it,i)=>{
       isSpecialPos = (+it.formPosition === 1);
       isExclu = (+it.exclusionType===1);
@@ -406,6 +411,7 @@ class ListItems extends Component{
       }
       return <ListItem datas={detail}
                        isRadio={isRadio}
+                       isSingle={isSingle}
                        joint={it.joint}
                        listIndex={i}
                        isSpecialPos={isSpecialPos}
@@ -415,6 +421,11 @@ class ListItems extends Component{
     });
     return list;
   }
+  clickConfirm(){
+    const {handleConfirm} = this.props;
+    this.child&&this.child.reset();//重置搜索框中的数据
+    handleConfirm();   
+  }
   getStyle(){
     const {show,left} = this.props;
     return {
@@ -422,14 +433,34 @@ class ListItems extends Component{
       left:left
     }
   }
+  searchSelect(item){
+    const {handleSelect,handleConfirm} = this.props;
+    //添加id字段,用于调尾巴
+    const it = Object.assign({id:item.questionId},item);
+    handleSelect&&handleSelect(it);     //添加到大数据推送一起选中
+    handleConfirm&&handleConfirm();       //确定事件
+  }
+  getPushItemIds(list){         //获取推送症状的id数组,去重用
+    return list&&list.map((it)=>{
+      return it.conceptId;
+    })||[];
+  }
   render (){
-    const {handleClear,handleConfirm,order,parDiv} = this.props;
+    const {handleClear,order,parDiv,boxMark,tagType,show,data,pos} = this.props;
+    const pushUl = data.find((it)=>it.controlType===99);
+    const pushList = pushUl&&pushUl.questionDetailList;
+    //推送标签没有推送结果时不显示顺序说明
+    const noPush = tagType===11&&(!pushList||pushList.length===0);
+    const noSearch = boxMark==1 && tagType==11 && !pos;       //非第一病程添加症状标签不显示搜索
     return <div className={style["drop-list"]} ref={parDiv} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
-        <p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>
+      {noPush?'':<p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>}
         {this.getLabels()}
+        {noSearch && <div className="search">
+          <SearchBox show={show} pushIds={this.getPushItemIds(pushList)} onSelect={this.searchSelect.bind(this)} onRef={(child)=>{this.child = child;}}/>
+        </div>}
         <div className="oper clearfix">
           <span className={style['clear']} onClick={handleClear}>清空选项</span>
-          <span className={style['confirm']} onClick={handleConfirm}>确定</span>
+          <span className={style['confirm']} onClick={this.clickConfirm}>确定</span>
         </div>
       </div>
   }
@@ -501,6 +532,9 @@ class ListItem extends Component{
       width:'6px',
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%'};
+    if(!datas||datas.length===0){
+      return <li className={style['no-push-data']}>暂无推送</li>
+    }
     if(datas&&datas.length>11){
       return <ScrollArea speed={0.8}
                     horizontal={false}
@@ -525,11 +559,30 @@ class ListItem extends Component{
       return <li onClick={(e)=>this.handleClick(e,it,i)} className={this.getClass(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
     });
   }
-  render(){
+
+  getMainData(){//主诉添加症状-带搜索框
     const {datas,isSpecialPos} = this.props;
-    const pos = isSpecialPos?style['independent']:'';
-    return  <ul className={classNames(style['row'],pos)} onBlur={(e)=>e.stopPropagation()}>
-      {this.getData()}
+    if(!datas||datas.length===0){
+      return <li className={style['no-push-data']}>暂无推送数据,可通过搜索查找更多内容~ </li>
+    }
+    return datas&&datas.map((it,i)=>{
+      return <li onClick={(e)=>this.handleClick(e,it,i)} 
+            className={this.getClass(it.id)} 
+            title={it.name.length>4?it.name:''}
+            style={{'width':'55px','display':'inline-block'}}>
+            {it.name&&it.name.length>4?it.name.slice(0,4)+'...':it.name}
+          </li>
+    });
+  }
+
+  render(){
+    const {datas,isSpecialPos,boxMark,tagType,listIndex,isSingle,pos} = this.props;
+    const posit = isSpecialPos?style['independent']:'';
+    const ifMainSear = boxMark==1 && tagType==11 && !pos?true:false;
+    // 单列直接设置宽度,多列则第二列设置(伴字ul不设置宽度)
+    const main = ifMainSear&&!isSingle&&listIndex==1?style['mainUl']:(ifMainSear&&isSingle?style['mainUl']:'');
+    return  <ul className={classNames(style['row'],posit,main)} onBlur={(e)=>e.stopPropagation()}>
+      {ifMainSear?this.getMainData():this.getData()}
     </ul>
   }
 }

+ 16 - 1
src/components/SpreadDrop/index.less

@@ -20,6 +20,17 @@
     width: 100%;
     border-bottom: 1px @disable-border-color solid;
   }
+  .mainUl{
+    width: 495px;
+    white-space: normal;
+    li{
+      width: 99px !important;
+    }
+    .no-push-data{
+      color:@disable-color;
+      width: auto !important;
+    }
+  }
   li{
     padding-left: 20px;
     cursor: pointer;
@@ -34,13 +45,16 @@
     .select-li;
     background-image: url(../../common/images/then.png);
   }
-  .exclusion{
+  .no-push-data,.exclusion{
     color:@disable-color;
   }
 }
 .tag,.selected-tag{
   cursor: pointer;
   line-height: 20px;
+  &.ext{
+    color: @extBlue;
+  }
 }
 
 .selected-tag{
@@ -48,6 +62,7 @@
   color: @text-color;
   border-bottom: 1px @border-color solid;
   line-height: 22px;
+  word-break: break-all;
 }
 .orderTips{
   color: #bfbfbf;

+ 3 - 2
src/components/TemplateItems/TemplateItem/index.less

@@ -33,7 +33,7 @@
     position: relative;
     height: 45px;
     line-height: 45px;
-    padding: 0 20px;
+    padding: 0 15px;
     cursor: pointer;
     img {
         display: inline-block;
@@ -58,7 +58,7 @@
       height: 100%;
       vertical-align: top;
     //   margin-top: 3px;
-    padding: 0 5px;
+    // padding: 0 5px;
       max-width: 150px;
       overflow: hidden;
       text-overflow: ellipsis;
@@ -90,6 +90,7 @@
       display: none;
       width: 20px;
       height: 20px;
+      margin-left: 5px;
     }
     
     .quote {

+ 68 - 7
src/components/TemplateItems/index.jsx

@@ -3,6 +3,7 @@ import React from "react"
 import style from "./index.less"
 import TemplateItem from './TemplateItem'
 import check_circle from './TemplateItem/img/check-circle.png';
+import delIcon from '@common/images/del_nor.png';
 import check_right from './TemplateItem/img/check-right.png';
 import Empty from '@components/Empty';
 import {windowEventHandler,getWindowInnerHeight} from '@utils/tools'
@@ -11,15 +12,24 @@ import {windowEventHandler,getWindowInnerHeight} from '@utils/tools'
 class TemplateItems extends React.Component {
     constructor(props) {
         super(props);
+        this.state = {
+            msg:'还没有保存模板',
+            val:''
+        }
         this.$cont = React.createRef();
+        this.$search = React.createRef();
         this.genItems = this.genItems.bind(this);
+        this.templateSearch = this.templateSearch.bind(this);
+        this.handleEnter = this.handleEnter.bind(this);
+        this.handleChange = this.handleChange.bind(this);
+        this.clear = this.clear.bind(this);
     }  
     componentDidMount(){
-        const height = getWindowInnerHeight()-206;
+        const height = getWindowInnerHeight()-195;
         this.$cont.current.style.height = height+"px";
         windowEventHandler('resize', ()=>{
             if(this.$cont.current){
-                const height = getWindowInnerHeight()-206;
+                const height = getWindowInnerHeight()-195;
                 this.$cont.current.style.height = height+"px";
             }
         });
@@ -49,13 +59,58 @@ class TemplateItems extends React.Component {
             return check_circle;
         }
     }
+    templateSearch(){
+        const {templateSearch} = this.props
+        templateSearch(this.$search.current.value)
+        if(this.$search.current.value.trim()){
+            this.setState({
+                msg:'暂无模板信息'
+            })
+        }else{
+            this.setState({
+                msg:'还没有保存模板'
+            })
+        }
+    }
+    
+    handleEnter(e){
+        if(e.keyCode==13){
+            this.templateSearch();
+        }
+    }
+    
+    handleChange(){
+        const value = (this.$search.current.value).substring(0,30);
+        // this.$search.current.value = value
+        setTimeout(() => {
+            
+            this.setState({
+                val: value
+            });
+        }, 30);
+        // if (value === '') {
+        //     this.setState({
+        //         val: ''
+        //     });
+        // }
+    }
+
+    clear(){
+        this.$search.current.value = '';
+        this.setState({
+            val:''
+        })
+        
+        this.$search.current.focus();
+    }
+
     render() {
         const { allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
-        // console.log(hasMore,current,7877877)
+        // console.log(allCheckShow,7877877)
         return (
             <div className={style.wrapper}>
                 {
-                    items && items.length > 0 ? (allCheckShow ?
+                    items ? (allCheckShow ?
                         <div className={style.wrapperTop}>
                             <div className={style['check-wrap']} onClick={handleAllCheckbox}>
                                 <img className={`${style['fl-element']} ${style['check-box']}`} src={this.getCheckIcon()} />
@@ -68,13 +123,19 @@ class TemplateItems extends React.Component {
                             }
                         </div> :
                         <div className={style.wrapperTop}>
-                            <span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
+                            <div className={style.templateSearch}>
+                                <input placeholder="模板搜索" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                                <div className={style.search} onClick={this.templateSearch}>搜索</div>
+                            </div>
+                            {
+                                items.length > 0&&<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
+                            }
                     </div>) : <div style={{height:'36px'}}></div>
                 }
                 <div className={style.tempLists} ref={this.$cont}>
                     {
-                        this.genItems().length > 0?this.genItems():
-                        <Empty message={'还没有保存模板'}></Empty>
+                        this.genItems().length > 0?this.genItems(): <Empty message={this.state.msg}></Empty>
                     }
                     {/* {//注释掉的暂时没有分也功能
                       hasMore?<p onClick={()=>handleClickGetMore(current)} className={style.loadMore}>点击查看更多</p>:null

+ 55 - 8
src/components/TemplateItems/index.less

@@ -1,38 +1,51 @@
 @import "~@less/mixin.less";
 
 .wrapper{
-    background-color: @gray-background-color;
+    // background-color: @gray-background-color;
     user-select: none;
     position: relative;
+    // padding: 0 15px;
+    // border: 1px solid #EAEDF1;
     .tempLists {
         overflow-y: auto;
         background-color: #fff;
+        // margin-top: 15px;
     }
-    .wrapperTop {
-        height: 36px;
+    .emptyWrap {
         padding: 0 20px;
-        background-color: #EAEDF1;
+        margin-top: 15px;
+        .fr-element {
+            float: right;
+            color: #3B9ED0;
+            display: inline-block;
+            height: 36px;
+            line-height: 36px;
+        }
+    }
+    .wrapperTop {
+        height: 46px;
+        padding: 0 15px;
+        margin-top: 10px;
+        // background-color: #EAEDF1;
         cursor: pointer;
         .check-box {
             height: 18px;
-            width: 18px;
+            // width: 18px;
             margin-top: 10px;
             padding-right: 10px;
-            
             box-sizing: content-box;
             float: left;
         }
         .check-wrap{
             height: 36px;
             padding-right: 10px;
-            display: inline-block;
             float: left;
         }
         span {
-            display: inline-block;
             height: 36px;
             line-height: 36px;
             float: left;
+            // margin-top: 20px;
         }
         .fr-element {
             float: right;
@@ -58,5 +71,39 @@
       cursor: pointer;
       margin-top: 15px;
     }
+    .templateSearch {
+        display: inline-block;
+        p {
+            font-size: 12px;
+            color: #979797;
+            margin-bottom: 10px;
+        }
+        input {
+            box-sizing: border-box;
+            width: 270px;
+            display: inline-block;
+            line-height: 34px;
+            height: 34px;
+            padding: 5px 25px 5px 5px;
+            border: 1px #CECECE solid;
+            vertical-align: top;
+        }
+        .search {
+            display: inline-block;
+            width: 80px;
+            text-align: center;
+            background-color: #2A9BD5;
+            color: #fff;
+            height: 35px;
+            line-height: 35px;
+        }
+        img {
+            position: absolute;
+            width: 15px;
+            left: 264px;
+            top: 10px;
+            cursor: pointer;
+        }
+    }
 }
 

+ 16 - 13
src/components/TimeInterval/index.jsx

@@ -59,12 +59,14 @@ class TimeInterval extends React.Component {
   timeSure(date) {
     const { getStartTime, getEndTime } = this.props;
     if (this.state.flg == 1) {
-      let time = getCalendarDate(date, true);
-      let dateBegin = (new Date(time)).getTime()
-      let dateEnd = (new Date(this.state.endTime)).getTime()
-      let dateDes = (dateEnd - dateBegin)/(24 * 3600 * 1000)
-      if(dateEnd < dateBegin){
-        Notify.info("终止时间不能早于起始时间");
+      let time = getCalendarDate(date);
+      let tmpTime = time.replace(/ |:/g, '-').split('-');
+      let arr = this.state.endTime.replace(/ |:/g, '-').split('-');
+      let dateBegin = (new Date(Date.UTC(tmpTime[0],tmpTime[1],tmpTime[2],tmpTime[3],tmpTime[4]))).getTime();
+      let dateEnd = (new Date(Date.UTC(arr[0], arr[1], arr[2], arr[3],arr[4]))).getTime();
+      let dateDes = (dateEnd - dateBegin)/(24 * 3600 * 1000) 
+      if(dateEnd - dateBegin <= 0){
+        Notify.info("终止时间不能早于和等于起始时间");
         return
       }else if(dateDes>90){
         Notify.info("只能搜索最近90天的数据");
@@ -76,14 +78,15 @@ class TimeInterval extends React.Component {
         timeLisStart: date//事件组件的日期
       })
       getStartTime(time)
-
     } else if (this.state.flg == 2) {
-      let time = getCalendarDate(date, true);
-      let dateBegin = (new Date(this.state.startTime)).getTime()
-      let dateEnd = (new Date(time)).getTime()
-      let dateDes = (dateEnd - dateBegin)/(24 * 3600 * 1000)
-      if(dateEnd < dateBegin){
-        Notify.info("终止时间不能早于起始时间");
+      let time = getCalendarDate(date);
+      let tmpTime = time.replace(/ |:/g, '-').split('-');
+      let arr = this.state.startTime.replace(/ |:/g, '-').split('-');
+      let dateBegin = (new Date(Date.UTC(arr[0], arr[1], arr[2], arr[3],arr[4]))).getTime();
+      let dateEnd = (new Date(Date.UTC(tmpTime[0],tmpTime[1],tmpTime[2],tmpTime[3],tmpTime[4]))).getTime();
+      let dateDes = (dateEnd - dateBegin)/(24 * 3600 * 1000);
+      if(dateEnd - dateBegin <= 0){
+        Notify.info("终止时间不能早于和等于起始时间");
         return
       }else if(dateDes>90){
         Notify.info("只能搜索最近90天的数据");

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

@@ -64,6 +64,7 @@ class AdverseReactions extends Component {
                         >
                             <span className={style['last-treat-big-name']} >{item.name}:
                                 {<img className={style['info-img']}  
+                                    title='点击i图标可查看详细说明'
                                     style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
                                     src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                     onMouseEnter={this.handleMouseEnterImg.bind(this)}
@@ -75,7 +76,7 @@ class AdverseReactions extends Component {
                     </span>
                         {item.details.map((it, idx) => {
                             return <span className={style['adverse-reactions-name']} key={item.conceptId + item.name + it.name}>
-                                <input type="checkbox" checked={it.select} id={item.conceptId +item.name + it.name} onChange={this.changeReact.bind(this, it, index)}/>
+                                <input type="radio" checked={it.select} id={item.conceptId +item.name + it.name} onChange={this.changeReact.bind(this, it, index)}/>
                                 <label for={item.conceptId +item.name + it.name}> {it.name} </label>
                                 {it.value==1 && <span className={style['adverse-reactions-recommend']}>(智能推荐)</span>}
                             </span>

+ 1 - 0
src/components/Treat/DrugHistory/LastDrug/index.jsx

@@ -59,6 +59,7 @@ class LastDrug extends Component {
                             > 
                             {item.medicitionName} 
                             {<img className={style['info-img']}  
+                                title='点击i图标可查看详细说明'
                                 style ={currentIndex === index  ? {display: "inline-block"} : {display: "none"}}
                                 src={currentIndex === index ?(hasEnterImg ? info3 : info2 ): info2} 
                                 onMouseEnter={this.handleMouseEnterImg.bind(this)}

+ 5 - 9
src/components/Treat/DrugTreat/index.jsx

@@ -91,9 +91,7 @@ class DrugTreat extends Component {
                         <div  className={style['drug-name-box']}>
                             <span style={item.drugsForbidden === '2'? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}>{index + 1 + '. ' }{item.bigdrugsName}<span>{item.subdrugsName && '('+item.subdrugsName+')'}</span>:&nbsp;</span>
                             {item.medicitionsList.map((it, ii) => {
-                                return ((it.isShow == 1 || it.selected) && <span >
-                                        {ii === 0 ? '' : ', '}
-                                        <span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
+                                return ((it.isShow == 1 || it.selected) &&<span onMouseEnter={this.handleMouseEnterDrug.bind(this, ii , index, it)}
                                               onMouseLeave = {this.handleMouseLeaveDrug}
                                               className={style['drug-name-wrapper']} 
                                         >
@@ -105,17 +103,15 @@ class DrugTreat extends Component {
                                                 {it.medicitionName}
                                             </span>
                                             {<img className={style['info-img']}  
+                                              title='点击i图标可查看详细说明'
                                               style ={currentIndex === index ? (ii === currentImg ? {display: "inline-block"} : {display: "none"}) : {display: "none"}}
                                               src={currentIndex === index ? (ii === currentImg ? (hasEnterImg ? info3 : info2) : info2): info2} 
                                               onMouseEnter={this.handleMouseEnterImg.bind(this, ii, index)}
                                               onMouseLeave = {this.handleMouseLeaveImg}
                                               onClick={this.setDrugInfo.bind(this,it)}/>}
-                                        </span>
-                                        
-                                        
-                                        {it.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: it.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3',filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}, 
-                                        <span  style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{it.rate}</span>
-                                        
+                                        {it.forbidden === '1' ? <span className={style['info-flag']} style={{border: '1px solid #F4C051', background: '#F4C051',marginLeft: '5px'}}>慎用</span>: it.forbidden === '2' ? <span className={style['info-flag']} style={{opacity: '0.3',filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)',border: '1px solid #000',marginLeft: '5px'}}>禁用</span> : ''}
+                                        {/*<span  style={it.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{it.rate}</span>*/}
+
                                     </span>)
                             })}
 

+ 5 - 0
src/components/Treat/DrugTreat/index.less

@@ -19,6 +19,11 @@
 }
 .drug-name-wrapper {
     position: relative;
+    margin-right: 6px;
+    &:not(:last-child):after{
+        display: inline;
+        content: ' ,';
+    }
 }
 .drug-name {
     border-bottom: 1px solid #666;

+ 1 - 1
src/components/Treat/FollowUp/Textarea/index.jsx

@@ -42,7 +42,7 @@ class Textarea extends Component {
   componentDidMount(){
     const {value} = this.props;
     if(value && value.trim()){
-      this.$dom.current.innerText = value
+      this.$dom.current.innerHTML = value
       // this.$dom.current.focus()
       // 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 = '')

+ 2 - 1
src/components/Treat/FollowUp/Textarea/index.less

@@ -5,5 +5,6 @@
     min-width: 30px;
     text-align: center;
     margin-right: 5px;
-    line-height: 20px
+    line-height: 20px;
+    min-height: 20px;
 }

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

@@ -13,14 +13,17 @@
     box-shadow: 0px 0px 5px -2px #7d7c7c;
     word-break: break-all;
     max-width: 100%;
+    line-height: 20px;
     ul, ol {
         padding: 0 0 0 15px;
       }
       ul li {
         list-style: disc;
+        list-style-position: inside;
       }
       ol li{
        list-style: decimal;
+       list-style-position: inside;
      }
 }
 .drug-desc-wrapper {

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


Некоторые файлы не были показаны из-за большого количества измененных файлов