Selaa lähdekoodia

Merge branch 'pro_zn' into dev/new1

zhouna 5 vuotta sitten
vanhempi
commit
3379751f9c

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

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

@@ -55,7 +55,7 @@ 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',
@@ -69,14 +69,14 @@ class SearchDrop extends Component{
       return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
         <ScrollArea speed={0.8}
                     horizontal={false}
-                    stopScrollPropagation={true}
+                    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>
             })}
@@ -88,14 +88,14 @@ class SearchDrop extends Component{
       return <div className={this.getClass()} id="searchBox" style={this.getStyle()}>
         <ScrollArea speed={0.8}
                     horizontal={false}
-                    stopScrollPropagation={true}
+                    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>
             })}

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

@@ -496,7 +496,7 @@ class ListItem extends Component{
     return <ul className={classNames(style['row'],pos)} onBlur={(e)=>e.stopPropagation()}>
     <ScrollArea speed={0.8}
     horizontal={false}
-    stopScrollPropagation={true}
+    stopScrollPropagation={datas.length>11?true:false}
     style={{maxHeight:'330px'}}
     className={style["area"]}
     verticalContainerStyle={contStyle}

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