Forráskód Böngészése

Merge branch 'dev/new1' into dev5.3.1

luolei 5 éve
szülő
commit
c5b5852107

+ 9 - 0
newICSS.iml

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

+ 2 - 2
src/common/components/EditableSpan/index.jsx

@@ -123,13 +123,13 @@ class EditableSpan extends Component{
     const {boxMark,handleClear,handleChange,i} = this.props;
     e.stopPropagation();
     // 延时清空搜索结果,不延时会影响选中
-    clearTimeout(this.state.clearTimer);
+    /*clearTimeout(this.state.clearTimer);
     const clearTimer = setTimeout(function(){
       handleClear && handleClear({boxMark})
     },config.delayTime);
     this.setState({
       clearTimer
-    });
+    });*/
   }
 
   moveEnd(obj) {

+ 2 - 2
src/common/less/variables.less

@@ -84,8 +84,8 @@
   padding-right: 8px;
 }
 .select-li{
-  height: 32px;
-  line-height: 32px;
+  height: 30px;
+  line-height: 30px;
   width: 100%;
   font-size: 14px;
   text-align: left;

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

@@ -3,7 +3,7 @@ import { SearchOption, Calendar, ConfirmModal, Notify, Add ,DelToast} from '@com
 import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
-import { getPageCoordinate,getCurrentDate } from '@utils/tools';
+import { getPageCoordinate,getCurrentDate,setPosition } from '@utils/tools';
 import ScrollArea from 'react-scrollbar';
 
 class AddAssistCheck extends React.Component {
@@ -31,10 +31,14 @@ class AddAssistCheck extends React.Component {
     $(document).click((event) => {
       let _con = $('#searchWrapAssist');   // 设置目标区域
       let _cons = $('#datePick');   // 设置目标区域
+      // let _conClick = $('#assistCheck');   // 点击的按钮
       let _del = document.getElementById("delBox");   // 删除弹窗
       let _close = document.getElementById("assiClose");   // 删除icon
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (_con && searchWrapAssist != event.target && !_con.is(event.target) && _con.has(event.target).length === 0) { // Mark 1
+        if(this.state.show){
+          this.props.setHighter(0)
+        }
         this.setState({ show: false });
       }
       if (!_cons.is(event.target) && _cons.has(event.target).length === 0 || event.target.isEqualNode(_close)) { // Mark 1
@@ -86,7 +90,8 @@ class AddAssistCheck extends React.Component {
   handleSearchShow(e) {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow,pageTop:getPageCoordinate(e).boxTop })
-    // e.stopPropagation();
+    // e.stopPropagation(); 
+    setPosition(e,"#searchOption",this.props.setHighter)   
   }
   handleShowDate(idx) {
     this.setState({

+ 36 - 11
src/components/AddInspect/SlideSelect/index.jsx

@@ -1,12 +1,12 @@
 import React, { Component } from "react";
 import styles from "./index.less";
-import { normalVal,timestampToTime } from '@utils/tools';
+import { normalVal,timestampToTime,getPageCoordinate,setPosition } from '@utils/tools';
 import { InspectCommon, Calendar,DelToast} from '@commonComp';
 import slideUp from "@common/images/slide-up.png";
 import slideDown from "@common/images/slide-down.png";
 import $ from 'jquery';
 import date1 from '../img/date1.png';
-import close from '../img/close.png';
+import ScrollArea from 'react-scrollbar';
 
 class SlideSelect extends Component {
   constructor(props) {
@@ -16,12 +16,13 @@ class SlideSelect extends Component {
       activeInd:false,
       activeName:'',
     };
-    this.toTime = this.toTime.bind(this)
-    this.handleSlide = this.handleSlide.bind(this)
-    this.handleDel = this.handleDel.bind(this)
-    this.handleCancel = this.handleCancel.bind(this)
-    this.delConfirm = this.delConfirm.bind(this)
-    this.timeSure = this.timeSure.bind(this)
+    this.toTime = this.toTime.bind(this);
+    this.handleSlide = this.handleSlide.bind(this);
+    this.handleDel = this.handleDel.bind(this);
+    this.handleCancel = this.handleCancel.bind(this);
+    this.delConfirm = this.delConfirm.bind(this);
+    this.timeSure = this.timeSure.bind(this);
+    this.handleLabelSub = this.handleLabelSub.bind(this);
   }
   handleChangeDate(date) {
     // console.log(date,'外')
@@ -82,8 +83,15 @@ class SlideSelect extends Component {
     const {handleChangeDate} = this.props;
     handleChangeDate&&handleChangeDate(date)
   }
+  handleLabelSub(e,questionId,idx){
+    const {handleLabelSub,handleFillShow,windowHeight,listDom,setHighter} = this.props;
+    handleLabelSub(e,questionId,idx);
+    handleFillShow(e,idx);
+    //弹窗高度超出屏幕,增加页面高度
+    setPosition(e,"#inspectFill",setHighter)
+  }
   render() {
-    const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,handleLabelSub,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate,showToast} = this.props;
+    const {getInfomation,handleConfirm,changeActivePart,handleDelClick,getItemList,date,item,idx,handleFillShow,showDetails,showFill,changeShowFill,handlePush,dateTime,currentIdx,currentData,fillActive,handleShowDate,handleChangeDate,showToast} = this.props;
     const {show,activeInd,activeName} = this.state;
     let numPlus = 0,numPlus1 = 0;
     let staticTime = {}
@@ -99,19 +107,27 @@ class SlideSelect extends Component {
         second: tmp2[2]
       }
     }
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'6px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
     return (
       <li key={item.questionId} className={styles.slideLi}> 
         {
             // 标签,血常规。。
             item.show ?
             <p className={styles.staticTagActive}>
-                <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e) => { handleLabelSub(e, item.questionId,idx); handleFillShow(e,idx) }}>
+                <span className={styles.tagSpan} data-flg="current" style={{color:"#000"}} onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </span>
             </p>:
             <p >
-                <i className={styles.tagSpan} data-flg="current" onClick={(e) => { handleLabelSub(e,item.questionId,idx); handleFillShow(e,idx) }}>
+                <i className={styles.tagSpan} data-flg="current" onClick={(e)=>this.handleLabelSub(e,item.questionId,idx)}>
                   {item.name}
                   <span className={styles.imgInfo} onClick={()=>getInfomation({name:item.uniqueName || '', position: 1, type: 12})}></span>
                 </i>
@@ -212,7 +228,16 @@ class SlideSelect extends Component {
                             </div>
                         </div>
                             {/* 填写单内容显示 */}
+                      <ScrollArea speed={0.8}
+                                  horizontal={false}
+                                  stopScrollPropagation={true}
+                                  style={{maxHeight:'358px'}}
+                                  className={styles["area"]}
+                                  verticalContainerStyle={contStyle}
+                                  verticalScrollbarStyle={barStyle}
+                                  contentClassName="content">
                             { getItemList() }
+                      </ScrollArea>
                     </InspectCommon>
                 : null
             }

+ 15 - 3
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} from '@utils/tools';
+import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate,setPosition} from '@utils/tools';
 import styles from './index.less';
 import ScrollArea from 'react-scrollbar';
 import store from '@store';
@@ -25,6 +25,7 @@ class Inspect extends React.Component {
       // tmpIds: [],      //内层外层
       impId: null
     }
+    this.$ul = React.createRef();
     this.handleChangeDate = this.handleChangeDate.bind(this)
     this.handleShowDate = this.handleShowDate.bind(this)
     this.getItemList = this.getItemList.bind(this)
@@ -89,11 +90,17 @@ class Inspect extends React.Component {
       let _closeTil = $('#delTit')[0];   // 弹窗标题
       if (searchOption) {
         if (searchOption != event.target && searchWrap != event.target && searchWrap != event.target.parentNode && !$.contains(searchOption, event.target)) { // Mark 1
+          if(this.state.show){
+            this.props.setHighter(0)
+          }
           this.setState({ show: false });
         }
       }
       if (inspectFill) {
         if ($(event.target).attr('id') != "getSureTime"&&event.target.getAttribute('data-flg') != 'current' && inspectFill != event.target && !$.contains(inspectFill, event.target)) { // Mark 1
+          if(this.state.showFill){
+            this.props.setHighter(0)
+          }
           this.setState({ showFill: false, date: false });
         }
       }
@@ -116,6 +123,7 @@ class Inspect extends React.Component {
   }
   changeShowFill() {
     this.setState({ showFill: false })
+    this.props.setHighter(0)
   }
   handleChangeDate(info) {
     // let date = info.year+'-'+info.month.toString().padStart(2,'0')+'-'+info.day.toString().padStart(2,'0')
@@ -126,6 +134,7 @@ class Inspect extends React.Component {
     let tmpShow = this.state.show;
     this.setState({ show: !tmpShow, pageTop: getPageCoordinate(e).boxTop })
     // e.stopPropagation();
+    setPosition(e,"#searchOption",this.props.setHighter)
   }
   handleFillShow(e, idx) {
     let tmpShow = this.state.showFill;
@@ -190,7 +199,7 @@ class Inspect extends React.Component {
     } else {
       fillActive = this.state.currentData;
     }
-    return <ul className={styles.searchLis}>
+    return <ul className={styles.searchLis} ref={this.$ul}>
       {
         fillActive && fillActive.details && fillActive.details.map((item, idx) => {
           if (item.controlType == 1) {
@@ -314,7 +323,7 @@ class Inspect extends React.Component {
     }
   }
   render() {
-    const {refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
+    const {setHighter,refreshScroller, getInfomation, handleChangeValue,inspectList, inspectVal, list, labelList, windowHeight, delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive, getExcelDataList, handleCloseExcel, handlePush } = this.props;
     const { tmpId, tmpIdx, id, pageTop, impId } = this.state;
 
     const contStyle={
@@ -363,6 +372,8 @@ class Inspect extends React.Component {
                 return <SlideSelect
                   item={item}
                   idx={idx}
+                  listDom={this.$ul}
+                  windowHeight={windowHeight}
                   showToast={idx == id ? true : false}
                   showFill={this.state.showFill}
                   handlePush={handlePush}
@@ -383,6 +394,7 @@ class Inspect extends React.Component {
                   handleDelConfirm={this.delConfirm}
                   handleConfirm={handleConfirm}
                   getInfomation={getInfomation}
+                  setHighter={setHighter}
                 ></SlideSelect>
               })
             }

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

@@ -65,7 +65,7 @@ class AssistCheck extends React.Component {
 
   }
     render(){
-        const {checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
+        const {setHighter,checkedListImport,list,getInfomation,windowHeight,hospitalMsg,assistLabel,assistVal,handleChangeValue,handleSign,fetchPushInfos,handleDelAssist,handleChangeAssistValue,handleChangeDate,isRead,winWidth,assistList} = this.props;
         const {showSlideImport,checkSystemIpt,onClose,closeInIcss} = this;
         const {importLis,ieVersion,hide} = this.state;
         // if(JSON.stringify(hospitalMsg) != {} && document.getElementById("choose")){//动态绑定只绑定一次
@@ -132,6 +132,7 @@ class AssistCheck extends React.Component {
                             assistVal={assistVal}
                             windowHeight={windowHeight}
                             checkedListImport={checkedListImport}
+                            setHighter={setHighter}
                         >
                         </AddAssistCheck>
                     </div>

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

@@ -28,6 +28,7 @@ class DiagResultSearch extends Component {
         } else {
           if (e.target != diagSearch && e.target != addDiag && e.target.parentNode != addDiag && !$.contains(diagSearch, e.target)) {
             that.props.hideSearch();
+            that.props.setHighter(0)
           }
 
 

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

@@ -1,8 +1,9 @@
 import React, { Component } from 'react';
 import { Button, ItemBox, ConfirmModal, Loading, Message, Add } from '@commonComp';
 import DiagnosticList from '@containers/DiagnosticList.js';
-import { getPageCoordinate } from '@utils/tools';
-import DiagResultSearch from '@containers/DiagResultSearch'
+import { getPageCoordinate,setPosition  } from '@utils/tools';
+import DiagResultSearch from '@containers/DiagResultSearch';
+import $ from 'jquery';
 
 class Diagnosis extends Component {
   constructor(props) {
@@ -37,6 +38,7 @@ class Diagnosis extends Component {
   handleshowSearch(e) {
     this.props.show ? this.hideSearch() : this.showSearch()
     this.setState({ pageTop:getPageCoordinate(e).boxTop })
+    setPosition(e,"#searchOption",this.props.setHighter)
   }
   refreshScroller(){
     //更新滚动条状态,解决容器变大滚动条不更新bug
@@ -52,7 +54,7 @@ class Diagnosis extends Component {
         <div style={{ marginLeft: '10px', position: 'relative' }}>
           <Add showText="添加诊断结果" handleClick={this.handleshowSearch} id="addDiag" height="50px" />
           <DiagResultSearch
-            refreshScroller={this.refreshScroller} windowHeight={this.props.windowHeight} pageTop={this.state.pageTop} height={150}></DiagResultSearch>
+            refreshScroller={this.refreshScroller} setHighter={this.props.setHighter} windowHeight={this.props.windowHeight} pageTop={this.state.pageTop} height={150}></DiagResultSearch>
         </div>
 
 

+ 12 - 4
src/components/EMRContainer/index.jsx

@@ -18,6 +18,8 @@ class EMRContainer extends Component {
     constructor(props){
         super(props);
         this.$cont = React.createRef();
+        this.$div = React.createRef();
+        this.setHighter = this.setHighter.bind(this);
     }
     componentDidMount(){
         // const {initHospital} = this.props;
@@ -35,6 +37,12 @@ class EMRContainer extends Component {
           }
         });
     }
+    setHighter(ht){
+      // console.log(this.$div.current.scrollHeight);
+      if(this.$div.current){
+        this.$div.current.style.paddingBottom = ht+'px';
+      }
+    }
     render() {
         const contStyle={
                           opacity:'0.4',
@@ -53,16 +61,16 @@ class EMRContainer extends Component {
                       verticalScrollbarStyle={barStyle}
                       contentClassName="content">
           <InfoTitle></InfoTitle>
-            <div className={style['inner']}>
+            <div className={style['inner']} id="EmrContainer" ref={this.$div}>
                 <MainSuit></MainSuit>
                 <CurrentIll></CurrentIll>
                 <OtherHistory></OtherHistory>
                 <div>
                   <CheckBody></CheckBody>
                 </div>
-                <Inspect></Inspect>
-                <AssistCheck></AssistCheck>
-                <Diagnosis></Diagnosis>
+                <Inspect setHighter={this.setHighter}></Inspect>
+                <AssistCheck setHighter={this.setHighter}></AssistCheck>
+                <Diagnosis setHighter={this.setHighter}></Diagnosis>
                 <AdviceContainer></AdviceContainer>
             </div>
             <OperationContainer></OperationContainer>

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

@@ -207,7 +207,7 @@ class Inspect extends React.Component {
 
   }
   render() {
-    const { fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, handleCloseExcel, handleChangeValue, labelListActive, list, handleSign, labelList, handleLabelSub, handleClear, handleConfirm, fillActive, changeActivePart, getExcelDataList, delPartItem, inspectList } = this.props;
+    const {setHighter, fetchPushInfos,getInfomation, hospitalMsg, inspectVal, windowHeight, 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")){//动态绑定只绑定一次
@@ -265,6 +265,7 @@ class Inspect extends React.Component {
           <div style={{ padding: '10px', boxSizing: 'border-box' }} >
             <AddInspect
               handleSign={handleSign}
+              setHighter={setHighter}
               refreshScroller={this.refreshScroller}
               handleChangeValue={handleChangeValue}
               list={list}

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

@@ -226,11 +226,6 @@ class MainSuit extends Component{
     if(!isIE()){
       inner?(e.target.innerText=""):(e.target.innerHTML="")
       freeText && freeText(data.trim());
-      // 慢病模板获取:精确匹配"糖尿病复诊",储存慢病字段
-      /*let flg = this.ifClear();
-      if((data.trim()=='糖尿病复诊'||data.trim()=='糖尿病(复诊)'||data.trim()=='糖尿病(复诊)') && !flg){
-        saveChronic && saveChronic({name:'糖尿病',conceptId:21773});
-      }*/
     }else{
       if(datas.length==0){
         const ev = e || window.event;
@@ -240,10 +235,10 @@ class MainSuit extends Component{
       }
     }
     // 延时关闭常见症状下拉、清空搜索结果,不延时会影响选中
-      const clearTimer = setTimeout(function(){
+     /* const clearTimer = setTimeout(function(){
         clearSearch && clearSearch();
         clearTimeout(clearTimer);
-      },config.delayTime-200); 
+      },config.delayTime-200); */
   }
   /*componentWillReceiveProps(nextProps){   //主诉高度变化不会出现滚动内容看不见的情况,因为已经是最顶部,所以可以不必更新滚动条
       const contHeightDiff =  nextProps.data&&this.props.data&&nextProps.data.length!==this.props.data.length;

+ 30 - 3
src/components/SearchDrop/index.jsx

@@ -1,5 +1,6 @@
 import React,{Component} from 'react';
 import classNames from 'classnames';
+import ScrollArea from 'react-scrollbar';
 
 import style from "./index.less";
 /****
@@ -54,26 +55,52 @@ class SearchDrop extends Component{
     // onShow&&onShow(e,false);
   }
   render(){
-    const {mainEmpty} = this.props;
+    const {mainEmpty,data} = this.props;
     let litext = '';
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
     if(mainEmpty){
       return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
+        <ScrollArea speed={0.8}
+                    horizontal={false}
+                    stopScrollPropagation={data.length>6?true:false}
+                    style={{maxHeight:'225px'}}
+                    className={style["area"]}
+                    verticalContainerStyle={contStyle}
+                    verticalScrollbarStyle={barStyle}
+                    contentClassName="content">
           <ul>
-            {this.props.data&&this.props.data.map((it)=>{
+            {data&&data.map((it)=>{
               litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
               return <li onClick={(e)=>this.handleSelect(e,it)} title={litext}>{litext}</li>
             })}
           </ul>
+        </ScrollArea>
         </div>
     }else{
       
       return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
+        <ScrollArea speed={0.8}
+                    horizontal={false}
+                    stopScrollPropagation={data.length>6?true:false}
+                    style={{maxHeight:'225px'}}
+                    className={style["area"]}
+                    verticalContainerStyle={contStyle}
+                    verticalScrollbarStyle={barStyle}
+                    contentClassName="content">
           <ul>
-            {this.props.data&&this.props.data.map((it)=>{
+            {data&&data.map((it)=>{
               litext = it.showType==1?it.name:it.name+'('+it.retrievalName+')';
               return <li onClick={(e)=>this.handleSelect(e,it)} title={litext}>{litext}</li>
             })}
           </ul>
+        </ScrollArea>
         </div>;
     }
     

+ 35 - 7
src/components/SpreadDrop/index.jsx

@@ -2,8 +2,9 @@ import React,{Component} from 'react';
 import classNames from 'classnames';
 import config from '@config/index.js';
 import style from './index.less';
-import {deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds} from '@utils/tools.js';
+import {deepClone,filterArr,handleEnter,isIE,windowEventHandler,filterDataArr,getIds,getPageCoordinate} from '@utils/tools.js';
 import {Notify} from '@commonComp';
+import ScrollArea from 'react-scrollbar';
 import $ from 'jquery';
 /****
  * 标签组合下拉,选中的项目展开
@@ -44,9 +45,11 @@ class SpreadDrop extends Component{
       ban:{},  //放'伴'字段
       editable:false,      //双击编辑
       labelVal:'',  //存放标签原有的值--主诉字数限制用
+      left:'auto',
       tmpDom:null
     };
     this.$div = React.createRef();
+    this.$list = React.createRef();
     this.handleSelect = this.handleSelect.bind(this);
     this.clearState = this.clearState.bind(this);
     this.handleClear = this.handleClear.bind(this);
@@ -68,6 +71,12 @@ class SpreadDrop extends Component{
         ++num
       }
     });
+    const listWidth = 30+$(this.$list.current).width();
+    if(num >= 5 && windowWidth-getPageCoordinate(e).boxLeft < listWidth){
+      this.setState({
+        left:windowWidth-listWidth-150
+      })
+    }
     // window.event? window.event.cancelBubble = true : e.stopPropagation();
      this.setStateInit();      //恢复初始选中状态
     const that = this;
@@ -343,7 +352,7 @@ class SpreadDrop extends Component{
 
   render(){
     const {placeholder,value,show,data,order} = this.props;
-    const {tmpDom} = this.state
+    const {tmpDom,left} = this.state
     if(!show&&tmpDom){
       $(tmpDom).parent().prev().attr({"contentEditable":true})
     }
@@ -362,7 +371,7 @@ class SpreadDrop extends Component{
         onInput={this.onChange}
         onkeydown={handleEnter}
         >{value||placeholder}</div>
-          <ListItems data={data} order={order}
+          <ListItems parDiv={this.$list} data={data} order={order} left={left}
              show={show} handleSelect={this.handleSelect} handleConfirm={this.handleConfirm} handleClear={this.handleClear} {...this.state}></ListItems>
       </div>
   }
@@ -371,6 +380,7 @@ class SpreadDrop extends Component{
 class ListItems extends Component{
   constructor(props){
     super(props);
+    this.$cont = React.createRef();
   }
   getLabels(){
     const {data,handleSelect} = this.props;
@@ -399,14 +409,15 @@ class ListItems extends Component{
     return list;
   }
   getStyle(){
-    const {show} = this.props;
+    const {show,left} = this.props;
     return {
-      display:show?'block':'none'
+      display:show?'block':'none',
+      left:left
     }
   }
   render (){
-    const {handleClear,handleConfirm,order} = this.props;
-    return <div className={style["drop-list"]} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
+    const {handleClear,handleConfirm,order,parDiv} = this.props;
+    return <div className={style["drop-list"]} ref={parDiv} style={this.getStyle()} contentEditable="false" onClick={(e)=>{e.stopPropagation();}}>
         <p className={style['orderTips']}>按{order?'从左到右从上到下':'点击'}顺序成文</p>
         {this.getLabels()}
         <div className="oper clearfix">
@@ -475,13 +486,30 @@ class ListItem extends Component{
   render(){
     const {datas,isSpecialPos} = this.props;
     const pos = isSpecialPos?style['independent']:'';
+    const contStyle={
+      opacity:'0.4',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'6px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#777',width:'100%'};
     return <ul className={classNames(style['row'],pos)} onBlur={(e)=>e.stopPropagation()}>
+    <ScrollArea speed={0.8}
+    horizontal={false}
+    stopScrollPropagation={datas.length>11?true:false}
+    style={{maxHeight:'330px'}}
+    className={style["area"]}
+    verticalContainerStyle={contStyle}
+    verticalScrollbarStyle={barStyle}
+    contentClassName="content">
       {datas&&datas.map((it,i)=>{
         if(isSpecialPos){
           return <li onClick={(e)=>this.handleClick(e,it,i)} className={this.getClass(it.id)}>{it.name}</li>
         }
         return <li onClick={(e)=>this.handleClick(e,it,i)} className={this.getClass(it.id)} title={it.name.length>8?it.name:''}>{it.name&&it.name.length>8?it.name.slice(0,8)+'...':it.name}</li>
       })}
+      </ScrollArea>
     </ul>;
   }
 }

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

@@ -12,7 +12,7 @@
     // width: 200px;
     vertical-align: top;
     margin-left: 8px;
-    max-height: 326px;
+    max-height: 330px;
     overflow-y: auto;
   }
   .independent{

+ 18 - 2
src/modules/HomePage/index.jsx

@@ -5,6 +5,10 @@ import BannerContainer from '@containers/TypeConfigContainer';
 import BodyContainer from "@components/BodyContainer";
 
 import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG} from '@store/types/homePage.js';
+import {CLEAR_SEARCH} from '@types/mainSuit';
+import {CURRENT_CLEAR} from '@types/currentIll';
+import {OTHERHIS_CLEAR} from '@types/otherHistory';
+import {CHECKBODY_CLEAR} from '@types/checkBody';
 import style from './index.less';
 import {getInitModules,getChronic,getSystemConfig} from '@store/async-actions/homePage.js';
 import { getUrlArgObject,parseNameVal } from "@utils/tools";
@@ -15,7 +19,8 @@ class HomePage extends Component {
         super();
         this.state={
             timer:null,
-        }
+        };
+        this.hidePops = this.hidePops.bind(this);
     }
     componentDidMount(){
         const {setWindow,getChronicList,getConfig} = this.props;
@@ -43,9 +48,14 @@ class HomePage extends Component {
             } 
         })
     }
+    hidePops(){
+        const {hideAllDrop,handleClear } = this.props;
+        hideAllDrop();        //隐藏填写单
+        handleClear&&handleClear();       //清空搜索结果
+    }
     render() {
         const {flag} = this.props;
-        return <div className={style['home-page']} onClick={this.props.hideAllDrop}>
+        return <div className={style['home-page']} onClick={this.hidePops}>
             <BannerContainer />
             {/* <InfoTitle /> */}
             <BodyContainer></BodyContainer>
@@ -63,6 +73,12 @@ const mapStateToProps = function (state) {
 };
 const mapDispatchToProps = function (dispatch) {
     return {
+      handleClear(){//清空搜索结果
+           dispatch({type:CLEAR_SEARCH});
+           dispatch({type:CURRENT_CLEAR});
+           dispatch({type:OTHERHIS_CLEAR});
+           dispatch({type:CHECKBODY_CLEAR});
+      },
         hideAllDrop(){
             dispatch({
               type:HIDEDROP

+ 3 - 1
src/store/async-actions/print.js

@@ -13,8 +13,10 @@ import {
 
 export const saveMessage = (bool) => {
     let baseList = store.getState();
+    const readMode = baseList.typeConfig.readMode;          //回读模式
     let state = baseList.patInfo.message;
-    let whichSign = baseList.typeConfig.typeConfig;
+    //保存时保存当前的数据实际模式,不是系统模式,针对回读模式与系统模式不一致的情况处理
+    let whichSign = readMode===-1||readMode===null?baseList.typeConfig.typeConfig:readMode;
     const pushMessage = baseList.pushMessage;
     let jsonStr = getAllDataStringList(baseList);
     let jsonData = getAllDataList(baseList);

+ 19 - 4
src/utils/tools.js

@@ -15,6 +15,7 @@ import { SET_READ_MODE } from "@store/types/typeConfig";
 import config from '@config/index';
 import up from '@images/up.png';
 import down from '@images/down.png';
+import $ from 'jquery';
 
 
 /***
@@ -1366,7 +1367,21 @@ function shiftLocalDelTag(){
   deledTags.shift();
   localStorage.setItem('deletedTags',JSON.stringify(deledTags));
 }
-
+//弹窗显示问题
+function setPosition (e,dom,setHighter){
+  setTimeout(()=>{
+    const contHt =$(dom).height();
+    const wrapHt = $("#EmrContainer").height();//滚动区域高度
+    const clickHt = getPageCoordinate(e).boxTop;//点击高度
+    const scrollHt = Math.abs(parseFloat($("#EmrContainer").parent('.scrollarea-content').css('margin-top'))) //滚动区滚动的距离
+    let btmHt = wrapHt-(clickHt-111)-scrollHt;//点击位置距离底部的距离
+    // console.log(wrapHt,clickHt,scrollHt,btmHt,contHt)
+    if(btmHt<contHt){
+      setHighter(contHt-btmHt+20);
+    }
+    // $(e.target)[0].scrollIntoView(true);
+  },10);
+}
 module.exports = {
     checkType: Type.checkType,
     getIds,
@@ -1420,7 +1435,7 @@ module.exports = {
     getPushList,
     getAllString,
     resetTagtype,
-  handleLocalDelTag,
-  shiftLocalDelTag,
-
+    handleLocalDelTag,
+    shiftLocalDelTag,
+    setPosition
 };