Browse Source

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

zhouna 5 năm trước cách đây
mục cha
commit
5e503b74f6
100 tập tin đã thay đổi với 2204 bổ sung604 xóa
  1. 2 1
      build/webpack.dev.conf.js
  2. 1 0
      build/webpack.prod.conf.js
  3. BIN
      favicon.ico
  4. 1 2
      src/common/components/Banner/index.jsx
  5. 4 2
      src/common/components/ConfirmModal/index.jsx
  6. 6 4
      src/common/components/ConfirmModal/index.less
  7. 6 3
      src/common/components/DropList/index.jsx
  8. 11 10
      src/common/components/DropList/index.less
  9. 94 33
      src/common/components/EditableSpan/index.jsx
  10. 7 1
      src/common/components/EditableSpan/index.less
  11. 74 0
      src/common/components/HasInfoItem/index.jsx
  12. 80 0
      src/common/components/HasInfoItem/index.less
  13. 64 41
      src/common/components/InlineTag/index.jsx
  14. 6 1
      src/common/components/InlineTag/index.less
  15. 20 10
      src/common/components/ItemBox/index.jsx
  16. 2 1
      src/common/components/ItemBox/index.less
  17. 31 0
      src/common/components/LiItem/index.jsx
  18. 31 0
      src/common/components/LiItem/index.less
  19. 10 2
      src/common/components/NumberPan/index.jsx
  20. 1 1
      src/common/components/NumberUnitPan/index.less
  21. 7 5
      src/common/components/SearchBox/index.jsx
  22. 27 15
      src/common/components/Textarea/index.jsx
  23. 2 1
      src/common/components/Textarea/index.less
  24. BIN
      src/common/images/addItem2.png
  25. BIN
      src/common/images/check_off.png
  26. BIN
      src/common/images/check_on.png
  27. BIN
      src/common/images/edit1.png
  28. BIN
      src/common/images/edit2.png
  29. BIN
      src/common/images/icon2.png
  30. BIN
      src/common/images/mimi.png
  31. BIN
      src/common/images/prec.png
  32. 60 0
      src/common/less/base.less
  33. 27 21
      src/common/less/variables.less
  34. 3 3
      src/components/AddAssistCheck/AssistName/index.jsx
  35. 18 3
      src/components/AddAssistCheck/Textarea/index.jsx
  36. 1 1
      src/components/AddAssistCheck/Textarea/index.less
  37. 10 17
      src/components/AddAssistCheck/index.jsx
  38. 12 22
      src/components/AddAssistCheck/index.less
  39. 75 0
      src/components/AddInspect/InspectName/index.jsx
  40. 256 0
      src/components/AddInspect/InspectName/index.less
  41. 5 5
      src/components/AddInspect/SlideExcel/index.jsx
  42. 22 9
      src/components/AddInspect/SlideExcel/index.less
  43. 25 12
      src/components/AddInspect/SlideSelect/index.jsx
  44. 39 4
      src/components/AddInspect/SlideSelect/index.less
  45. 5 29
      src/components/AddInspect/index.jsx
  46. 4 0
      src/components/AddInspect/index.less
  47. 17 7
      src/components/Advice/Textarea/index.jsx
  48. 5 0
      src/components/Advice/Textarea/index.less
  49. 21 26
      src/components/Advice/index.jsx
  50. 12 1
      src/components/Advice/index.less
  51. 4 4
      src/components/AssessResult/ChooseItem/index.jsx
  52. 15 10
      src/components/AssessResult/ScaleItem/index.jsx
  53. 3 3
      src/components/AssessResult/index.jsx
  54. 7 4
      src/components/AssistCheck/index.jsx
  55. 65 13
      src/components/Banner/ModeChange/index.jsx
  56. 18 5
      src/components/Banner/ModeChange/index.less
  57. 63 21
      src/components/Banner/index.jsx
  58. 15 3
      src/components/Banner/index.less
  59. 1 1
      src/components/BodyContainer/index.less
  60. 25 0
      src/components/CaseQuailty/index.jsx
  61. 6 0
      src/components/CaseQuailty/index.less
  62. 6 4
      src/components/CheckBody/index.jsx
  63. 5 0
      src/components/CheckBody/index.less
  64. 40 26
      src/components/ChronicInfo/index.jsx
  65. 10 35
      src/components/CommonSymptom/index.jsx
  66. 17 12
      src/components/CommonSymptom/index.less
  67. 10 19
      src/components/CurrentIll/index.jsx
  68. 2 3
      src/components/Diagnosis/index.jsx
  69. 2 2
      src/components/DiagnosticItem/index.jsx
  70. 5 5
      src/components/DiagnosticList/index.jsx
  71. 10 5
      src/components/DiagnosticList/index.less
  72. 2 2
      src/components/EMRContainer/index.jsx
  73. 2 2
      src/components/Emergency/HisList/index.less
  74. 9 7
      src/components/InfoTitle/index.jsx
  75. 11 3
      src/components/InfoTitle/index.less
  76. 8 4
      src/components/Information/index.jsx
  77. 24 6
      src/components/Information/index.less
  78. 7 5
      src/components/Inspect/index.jsx
  79. 131 0
      src/components/ListItem/index.jsx
  80. 47 0
      src/components/ListItem/index.less
  81. 87 0
      src/components/ListItems/index.jsx
  82. 37 0
      src/components/ListItems/index.less
  83. 14 24
      src/components/MainSuit/index.jsx
  84. 31 0
      src/components/MedicalInfo/Filters/index.jsx
  85. 13 0
      src/components/MedicalInfo/Filters/index.less
  86. 53 12
      src/components/MedicalInfo/index.jsx
  87. 2 2
      src/components/MedicalInfo/index.less
  88. 34 21
      src/components/MultSpread/index.jsx
  89. 17 3
      src/components/Multiple/SlideItem/index.jsx
  90. 2 9
      src/components/Multiple/SlideItem/index.less
  91. 30 9
      src/components/Multiple/index.jsx
  92. 5 5
      src/components/Multiple/index.less
  93. 27 14
      src/components/NumberDrop/index.jsx
  94. 12 1
      src/components/NumberDrop/index.less
  95. 22 7
      src/components/NumberUnitDrop/index.jsx
  96. BIN
      src/components/Operation/Search/imgs/clear.png
  97. BIN
      src/components/Operation/Search/imgs/search.png
  98. 106 0
      src/components/Operation/Search/index.jsx
  99. 38 0
      src/components/Operation/Search/index.less
  100. 0 0
      src/components/Operation/index.jsx

+ 2 - 1
build/webpack.dev.conf.js

@@ -73,7 +73,8 @@ module.exports = merge(baseWebpackConfig, {
         new HtmlWebpackPlugin({
             filename: 'index.html',
             template: 'index.html',
-            inject: 'body'
+            inject: 'body',
+          favicon:'./favicon.ico',
         }),
         new FriendlyErrorsPlugin()
     ]

+ 1 - 0
build/webpack.prod.conf.js

@@ -119,6 +119,7 @@ const webpackConfig = merge(baseWebpackConfig, {
             filename: config.build.index,
             template: 'index.html',
             inject: 'body',
+            favicon:'./favicon.ico',
             minify: {
                 removeComments: true,
                 collapseWhitespace: true,

BIN
favicon.ico


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

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

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

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

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

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

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

@@ -1,4 +1,5 @@
 import React,{Component} from 'react';
+import LiItem from '@common/components/LiItem';
 import classNames from 'classnames';
 
 import style from "./index.less";
@@ -39,10 +40,12 @@ class DropList extends Component{
     return <div className={this.getClass()} contentEditable='false'>
         <ul>
           {data&&data.map((it)=>{
-            /*return <li onClick={(e)=>this.handleSelect(e,it)} className={it.selected||(it.selected!==false&&+it.defaultSelect===1)?style['selected']:''}>{it.labelPrefix}{it.questionDetailList&&it.questionDetailList.length>0?it.questionDetailList[0].name:it.name}{it.labelSuffix}</li>*/
-            return <li onClick={(e)=>this.handleSelect(e,it)} className={it.selected||(boxMark!=1&&!hideTag&&it.selected!==false&&+it.defaultSelect===1)?style['selected']:''}>{it.labelPrefix}{it.name}{it.labelSuffix}</li>
+            return <LiItem handleClick={(e)=>this.handleSelect(e,it)}
+                            type='border'
+                            selected={it.selected||(boxMark!=1&&!hideTag&&it.selected!==false&&+it.defaultSelect===1)}
+                            >{it.labelPrefix}{it.name}{it.labelSuffix}</LiItem>
           })}
-          <li onClick={(e)=>this.handleClear(e)} className='red'>清空选项</li>
+          <li onClick={(e)=>this.handleClear(e)} className={style['mclear']}>清空选项</li>
         </ul>
       </div>;
   }

+ 11 - 10
src/common/components/DropList/index.less

@@ -1,18 +1,19 @@
 @import "~@less/variables.less";
 .list{
   .pop;
+  font-weight: normal;
   padding: 0 0 10px;
   color: @text-color;
-  li{
-    line-height: 35px;
-    border:1px #fff solid;
-    padding: 0 15px;
-    white-space: nowrap;
-    cursor: pointer;
-  }
-  li:hover,.selected{
-    border-color:#3B9ED0;
-  }
+}
+.mclear{
+  height: 32px;
+  line-height: 32px;
+  border:1px #fff solid;
+  padding: 0 20px;
+  white-space: nowrap;
+  text-align: center;
+  cursor: pointer;
+  color: @red;
 }
 .hide{
   display: none;

+ 94 - 33
src/common/components/EditableSpan/index.jsx

@@ -1,7 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import config from "@config/index";
-import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault} from '@utils/tools.js';
+import {filterArr,isIE,getPageCoordinate,filterDataArr,preventDefault,setFontColorSize,moveEnd} from '@utils/tools.js';
 import Notify from '../Notify/index.js';
 import classNames from 'classnames';
 
@@ -17,6 +17,7 @@ import $ from 'jquery';
  * * text:标签内文字
  *
  * ****/
+let indexNum = '';
 
 class EditableSpan extends Component{
   constructor(props){
@@ -36,8 +37,9 @@ class EditableSpan extends Component{
     this.handleBlur = this.handleBlur.bind(this);
     this.handleKeydown = this.handleKeydown.bind(this);
     this.handleKeyup = this.handleKeyup.bind(this);
-    this.moveEnd = this.moveEnd.bind(this);
     this.handleClick = this.handleClick.bind(this);
+    this.selectStart = this.selectStart.bind(this);
+    this.selectEnd=this.selectEnd.bind(this);
   }
   handleFocus(e){
     e.stopPropagation();
@@ -48,8 +50,10 @@ class EditableSpan extends Component{
       setTimeout(function(){
         txt = that.$span.current.innerText||that.$span.current.innerHTML;
         that.$span.current.innerHTML = txt;
+        moveEnd($(that.$span.current)[0]);     //光标落到最后去
       });
     })
+    
     const {mainSaveText,full,setFocusIndex,i,boxMark,value}= this.props;
     let mainText = filterDataArr(mainSaveText);//主诉字数
     if(+boxMark==3||+boxMark==4){         //主诉为空,且第一次聚焦其他史查体时提示且不可输入
@@ -79,6 +83,7 @@ class EditableSpan extends Component{
       if(mainText.length >= config.limited){
         if(text1.length > labelVal.length){
           e.target.innerHTML = labelVal;    //innerHTML兼容FF26
+          e.target.blur();
           Notify.info(config.limitText);
           return
         }else if(text1.length == labelVal.length){
@@ -134,21 +139,6 @@ class EditableSpan extends Component{
     $(this.$span.current).off("paste");
   }
 
-  moveEnd(obj) {
-    if(window.getSelection){//ie11 10 9 ff safari
-      obj.focus(); //解决ff不获取焦点无法定位问题
-      var range = window.getSelection();//创建range
-      range.selectAllChildren(obj);//range 选择obj下所有子内容
-      range.collapseToEnd();//光标移至最后
-    }
-    else if (document.selection) {//ie10 9 8 7 6 5
-      var range = document.selection.createRange();//创建选择对象
-      range.moveToElementText(obj);//range定位到obj
-      range.collapse(false);//光标移至最后
-      range.select();
-    }
-  }
-
   handleKeydown(e){
     const ev = e||window.event;
     const {i} = this.props;
@@ -163,32 +153,35 @@ class EditableSpan extends Component{
         preVal:innerVal
       })
     }
+
     let range = window.getSelection();
     let textIndex = range.focusOffset;
-    let textLength = range.anchorNode.length;
-    if(ev.keyCode==37&& i!=0){//向左
+    let textLength = range.anchorNode&&range.anchorNode.length;
+    let preObj = $(this.$span.current).prev();
+    if(ev.keyCode==37){//向左
       let preObj = $(this.$span.current).prev();
       let obj = preObj[0]&&preObj[0].nodeName=="DIV"?preObj.prev():preObj;
       if(textIndex == 0){
         preventDefault(ev);
         if(obj){
-          this.moveEnd(obj[0]);
+          obj[0]&&moveEnd(obj[0]);
         }
       }
     }
     if(ev.keyCode==39){//向右
+      let curObj = $(this.$span.current)
       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)){
         preventDefault(ev);
         if(obj){
-          obj.focus();
+          obj[0]&&obj.focus();
         }
       }
     }
   }
   handleKeyup(e){
-    const {boxMark,handleKeydown,removeId,handleClear,removeSpan} = this.props;
+    const {boxMark,handleKeydown,removeId,handleClear,removeSpan,handleChange,select_end} = this.props;
     const {preVal,index} = this.state;
     const ev = e||window.event;
     const target = ev.target||ev.srcElement;
@@ -200,13 +193,24 @@ class EditableSpan extends Component{
     if(ev.keyCode==46){//delete
       //判断nexObj
       // let nextObj = $(this.$span.current).next();
+      // ||textIndex ==innerVal.length&&preObj[0].nodeName=="DIV"
+      let range = window.getSelection();
+      let textIndex = range.focusOffset;
+
       let nextObj = $(this.$span.current);
+      let nexObj = $(this.$span.current).next();
+      let nexObjN = nexObj.next();
+      let preObj = $(this.$span.current).prev();
+      let nexVal = nexObj[0]&&nexObj[0].innerText || nexObj[0]&&nexObj[0].innerHTML; 
       if(preVal.trim().length==1&& !innerVal){
         removeId && removeId({boxMark,i:index,text:"",flag:'del'});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
         //如果后一个不是标签,则光标移到最前
         if(nextObj && nextObj[0].nodeName !=="DIV"){
-          nextObj.focus();
+          // nextObj.focus();
+          moveEnd(nextObj[0],1)
+        }else{
+          moveEnd(preObj[0])
         }
       }
       //action里往后删除
@@ -214,32 +218,53 @@ class EditableSpan extends Component{
         let data = innerVal.trim();
         if(nextObj && !config.punctuationReg.test(data) || data=='<br>'){
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'del'});
-          // nextObj.focus();  
           if(nextObj && nextObj[0] && nextObj[0].nodeName !=="DIV"){
             // IE浏览器focus光标在最后,其他浏览器在最前
-            nextObj.focus();
+            // nextObj.focus();
+            if(boxMark==2&&this.props.data[index+1]&&this.props.data[index+1].flag==3){
+              moveEnd(nexObjN[0],1);
+            }else{
+              moveEnd(nextObj[0],1);
+            }
           }
           /*this.setState({
             index: null
           })*/
+        }else if(indexNum ==innerVal.length&&nexObj[0]&&nexObj[0].nodeName=="DIV"){//span最后一位后面为div标签
+          handleKeydown&&handleKeydown({boxMark,i:index+1,text:data,flag:'del'});
+          moveEnd(nextObj[0]);
+        }else if(nexObj[0]&&nexObj[0].nodeName=="SPAN"){
+          if(nexVal.length <= 1){//为空或者一个字delete时候
+            removeId && removeId({boxMark,i:index+1,text:"",flag:'del'});
+            handleClear && handleClear({boxMark});
+            moveEnd(nexObj[0])
+          }else if(nexVal.length > 1){
+            let tmpVal = nexVal.substr(1,data.length)
+            handleChange&&handleChange({text1:tmpVal,boxMark,i:index+1});
+            nexObj.html(tmpVal)
+            moveEnd(nexObj[0],1)
+          }
         }
       }
     }
 
-    if(ev.keyCode==8){
+    if(ev.keyCode==8&&!select_end){
       // 主诉现病史去重:删除最后一个字的时候移除该数据(将name、id和value替换成空)并移除id
       // 前面是标签,内容为空时再删一次才移除标签;前面是文本,则直接移除;
       let preObj = $(this.$span.current).prev();
+      let curObj = $(this.$span.current);
       if(index!==0&&preVal.trim().length==1&& !innerVal){
         removeId && removeId({boxMark,i:index,text:""});
         handleClear && handleClear({boxMark});//删除最后一个字时清空搜索结果,避免现病史搜索框不立即消失的情况
         if(preObj[0].nodeName !=="DIV"){
-          this.moveEnd(preObj[0]);
+          moveEnd(preObj[0]);
         }
       }
 
+      let range = window.getSelection();
+      let textIndex = range.focusOffset;
       if(innerVal !== preVal){
-
+        
       }else{
         // 中英文数字和下划线--单独删除标签
         /*const reg = new RegExp("([\u4E00-\uFA29]|[\uE7C7-\uE7F3]|[a-zA-Z0-9_])");
@@ -256,14 +281,34 @@ class EditableSpan extends Component{
         // let pattern = new RegExp(/^\,?$|^\,?$|^\.?$|^\。?$|^\、?$|^\;?$|^\;?$|^\:?$|^\:?$|\s/);
         // if(index!==0 && pattern.test(data)){
         // 后半段是处理IE
-        if(index!==0 && !config.punctuationReg.test(data) || index!==0 && data=='<br>'){
+        if(index!==0 && !config.punctuationReg.test(data) || index!==0 && data=='<br>'||indexNum == 0&&preObj[0]&&preObj[0].nodeName=="DIV"){
           // let preObj = $(this.$span.current).prev();
           let obj = preObj[0].nodeName=="DIV"?preObj.prev():preObj;
           handleKeydown&&handleKeydown({boxMark,i:index,text:data,flag:'backsp'});
-          this.moveEnd(obj[0]);
+          moveEnd(obj[0]);
           this.setState({
             index: null
           })
+        }else if(textIndex == 0&&preObj[0]&&preObj[0].nodeName=="SPAN"){
+          let data = preObj[0].innerText || preObj[0].innerHTML;
+          if(data.length == 1){//span只有一个文本,删除后移除检索
+            removeId && removeId({boxMark,i:index-1,text:""});
+            handleClear && handleClear({boxMark});
+            if(preObj[0].nodeName !=="DIV"){
+              if(boxMark==2){
+                moveEnd(preObj[0],1);
+              }else{
+                moveEnd(preObj[0]);
+              }
+            }
+          }else{
+            let tmpVal = data.substr(0,data.length-1)
+            handleChange&&handleChange({text1:tmpVal,boxMark,i:index});
+            preObj.html(tmpVal)
+            if(preObj[0].nodeName !=="DIV"){
+              moveEnd(preObj[0]);
+            }
+          }
         }
       }
       // 主诉使用模板删除最后一个空span时移除
@@ -271,7 +316,6 @@ class EditableSpan extends Component{
         removeSpan();
       }
     }
-
   }
   componentWillReceiveProps(next){
     const isRead = this.props.isRead;
@@ -281,6 +325,9 @@ class EditableSpan extends Component{
   }
   handleClick(e){
     $(this.$span.current).attr({"contentEditable":true}).focus()
+    let range = window.getSelection();
+    let textIndex = range.focusOffset;
+    indexNum = textIndex
   }
   componentDidMount(){
     const {value} = this.props;
@@ -288,8 +335,19 @@ class EditableSpan extends Component{
       this.$span.current.innerText?(this.$span.current.innerText = value||''):(this.$span.current.innerHTML = value||'');
     }
   }
+  selectStart(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
+  selectEnd(){
+    const {i,setSelectArea,boxMark,select_start}= this.props;
+    if(select_start!==i){     //判断不能省,否则无法聚焦
+      setSelectArea({i,boxMark,dir:'end'});
+      window.getSelection().empty();
+    }
+  }
   getClass(){
-    const {full,value,saveText,i,preIsExt,afterIsExt} = this.props;
+    const {full,value,saveText,i,preIsExt,afterIsExt,mouseSelect} = this.props;
     const br = preIsExt&&!afterIsExt;       //最后一个体征标签
     const preSelected = saveText[i-1];
     const isFull = full?' '+style['full']:'';       //是否宽度设为整行宽度
@@ -297,11 +355,12 @@ class EditableSpan extends Component{
     const ext = preIsExt?style['ext']:style['unselect'];
     const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const $span = this.$span.current;
     if(br&&$span&&!$span.innerText){
       this.$span.current.innerHTML='&nbsp;';
     }
-    return classNames(style['editable-span'],isFull,unselect,hasBr);
+    return classNames(style['editable-span'],isFull,unselect,hasBr,setFontColorSize(2,6),selectedArea);
   }
 
   render() {
@@ -311,6 +370,8 @@ class EditableSpan extends Component{
                  onInput={this.onChange}
                  onFocus={this.handleFocus}
                  onBlur={this.handleBlur}
+                 onmousedown={this.selectStart}
+                 onmouseup={this.selectEnd}
                  onkeydown={this.handleKeydown}
                  onclick={this.handleClick}
                  onkeyup={this.handleKeyup}></span>;

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

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

+ 74 - 0
src/common/components/HasInfoItem/index.jsx

@@ -0,0 +1,74 @@
+import React,{Component} from 'react';
+import style from './index.less';
+import infoShow from '@common/images/info-show.png';
+import infoMove from '@common/images/info-move.png';
+import $ from 'jquery';
+
+class HasInfoItem extends Component {
+    constructor(props) {
+        super(props)
+        this.state = {
+            hasEnterItem: false,
+            hasEnterImg: false
+        }
+    }
+    handleMouseEnterDrug(){
+        this.setState({
+            hasEnterItem: true
+        })
+    }
+    handleMouseLeaveDrug(){
+        this.setState({
+            hasEnterItem: false
+        })
+    }
+    handleMouseEnterImg(){
+        this.setState({
+            hasEnterImg: true
+        })
+    }
+    handleMouseLeaveImg(){
+        this.setState({
+            hasEnterImg: false
+        })
+    }
+    setDrugInfo(item,e){
+        e.stopPropagation();
+        const{ setDrugInfo } = this.props
+        setDrugInfo && setDrugInfo(item)
+    }
+    handleSelect(){
+        const{ handleSelect, position } = this.props
+        handleSelect && handleSelect(position)
+    }
+
+    render(){
+        const { item } = this.props
+        const { hasEnterItem, hasEnterImg} = this.state
+        return (<span className={style['drug-name-wrapper']} >
+            <span className={`${style['drug-name']}`}  
+                // onDoubleClick={() =>{this.setDrugInfo(it);showDrugInfo();}}  //药品说明双击显示(现在为点击图标显示)
+                onClick={()=>{item.forbidden === '2' ? '' : this.handleSelect()}} 
+                onMouseEnter={this.handleMouseEnterDrug.bind(this)}
+                onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
+                >
+                <span className={`${style['drug-name-span']}  ${item.forbidden === '2' ? style['disabled']: item.selected ?  style['selected'] : ''}`}>
+                    {item.medicitionName}
+                </span>
+                {<img className={`${style['info-img']} ${hasEnterItem?style['show-content']:style['hide-content']}`}  
+                title='点击i图标可查看详细说明'
+                src={hasEnterImg?infoMove:infoShow} 
+                onMouseEnter={this.handleMouseEnterImg.bind(this)}
+                onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
+                onClick={this.setDrugInfo.bind(this,item)}/>}
+            </span>
+            {(item.forbidden === '1'||item.forbidden === '2') && <span className={`${style['info-flag']} ${item.forbidden === '1' ? style['cautious']:item.forbidden === '2'?style['disabled']:''}`}>
+                {item.forbidden === '1' ? "慎用":item.forbidden === '2'? "禁用":""} 
+            </span>}
+        {/*<span  style={item.forbidden === '2' ? {opacity: '0.3', filter:'alpha(opacity=30)',filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=30)'} : ''}> 使用率{item.rate}</span>*/}
+
+    </span>)
+    }
+}
+
+export default HasInfoItem;

+ 80 - 0
src/common/components/HasInfoItem/index.less

@@ -0,0 +1,80 @@
+
+
+.drug-name-wrapper {
+    position: relative;
+    margin-right: 6px;
+    &:not(:last-child){
+        .drug-name-span:after{
+            display: inline;
+            content: ',';
+        }
+    }
+    
+.drug-name {
+    display: inline-block;
+    cursor: pointer;
+    position: relative;
+    
+    
+}
+.drug-name-span {
+   position: relative;
+   text-decoration: underline;
+   
+}
+}
+.underline {
+    position: absolute;
+    width: 100%;
+    border-bottom: 1px solid #666;
+    display: inline-block;
+    left: 0;
+    bottom: 0;
+}
+.underline-select {
+    border-bottom: 1px solid #3B9ED0;
+}
+.info-img, .info-img-more {
+    width: 12px;
+    margin: 0 3px -1px;
+    cursor: pointer;
+}
+.info-img {
+    width: 15px;
+    position: absolute;
+    top: -5px;
+    left: 50%;
+    margin-left: -7px;
+    cursor: pointer;
+}
+.info-flag {
+    display: inline-block;
+    width: 34px;
+    height: 16px;
+    line-height: 16px;
+    border-radius: 4px;
+    text-align: center;
+    margin: 0 0 0 5px;
+    border: 1px solid #000;
+    position: relative;
+    top: 2px;
+}
+.show-content {
+    display: inline-block;
+}
+.hide-content{
+    display: none;
+}
+.disabled{
+    opacity: 0.3;
+    filter:alpha(opacity=30);
+    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30);";
+}
+.selected {
+    color: #3B9ED0;
+}
+.cautious {
+    border: 1px solid #F4C051;
+    background: #F4C051;
+}
+

+ 64 - 41
src/common/components/InlineTag/index.jsx

@@ -1,6 +1,9 @@
 import React, { Component } from "react";
 import style from "./index.less";
 import classNames from 'classnames';
+import Notify from '@commonComp/Notify';
+import config from '@config/index';
+import {setFontColorSize} from '@utils/tools';
 /***
  * 标签组件
  * author:zn@2018-11-08
@@ -17,7 +20,7 @@ class InlineTag extends Component {
     this.$span = React.createRef();
     this.state = {
       value:props.value||'',
-      placeholder:props.placeholder||''
+      over:false
     };
     this.handleBlur = this.handleBlur.bind(this);
     this.handleInput = this.handleInput.bind(this);
@@ -26,51 +29,68 @@ class InlineTag extends Component {
   }
   handleInput(e){       //输入时保存临时值,在修改灰显为黑色时判断用
     e.stopPropagation();
-    const value = e.target.innerText||e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');//兼容firefox26
+    const {mainSaveText,ikey,prefix,suffix,value,boxMark} = this.props;
+    const val = e.target.innerText||e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');//兼容firefox26
+    const myval = prefix+val+suffix;
+    const i = ikey.split("-")[1];
+    const tempArr = [...mainSaveText];
+    tempArr.splice(i,1);
+    let lefts = tempArr.join("");
+    if(boxMark==='1'&&(lefts+myval).length>config.limited) {      //主诉超过字数限制提示并禁止输入
+      e.target.innerHTML = value||'';
+      Notify.info(config.limitText);
+      this.setState({
+        over:true
+      });
+      return;
+    }
     this.setState({
-      value:value
-    })
+      value:val,
+      over:false
+    });
   }
   handleBlur(e){         //鼠标离开是保存值到store中
     e.stopPropagation(); //不阻止会触发外层div的失焦事件
-    const value = e.target.innerText||e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');;
-    const {handleInput,ikey,prefix,suffix,placeholder} = this.props;
-    if(!value.trim()){
+    const val = e.target.innerText||e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');
+    const {handleInput,ikey,prefix,suffix,placeholder,value,boxMark} = this.props;
+    if(!val.trim()){
       this.setState({
-        placeholder:placeholder,
         value:''
       });
+      e.target.innerHTML = placeholder;
+      return;
     }
-    //this.$span.current.innerText?(this.$span.current.innerText=''):(this.$span.current.innerHTML='');      //修改生成文字变成输入的2倍bug
-    handleInput&&handleInput({text:value.trim(),ikey,prefix,suffix});
-    this.setState({
-      value:value.trim()
-    });
+    if(boxMark==='1'&&this.state.over){     //超过字数限制,显示输入前的值
+      e.target.innerHTML = value||'';
+      return;
+    }
+    //主诉未超过字数限制,保存值
+    e.target.innerHTML = val.trim();
+    handleInput&&handleInput({text:val.trim(),ikey,prefix,suffix});
   }
   handleFocus(e){
     e.stopPropagation();
-    const text = e.target.innerText || e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');;
+    const text = e.target.innerText || e.target.innerHTML.replace(/&nbsp;$|^&nbsp;/,'');
     const {placeholder} = this.props;
     if(text.trim()==placeholder){
-      this.setState({
-        placeholder:''
-      });
+      e.target.innerHTML = '';
     }
   }
   getStyle(){
-    const {hideTag,placeholder,isExtBlue} = this.props;
+    const {hideTag,placeholder,isExtBlue,mouseSelect} = this.props;
     const value = this.state.value;
-    const ext = isExtBlue?style['ext']:'';
-    if(hideTag){
+    const ext = isExtBlue?style['ext']:'';//是否为体征
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    if(hideTag){//是否是多标签组合
       if(value){
-        return classNames(style['selected-no-tag']);
+        return classNames(style['selected-no-tag'], setFontColorSize(),selectedArea);
       }
-      return classNames(style['no-tag'],ext);
+      return classNames(style['no-tag'],ext, setFontColorSize(2),'prefixUnsetColor',selectedArea);
     }
-    if(!value||value.trim()==placeholder){
-      return classNames(style['gray'],ext);
+    if(!value||value.trim()==placeholder){//灰色标签
+      return classNames(style['gray'],ext, setFontColorSize(2),selectedArea);
     }
-    return style['selected-tag'];
+    return classNames(style['selected-tag'],ext, setFontColorSize(),selectedArea);
   }
   moveEnd(obj) {
     if(window.getSelection){//ie11 10 9 ff safari
@@ -89,34 +109,37 @@ class InlineTag extends Component {
   handleFixClick(){
     this.moveEnd(this.$span.current);
   }
+  handleMouseUp(){
+    const {select_start,i,setSelectArea,boxMark}= this.props;
+    if(select_start!==undefined){
+      setSelectArea({i,boxMark,dir:'end'});
+    }
+  }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //设置最小宽度避免输入后宽度跳动
+    this.$span.current.innerHTML=this.props.placeholder;
     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,value} = this.props;
-    const {placeholder} = this.state;
+    const {prefix,suffix,isExtBlue} = this.props;
     return <div className={this.getStyle()}
-                onClick={this.handleFixClick}>
-                <span>{prefix}</span>
-                <span className={style['free-in']}
+                onClick={this.handleFixClick}
+                onMouseUp={this.handleMouseUp.bind(this)}
+                onMouseDown={this.handleMouseDown.bind(this)}>
+                <span className="prefixUnset">{prefix}</span>
+                <span className={`${style['free-in']} prefixUnset`}
                       contentEditable={true}
                       onBlur={this.handleBlur}
                       onInput={this.handleInput}
                       onFocus={this.handleFocus}
                       onClick={(e)=>{e.stopPropagation();}}
-                      ref={this.$span}>&nbsp;{value||placeholder}</span>
-                <span>{suffix}</span>
+                      ref={this.$span}></span>
+                <span className="prefixUnset">{suffix}</span>
             </div>;
     }
 }

+ 6 - 1
src/common/components/InlineTag/index.less

@@ -14,6 +14,10 @@
 }
 .gray{
    .tag;
+   span {
+    color: unset;
+    font-size: unset;
+   }
   &.ext{
     color: @extBlue;
   }
@@ -23,7 +27,8 @@
   min-width: 30px;
   vertical-align: top;
   text-align: center;
-  /*border-bottom: 1px @placeholder-color solid;*/
+  color: unset;
+  font-size: unset;
   outline: none;
   word-break: break-all;
 }

+ 20 - 10
src/common/components/ItemBox/index.jsx

@@ -1,6 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
-import {isIE,handleEnter} from '@utils/tools.js';
+import store from '@store';
+import {isIE,handleEnter,setFontColorSize} from '@utils/tools.js';
 import $ from 'jquery';
 /***
  * author:zn@2018-11-13
@@ -27,20 +28,21 @@ class ItemBox extends Component {
     const sty = {width:boxWidth?boxWidth:undefined,height:boxHeight?boxHeight:undefined,lineHeight:boxLineHeight?boxLineHeight:'22px',marginTop:marginTop,backgroundColor:backgroundColor?backgroundColor:''};
     return style?Object.assign(style,sty):sty;
   }
-
   handleClick(e){
-    const {handleClick} = this.props;
+    e.stopPropagation();
+    const {handleClick,hideAllDrop} = this.props;
     handleClick && handleClick(e);//为了获取鼠标位置,显示搜索结果框;
+    hideAllDrop&&hideAllDrop();
   }
   handleInput(e){
-    const {onchange,data} = this.props;
+    const {handleChange,data} = this.props;
     if(!data || (data.length==0)){//避免结构化下触发onchange,导致下拉要点两下
-      onchange&&onchange(e)
+      handleChange&&handleChange(e)
     }
   }
-
   componentDidMount(){
     const {setRef} = this.props;
+    this.$div.current.innerHTML='';     //bug2276,FF26初始光标位置问题
     setRef&&setRef(this.$div);
     if(isIE()){
       $(this.$div.current).onIe8Input(function(e){
@@ -48,6 +50,7 @@ class ItemBox extends Component {
       },this);
     }
   }
+  
 componentWillReceiveProps(nextP){
     if(nextP.children.length>1){
       const that = this;
@@ -56,12 +59,19 @@ componentWillReceiveProps(nextP){
         that.context.scrollArea&&that.context.scrollArea.refresh();
       });
     }
+}
+setFontColorSize(){
+  const {data,saveText,title} = this.props;
+  if(data&&data.length==0&&saveText&&saveText[0]){
+    return setFontColorSize(2,7)
+  }
+  return setFontColorSize(2,5)
 }
   render(){
-    const {title,children,editable,className,handleFocus,onchange,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
-    return <div className={style["box"]+" "+"clearfix"} >
-      <div className={style["title"] + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
-      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={handleFocus} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
+    const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
+    return <div className={style["box"]+" "+"clearfix"}>
+      <div className={`${style["title"]} ${setFontColorSize(2,4)}` + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
+      <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:'' } ${this.setFontColorSize()}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={editable?handleFocus:null} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
         {fuzhen?children||fuzhen:children}
       </div>
     </div>

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

@@ -20,9 +20,10 @@
     min-height: 38px;
     margin:0 470px 0 60px;
     position: relative;
-    padding:5px;
+    padding:5px 12px 5px 5px;
     outline: none;
     border-bottom:1px @part-border-color dashed;
+    color: #333;
     /*border-radius: 4px;*/
   }
   .border {

+ 31 - 0
src/common/components/LiItem/index.jsx

@@ -0,0 +1,31 @@
+import classNames from 'classnames';
+import styles from './index.less';
+/**
+ * 单/多选列表的一行
+ * selected:是否被选中
+ * noHover:是否有hover状态
+ * noDot:无最大宽度缩略...样式
+ * disabled:灰色样式,与selected,noHover互斥
+ * handleClick:点击事件
+ * title,style:原生属性
+ * type: border边框选中样式,check蓝色对勾选中样式(默认),noneCheck黑色对勾选中样式
+ *
+ * **/
+function LiItem(props){
+  const {children,handleClick,title,style,noHover,selected,disabled,noDot} = props;
+  const type = props.type||'check';     //选中样式默认多选选中样式
+  const dot = noDot?styles['no-dot']:'';
+  if(disabled){
+    return <li onClick={handleClick} className={classNames(styles["disabled"],dot,styles["li-item"])} title={title} style={style}>{children}</li>;
+  }
+  const typeMap = {
+    border:'border-selected',
+    check:'check-selected',
+    noneCheck:'black-selected',
+  };
+  const hover = noHover?'':styles['hoverable'];
+  const select = selected?styles[typeMap[type]]:'';
+  return <li onClick={handleClick} className={classNames(hover,select,dot,styles["li-item"])} title={title} style={style}>{children}</li>;
+};
+
+export default LiItem;

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

@@ -0,0 +1,31 @@
+@import "~@less/mixin.less";
+
+.li-item{
+  height:30px;
+  line-height: 30px;
+  padding: 0 18px 0 22px;
+  border:1px #fff solid;
+  text-align: left;
+  white-space: nowrap;
+  max-width: 100%;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  cursor: pointer;
+}
+.hoverable:hover,.border-selected{
+  border-color:#3B9ED0;
+}
+.check-selected,.black-selected{
+  .select-li;
+}
+.black-selected{
+  background-image:url('@common/images/then.png');
+}
+.disabled{
+  color: @disable-color;
+}
+.no-dot{
+  /*max-width:100%;
+  width: unset;
+  text-overflow: unset;*/
+}

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

@@ -22,7 +22,7 @@ class NumberPan extends Component{
     onSelect&&onSelect(value+text);
   }
   handleClear(e){
-    e.stopPropagation();
+    e&&e.stopPropagation();
     const onSelect = this.props.handleSelect;
     this.setState({
       value: ''
@@ -57,6 +57,14 @@ class NumberPan extends Component{
       display:show?'table':'none'        //table onBlur阻止冒泡是为了修复multSpread中数字键盘点击触发最外层数字组件onBlur事件
     }
   }
+  componentWillReceiveProps(next){
+    //超过范围后重新打开下拉点删除,显示原值bug修改
+    if(next.toClear&&!this.props.toClear){
+      this.setState({
+        value: this.props.value
+      });
+    }
+  }
   render(){
     const select = this.handleSelect;
     const noString=this.props.noString;
@@ -77,7 +85,7 @@ class NumberPan extends Component{
           <td><button onMouseUp={select}>4</button></td>
           <td><button onMouseUp={select}>5</button></td>
           <td><button onMouseUp={select}>6</button></td>
-          <td><button onMouseUp={this.handleBack.bind(this)}><img src={backspace} onClick={this.handleBack.bind(this)} /></button></td>
+          <td><button onMouseUp={this.handleBack.bind(this)}><img src={backspace} /></button></td>
         </tr>
         <tr>
           <td><button onMouseUp={select}>7</button></td>

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

@@ -4,7 +4,7 @@
 }
 .pan{
   width: 280px;
-  
+  font-weight: normal;
   td{
     width: 68px;
     height:44px;

+ 7 - 5
src/common/components/SearchBox/index.jsx

@@ -4,7 +4,7 @@ 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 LiItem from '@common/components/LiItem';
 import ScrollArea from 'react-scrollbar';
 /**
  * 主诉“添加症状”下拉中的:搜索框(含结果下拉)
@@ -25,7 +25,7 @@ class SearchBox extends React.Component {
         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.handleSearchSelect = this.handleSearchSelect.bind(this);
         this.reset = this.reset.bind(this);
     }
     handleClearVal(){
@@ -37,7 +37,7 @@ class SearchBox extends React.Component {
         });
         clearSearch&&clearSearch();
     }
-    handleSearchSelect(e,item){
+    handleSearchSelect(item,e){
       e.stopPropagation();
       e.preventDefault();
       const {clearSearch,onSelect} = this.props;
@@ -70,7 +70,7 @@ class SearchBox extends React.Component {
         });
     }
     handleFocus(e){//聚焦时边框变蓝色
-      e.stopPropagation();
+      //e.stopPropagation();
       e.preventDefault();
       this.setState({border:true})
     }
@@ -149,7 +149,9 @@ class SearchBox extends React.Component {
                       <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>
+                          return <LiItem key={it.conceptId}
+                                         handleClick={this.handleSearchSelect.bind(this,it)}
+                                         title={litext}>{litext}</LiItem>
                         })}
                       </ul>
                     </ScrollArea>

+ 27 - 15
src/common/components/Textarea/index.jsx

@@ -2,9 +2,9 @@ import React, { Component } from "react";
 import style from "./index.less";
 import Notify from '../Notify';
 import config from '@config/index';
-import {isIE} from '@utils/tools.js';
+import {isIE,moveEnd} from '@utils/tools.js';
 import {getFeature} from '@store/async-actions/fetchModules';
-import {getAllDataList,getAllDataStringList,ifOtherClear} from "@utils/tools.js";
+import {getAllDataList,getAllDataStringList,ifOtherClear,setFontColorSize} from "@utils/tools.js";
 import store from '@store';
 import $ from "jquery";
 
@@ -26,8 +26,18 @@ class Textarea extends Component {
   }
   handleFocus(e){            //初始显示props中的值,focus已经显示输入的值,避免值更新闪烁
     const {handleFocus,fuzhen,handleInput,isChronic,hasMain,boxMark} = this.props;
+    //黏贴时去掉html格式
+    const that = this;
+    let txt = '';
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      });
+    });
     //const {inpText} = this.state;console.log(inpText,boxMark,hasMain)
-    if(boxMark!='1'&&!hasMain&&!e.target.innerText){
+    if(boxMark!='1'&&boxMark!='2'&&!hasMain&&!e.target.innerText){
       //现病史、其他史无主诉且本身无内容是聚焦提示无法操作
       this.setState({
         editable:false
@@ -102,9 +112,11 @@ class Textarea extends Component {
     return flg;
   }
   handleBlur(e){
-    const {saveChronic} = this.props;
-    const text = e.target.innerText || e.target.innerHTML;
-    getFeature(text).then((res)=>{
+    //const {saveChronic} = this.props;
+    //const text = e.target.innerText || e.target.innerHTML;
+    //解除绑定事件
+    $(this.$dom.current).off("paste");
+    /*getFeature(text).then((res)=>{
       if(res.data.code==0){
         const result = res.data.data;
         // 慢病
@@ -115,7 +127,7 @@ class Textarea extends Component {
           }
         }
       }
-    })
+    })*/
   }
   handleKeydown(e){
     const {boxMark} = this.props;
@@ -125,12 +137,12 @@ class Textarea extends Component {
       if(ev.keyCode==13){return false;}
     }
   }
-  shouldComponentUpdate(next){
-    if(JSON.stringify(next) == JSON.stringify(this.props)){
-      return false;
-    }
-    return true;
-  }
+  // shouldComponentUpdate(next){  切换字体设置不渲染
+  //   if(JSON.stringify(next) == JSON.stringify(this.props)){
+  //     return false;
+  //   }
+  //   return true;
+  // }
   componentWillReceiveProps(next){
     const isRead = this.props.isRead;
     if(next.isRead != isRead||(next.value!=this.props.value&&next.value&&next.value.indexOf("复诊")!=-1)){    //value对比解决复诊不显示bug,复诊对比解决关标跳到前面bug
@@ -155,9 +167,9 @@ class Textarea extends Component {
     const { title,boxMark } = this.props;
     return (
       <div className={style["box"]}>
-        <div className={style["title"]}>{title}</div>
+        <div className={`${style["title"]} ${setFontColorSize(2,4)}`}>{title}</div>
         {/*{isRead?<div className={style["content"]+" "+'11'} contentEditable={true} onFocus={this.handleFocus}>{value}</div>:''}*/}
-        <div className={style["content"]}
+        <div className={`${style["content"]} ${setFontColorSize(2,5)}`}
              onFocus={this.handleFocus}
              ref={this.$dom}
              contentEditable={true}

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

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

BIN
src/common/images/addItem2.png


BIN
src/common/images/check_off.png


BIN
src/common/images/check_on.png


BIN
src/common/images/edit1.png


BIN
src/common/images/edit2.png


BIN
src/common/images/icon2.png


BIN
src/common/images/mimi.png


BIN
src/common/images/prec.png


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

@@ -70,3 +70,63 @@ html,body {
 :global(.ql-align-right) {
     text-align: right;
 }
+
+//标准颜色(主诉、现病史、其他史、查体)
+//字体修改
+:global(.inheritStyle){//继承样式
+    color: inherit;
+    font-size: inherit;
+}
+:global(.largeFontSize){//超大字号
+    font-size: 18px !important;
+}
+:global(.middleFontSize){//大字号
+    font-size: 16px !important;
+}
+:global(.simpleFontSize){//默认字号
+    font-size: 14px !important;
+}
+:global(.simpleLightColor){//标签未选中颜色
+    color: #bfbfbf !important;
+}
+:global(.simpleColor){
+    color: #333 !important;
+}
+:global(.selectColor){//选中颜色
+    color: #000 !important;
+}
+:global(.prefixUnset){//选中颜色
+    color: unset !important;
+    font-size: unset !important;
+}
+:global(.prefixUnsetColor){//继承颜色
+    color: unset !important;
+}
+
+:global(.widthChangeed){
+    width: 318px !important;
+}
+:global(.pdright){
+    padding-right: 308px !important;
+}
+:global(.middleImg){
+    img {
+        margin-bottom: 7px !important;
+    }
+}
+:global(.titleWidth){
+    width: 78px !important;
+    #mainSuit {
+        margin-left: 78px;
+    }
+}
+:global(.specialSize){
+    margin-left: 74px !important;
+}
+:global(.specialpaceSize){
+    margin-left: 74px !important;
+}
+:global(.fontWeight){
+    font-weight: bold !important;
+}
+

+ 27 - 21
src/common/less/variables.less

@@ -4,7 +4,7 @@
 @cyan: #00bcd4;
 @blue: #3B9ED0;
 @red:#ff0000;
-@extBlue:#71A9FE;
+@extBlue:#5968DD;
 @tab-color:#3B9ED0;
 
 @ipt-color:#E9F5FA;
@@ -18,6 +18,7 @@
 
 @btn-text-color: #fff;
 @text-color: #333;
+
 @placeholder-color: #bfbfbf;
 
 @link-hover-decoration: underline;
@@ -90,14 +91,10 @@
   width: 100%;
   font-size: 14px;
   text-align: left;
-  border: none;
   color:#000000;
-  /*padding-left: 40px;*/
+  border: 1px solid #fff;
   cursor: pointer;
-  background: rgba(59,158,208,0.1);
-  background-image: url(../images/first.png);
-  background-repeat: no-repeat;
-  background-position: 0px 10px;
+  background:url(../images/first.png) rgba(59,158,208,0.1) 5px 8px no-repeat;
 }
 .clear{
   width: 60px;
@@ -105,15 +102,11 @@
   line-height: 44px;
   font-size: 12px;
   color:@red;
-  // border: none;
   background: #fff;
-  float: left;
-  // outline: none;
-  // text-align: center;
-  // cursor: pointer;
-  margin-left: 22px;
+  //float: left;
+  margin-right: 15px;
   position: relative;
-  bottom: -10px;
+  //bottom: -10px;
 }
 .confirm{
   width: 120px;
@@ -121,16 +114,13 @@
   line-height: 44px;
   color:@blue;
   font-size: 12px;
-  // border: 1px solid @blue;
   background: #fff;
-  margin-left: 20px;
-  float: right;
-  // outline: none;
+  /*margin-left: 20px;*/
+  //float: right;
   text-align: right;
-  // cursor: pointer;
   font-weight: bold;
   position: relative;
-  bottom: -10px;
+  //bottom: -10px;
   padding-right: 10px;
 }
 :global(.red){
@@ -153,20 +143,36 @@
     /*width: 8px;*/
     display: inline-block;
   }
+  &.selected-area{
+     background: #338fff;
+    color: #fff!important;
+    span,div{
+      color: #fff!important;
+    }
+   }
  }
 .selected-tag{
   position: relative;//发热
   display: inline-block;
   color: @text-color;
+  font-weight: bold;
   /*padding: 0 3px 0;*/
   border-bottom: 1px @border-color solid;
+  &.selected-area{
+    background: #338fff;
+    color: #fff!important;
+    span,div{
+      color: #fff!important;
+    }
+  }
 }
+
 .no-tag{
   display: inline-block;
   position: relative;
   /*margin-right: 5px;
   padding: 0 3px 0;*/
-  color: unset;
+  // color: unset;
   border:none!important;
   &:before,&:after{
   content: ''!important;

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

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

+ 18 - 3
src/components/AddAssistCheck/Textarea/index.jsx

@@ -2,6 +2,7 @@ import React, { Component } from "react";
 import style from "./index.less";
 import config from '@config/index';
 import $ from 'jquery';
+import { setFontColorSize,moveEnd} from '@utils/tools';
 
 class Textarea extends Component {
   constructor(props) {
@@ -18,7 +19,7 @@ class Textarea extends Component {
   }
   handleInput(e){
     const {handleChangeAssistValue,idx,handlePush} = this.props;
-    const text = (e.target.innerHTML || e.target.innerText);
+    const text = (e.target.innerText || e.target.innerHTML||e.target.textContent);
     $(e.target).find('img').remove();
     this.context.scrollArea.scrollBottom();       //避免滚动条上移不见
     // e.target.innerHTML = e.target.textContent
@@ -35,6 +36,7 @@ class Textarea extends Component {
     }else{
       e.target.nextSibling.innerText?(e.target.nextSibling.innerText = '报告描述或意见'):(e.target.nextSibling.innerHTML = '报告描述或意见')
     }
+    $(".TextareaRsize").css({marginTop:0});
     this.setState({
       timer
     });
@@ -64,6 +66,19 @@ class Textarea extends Component {
     }else{
       this.$dom.current.nextSibling.innerText?(this.$dom.current.nextSibling.innerText = '报告描述或意见'):(this.$dom.current.nextSibling.innerHTML = '报告描述或意见')
     }
+    const that = this;
+    let txt = '';
+    //黏贴时去掉html格式
+    $(this.$dom.current).on("paste",function(e){
+      setTimeout(function(){
+        txt = that.$dom.current.innerText||that.$dom.current.innerHTML;
+        that.$dom.current.innerHTML = txt;
+        moveEnd($(that.$dom.current)[0]);     //光标落到最后去
+      });
+    })
+  }
+  componentWillUnmount(){
+    $(this.$dom.current).off("paste");
   }
   handleFocus(){     //ie8下提示语挡住输入框,导致输入框无法聚焦
     this.textInput.current.previousSibling.focus();
@@ -72,13 +87,13 @@ class Textarea extends Component {
     const {idx,disabled} = this.props;
     return (
       <div className={style.textWap}>
-        <div className={style.divTextarea}
+        <div className={`${style.divTextarea} ${setFontColorSize(2)}`}
             contenteditable={disabled?false:true}
             ref={this.$dom}
             onInput={this.handleInput}
             onKeyUp={this.handleInput}
         ></div>
-        <p ref={this.textInput} onClick={this.handleFocus} className={style.textareaWarring}></p>
+        <p ref={this.textInput} onClick={this.handleFocus} className={`${style.textareaWarring} ${setFontColorSize(2)}`}></p>
       </div>
     );
   }

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

@@ -1,6 +1,6 @@
 .divTextarea {
   /*overflow-y: auto;*/
-  overflow-x: hidden;
+  // overflow-x: hidden;
   /*max-height: 100px;*/
   border-bottom: 1px dashed #333;
   box-sizing: border-box;

+ 10 - 17
src/components/AddAssistCheck/index.jsx

@@ -4,7 +4,7 @@ import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
 import AssistName from './AssistName';
-import { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
+import { getPageCoordinate,getCurrentDate,setPosition, setFontColorSize } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
 
 class AddAssistCheck extends React.Component {
@@ -59,7 +59,6 @@ class AddAssistCheck extends React.Component {
             })
           }
         }
-        
       }
     });
     const that = this;
@@ -85,6 +84,7 @@ class AddAssistCheck extends React.Component {
   delConfirm(type) {
     const { handleDelAssist, handlePush } = this.props;
     const { id,activeName } = this.state;
+    $(".TextareaRsize").css({marginTop:0});
     handleDelAssist && handleDelAssist(id,activeName,type);
     handlePush && handlePush();           //右侧推送
     this.setState({
@@ -195,7 +195,6 @@ class AddAssistCheck extends React.Component {
       width:'8px',
       background:'#f1f1f1'};
     const barStyle={background:'#777',width:'100%'};
-    $(".TextareaRsize").css({marginTop:0})
     return <React.Fragment>
       {
         checkedListImport.map((part,index)=>{
@@ -203,14 +202,8 @@ class AddAssistCheck extends React.Component {
             {
               part.map((item, idx) => {
                 return (<li className={`${styles.assistLists} ${styles.clearfix}`}>
-                  {/* <span className={styles.assistName} style={{ width: winWidth<1200?'120px':'auto' }}>
-                    <span className={styles.tagSpan}>
-                      {item.name}:
-                      <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name: item.name, position: 1, type: 6})}></span>
-                    </span>
-                  </span> */}
-                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
-                  <div className={styles.textareaWrap}>
+                  <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation} normal={true}></AssistName>
+                  <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                     <ScrollArea speed={0.8}
                                 horizontal={false}
                                 stopScrollPropagation={showedBar?true:false}
@@ -222,7 +215,7 @@ class AddAssistCheck extends React.Component {
                       <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                     </ScrollArea>
                   </div>
-                  <div className={styles.pointerFinger}>
+                  <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
                     <p>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                   </div>
                 </li>)
@@ -264,7 +257,7 @@ class AddAssistCheck extends React.Component {
                 </span>
               </span> */}
               <AssistName name={item.name} winWidth={winWidth} getInfomation={getInfomation}></AssistName>
-              <div className={styles.textareaWrap}>
+              <div className={`${styles.textareaWrap} ${setFontColorSize(2,1)}`}>
                 <ScrollArea speed={0.8}
                             horizontal={false}
                             stopScrollPropagation={showedBar?true:false}
@@ -276,7 +269,7 @@ class AddAssistCheck extends React.Component {
                 <Textarea value={item.value} disabled={item.disabled} handlePush={handlePush} isRead={isRead} handleChangeAssistValue={handleChangeAssistValue} idx={idx}></Textarea>
                 </ScrollArea>
               </div>
-              <div className={styles.pointerFinger}>
+              <div className={`${styles.pointerFinger} ${setFontColorSize(2,2)}`}>
                 <p onClick={() => this.handleShowDate(idx)}>报告日期:<span>{item.time || this.state.dateTime}</span></p>
                 <i onClick={() => this.handleShowDate(idx)}></i>
                 {/*<a href="javascript:void(0);" onClick={() => { this.handleDelClick(idx,item) }}><img src={close} alt="" /></a>*/}
@@ -324,9 +317,9 @@ class AddAssistCheck extends React.Component {
             {
               (list && list.length>0) || (assistVal != '') || (assistList&&assistList.length==0)?'':<div>
                 <p style={{padding:'5px 30px',color:'#bfbfbf'}}>常用辅检项</p>
-                <ScrollArea speed={0.8}
+                {assistList.length>6?<ScrollArea speed={0.8}
                             horizontal={false}
-                            stopScrollPropagation={assistList.length>6?true:false}
+                            stopScrollPropagation={true}
                             style={{height:'225px'}}
                             className={styles["area"]}
                             verticalContainerStyle={contStyle}
@@ -335,7 +328,7 @@ class AddAssistCheck extends React.Component {
                 {
                   this.getCommonList()
                 }
-                </ScrollArea>
+                </ScrollArea>:this.getCommonList()}
               </div>
             }
           </SearchOption> : ''}

+ 12 - 22
src/components/AddAssistCheck/index.less

@@ -50,13 +50,18 @@
     position: relative;
     clear: both;
     border-radius: 4px;
-
+    color: #000;
     .pointerFinger {
       width: 260px;
       position: absolute;
       right: 0;
-      top: 10px;
-
+      bottom: 10px;
+      p {
+        font-size: unset;
+        span {
+          font-size: unset;
+        }
+      }
       i {
         display: inline-block;
         position: absolute;
@@ -67,41 +72,26 @@
         background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAANtJREFUOBHFU90RwiAMDj3H8FV3KQ4AxwAO5QQwgbvoY90DQ+/gUpogXj3bF/L75ctXANj7c85pY0zMPKy1U7bLmQqG4hFjwPIL8UEp9aI+UOxFotcRZ3MALEmu8I+xWoGk2VpiQqhoWneSmoXZvfWehaubsVgBoGxdxb93EekhdbVyKjWh5iNSvcUYjxJIK57WxN5rCOE+13E/scWCy2WMzLC81haTTzlkOONtf6I4KTM8SFPTWqjLicujZk/v/ZnLdV9ZrpmLiQwlBhwIjWVAjStOG6+NpsA/s99BMkpktdAgdAAAAABJRU5ErkJggg==') no-repeat;
       }
 
-      /* a {
-                img {
-                  width: 13px;
-                  height: 13px;
-                  // margin-bottom: 11px;
-                  cursor: pointer;
-                  display: inline-block;
-                  position: absolute;
-                  // right: -4px;
-                  right: 3px;
-                  top: 2px;
-                }
-            } */
-
       p {
         display: inline-block;
         margin: 0 6px;
         vertical-align: top;
-
         span {
           border-bottom: 1px dashed #333;
           box-sizing: border-box;
           margin-right: 0;
           display: inline-block;
-          width: 140px;
         }
       }
     }
 
     .assistName {
-      // height: 20px;
-      // line-height: 20px;
       box-sizing: border-box;
-      float: left;
+      // float: left;
       position: relative;
+      span {
+        font-size: unset;
+      }
     }
 
     .textareaWrap {

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

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

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

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

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

@@ -1,6 +1,6 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal, timestampToTime, getStatusImg } from '@utils/tools';
+import { normalVal, timestampToTime, getStatusImg,setFontColorSize } from '@utils/tools';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 class SlideExcel extends Component {
@@ -36,12 +36,12 @@ class SlideExcel extends Component {
     return (
       <li className={`${styles.excelDataLis} clearfix`} style={{ border: items.lisExcelRes.length - 1 == idx ? 0 : '' }}>
         <span className={styles.excelDataTitle}>
-          <span className={styles.tagSpan}>
-            {item.menus}
+          <span className={`${styles.tagSpan} ${styles.selectTagSpan}`}>
+            <span className={`${styles.menus} ${setFontColorSize(2)}`}>{item.menus}</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}>
+        <table className={`${styles.table} ${setFontColorSize(2)}`}>
           {show ? (item.lisExcelItem && item.lisExcelItem.map((value, idx) => {
             return <tr>
               <td style={{ width: '30%' }}>
@@ -85,7 +85,7 @@ class SlideExcel extends Component {
         </table>
         {
           item.lisExcelItem && item.lisExcelItem.length > 5 ?
-            <div className={styles.slides} onClick={this.handleSlide}>
+            <div className={`${styles.slides} ${setFontColorSize(2)}`} onClick={this.handleSlide}>
               {
                 show ? <span>收起</span> : <span>剩余<span className={styles.num}>{item.lisExcelItem.length - 4}</span>项</span>
               }

+ 22 - 9
src/components/AddInspect/SlideExcel/index.less

@@ -41,15 +41,20 @@
 
 .table {
   color: #000;
-  width: 80%;
+  width: 100%;
   // display: inline-block;
   tr {
-      line-height: 18px;
-      height: 18px;
-      width: 100%;
-      td {
-          padding-top: 3px;
+    line-height: 18px;
+    height: 18px;
+    width: 100%;
+    font-size: unset;
+    td {
+      padding-top: 3px;
+      font-size: unset;
+      span {
+        font-size: unset;
       }
+    }
   }
 }
 
@@ -97,15 +102,14 @@
     padding: 2px 0px;
     border-bottom: 1px dashed #989DA3;
     .excelDataTitle {
-        display: inline-block;
-        width: 20%;
+        width: 100%;
         vertical-align: top;
         padding-left: 10px;
         float: left;
         color: #000;
     }
     table {
-        width: 80%;
+        width: 100%;
         tr {
             height: 16px;
             line-height: 16px;
@@ -114,6 +118,7 @@
         td {
             text-align: left;
             padding-top: 6px;
+            padding-left: 10px;
             cursor: default;
         }
         .excelUnit {
@@ -137,6 +142,7 @@
   cursor: pointer;
   span {
     color:#7d7d7d;
+    font-size: unset;
   }
   img{
     vertical-align: middle;
@@ -178,6 +184,13 @@
   display: inline-block;
   position: relative;
 }
+.selectTagSpan {
+  // color: #000;
+  // font-weight: bold;
+  // .menus {
+  //   border-bottom: 1px solid #666666;
+  // }
+}
 .tagSpan:hover {
   .imgInfo, .imgInfo1 {
     display: block;

+ 25 - 12
src/components/AddInspect/SlideSelect/index.jsx

@@ -1,12 +1,13 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,timestampToTime,getPageCoordinate,setPosition } from '@utils/tools';
+import { normalVal,timestampToTime,getPageCoordinate,setPosition,setFontColorSize } from '@utils/tools';
 import { InspectCommon, Calendar,DelToast} from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import $ from 'jquery';
 import date1 from '../img/date1.png';
 import ScrollArea from 'react-scrollbar';
+import InspectName from '../InspectName';
 
 class SlideSelect extends Component {
   constructor(props) {
@@ -94,7 +95,7 @@ class SlideSelect extends Component {
     })*/
   }
   render() {
-    const {windowWidth,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
+    const {windowWidth,handleFillShow,setTipValue,setHighter,refreshScroller,getInfomation,handleConfirm,changeActivePart,getItemList,date,item,idx,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,showToast} = this.props;
     const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
     let staticTime = {}
@@ -122,22 +123,34 @@ class SlideSelect extends Component {
     const stopScroll =(windowWidth<1300&&listLen>12)||(windowWidth>1299&&listLen>24);
     return (
       <li key={item.questionId} className={`${styles.slideLi} clearfix`}> 
-        {
+        <InspectName 
+          item={item} 
+          handleLabelSub={this.handleLabelSub} 
+          idx={idx} 
+          getInfomation={getInfomation} 
+          refreshScroller={refreshScroller} 
+          setHighter={setHighter} 
+          setTipValue={setTipValue}
+          handleFillShow={handleFillShow}></InspectName>
+        {/* {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
-                <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
+                <span className={`${styles.tagSpan} ${styles.selectTagSpan} ${setFontColorSize(2,6)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo1} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
+                {
+                  item.inpValue?<input className={styles.iptValue} type="text"/>:<span className={styles.iptValueBtn}>点击备注</span>
+                }
             </p>:
             <p >
-                <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
+                <i className={`${styles.tagSpan} ${styles.tagSpanS} ${setFontColorSize(2)}`} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo} title='点击i图标可查看详细说明' onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
             </p>
-        }
+        } */}
 
         {
           item.details && item.details.map((val)=>{
@@ -148,7 +161,7 @@ class SlideSelect extends Component {
         }
         {
             item.show ?
-                <table className={styles.table}>
+                <table className={`${styles.table} ${setFontColorSize(2)}`}>
                     {
                         show?(item.details.map((val)=>{
                             if(val.value && val.value != ''){
@@ -156,7 +169,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' 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,showName:item.name+'('+val.name+')'})}></span>                                        
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -174,7 +187,7 @@ class SlideSelect extends Component {
                                     <td style={{width:'30%'}}>
                                       <span className={styles.tagSpan}>
                                         {val.name}
-                                        <span className={styles.imgInfo1} title='点击i图标可查看详细说明' 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,showName:item.name+'('+val.name+')'})}></span>
                                       </span>
                                     </td>
                                     {showDetails(val)}
@@ -233,16 +246,16 @@ class SlideSelect extends Component {
                             </div>
                         </div>
                             {/* 填写单内容显示 */}
-                      <ScrollArea speed={0.8}
+                      {stopScroll?<ScrollArea speed={0.8}
                                   horizontal={false}
-                                  stopScrollPropagation={stopScroll}
+                                  stopScrollPropagation={true}
                                   style={{maxHeight:'358px'}}
                                   className={styles["area"]}
                                   verticalContainerStyle={contStyle}
                                   verticalScrollbarStyle={barStyle}
                                   contentClassName="content">
                             { getItemList() }
-                      </ScrollArea>
+                      </ScrollArea>:getItemList()}
                     </InspectCommon>
                 : null
             }

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

@@ -51,12 +51,12 @@
 .staticTagActive {
     cursor: pointer;
     color: #333;
-    display: inline-block;
+    // display: inline-block;
     position: relative;
     vertical-align: top;
-    padding: 2px 10px;
+    padding: 2px 10px 10px 10px;
     box-sizing: border-box;
-    width: 20%;
+    width: 100%;
     float: left;
     span {
         border-bottom: 1px solid #666666 ;
@@ -79,16 +79,25 @@
 }
 .table {
     color: #000;
-    width: 80%;
+    width: 100%;
     tr {
         line-height: 18px;
         height: 18px;
         width: 100%;
+        font-size: unset;
         td {
           cursor: default;
           padding-top: 3px;
+          font-size: unset;
+          span {
+              font-size: unset;
+          }
         }
     }
+    tr > td {
+        padding: 0 10px;
+        box-sizing: border-box;
+    }
 }
 
 .searchResult {
@@ -192,8 +201,34 @@
   display: inline-block;
   position: relative;
 }
+.tagSpanS {
+    font-weight: bold;
+    color: #000;
+}
+.selectTagSpan {
+  color: #000;
+  font-weight: bold;
+}
 .tagSpan:hover {
     .imgInfo, .imgInfo1 {
         display: block;
       }
+}
+.iptValue {
+    width: 60px;
+    color: #3B9ED0;
+    font-size: 12px;
+}
+.iptValueBtn {
+    color: #3B9ED0;
+    width: 60px;
+    height: 22px;
+    line-height: 22px;
+    background-color: #EDF8FF;
+    text-align: center;
+    display: inline-block;
+    font-size: 12px;
+    border-radius: 4px;
+    border-bottom: 0 !important;
+    margin-left: 10px;
 }

+ 5 - 29
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,getCalendarDate} from '@utils/tools';
+import { deepClone, getPageCoordinate, getStatusImg,getDomUpDown ,getCurrentDate,setPosition,getCalendarDate} from '@utils/tools';
 import styles from './index.less';
 import ScrollArea from 'react-scrollbar';
 import store from '@store';
@@ -316,33 +316,8 @@ class Inspect extends React.Component {
   }
   showDetails(val) {
     let min = val.minValue, max = val.maxValue, value = val.value, dom = '';
-    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) {//下降
-        dom = getStatusImg(3, value, 1)
-      } else if (value >= max) {//上升
-        dom = getStatusImg(2, value, 1)
-      } else {//正常
-        dom = getStatusImg(0, value, 1)
-      }
-    } else if (isNaN(min) && !isNaN(max)) {//有最大值无最小值
-      if (value >= max) {//上升
-        dom = getStatusImg(2, value, 1)
-      } else {//正常
-        dom = getStatusImg(0, value, 1)
-      }
-    } else if (!isNaN(min) && isNaN(max)) {//有最小值无最大值
-      if (value <= min) {//下降
-        dom = getStatusImg(3, value, 1)
-      } else {//正常
-        dom = getStatusImg(0, value, 1)
-      }
-    } else {//无最大最小值
-      dom = getStatusImg(1, value, 1)
-    }
+    dom = getDomUpDown(min,max,value)
+    
     if (val.questionDetailList.length > 0) {
       return val.questionDetailList.map((item) => {
         if (val.value == item.name) {
@@ -355,7 +330,7 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const {setHighter,refreshScroller, getInfomation,setTipValue, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, windowWidth,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
 
     const contStyle={
@@ -428,6 +403,7 @@ class Inspect extends React.Component {
                   handleConfirm={handleConfirm}
                   getInfomation={getInfomation}
                   setHighter={setHighter}
+                  setTipValue={setTipValue}
                 ></SlideSelect>
               })
             }

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

@@ -159,10 +159,14 @@
             text-align: center;
             float: left;
             margin-right: 10px;
+            height: 28px;
+            line-height: 28px;
         }
         .unit {
             display: inline-block;
             width: 70px;
+            height: 28px;
+            line-height: 28px;
             overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;

+ 17 - 7
src/components/Advice/Textarea/index.jsx

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

+ 5 - 0
src/components/Advice/Textarea/index.less

@@ -0,0 +1,5 @@
+.text {
+  div {
+    font-size: unset;
+  }
+}

+ 21 - 26
src/components/Advice/index.jsx

@@ -1,6 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import {ItemBox} from '@commonComp';
+import {setFontColorSize} from '@utils/tools';
 import Textarea from './Textarea';
 import FollowUp from '@components/Treat/FollowUp'
 
@@ -19,12 +20,6 @@ class Advice extends Component{
     this.handleAdviceInput = this.handleAdviceInput.bind(this);
   }
 
-  shouldComponentUpdate(next){
-    if(JSON.stringify(next) == JSON.stringify(this.props)){
-      return false;
-    }
-    return true;
-  }
   componentWillReceiveProps(next){
     const isRead = this.props.isRead;
     // if(next.isRead != isRead||next.value!=this.props.value){      //value对比解决复诊不显示bug
@@ -66,39 +61,39 @@ class Advice extends Component{
 
   render(){
     const {advice} = this.props.pushMessage;
-    const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp, typeConfig} = this.props
-    let scheme = advice.scheme && advice.scheme.map((item, index) => {
-      return <p>{item.treatment.map((it,ii) =>{
-        return(it.treatmentStr && it.treatmentStr.length > 0 ? 
-          <div>
-            { it.treatmentStr }
-            {/* <input className={style['treat-input']} ref={this.treatInput} onInput={(e)=>{this.handleTreatInput(e, index, ii)}} type='text' value={ it.treatmentStr }/>  */}
-          </div>: '') 
-
-        // return <div>{it.drugs.length > 0 ? it.name : ''}: {it.drugs.map((drug, drugIndex) =>{
-        //   return(<span>{drug.selected ? (drugIndex === 0 ? drug.name : '  ' + drug.name) : ''}</span>)
-        // })}</div>
-      })}</p>
+    const {isRead, isFirstMainDiag, followUp, hasFollowUp, saveFollowUp, typeConfig,hideAllDrop} = this.props
+    let scheme = advice.scheme && advice.scheme.map((item0, index0) => {
+      return <p>
+        {item0.treatment.map((item1, index1) => {
+          return item1.meditionDetails.map((item2, index2) => {
+              return item2.treatment.map((item3, index3) => {
+                return(item3.treatmentStr && item3.treatmentStr.length > 0 ?
+                  <div>
+                    { item3.treatmentStr }
+                  </div>: '')
+              })
+          })
+        })}
+      </p>
     })
-
     return  <div id="adviceBox" className={`${'mainsuit-box'} ${style['main-suit']}`}>
-      <ItemBox title='医嘱' editable={false} border={true} marginTop="10px">
-        <div className={style['billing']}>
+      <ItemBox title='医嘱' editable={false} border={true} marginTop="10px" hideAllDrop={hideAllDrop}>
+        <div className={`${style['billing']} ${setFontColorSize(2)}`}>
           {advice.assay && advice.assay.length > 0 || advice.check && advice.check.length > 0 ? <h1>开单项目</h1> : ''}
             {advice.assay && <span className={style['treat-input']}> {advice.assay}</span>}
             {advice.check && <span className={style['treat-input']}> {advice.check}</span>}
         </div>
-        {advice.commontreatment && advice.commontreatment.length > 0 &&<div className={style['billing']}  >
+        {advice.commontreatment && advice.commontreatment.length > 0 &&<div className={`${style['billing']} ${setFontColorSize(2)}`}  >
           {advice.commontreatment && advice.commontreatment.length > 0 && <h1>一般治疗</h1>}
             {/* {advice.commontreatment && <div className={style['treat-input']}  onInput={this.handleComTreatInput}  contentEditable={true} style = {{outline: 'none'}}></div>} */}
             {<Textarea value={advice.commontreatment} isRead={isRead} handleChangeAssistValue={this.handleComTreatInput} ></Textarea>}
         </div>}
-        {!isFirstMainDiag && hasFollowUp &&<div><FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp></div>}
-        {advice.scheme && advice.scheme.length > 0 &&<div contentEditable='false' className={style['scheme']}>
+        {!isFirstMainDiag && hasFollowUp &&<FollowUp  noHeader="true" textStyle={{padding: '0 10px'}}  setFollowUp={saveFollowUp} followUp = {followUp} isRead={isRead}></FollowUp>}
+        {advice.scheme && advice.scheme.length > 0 &&<div contentEditable='false' className={`${style['scheme']} ${setFontColorSize(2)}`}>
           {advice.scheme && advice.scheme.length > 0  && <h1>治疗方案</h1>}
           {scheme}
         </div>}
-        <div className={style['billing']} > 
+        <div className={`${style['billing']} ${setFontColorSize(2)}`} > 
             {/* {!advice.adviceInput && <Textarea value='' isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>}
             {advice.adviceInput && <Textarea value={advice.adviceInput} isRead={isRead} handleChangeAssistValue={this.handleAdviceInput} ></Textarea>} */}
             <Textarea value={advice.adviceInput} isRead={isRead} handleChangeAssistValue={this.handleAdviceInput}  typeConfig={typeConfig}></Textarea>

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

@@ -8,19 +8,30 @@
 }
 .billing {
   padding: 0px 10px;
+  color: #000;
   h1{
     margin: 5px 0px;
+    font-size: unset;
+  }
+  p,span{
+    font-size: unset;
   }
 }
 .scheme {
   padding: 0px 10px;
+  color: #000;
   h1{
     margin: 5px 0px;
+    font-size: unset;
   }
   p{
     line-height: 18px;
+    font-size: unset;
+  }
+  div {
+    font-size: unset;
   }
 }
 .treat-input {
   // display: inline-block;
-}
+}

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

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

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

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

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

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

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

@@ -4,7 +4,7 @@ import { ItemBox, ConfirmModal, WrapModalContainer } from '@commonComp';
 import styles from './index.less';
 import Notify from '@commonComp/Notify';
 import $ from 'jquery';
-import { isIE, getUrlArgObject } from '@utils/tools.js';
+import { isIE, getUrlArgObject,setFontColorSize } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBodyPac from '@containers/WrapModalBodyPac';
 import { getExcelList } from '@store/actions/inspect';
@@ -64,7 +64,9 @@ class AssistCheck extends React.Component {
 
   }
     render(){
-        const {setHighter,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {setHighter,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,
+          handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,
+          isRead,winWidth,assistList,hideAllDrop} = this.props;
         const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
         const {importLis,ieVersion,hide} = this.state;
         // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -74,7 +76,7 @@ class AssistCheck extends React.Component {
         return (
             <div className={styles.wrapper}>
                 <div className={styles.top}>
-                    <span id="assistResultData">辅检结果数据</span>
+                    <span id="assistResultData" className={`${setFontColorSize(2,5)}`}>辅检结果数据</span>
                     {/* <div className={styles.pushButton} disabled={ieVersion && ieVersion > 9 ? true : false} onClick={checkSystemIpt}>
                         <p id="importPacBtn" className={styles.importInspectBtn}>导入辅检结果</p>
                     </div> */}
@@ -108,12 +110,13 @@ class AssistCheck extends React.Component {
                 </div>
                 <ItemBox 
                     className={styles.title}
+                    hideAllDrop={hideAllDrop}
                     title={'辅检'}
                     editable={false}
                     border={true}
                     marginTop={'20px'}
                 >
-                    <div style={{padding:'10px',boxSizing:'border-box'}} >
+                    <div style={{padding:'10px',boxSizing:'border-box',color:'#000'}} >
                         <AddAssistCheck
                             handleChangeValue={handleChangeValue}
                             refreshScroller={this.refreshScroller}

+ 65 - 13
src/components/Banner/ModeChange/index.jsx

@@ -2,8 +2,11 @@ import React, { Component } from "react";
 import style from "./index.less";
 import ReactDom from "react-dom";
 import close from '@images/icon_close.png';
-import sopen from '@images/btn-open.png'
-import sclose from '@images/btn-closed.png'
+import sopen from '@images/btn-open.png';
+import sclose from '@images/btn-closed.png';
+import radio_off from '@images/icon-radio-default.png';
+import radio_on from '@images/icon-radio-active.png';
+
 
 class ModeChange extends Component {
     constructor(props){
@@ -11,32 +14,81 @@ class ModeChange extends Component {
       this.getStyle=this.getStyle.bind(this);
 
     }
-    getStyle(){
-        const {hideBtn} = this.props;
+    getStyle(flag){
+        const {hideBtn,config0} = this.props;
+        if(flag===1&&config0===1){
+          return style['fade'];
+        }
         return hideBtn?'':style['fade'];
     }
     render(){
-        const {closeConfigModal, changeType, confirmType, mode,hideBtn} = this.props;
+        const {closeConfigModal, changeType, confirmType, config0,config1,config2,config3,config4,hideBtn} = this.props;
         const domNode = document.getElementById('root');
-        const isOpen = +mode===0;
+        const isOpen = +config0!==1;
+        const general = +config1!==1;
+        const ohis = +config2!==1;
+        const fontsize = +config3!==1;
+        const color = +config4!==1;
         return ReactDom.createPortal(<React.Fragment>
             <div className={style['modal']}>
               <div className={style['shade']} onClick={closeConfigModal}></div>
               <div className={style['content']}>
                 <div className={style['close']}>设置<img src={close} onClick={closeConfigModal} /></div>
-                <div className={style["oper"]}>
+                <div className="scroller">
+                  <div className={style["oper"]}>
                     <p className={this.getStyle()}>
                       <span>开启模板智能推送:</span>
-                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType(isOpen?'1':'0'):null}>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config0',isOpen?1:0):null}>
                         <img src={isOpen?sopen:sclose} alt=""/>
                         {isOpen?'开':'关'}
-                        </a>
+                      </a>
                     </p>
-                </div>
-                <div className={style["explain"]}>
+                    <p className={this.getStyle(1)}>
+                      <span>开启一般情况默认值:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config1',general?1:0):null}>
+                        <img src={general?sclose:sopen} alt=""/>
+                        {general?'关':'开'}
+                      </a>
+                    </p>
+                    <p className={this.getStyle(1)+" "+style['big-marb']}>
+                      <span>开启其他史默认值:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn&&isOpen?()=>changeType('config2',ohis?1:0):null}>
+                        <img src={ohis?sclose:sopen} alt=""/>
+                        {ohis?'关':'开'}
+                      </a>
+                    </p>
+                    <p className={this.getStyle()}>
+                      <span>默认字体大小:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',0):null}>
+                        <img src={fontsize?radio_on:radio_off} alt=""/>
+                        标准
+                      </a>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config3',1):null}>
+                        <img src={fontsize?radio_off:radio_on} alt=""/>
+                        增大
+                      </a>
+                    </p>
+                    <p className={this.getStyle()}>
+                      <span>默认字体颜色:</span>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',0):null}>
+                        <img src={color?radio_on:radio_off} alt=""/>
+                        标准
+                      </a>
+                      <a className={style['switch']} href="javascript:void(0)" onClick={hideBtn?()=>changeType('config4',1):null}>
+                        <img src={color?radio_off:radio_on} alt=""/>
+                        增黑
+                      </a>
+                    </p>
+                  </div>
+                  <div className={style["explain"]}>
                     <p>说明:</p>
-                    <p>1.该设置只针对问诊模块中的“主诉”、“现病史”、“其他史”功能;</p>
-                    <p>2.慢病模式下,该模板智能推送的设置功能不可使用。</p>
+                    <p>1、智能推送模式只针对问诊模块中的“主诉”、“现病史”、“其他史”展示科室模版功能;</p>
+                    <p>2、慢病模式下,该模版智能推送的设置功能不可用;</p>
+                    <p>3、一般情况默认值:神清、精神可、胃纳可、睡眠可、二遍无殊、体重无明显减轻;</p>
+                    <p>4、其他史默认值:既往史无殊、过敏史无殊、个人史无殊;</p>
+                    <p>5、病历书写模块,字体大小标准为14px,增大为18px;</p>
+                    <p>6、病历书写模块,字体颜色标准为灰黑色,增黑为全黑色;</p>
+                  </div>
                 </div>
                 {hideBtn?<div className={style['btn']} onClick={confirmType}><button>保存修改</button></div>:<div className={style['btn']} onClick={closeConfigModal}><button>&nbsp;&nbsp;关闭&nbsp;&nbsp;</button></div>}
             </div>

+ 18 - 5
src/components/Banner/ModeChange/index.less

@@ -15,21 +15,34 @@
     .content {
       .maskContentZIndex1;
       position: fixed;
-      top: 100px;
-      width: 432px;
-      left:50%;
-      margin-left: -216px;
+      top: 50%;
+      width: 45%;
+      min-width: 450px;
+      left:27%;
+      margin-top:-265px;
+      /*margin-left: -216px;*/
       min-height: 284px;
       background: #fff;
       .oper{
         margin: 20px 30px;
+        p{
+          margin-bottom: 10px;
+          &.big-marb{
+            margin-bottom: 20px;
+          }
+          span{
+            display: inline-block;
+            width: 140px;
+          }
+        }
         .fade{
           opacity: .4;
         }
       }
       .explain{
         margin: 50px 30px;
-        opacity: .5;
+        /*opacity: .5;*/
+        color: #777;
         p{
           font-size: 12px;
           line-height: 20px;

+ 63 - 21
src/components/Banner/index.jsx

@@ -3,21 +3,30 @@ import { connect } from "react-redux";
 import style from "./index.less";
 import ReactDom from "react-dom";
 import logo from "../../common/images/logoa.png";
+import prec from "../../common/images/prec.png";
 import setup from "../../common/images/setup.png";
 import emergIcon from '../../common/images/emergency.png'
 import {Notify} from '@commonComp';
 import Emergency from '@containers/Emergency';
+import PreInIcss from '@containers/PreInIcss';
 import {getAllHis} from '@store/async-actions/fetchModules.js';
 import {timestampToTime,getCurrentDate} from '@utils/tools.js';
 import {dragBox} from '@utils/drag';
 import {CLEAR_COMSYMPTOMS} from '@store/types/mainSuit';
+import { GET_PREC_LIST,SET_PREC_SHOW } from "@store/types/preIcss";
+import {getPreMsg} from '@store/async-actions/preIcss';
 import ModeChange from './ModeChange'
 
 class Banner extends Component {
   constructor(props){
-    super(props)
+    super(props);
+    const conf = props.typeConfig;
     this.state = {
-      mode: props.typeConfig,
+      config0: conf[0],    //模式
+      config1:conf[1],   //一般情况默认
+      config2:conf[2],      //其他史默认
+      config3:conf[3],    //字体大小
+      config4:conf[4],       //字体颜色
       emergencyBox:false
     };
     this.showConfigModal = this.showConfigModal.bind(this);
@@ -25,32 +34,58 @@ class Banner extends Component {
     this.confirmType = this.confirmType.bind(this);
     this.showHisModal = this.showHisModal.bind(this);
     this.handleHisClose = this.handleHisClose.bind(this);
+    this.setInitConfig = this.setInitConfig.bind(this);
   }
 
   showConfigModal(){
-    this.setState({
-      mode:this.props.typeConfig,
-    });
+    this.setInitConfig();
     this.props.showConfigModal()
   }
 
-  changeType(typeConfig){
+  changeType(type,typeConfig){
+    if(type==='config0'&&typeConfig===1){     //智能模式关闭,一般情况和其他史默认值也关闭
+      this.setState({
+        config0: 1,
+        config1: 0,
+        config2: 0,
+      });
+      return;
+    }
     this.setState({
-      mode:typeConfig
+      [type]:typeConfig
     });
   }
 
   confirmType(){
     const {typeConfig,confirmType,clearCommS,closeConfigModal,readMode} = this.props;
-    const mode = this.state.mode;
     // 清空主诉常见症状
     clearCommS();
-    if(mode==typeConfig&&typeConfig==readMode){
+    /*if(mode==typeConfig&&typeConfig==readMode){
       closeConfigModal();
       return;
+    }*/
+    const configs= this.parseConf();
+    confirmType&&confirmType(configs);
+    closeConfigModal();
+  }
+  parseConf(){
+    let configs = Object.assign({},this.state);
+    delete configs.emergencyBox;
+    let obj = {};
+    for(let i in configs){
+      obj[i.replace('config','')] = configs[i];
     }
-    confirmType&&confirmType(mode);
-    closeConfigModal()
+    return obj;
+  }
+  setInitConfig(){
+    const conf = this.props.typeConfig;
+    this.setState({
+      config0: conf[0],
+      config1:conf[1],
+      config2:conf[2],
+      config3:conf[3],
+      config4:conf[4],
+    });
   }
   showHisModal(){
     const {getAllRecord} = this.props;
@@ -68,12 +103,12 @@ class Banner extends Component {
   handleHisClose(){
     this.setState({
       emergencyBox:false,
-    })
+    });
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther} = this.props;
-    const {mode,emergencyBox} = this.state;
+    const {visible,ifShow,deptName, closeConfigModal,hasMain,hasCurrent,hasOther,preShow,show} = this.props;
+    const {emergencyBox} = this.state;
     const {showConfigModal, changeType, confirmType} = this;
     const domNode = document.getElementById('root');
     const disabled = !(hasMain||hasCurrent||hasOther);
@@ -82,17 +117,21 @@ class Banner extends Component {
         <img src={logo} />
         <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]}>
-          {ifShow==1&&deptName=='急诊科'?<div className={style["buon1"]} onClick={this.showHisModal}>
+          {ifShow==1&&deptName=='急诊科'?<div className={`${style["buon1"]} ${style["buon2"]}`} onClick={this.showHisModal}>
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
-                      本科室近期全部病历
+                      <i>本科室近期全部病历</i>
                     </div>:''}
+          <div className={style.prec} onClick={()=>preShow(show)}>
+            <img className={style["st"]} src={prec} alt="预问诊"/>
+            <i> 预问诊信息</i>
+          </div>
           <div className={style["buon1"]} onClick={showConfigModal}>
             <img className={style["st"]} src={setup} />
-            设置
+            <i> 设置</i>
           </div>
         </div>
         {visible&& <ModeChange
-          mode = {mode}
+          {...this.state}
           hideBtn={disabled}
           closeConfigModal = {closeConfigModal}
           changeType = {changeType}
@@ -106,7 +145,7 @@ class Banner extends Component {
             </div>
           </React.Fragment>
           , domNode):''}
-        
+        {show?<PreInIcss></PreInIcss>:null}
       </div>
     );
   }
@@ -117,7 +156,8 @@ const mapStateToProps = function(state){
   const {message} = state.patInfo;
   return {
     ifShow:sysConfig.general_show,
-    deptName:message.selfDeptName
+    deptName:message.selfDeptName,
+    show:state.preIcss.preShow
   }
 }
 
@@ -131,7 +171,9 @@ const mapDispatchToProps = function(dispatch){
         type: CLEAR_COMSYMPTOMS
       })
     },
+    preShow(show){
+      show?dispatch({type:SET_PREC_SHOW}):getPreMsg()
+    }
   }
 }
-// export default Banner;
 export default connect(mapStateToProps,mapDispatchToProps)(Banner);

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

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

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

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

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

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

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

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

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

@@ -7,6 +7,7 @@ import {getPageCoordinate,windowEventHandler,isIE,filterDataArr} from '@utils/to
 import $ from "jquery";
 import showImg from "../../common/images/show.png";
 import hideImg from "../../common/images/close.png";
+import rePushIcon from '../../common/images/icon2.png';
 import config from '@config/index';
 
 class CheckBody extends Component{
@@ -44,7 +45,7 @@ class CheckBody extends Component{
     return false;
   }
   getLabels(){
-    const {data,showArr,saveText,selecteds,importLabel,setHighter} = this.props;
+    const {data,showArr,saveText,importLabel,setHighter} = this.props;
     let arr = [],list=[];
     const {boxMark,showAll} = this.state;
     const moreNum =data.length-[...data].reverse().findIndex((it)=>it.showInCheck)-1;//被隐藏的位置
@@ -62,7 +63,7 @@ class CheckBody extends Component{
       arr = list.map((it,i)=>{
         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});
+        return chooseType({item:it,preIsExt,afterIsExt,boxMark,i,showArr,saveText,importLabel,setHighter});
       });
     }
     showMoreBtn&&arr.push(more);      //是否显示收起展开按钮
@@ -110,9 +111,10 @@ class CheckBody extends Component{
     });
   }
   render(){
-    const {searchData,totalHide,data,saveText} = this.props;
+    const {searchData,totalHide,rePush,hasMain,isEmpty,isChronic,hideAllDrop} = this.props;
     const {boxLeft,boxTop} = this.state;
-    return <ItemBox title='查体' handleClick={this.handleClick}>
+    return <ItemBox title='查体' handleClick={this.handleClick} hideAllDrop={hideAllDrop}>
+      {!isEmpty&&!isChronic?<img className={style['refresh']} src={rePushIcon} title='重新加载' onClick={!hasMain&&isEmpty?null:rePush}/>:''}
         {this.getLabels()}
         {/*{showMoreBtn?more:''}*/}
         {searchData && searchData.length>0?<SearchDrop data={searchData} show={!totalHide} left={boxLeft} top={boxTop} onSelect={this.handleSearchSelect}></SearchDrop>:''}

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

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

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

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

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

@@ -26,7 +26,6 @@ class CommonSymptom extends Component{
     this.handleSelect = this.handleSelect.bind(this);
     this.handleClear = this.handleClear.bind(this);
     this.handleConfirm = this.handleConfirm.bind(this);
-    this.handleOuter = this.handleOuter.bind(this);
   }
   getClass(){
     let isHide = this.props.show?'':style['hide'];
@@ -34,7 +33,7 @@ class CommonSymptom extends Component{
   }
 
   handleSelect(e,item){
-    // e.stopPropagation();
+    e.stopPropagation();
     let {select,ids,conceptId} = this.state;
     const id = item.questionId||item.id; //缓存localStorage中的数据有id
     const copid = item.conceptId
@@ -56,7 +55,7 @@ class CommonSymptom extends Component{
         ids.push(id);
       }
       conceptId.push(copid);
-      select.push(item);
+      select.push(Object.assign(item,{id:item.questionId}));
     }
     this.setState({
       select,
@@ -86,53 +85,29 @@ class CommonSymptom extends Component{
     onSelect&&onSelect({select,ids,conceptId});
   }
 
-  handleOuter(e){
-    e.stopPropagation();
-    let itemBox = $('#mainSuit')[0]; //主诉框
-    if(this.div.current.contains(e.target) || e.target == itemBox){
-      this.setState({
-        hide:false
-      })
-    }else{
-      this.setState({
-        hide:true,
-        select:[],
-        ids:[],
-        conceptId:[]
-      })
-    }
-  }
-
-  componentDidMount() {
-    window.addEventListener('click', this.handleOuter);
-  }
-
-  componentWillUnmount() {
-    window.removeEventListener('click', this.handleOuter);
-  }
-
   render(){ 
-    const {data} = this.props;
-    const {hide} = this.state;
+    const {data,isCurrent} = this.props;
     const mainSymp = storageLocal.get('mainSymp');
     const mainHis = mainSymp?JSON.parse(mainSymp).reverse():[];
-    return <div className={this.getClass()} contenteditable="false" style={{'display':hide?'none':'block'}} ref={this.div} onClick={this.handleOuter}>
+    return <div className={this.getClass()} contenteditable="false" style={{left:isCurrent?"auto":undefined}} ref={this.div}>
       <ul className={style["listBox"]}>
         {mainHis.length>0?<ul className={style["his"]}>
+          <div className='clearfix'>
           <p>最近输入症状:</p>
+          </div>
           {mainHis.map((it)=>{
             return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
           })}
         </ul>:''}
         <p className={style['c-title']}>常见症状:</p>
+        <div className={style['oper']}>
+          <span className={style['clear']} onClick={this.handleClear}>清空选项</span>
+          <span className={style['confirm']} onClick={this.handleConfirm}>确定</span>
+        </div>
         {data&&data.map((it)=>{
           return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getStyle(it.conceptId)} title={it.name.length>5?it.name:''}>{it.name.length>5?it.name.slice(0,4)+'...':it.name}</li>
         })}
       </ul>
-      <div className={style['oper']}>
-        <span className={style['clear']} onClick={this.handleClear}>清空选项</span>
-        <span className={style['confirm']} onClick={this.handleConfirm}>确定</span>
-      </div>
     </div>
   }
 }

+ 17 - 12
src/components/CommonSymptom/index.less

@@ -1,19 +1,22 @@
 @import "~@less/variables.less";
 .list{
+  position: relative;
   .pop;
   left: 85px;
   padding: 5px;
   white-space: pre-wrap;
   .listBox{
-    max-width: 460px;
+    width: 460px;
   }
   .his{
       color: #3B9ED0;
       border-bottom: 1px solid #EAEDF1;
       p{
-        line-height: 32px;
+        line-height: 44px;
         padding-left: 15px;
         color: #000;
+        width: 180px;
+        float: left;
       }
     }
   .c-title{
@@ -21,37 +24,39 @@
     text-indent: 15px;
   }
   li{
-    width: 85px;
+    width: 92px;
     line-height: 30px;
-    padding-left: 15px;
-    margin-right: 5px;
+    padding-left: 20px;
+    /*margin-right: 5px;*/
+    border:1px solid #fff;
     cursor: pointer;
     display: inline-block;
   }
-  li:hover{
-    border-color:#3B9ED0;
-  }
   .selected{
     .select-li;
-    width: 85px;
+    width: 92px;
   }
   .clear{
     .btnCom;
     .clear;
+    border: 1px #ff0000 solid;
+    padding: 5px 8px;
     margin-left: 15px;
     bottom: 0;
   }
   .confirm{
     .btnCom;
     .confirm;
+    border: 1px #3B9ED0 solid;
+    padding: 5px 8px;
     width: 75px;
     margin-left: 15px;
     bottom: 0;
-    padding-right: 20px;
   }
   .oper{
-    margin-top: 5px;
-    padding-right: 5px;
+    position: absolute;
+    top: 0px;
+    right: 10px;
   }
 }
 .hide{

+ 10 - 19
src/components/CurrentIll/index.jsx

@@ -33,18 +33,18 @@ class CurrentIll extends Component{
   handleFocus(e){
     // 判断主诉是否为空
     const {mainData,mainText,setData,moduleNum,mainIds,mainTailIds,data,changeEditIll,editClear,symptomFeature,isChronic} = this.props;
-    const that = this;
+    //const that = this;
     const ev = e || window.event;
     const text = ev.target.innerText || ev.target.innerHTML;
-    let {setDataTimer} = this.state; 
-    let mainFinallyText = filterDataArr(mainText);
+    let {setDataTimer} = this.state;
+    /*let mainFinallyText = filterDataArr(mainText);
     if(!mainFinallyText && !text){
       //弹窗提醒
       Notify.error("无法操作,请先输入主诉");
       this.setState({
         forbidInput:true
       })
-    }else if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
+    }else */if(!text || (isIE() && text=='<br>')) {//现病史框里没有内容时才设置模板
       let num = moduleNum.num;//主诉使用了几个模板
       if(data.length==0 && !isChronic){
         clearTimeout(setDataTimer);
@@ -89,14 +89,14 @@ class CurrentIll extends Component{
   }
 
   getInlineTag(){
-    const {data,showArr,selecteds,saveText,insertProcess,symptomIds,allModules} = this.props;
+    const {data,showArr,saveText,insertProcess,symptomIds,allModules} = this.props;
     const boxMark = '2';
 
     let list = data&&data.map((item,i)=>{
       if(item.flag && item.flag==3){
         return <TailInlineTag {...item} showText={item.relationModuleName} handleTailClick={(obj)=>{insertProcess(obj,allModules)}}></TailInlineTag>
       }else {
-        return chooseType({item,boxMark,i,hideTag:false,showArr,selecteds,saveText,mainIds:symptomIds});
+        return chooseType({item,boxMark,i,hideTag:false,showArr,saveText,mainIds:symptomIds});
       }
     })
     return list;
@@ -114,18 +114,8 @@ class CurrentIll extends Component{
       }
     } 
   }
-  //componentWillReceiveProps(nextProps){
-    /*const contHeightDiff =  nextProps.data&&this.props.data&&nextProps.data.length!==this.props.data.length;
-    const dataDiff = !!nextProps.data!==!!this.props.data;
-    if(contHeightDiff||dataDiff){*/     //走慢病否,现病史消失滚动才出现bug修改
-   /* if(this.props.data&&this.props.data.length>0){
-      return ;
-    }
-      this.context.scrollArea.refresh();*/
-    //}
-  //}
   render(){
-    const {hasMain,readMode,fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
+    const {hideAllDrop,hasMain,readMode,fuzhen,isChronic,type,fetchPushInfos,handleInput,isRead,saveText,searchData,totalHide,editClear,data} = this.props;
     const {forbidInput,boxLeft,boxTop} = this.state;
     const searchFlag = searchData.length > 0 ? true : false;
     const mode = readMode===null||readMode===-1?type:readMode;
@@ -142,9 +132,10 @@ class CurrentIll extends Component{
     return  <div className={style['current-ill']}>
       <ItemBox title='现病史' 
       editable={editClear||data.length==0?true:false} 
-      handleFocus={this.handleFocus} 
-      onchange={forbidInput?this.onchange:''} 
+      handleFocus={this.handleFocus}
+      handleChange={forbidInput?this.onchange:''}
       handleClick={this.handleClick}
+      hideAllDrop={hideAllDrop}
       handleBlur={this.handleBlur}>
         {data.length>0?this.getInlineTag():(saveText[0]?saveText[0]:'')}
       </ItemBox>

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

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

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

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

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

@@ -12,7 +12,7 @@ import Notify from '@commonComp/Notify';
 import Treat from '@containers/Treat'
 import store from '@store';
 import { initItemList ,setInitHistory,getHistempDetail} from '@store/async-actions/historyTemplates';
-import { pushAllDataList,inspectAndAssist ,deepClone} from '@utils/tools';
+import { pushAllDataList,inspectAndAssist ,deepClone,setFontColorSize} from '@utils/tools';
 import { dragBox } from '@utils/drag';
 import iconRadioDefault from '@common/images/icon-radio-default.png'
 import iconRadioActive from '@common/images/icon-radio-active.png'
@@ -288,8 +288,8 @@ class DiagnosticList extends Component {
                     {list && (list.length > 0) && list.map((item, index) => {
                         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'} id="diagListBox" key={item.conceptId} >
+                        isChronic = chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;
+                        return (<div draggable={true} className={`${style['diag-box']} ${setFontColorSize(2,3)} 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>
@@ -300,7 +300,7 @@ class DiagnosticList extends Component {
                                       <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']}  
+                                      <img className={`${style['info-img']}`}
                                           title='点击i图标可查看详细说明'
                                           style ={hasEnterItem===index  ? {display: "inline-block"} : {display: "none"}}
                                           src={hasEnterImg ? infoMove : infoShow} 
@@ -315,7 +315,7 @@ class DiagnosticList extends Component {
                                           onClick={() =>{this.showTreat(item, index)}}>
                                           治疗方案
                                     </span>
-                                    {isChronic?<span className={style['assess']}
+                                    {isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
                                           onClick={this.showAssessFn.bind(this,item)}>
                                         管理评估
                                     </span>:''}

+ 10 - 5
src/components/DiagnosticList/index.less

@@ -9,6 +9,9 @@
     border-bottom: 1px dotted #989DA3;
     position: relative;
     background: #EAF7FD;
+    span {
+        font-size: unset;
+    }
 }
 .diag-number {
     display: inline-block;
@@ -50,26 +53,28 @@
 
 
 .diag-name {
-   
     margin-left: 10px;
-    border-bottom: 1px solid #666;
+    // border-bottom: 1px solid #666;
     box-sizing: border-box;
     position: relative;
     color:#000;
     font-weight: bold;
     cursor: pointer;
+    line-height: 18px;
 }
 .diag-name-box {
     .ellipsis;
     display: inline-block;
-    line-height: 16px;
+    line-height: 18px;
+    border-bottom: 1px solid #666;
+    position: relative;
+    top: 3px;
     // max-width: 220px;
 }
 
 .diag-up, .diag-down {
     position: relative;
     top: 5px;
-    
 }
 
 .treat {
@@ -121,7 +126,7 @@
 }
 .assess{
     .treat;
-    right: 106px;
+    right: 116px;
 }
 .diag-del {
     position: absolute;

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

@@ -55,13 +55,13 @@ class EMRContainer extends Component {
         const barStyle={background:'#777',width:'100%',marginLeft:'0'};
         return <div className={style['EMR-container']}
                     ref={this.$cont} id="addScrollEvent">
+            <InfoTitle></InfoTitle>
           <ScrollArea speed={1}
                       horizontal={false}
                       className={style["area"]}
                       verticalContainerStyle={contStyle}
                       verticalScrollbarStyle={barStyle}
                       contentClassName="content">
-            <InfoTitle></InfoTitle>
             <div className={style['inner']} id="EmrContainer" ref={this.$div}>
                 <MainSuit></MainSuit>
                 <CurrentIll></CurrentIll>
@@ -74,8 +74,8 @@ class EMRContainer extends Component {
                 <Diagnosis setHighter={this.setHighter}></Diagnosis>
                 <AdviceContainer></AdviceContainer>
             </div>
+    </ScrollArea>
             <OperationContainer></OperationContainer>
-          </ScrollArea>
         </div>
     }
 }

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

@@ -114,13 +114,13 @@
       margin: 0 8px 0 0;
     }
     .export{
-      color: #E2EFF6;
+      color: #a3c9de;
       display: inline-block;
       width: 92px;
       height: 30px;
       line-height: 30px;
       text-align: center;
-      border: 1px solid #E2EFF6;
+      border: 1px solid #a3c9de;
       border-radius: 4px;
       margin-left: 136px;
       cursor: pointer;

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

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

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

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

+ 8 - 4
src/components/Information/index.jsx

@@ -22,16 +22,20 @@ class Information extends Component {
         <div ref={this.$content} className={style['title']}>{preInfo.hospitalName}</div>
         <table className={style['patInfo']}>
           <tr>
-            <td>卡号:{baseObj ? baseObj.patientIdNo : noData ? '' : preInfo.patientIdNo}</td>
             <td>姓名:{baseObj ? baseObj.patientName : noData ? '' : preInfo.patientName}</td>
+            <td>门诊号:{baseObj ? baseObj.inquiryCode : (noData ? '' : preInfo.recordId)}</td>
+          </tr>
+          <tr>
             <td>年龄:{baseObj ? baseObj.patientAge : noData ? '' : preInfo.patientAge}</td>
+            <td>医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</td>
+          </tr>
+          <tr>
             <td>性别:{baseObj ? baseObj.patientSex : noData ? '' : preInfo.patientSex}</td>
+            <td>科室:{baseObj ? baseObj.hospitalDeptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
           </tr>
           <tr>
+            <td>卡号:{baseObj ? baseObj.patientIdNo : noData ? '' : preInfo.patientIdNo}</td>
             <td>就诊时间:{baseObj ? baseObj.inquiryDate : (noData ? '' : preInfo.systemTime.split(' ')[0])}</td>
-            <td>科室:{baseObj ? baseObj.hospitalDeptName : (noData ? '' : preInfo.hospitalDeptName)}</td>
-            <td>医生:{baseObj ? baseObj.doctorName : (noData ? '' : preInfo.doctorName)}</td>
-            <td>门诊号:{baseObj ? baseObj.inquiryCode : (noData ? '' : preInfo.recordId)}</td>
           </tr>
         </table>
       </div>

+ 24 - 6
src/components/Information/index.less

@@ -1,18 +1,36 @@
 .title {
   clear: both;
-  font-size: 24px;
-  margin-bottom: 30px;
+  font-size: 22px !important;
+  margin-bottom: 15px;
   text-align:center;
   padding-top: 15px;
 }
 .patInfo {
-  margin: 0px 0px 30px 0px;
+  margin: 0px 0px 15px 0px;
   td {
     border: 1px solid #aaa;
-    padding: 8px 10px;
+    padding: 4px 8px;
     font-size: 14px;
   }
-  tr td:first-child{
-    width: 31%;
+  tr td{
+    width: 50%;
   }
 }
+@media print{
+  .title {
+    clear: both;
+    font-size: 22px;
+    margin-bottom: 15px;
+    text-align:center;
+    padding-top: 15px;
+  }
+  .patInfo {
+    margin: 0px 0px 15px 0px;
+    td {
+      border: 1px solid #aaa;
+      padding: 2px 8px;
+      font-size: 12px;
+    }
+  }
+}
+

+ 7 - 5
src/components/Inspect/index.jsx

@@ -7,7 +7,7 @@ import Notify from '@commonComp/Notify';
 import store from '@store';
 import $ from 'jquery';
 import { host, prefix } from '@utils/config.js';
-import { isIE, getUrlArgObject,getCurrentDate } from '@utils/tools.js';
+import { isIE, getUrlArgObject,getCurrentDate,setFontColorSize } from '@utils/tools.js';
 import { dragBox } from '@utils/drag';
 import WrapModalBody from '@containers/WrapModalBody';
 
@@ -208,7 +208,7 @@ class Inspect extends React.Component {
 
   }
   render() {
-    const {setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const {hideAllDrop,setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, windowWidth,setTipValue, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
     const { ieVersion, isIE, hide,importLis } = this.state;
     const { checkSystemIpt, onClose,handleBindFileApi,closeInIcss,showSlideImport } = this;
     if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -219,9 +219,9 @@ class Inspect extends React.Component {
       <div className={styles.wrapper}>
         {/* 导入功能插件,ie8/9权限问题暂未解决,先隐藏 */}
         <div className={styles.top}>
-          <span id="inspectResultData">化验结果数据</span>
+          <span id="inspectResultData" className={setFontColorSize(2,5)}>化验结果数据</span>
           {/* <div className={this.getStyle()} onClick={ieVersion&&ieVersion<=9?null:this.handleImportExcel}> */}
-          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0 ? 'none' : 'block' }}>
+          <div className={this.getStyle()} style={{ display: hospitalMsg.import_way_lis == 0||hospitalMsg.import_way_lis ==undefined ? 'none' : 'block' }}>
             {/* <button disabled={ieVersion&&ieVersion>9?true:false}onClick={ieVersion && ieVersion <= 9 ? null : this.handleImportExcel}>导入化验结果</button>
             <input accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" type="file" name="uploadfile" id="choose" style={{ display: 'none' }} ref={(DOM) => this.inputRef = DOM} /> */}
             {/* {0没有,1本地,2医院,3本地和医院} */}
@@ -256,6 +256,7 @@ class Inspect extends React.Component {
           </div>
         </div>
         <ItemBox
+          hideAllDrop={hideAllDrop}
           className={styles.title}
           title={'化验'}
           editable={false}
@@ -263,7 +264,7 @@ class Inspect extends React.Component {
           style={{marginRight:'0'}}
           marginTop={'20px'}
         >
-          <div style={{ padding: '10px', boxSizing: 'border-box' }} >
+          <div style={{ padding: '10px', boxSizing: 'border-box',color:'#000' }} >
             <AddInspect
               handleSign={handleSign}
               setHighter={setHighter}
@@ -286,6 +287,7 @@ class Inspect extends React.Component {
               inspectVal={inspectVal}
               windowHeight={windowHeight}
               windowWidth={windowWidth}
+              setTipValue={setTipValue}
             >
             </AddInspect>
           </div>

+ 131 - 0
src/components/ListItem/index.jsx

@@ -0,0 +1,131 @@
+import classNames from "classnames";
+import {Component} from "react";
+import ScrollArea from 'react-scrollbar';
+import {getIds} from '@utils/tools.js';
+import LiItem from '@common/components/LiItem';
+import style from './index.less';
+
+class ListItem extends Component{
+  constructor(props){
+    super(props);
+    this.getData = this.getData.bind(this);
+    this.getLis = this.getLis.bind(this);
+  }
+  handleClick(item,i,e){
+    e.stopPropagation();
+    // window.event? window.event.cancelBubble = true : e.stopPropagation();
+    const {handleClick,isExclu,isRadio,data,exists,noneIds,withs,joint,listIndex} = this.props;
+    const index=listIndex+''+i;
+    //列单选处理
+    if(isRadio){
+      let selected = exists.find((i)=>{
+        return i.questionId===item.questionId;
+      })||withs.find((i)=>{
+        return i.questionId===item.questionId;
+      })||noneIds.find((i)=>{
+        return i.id===item.questionId;
+      });
+      /*const selected = data.find((it)=>{console.log(exists)
+        return exists.findIndex((i)=>i.questionId===it.id)!==-1||noneIds.includes(it.id)||withs.findIndex((i)=>i.questionId===it.id)!==-1;
+      });*/
+      if(selected&&selected.id!=item.id){     //该列已有选中项,传回已选中的id,name取消选中
+        handleClick&&handleClick(item,isExclu,joint,index,{id:selected.id,name:selected.name,questionId:selected.questionId});
+      }else{
+        handleClick&&handleClick(item,isExclu,joint,index);
+      }
+      return;
+    }
+    handleClick&&handleClick(item,isExclu,joint,index);
+  }
+  getLis(){
+    const {exclusion,noneIds,exists,withs,ban,isSpecialPos,datas} = this.props;
+    let type='';    //选中样式类型
+    let selected = false;  //是否选中
+    const list = Object.keys(ban).length>0?[...exists,...withs,ban]:[...exists,...withs];
+    const arrs = [...noneIds,...getIds(list)];   //非无殊选中项id集合
+    return datas&&datas.map((it,i)=>{
+      if(isSpecialPos){
+        //无殊部分,非无殊项有选中,则无殊项灰显(仍可点,选中非无殊项取消选中,反之亦然)
+        selected = exclusion===it.id;
+        return <LiItem handleClick={this.handleClick.bind(this,it,i)}
+                       key={it.id}
+                       noHover={true}
+                       selected={selected}
+                       noDot={true}
+                       disabled={(exclusion&&!selected)||arrs.length>0}
+                       type='check'
+                       >{it.name}</LiItem>
+      }
+      //非无殊项,有无殊项被选中,则灰显,“无”选中黑√随后选中的项也黑√选中,
+      type = noneIds.includes(it.id)?'noneCheck':'check';
+      selected = arrs.includes(it.id);
+      return <LiItem handleClick={this.handleClick.bind(this,it,i)}
+                     key={it.id}
+                     type={type}
+                     noHover={true}
+                     selected={selected}
+                     disabled={exclusion}
+                     title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</LiItem>
+    })
+  }
+  getData(){
+    const {datas} = this.props;
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'6px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
+    if(!datas||datas.length===0){
+      return <li className={style['no-push-data']}>暂无推送</li>
+    }
+    const liArr = this.getLis();
+    if(datas&&datas.length>11){
+      //超过最多显示条数,添加自定义滚动条,不能全部添加,不需要滚动条时不能阻止外部滚动条滚动事件
+      return <ScrollArea speed={0.8}
+                         horizontal={false}
+                         stopScrollPropagation={true}
+                         style={{maxHeight:'330px'}}
+                         className={style["area"]}
+                         verticalContainerStyle={contStyle}
+                         verticalScrollbarStyle={barStyle}
+                         contentClassName="content">
+        {liArr}
+      </ScrollArea>;
+    }
+    return liArr;
+  }
+
+  getMainData(){//主诉添加症状-带搜索框
+    const {exists,withs,ban,datas} = this.props;
+    if(!datas||datas.length===0){
+      return <li className={style['no-push-data']}>暂无推送数据,可通过搜索查找更多内容~ </li>
+    }
+    const arrs = getIds([...exists,...withs,ban]);   //非无殊选中项id集合
+    return datas&&datas.map((it,i)=>{
+      return <LiItem handleClick={this.handleClick.bind(this,it,i)}
+                 key={it.id}
+                 noHover={true}
+                 selected={arrs.includes(it.id)}
+                 title={it.name.length>4?it.name:''}
+                 style={{'width':'58px','display':'inline-block'}}>
+        {it.name&&it.name.length>4?it.name.slice(0,4)+'...':it.name}
+      </LiItem>
+    });
+  }
+
+  render(){
+    const {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>
+  }
+}
+
+export default ListItem;

+ 47 - 0
src/components/ListItem/index.less

@@ -0,0 +1,47 @@
+@import "~@less/mixin.less";
+
+.row{
+  display: inline-block;
+  vertical-align: top;
+  margin-left: 8px;
+  max-height: 330px;
+  overflow-y: auto;
+}
+.independent{
+  display: block;
+  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;
+  }
+}
+.no-push-data{
+  color:@disable-color;
+}
+.tag,.selected-tag{
+  cursor: pointer;
+  line-height: 20px;
+  &.ext{
+    color: @extBlue;
+  }
+}
+
+.selected-tag{
+  padding: 0;
+  color: @text-color;
+  border-bottom: 1px @border-color solid;
+  line-height: 22px;
+  word-break: break-all;
+}
+.orderTips{
+  color: #bfbfbf;
+  margin:0 0 0 28px;
+}

+ 87 - 0
src/components/ListItems/index.jsx

@@ -0,0 +1,87 @@
+import React, {Component} from "react";
+import SearchBox from '@containers/SearchBox'
+import ListItem from '@components/ListItem';
+import style from './index.less';
+
+class ListItems extends Component{
+  constructor(props){
+    super(props);
+    this.$cont = React.createRef();
+    this.clickConfirm = this.clickConfirm.bind(this);
+  }
+  getLabels(){
+    const {data,handleSelect} = this.props;
+    let detail = [];
+    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);
+      isRadio = (+it.tagType ===1&&+it.controlType === 1);
+      if(+it.controlType===0){
+        detail = it.questionMapping;
+      }else{
+        detail = it.questionDetailList;
+      }
+      return <ListItem datas={detail}
+                       isRadio={isRadio}
+                       isSingle={isSingle}
+                       joint={it.joint}
+                       listIndex={i}
+                       isSpecialPos={isSpecialPos}
+                       isExclu={isExclu}
+                       handleClick={handleSelect}
+                       {...this.props}></ListItem>;
+    });
+    return list;
+  }
+  clickConfirm(){
+    const {handleConfirm} = this.props;
+    this.child&&this.child.reset();//重置搜索框中的数据
+    handleConfirm();
+  }
+  getStyle(){
+    const {show,left} = this.props;
+    return {
+      display:show?'block':'none',
+      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,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();}}>
+      <div className='clearfix'>
+        {noPush?'':<p className={order?style['orderTips']:style['orderTips-m']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>}
+        <div className={style["oper"]}>
+          <span className={style['clear']} onClick={handleClear}>清空选项</span>
+          <span className={style['confirm']} onClick={this.clickConfirm}>确定</span>
+        </div>
+      </div>
+      {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>
+  }
+}
+
+export default ListItems;

+ 37 - 0
src/components/ListItems/index.less

@@ -0,0 +1,37 @@
+@import "~@less/mixin.less";
+.drop-list{
+  .pop;
+  padding:14px 20px 8px 0;
+  min-width: 300px;
+}
+.orderTips{
+  float: left;
+  color: #bfbfbf;
+  margin:0 0 10px 28px;
+  max-width: 98px;
+  white-space: initial;
+}
+.orderTips-m{
+  .orderTips;
+  margin-top:10px;
+}
+.oper{
+  float: right;
+}
+.clear{
+  .btnCom;
+  .clear;
+  border: 1px #ff0000 solid;
+  padding: 5px 8px;
+  /*height: auto;
+  line-height: unset;*/
+}
+.confirm{
+  .btnCom;
+  .confirm;
+  border: 1px #3B9ED0 solid;
+  padding: 5px 8px;
+ /* height: auto;
+  line-height: unset;*/
+  width: 60px;
+}

+ 14 - 24
src/components/MainSuit/index.jsx

@@ -13,7 +13,6 @@ class MainSuit extends Component{
   constructor(props){
     super(props);
     this.state = {
-      boxEditable:true,
       boxLeft:null,
       boxTop:null,
       symptom:false,
@@ -22,7 +21,6 @@ class MainSuit extends Component{
       clearTimer:null,
       overFlag:false,
     };
-    this.toggleEditable = this.toggleEditable.bind(this);
     this.handleFocus = this.handleFocus.bind(this);
     this.handleSelect = this.handleSelect.bind(this);
     this.handleSearchSelect = this.handleSearchSelect.bind(this);
@@ -30,21 +28,15 @@ class MainSuit extends Component{
     this.handleClick = this.handleClick.bind(this);
     this.handleBlur = this.handleBlur.bind(this);
   }
-  toggleEditable(){
-    this.setState({
-      boxEditable:!this.state.boxEditable
-    })
-  }
-
 
   getInlineTag(){
-    const {datas,showArr,handleTailClick,selecteds,saveText,mainIds,allModules} = this.props;
+    const {datas,showArr,handleTailClick,saveText,mainIds,allModules} = this.props;
     const boxMark = '1';
     let list = datas&&datas.map((item,i)=>{
       if(item.flag && item.flag==3){
         return <TailInlineTag {...item} showText={item.relationModuleName} handleTailClick={(obj)=>{handleTailClick(obj,saveText,allModules)}}></TailInlineTag>
       }else {
-        return chooseType({item,boxMark,i,hideTag:false,showArr,selecteds,saveText,mainIds});
+        return chooseType({item,boxMark,i,hideTag:false,showArr,saveText,mainIds});
       }
 
     })
@@ -53,20 +45,18 @@ class MainSuit extends Component{
 
 
   handleFocus(e){
-    e.stopPropagation();
-    const {getCommonSymptoms,datas,clearDiagnose} = this.props;
+    const {getCommonSymptoms,datas,clearDiagnose,handleShow} = this.props;
     let innerText = e.target.innerText || e.target.innerHTML;//兼容火狐43
     clearDiagnose&&clearDiagnose();//清除复诊数据
     if(!isIE()){//IE会触发onfocus和onblur事件
       if(!innerText.trim()){//有内容就走搜索接口
         getCommonSymptoms && getCommonSymptoms();
+        handleShow&&handleShow({ikey:'common'});
         this.setState({
-          symptom:true,
           inpText:innerText
         })    
       }else{
         this.setState({
-          symptom:false,
           inpText:innerText
         }) 
       }
@@ -76,9 +66,6 @@ class MainSuit extends Component{
       // if(datas.length==0 && !innerText.trim()){
       if(datas.length==0 && innerText == '<br>'){
         getCommonSymptoms && getCommonSymptoms();
-        this.setState({
-          symptom:true
-        })  
       }
     }
     
@@ -135,6 +122,8 @@ class MainSuit extends Component{
 
 
   handleClick(e){
+    const {handleShow} = this.props;
+    handleShow&&handleShow({ikey:'common'});
     // e.stopPropagation(); //冒泡到最顶层关闭其他下拉
     //搜索框位置
     const ele = document.activeElement;
@@ -280,15 +269,15 @@ class MainSuit extends Component{
       }
   }*/
   render(){
-    const {saveChronic,readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide} = this.props;
-    const {symptom,boxLeft,boxTop} = this.state;
+    const {readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,showArr} = this.props;
+    const {boxLeft,boxTop} = this.state;
     const symptomFlag = CommonSymptoms.length>0 ? true : false;
     const searchFlag = searchData.length>0 ? true : false;
     const boxTop1 = datas.length>0?boxTop:45;
     const boxLeft1 = datas.length>0?boxLeft:85;
     const mode = readMode===null||readMode===-1?type:readMode;
     if(+mode===1){      //文本模式
-      return <Textarea title='主诉' boxMark='1' saveChronic={saveChronic} isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
+      return <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
     }
     return  <div className={style['main-suit']}>
       <ItemBox
@@ -296,16 +285,17 @@ class MainSuit extends Component{
       title='主诉' 
       editable={editClear||datas.length==0?true:false} 
       boxLineHeight="24px"
-      handleFocus={this.handleFocus} 
-      onchange={this.handleChange} 
+      handleFocus={this.handleFocus}
+      handleChange={this.handleChange}
       handleClick={this.handleClick} 
       handleBlur={this.handleBlur}
       data={datas}
+      saveText={saveText}
       boxId="mainSuit">
-        {datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
+        {''}{datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
       </ItemBox>
       {/*没有推送结果就不显示*/}
-      {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
+      {symptomFlag && !searchFlag&&datas.length===0 ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&showArr['common']} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
     </div>
   }
 }

+ 31 - 0
src/components/MedicalInfo/Filters/index.jsx

@@ -0,0 +1,31 @@
+import React, {Component} from "react";
+import style from './index.less';
+import checkOnIcon from '@common/images/check_on.png';
+import checkOffIcon from '@common/images/check_off.png';
+
+class Filters extends Component {
+  constructor(props) {
+    super(props);
+  }
+  drawItem(){
+    const {data,checkeds,handleCheck} = this.props;
+    let isChecked=false;
+    return data.map((it)=>{
+      isChecked = checkeds.includes(it.val);
+      return <span onClick={()=>handleCheck(it.val)}>
+                  <img src={isChecked?checkOnIcon:checkOffIcon} alt=""/>
+                  {it.name}
+                </span>
+    })
+  }
+  render() {
+    return <div className={style["filters"]} id='medicalInfoFilter'>
+              {this.drawItem()}
+            </div>
+
+
+
+  }
+}
+
+export default Filters;

+ 13 - 0
src/components/MedicalInfo/Filters/index.less

@@ -0,0 +1,13 @@
+.filters{
+  width: 380px;
+  margin-top:10px;
+  img{
+    vertical-align: text-bottom;
+    margin-right: 3px;
+  }
+  span{
+    cursor: pointer;
+    font-size: 12px;
+    margin:0 20px 4px 0;
+  }
+}

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

@@ -2,6 +2,7 @@ import React, { Component } from 'react';
 import style from './index.less';
 import delIcon from '@common/images/del_nor.png';
 import {windowEventHandler,getCurrentDate,getWindowInnerHeight} from '@utils/tools'
+import Filters from './Filters';
 
 class MedicalInfo extends Component {
     constructor(props) {
@@ -12,26 +13,37 @@ class MedicalInfo extends Component {
         this.state={
           val:'',
           hasSearch: false,
-          msg:''
+          msg:'',
+          typeChecks:['0'],
         };
         this.search = this.search.bind(this);
         this.handleChange = this.handleChange.bind(this);
         this.clear = this.clear.bind(this);
         this.getSearchList = this.getSearchList.bind(this);
         this.handleEnter = this.handleEnter.bind(this);
+        this.handleTypeCheck = this.handleTypeCheck.bind(this);
+        this.showScale=this.showScale.bind(this);
+    }
+    showScale(item){
+      const {scaleInfo,getScale,showScaleFn} = this.props;
+      if(scaleInfo&&scaleInfo[item.conceptId]){
+        showScaleFn&&showScaleFn(item);
+      }else{
+        getScale(item);
+      }
     }
     getSearchList() {
         const { getAllConceptDetail,searchResult } = this.props;
         const that = this;
         if(searchResult&&searchResult.length>0){
           setTimeout(function(){
-            that.$ul.current.style.height = getWindowInnerHeight()-248+'px';
+            if(that.$ul.current)that.$ul.current.style.height = getWindowInnerHeight()-278+'px';
           },100);
         }
         return searchResult && searchResult.map((item) => {
           return <li key={item.conceptId}
                      title='点击查看详情'
-                     onClick={() => getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName,position:0})}>
+                     onClick={()=>+item.type===21?this.showScale(item):getAllConceptDetail({name: item.name, type: item.type, uname: item.uniqueName,position:0,showName:item.name})}>
             <span>{item.name}</span>
             <i>( {item.libTypeName} )</i>
             {item.retrievalName?<p>• {item.retrievalName}</p>:''}
@@ -48,7 +60,7 @@ class MedicalInfo extends Component {
       }
       const {handleChangeValue} = this.props;
       const val = this.$inp.current.value;
-      handleChangeValue&&handleChangeValue(val);
+      handleChangeValue&&handleChangeValue(val,this.state.typeChecks);
     }
   handleChange(){
     const value = this.$inp.current.value;
@@ -82,39 +94,68 @@ class MedicalInfo extends Component {
       this.$inp.current.focus();
       clearResult&&clearResult();
   }
+  handleTypeCheck(val){
+    let {typeChecks} = this.state;
+    //const allChecked = typeChecks.includes('0');
+    const alli = typeChecks.findIndex((it)=>it==='0');
+    const allChecked = alli!==-1;
+    if(val==='0'){      //全部与其他互斥
+      !allChecked?typeChecks=['0']:typeChecks.splice(alli,1);
+    }else{
+      allChecked&&typeChecks.splice(alli,1);
+      if(!typeChecks.includes(val)){
+        typeChecks.push(val);
+      }else{
+        const i = typeChecks.findIndex((it)=>val===it);
+        typeChecks.splice(i,1);
+      }
+    }
+    this.setState({
+      typeChecks:typeChecks
+    });
+  }
   componentDidMount(){
-    const height = getWindowInnerHeight()-148;
+    const height = getWindowInnerHeight()-149;
     this.$cont.current.style.height = height+"px";
+    this.props.getFilters();
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-148;
+        const height = getWindowInnerHeight()-149;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){
-        const height = getWindowInnerHeight()-248;
+        const height = getWindowInnerHeight()-278;
         this.$ul.current.style.height = height+"px";
       }
     });
   }
-  componentWillReceiveProps(){
+  componentWillReceiveProps(next){
     this.setState({
       hasSearch: false
     });
+    //点清空恢复初始状态
+    if(this.props.clearSearch!==next.clearSearch){
+      this.clear();
+      this.setState({
+        typeChecks:['0']
+      });
+    }
   }
     render() {
-        const {searchResult} = this.props;
-        const {val, hasSearch,msg} = this.state;
+        const {searchResult,filterList} = this.props;
+        const {val, hasSearch,msg,typeChecks} = this.state;
         return (
             <div className={style['search-cont']} ref={this.$cont}>
               <div className={style['search-box']}>
                 <p className={style['cont']}>
-                  <input placeholder="医学知识搜索" type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
+                  <input placeholder="医学知识搜索" id='medicalInfoSearch' type="text" className={style['input']} ref={this.$inp} onInput={this.handleChange} onKeyUp={this.handleEnter}/>
                   {val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
                   <button onClick={this.search}>搜索</button>
                 </p>
+                <Filters data ={filterList} checkeds={typeChecks} handleCheck={this.handleTypeCheck}></Filters>
               </div>
               {searchResult&&searchResult.length>0?<div className={style['result']}>
-                    <p className={style['title']}>查询内容</p>
+                    <p className={style['title']}>搜索内容</p>
                     <ul ref={this.$ul}>
                       {this.getSearchList()}
                     </ul>

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

@@ -56,7 +56,7 @@
         border: none;
     }
     .result{
-        margin-top:46px;
+        margin-top:95px;
         padding: 0 5px 0 0;
         height: 100%;
         box-sizing: border-box;
@@ -105,6 +105,6 @@
         color:#979797;
         text-align: center;
         line-height: 40px;
-        margin-top: 66px;
+        margin-top: 106px;
     }
 }

+ 34 - 21
src/components/MultSpread/index.jsx

@@ -9,8 +9,10 @@ import addIcon from '@images/addItem.png';
 import addIcon1 from '@images/addItem2.png';
 import style from "./index.less";
 import tools from '@utils/tools';
+import {setFontColorSize,handleMouseUp} from '@utils/tools';
 import NumberUnitDrop from '@containers/NumberUnitDrop';
 
+
 /****
  * 多标签组合
  * author:zn@2018-11.26
@@ -23,7 +25,6 @@ import NumberUnitDrop from '@containers/NumberUnitDrop';
  * ikey:当前组件唯一标识,由模块index+标签index+标签内index三个组成的字符串
  * boxMark:当前所在的模块
  * isImports:是否高亮(仅查体使用)
- * selecteds:选中项数据(仅多选子组件用)
  * saveText:该模块的预览数据
  * textPrefix:前缀
  * textSuffix:后缀
@@ -39,6 +40,7 @@ class MultSpread extends Component{
       weight:0,     //体重
       bmi:'',        //BMI
       wrBmi:false,      //是否无效bmi值,是则要清空身高体重,不能用判断bmi是否为空来判断,因为初始就是为空
+      isSelectAll:false
     };
     this.setBMIParam = this.setBMIParam.bind(this);
     this.setBMI = this.setBMI.bind(this);
@@ -46,13 +48,14 @@ class MultSpread extends Component{
     this.setBMIstate = this.setBMIstate.bind(this);
   }
   getClass(){
-    const {saveText,ikey,showAdd} = this.props;
+    const {saveText,ikey,showAdd,isExtBlue,mouseSelect} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     //const orgBorder = isImports&&!text?style['orange-border']:'';
     const isSelected = text?style['selected']:style['container'];
     const hasAdd = showAdd?style['add']:'';
-    return classNames(isSelected,hasAdd);
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return classNames(isSelected,hasAdd,setFontColorSize(!!text?'2,6':isExtBlue?2:1),selectedArea);
   }
   saveDoms(it){
     const doms = this.state.numDoms;
@@ -135,8 +138,10 @@ class MultSpread extends Component{
     }
   }
   getLabels(){
-    const {data,ikey,showArr,copyId,selecteds,boxMark,isExtBlue} = this.props;
-    const {wrBmi,bmi} = this.state;
+    const {data,ikey,showArr,copyId,boxMark,isExtBlue,saveText} = this.props;
+    const {wrBmi,bmi,isSelectAll} = this.state;
+    const labelInx = tools.getLabelIndex(ikey);
+    const text = !!(saveText&&saveText[+labelInx]);
     let show = false;
     let inx = '',count=0;
     const list = data.map((it,i)=>{
@@ -165,7 +170,7 @@ class MultSpread extends Component{
                            isExtBlue={isExtBlue}
                            value={it.value}
                            copyType={it.copyType}
-                           selecteds={selecteds ?selecteds[i]:[]}
+                           selecteds={it.selecteds}
                            show={showArr&&showArr[inx]}
                            order={it.textGenerate}
                            type={boxMark}
@@ -199,6 +204,7 @@ class MultSpread extends Component{
                              suffix={it.labelSuffix}
                              placeholder={it.name}
                              isExtBlue={isExtBlue}
+                             isSelectAll={text}
                              //inputRef = {this['$inp'+(count++)]}
                              saveDoms={this.saveDoms.bind(this)}
                              reFocus={this.setNextFocus.bind(this)}
@@ -234,36 +240,43 @@ class MultSpread extends Component{
     });
     return list;
   }
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     //挂载完成保存有加号的项目数据
     const {saveAddItem,fullData,copyId,showAdd} = this.props;
     if(showAdd){
       const data = tools.deepClone(fullData);
-    setTimeout(function(){        //修改个别历史病例引用报错bug
-      saveAddItem&&saveAddItem(copyId,data);
-    })
+      setTimeout(function(){        //修改个别历史病例引用报错bug
+        saveAddItem&&saveAddItem(copyId,data);
+      })
     }
   }
   getContClass(){
-    const {isImports,ikey,saveText,isExtBlue} = this.props;
+    const {isImports,ikey,saveText,isExtBlue,mouseSelect} = this.props;
     const labelInx = tools.getLabelIndex(ikey);
     const text = saveText&&saveText[+labelInx];
     const ext = !text&&isExtBlue?style['ext']:'';
     const orgBorder = isImports&&!text?style['orange-border']:'';
-    return classNames(orgBorder,ext);
+    const selectedArea = mouseSelect?style['selected-area']:'';
+    return classNames(orgBorder,ext,selectedArea);
   }
   render(){
-    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue} = this.props;
+    const {showAdd,addLabelItem,ikey,copyId,textPrefix,textSuffix,isExtBlue,select_start,i,boxMark} = this.props;
     return (<div className={this.getContClass()}
-                 style={{display:'inline-block'}}>
-      {textPrefix?<span>{textPrefix}</span>:''}
-      <div className={this.getClass()}>
-      {this.getLabels()}
-      {textSuffix?<span>{textSuffix}</span>:''}
-      {showAdd?<img src={isExtBlue?addIcon1:addIcon} alt="复制该项"
-                    className={style['add-icon']}
-                    onClick={()=>addLabelItem({ikey,copyId})}/>:''}
-    </div>
+                 style={{display:'inline-block'}}
+                 onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+                 onMouseDown={this.handleMouseDown.bind(this)}>
+        {textPrefix?<span className="prefixUnset">{textPrefix}</span>:''}
+        <div className={this.getClass()}>
+          {this.getLabels()}
+          {textSuffix?<span className="prefixUnset">{textSuffix}</span>:''}
+          {showAdd?<img src={isExtBlue?addIcon1:addIcon} alt="复制该项"
+                        className={style['add-icon']}
+                        onClick={()=>addLabelItem({ikey,copyId})}/>:''}
+        </div>
     </div>)
   }
 }

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

@@ -2,6 +2,7 @@ import react from "react";
 import style from "./index.less";
 import classNames from 'classnames';
 import {deepClone} from '@utils/tools.js';
+import LiItem from '@common/components/LiItem';
 /**
   单列多选组件下拉 2019-2-20 By_liucf
   接收参数:
@@ -30,13 +31,13 @@ class SlideItem extends react.Component{
     return classNames(style['list'],isHide);
   }
 
-  getSeleStyle(id){
+  /*getSeleStyle(id){
     const {seleId} = this.state;
     if(seleId.includes(id)){
       return style['selected'];
     }
     return '';
-  }
+  }*/
 
   handleSelect(e,item){
     e&&e.stopPropagation();
@@ -75,12 +76,25 @@ class SlideItem extends react.Component{
     const params = this.state;
     handleConfirm&&handleConfirm(params);
   }
+  componentWillReceiveProps(next){
+    if(this.props.show!==next.show){
+      const seleData = deepClone(this.props.seleData||[]);
+      const seleId = deepClone(this.props.seleId||[]);
+      this.setState({
+        seleData:seleData||"",
+        seleId:seleId||[]
+      });
+    }
+  }
   render(){
     const {data} = this.props;
+    const {seleId} = this.state;
     return <div className={this.getListClass()} style={this.getStyle()} contentEditable="false">
         <ul>
           {data&&data.map((it)=>{
-          return <li onClick={(e)=>this.handleSelect(e,it)} className={this.getSeleStyle(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
+          return <LiItem handleClick={(e)=>this.handleSelect(e,it)}
+                         selected={seleId.includes(it.id)}
+                         title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</LiItem>
         })}
           <li onClick={this.handleClear} className={style['mClear']}>清空选项</li>
           <li onClick={this.handleClick} className={style['mConfirm']}>确定</li>

+ 2 - 9
src/components/Multiple/SlideItem/index.less

@@ -1,23 +1,17 @@
 @import "~@less/mixin.less";
-.selected{
-    .select-li;
-  }
 .list{
   .pop;
   padding: 0 0 10px;
   color: @text-color;
-  li{
+  .mClear,.mConfirm{
     height: 32px;
     line-height: 32px;
     border:1px #fff solid;
     padding: 0 20px;
     white-space: nowrap;
+    text-align: center;
     cursor: pointer;
   }
-  // li:hover,.selected{
-  li:hover{
-    border-color:#3B9ED0;
-  }
 }
 .hide{
   display: none;
@@ -28,7 +22,6 @@
 }
 .mConfirm{
   color: #3B9ED0;
-  text-align: center;
   border: 1px solid #3B9ED0;
 
 }

+ 30 - 9
src/components/Multiple/index.jsx

@@ -2,7 +2,7 @@ import react from "react";
 import style from "./index.less";
 import $ from 'jquery';
 import classNames from 'classnames';
-import {handleEnter,isIE,filterArr,deepClone,filterDataArr} from '@utils/tools.js';
+import {handleEnter,isIE,filterArr,deepClone,filterDataArr,setFontColorSize,handleMouseUp} from '@utils/tools.js';
 import {Notify} from '@commonComp';
 import SlideItem from "./SlideItem";
 import config from '@config/index.js';
@@ -37,18 +37,31 @@ class Multiple extends react.Component{
   }
 
   getClass(){
-    const {show,value,hideTag,isImports,isExtBlue} = this.props;
+    const {show,value,hideTag,isImports,isExtBlue,mouseSelect} = this.props;
     const orgBorder = isImports&&!value?style['orange-border']:'';
     const ext = isExtBlue?style['ext']:'';
+    const editBorder = this.state.editable?style['blue-border']:'';
+    const selectedArea = mouseSelect?style['selected-area']:'';
     if(show){
       $(this.$div.current).addClass(style['borderd']);
     }else{
       $(this.$div.current).removeClass(style['borderd']);
     }
     if(value){
-      return hideTag?classNames(style['hide-tag'],orgBorder):classNames(style['selected-tag'],orgBorder);
+      if(hideTag){
+          return classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:''),selectedArea)
+        }
+      return classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize(),selectedArea);
+    }else{
+      if(hideTag){
+        return isExtBlue?classNames(setFontColorSize(2)):classNames(setFontColorSize(2),'prefixUnsetColor')
+      }
+      return classNames(style['tag'],orgBorder,ext,setFontColorSize(1),selectedArea);
     }
-    return hideTag?'':classNames(style['tag'],orgBorder,ext);
+    // if(value){
+      //   return hideTag?classNames(style['hide-tag'],orgBorder,setFontColorSize(isExtBlue?2:'')):classNames(style['selected-tag'],orgBorder,editBorder,setFontColorSize());
+      // }
+      // return hideTag?classNames(setFontColorSize()):classNames(style['tag'],orgBorder,ext,setFontColorSize());
   }
 
   getListClass(){
@@ -84,6 +97,7 @@ class Multiple extends react.Component{
   changeToEdit(e){//双击
     const {value,id,placeholder,handleDbclick,handleHide} = this.props;
     let text = e.target.innerText || e.target.innerHTML;
+    window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
     handleHide&&handleHide();       //展开情况下双击收起
     // clearTimeout(this.state.timer);//取消延时的单击事件
     e.stopPropagation();
@@ -92,7 +106,9 @@ class Multiple extends react.Component{
         labelVal:text,
         editable:true
       });
-      e.target.focus();
+      /*setTimeout(()=>{
+        e.target.focus();
+      })*/
       handleDbclick && handleDbclick({value,id,placeholder});
     }
   }
@@ -145,7 +161,10 @@ class Multiple extends react.Component{
     handleConfirm&&handleConfirm(params);
     handleHide&&handleHide();
   }
-
+  handleMouseDown(){
+    const {i,setSelectArea,boxMark}= this.props;
+    !this.state.editable&&setSelectArea({i,boxMark,dir:'start'});
+  }
   componentDidMount(){
     if(isIE()){
       $(this.$div.current).onIe8Input(function(e){
@@ -154,7 +173,7 @@ class Multiple extends react.Component{
     }
   }
   render(){
-    const {placeholder,value,show,data,hideTag} = this.props;
+    const {placeholder,value,show,data,hideTag,select_start,i,boxMark} = this.props;
     const {editable,seleData,seleId} = this.state;
     return <div className={style["container"]}>
       <div className={this.getClass()}
@@ -164,15 +183,17 @@ class Multiple extends react.Component{
       onBlur={this.handleBlur}
       onInput={this.onChange}
       onKeyDown={handleEnter}
+      onMouseUp={()=>handleMouseUp({select_start,i,boxMark})}
+      onMouseDown={this.handleMouseDown.bind(this)}
       contentEditable={editable}>{value||placeholder}</div>
       <div className={this.getListClass()} contentEditable="false">
-        <SlideItem 
+        <SlideItem
           show={show}
           data={data} 
           seleData={seleData} 
           seleId={seleId} 
           handleConfirm={(obj)=>this.handleConfirm(obj)}
-          ></SlideItem>
+          ></SlideItem >
       </div>
     </div>
   }

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

@@ -3,26 +3,26 @@
   display: inline-block;
   cursor: pointer;
 }
-/* .selected{
-    .select-li;
-  } */
 .tag,.selected-tag{
   cursor: pointer;
   line-height: 20px;
   &.ext{
     color: @extBlue!important;
+    &.selected-area{
+      color: #fff!important;
+    }
   }
 }
 
 .selected-tag{
   padding: 0;
-  color: @text-color;
+  // color: @text-color;
   border-bottom: 1px @border-color solid;
   line-height: 22px;
 }
 .hide-tag{
   padding: 0;
-  color: @text-color;
+  // color: @text-color;
   line-height: 22px;
   &.ext{
     color: @extBlue;

+ 27 - 14
src/components/NumberDrop/index.jsx

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

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

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

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

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

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


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


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

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

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

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

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


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác