Преглед изворни кода

右侧开单后滚动到底部2194

zhouna пре 5 година
родитељ
комит
38f38f9de2
2 измењених фајлова са 7 додато и 1 уклоњено
  1. 5 0
      src/components/PushItems/index.jsx
  2. 2 1
      src/containers/PushItemsContainer.js

+ 5 - 0
src/components/PushItems/index.jsx

@@ -58,6 +58,7 @@ class PushItems extends Component {
 
   billing() {
     const { assay, check } = this.props.pushMessage;
+    const {EMRScrollCont} = this.props;
     const checkedAssay = assay.filter(item => item.checked);
     const checkedCheck = check.filter(item => item.checked);
     this.props.billing(checkedAssay, checkedCheck);
@@ -102,6 +103,10 @@ class PushItems extends Component {
       }
       store.dispatch(addAssistLabel(checkArr))
     }
+    //滚动到底部
+    setTimeout(function(){
+      EMRScrollCont&&EMRScrollCont.scrollBottom();
+    },100);
     /*if(checkedAssay.length > 0){
       document.getElementById("inspectResultData").scrollIntoView(true)
     }else{

+ 2 - 1
src/containers/PushItemsContainer.js

@@ -8,7 +8,7 @@ import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import { HIDEDROP } from '@store/types/homePage.js';
 
 function mapStateToProps(state) {//console.log(state)
-  const {pushMessage,diagnosticList} = state;
+  const {pushMessage,diagnosticList,inspect} = state;
         return {
         pushMessage: pushMessage,
         tipsDiscalimer:  state.copyRight.disContent,
@@ -20,6 +20,7 @@ function mapStateToProps(state) {//console.log(state)
         setPushEmergencyIdx: state.pushMessage.setPushEmergencyIdx || '',
         sysConfig:state.homePage.sysConfig,
         windowHeight:state.homePage.windowHeight,
+        EMRScrollCont:inspect.context.scrollArea,             //滚动条对象
     }
 }