zhouna 5 лет назад
Родитель
Сommit
be0b022f24

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

+ 45 - 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 } 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,24 @@ 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);
+    //弹窗高度超出屏幕,增加页面高度
+    setTimeout(function(){
+      const listHeight =$(listDom.current).height();
+      const contHt = listHeight>358?450:(100+listHeight);
+      const lastHt = windowHeight-getPageCoordinate(e).boxTop;
+      if(lastHt < contHt){
+        //console.log(windowHeight,getPageCoordinate(e).boxTop,contHt,lastHt)
+        setHighter(contHt-lastHt+80);
+      }
+    });
+
+  }
   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 +116,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 +237,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
             }

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

@@ -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)
@@ -190,7 +191,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 +315,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 +364,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 +386,7 @@ class Inspect extends React.Component {
                   handleDelConfirm={this.delConfirm}
                   handleConfirm={handleConfirm}
                   getInfomation={getInfomation}
+                  setHighter={setHighter}
                 ></SlideSelect>
               })
             }

+ 8 - 2
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,10 @@ class EMRContainer extends Component {
           }
         });
     }
+    setHighter(ht){
+      console.log(this.$div.current.scrollHeight);
+      this.$div.current.style.paddingBottom = ht+'px';
+    }
     render() {
         const contStyle={
                           opacity:'0.4',
@@ -53,14 +59,14 @@ class EMRContainer extends Component {
                       verticalScrollbarStyle={barStyle}
                       contentClassName="content">
           <InfoTitle></InfoTitle>
-            <div className={style['inner']}>
+            <div className={style['inner']} ref={this.$div}>
                 <MainSuit></MainSuit>
                 <CurrentIll></CurrentIll>
                 <OtherHistory></OtherHistory>
                 <div>
                   <CheckBody></CheckBody>
                 </div>
-                <Inspect></Inspect>
+                <Inspect setHighter={this.setHighter}></Inspect>
                 <AssistCheck></AssistCheck>
                 <Diagnosis></Diagnosis>
                 <AdviceContainer></AdviceContainer>

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

+ 1 - 1
src/utils/config.js

@@ -2,7 +2,7 @@
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.236:5050';//后端接口访问地址
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.121:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚