Просмотр исходного кода

化验等内部滚动条与外滚动条同时滚动阻止

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

+ 18 - 1
src/components/AddAssistCheck/index.jsx

@@ -4,7 +4,7 @@ import styles from './index.less';
 import $ from 'jquery';
 import Textarea from './Textarea';
 import { getPageCoordinate,getCurrentDate } from '@utils/tools';
-import close from './img/close.png';
+import ScrollArea from 'react-scrollbar';
 
 class AddAssistCheck extends React.Component {
   constructor(props) {
@@ -231,6 +231,14 @@ class AddAssistCheck extends React.Component {
   render() {
     const { handleChangeValue, list,assistVal,windowHeight,assistList } = this.props;
     const { visible,pageTop } = this.state;
+    const contStyle={
+      opacity:'1',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#c1c1c1',width:'100%'};
     return (
       <div className={styles.wrapper}>
         {this.getAssistLabel()}
@@ -241,9 +249,18 @@ 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}
+                            horizontal={false}
+                            stopScrollPropagation={true}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
                 {
                   this.getCommonList()
                 }
+                </ScrollArea>
               </div>
             }
           </SearchOption> : ''}

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

@@ -27,8 +27,8 @@
 }
 
 .searchLiUl {
-  overflow-y: auto;
-  max-height: 225px;
+ /* overflow-y: auto;
+  max-height: 225px;*/
   // min-height: 80px;
 }
 

+ 18 - 4
src/components/AddInspect/index.jsx

@@ -4,10 +4,7 @@ import SlideExcel from './SlideExcel';
 import SlideSelect from './SlideSelect';
 import { deepClone, getPageCoordinate, getStatusImg ,getCurrentDate} from '@utils/tools';
 import styles from './index.less';
-import date1 from './img/date1.png';
-import close from './img/close.png';
-import slideUp from "@common/images/slide-up.png";
-import slideDown from "@common/images/slide-down.png";
+import ScrollArea from 'react-scrollbar';
 import store from '@store';
 import $ from 'jquery';
 class Inspect extends React.Component {
@@ -320,6 +317,14 @@ class Inspect extends React.Component {
     const { 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={
+      opacity:'1',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#c1c1c1',width:'100%'};
     return (
       <div className={styles.wrapper}>
         <div className={styles.check}>
@@ -390,9 +395,18 @@ class Inspect extends React.Component {
             {
               (list && list.length > 0) || (inspectVal != '') || (inspectList&&inspectList.length==0) ? '' : <div>
                 <p style={{ padding: '5px 30px', color: '#bfbfbf' }}>常用化验项</p>
+                <ScrollArea speed={0.8}
+                            horizontal={false}
+                            stopScrollPropagation={true}
+                            style={{height:'225px'}}
+                            className={styles["area"]}
+                            verticalContainerStyle={contStyle}
+                            verticalScrollbarStyle={barStyle}
+                            contentClassName="content">
                 {
                   this.getCommonList()
                 }
+                </ScrollArea>
               </div>
             }
           </SearchOption> : ''}

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

@@ -89,8 +89,8 @@
     display: none;
 }
 .searchLiUl {
-  overflow-y: auto;
-  max-height: 225px;
+  /*overflow-y: auto;
+  max-height: 225px;*/
   // min-height: 80px;
 }
 .searchLi {

+ 18 - 3
src/components/DiagResultSearch/index.jsx

@@ -1,10 +1,8 @@
 import React, { Component } from 'react';
 import style from './index.less';
-import close from './img/close.png'
-import search from './img/search.png'
 import DiagnosticItem from '@containers/DiagnosticItem'
 import { SearchOption } from '@commonComp';
-import config from '@config/index';
+import ScrollArea from 'react-scrollbar';
 import $ from 'jquery';
 class DiagResultSearch extends Component {
   constructor(props) {
@@ -54,10 +52,27 @@ class DiagResultSearch extends Component {
   render() {
     const { show, searchResult, getSearchResult, handleChangeValue,pageTop,windowHeight } = this.props
 
+    const contStyle={
+      opacity:'1',
+      right:'0',
+      top:'1px',
+      zIndex:'15',
+      width:'14px',
+      background:'#f1f1f1'};
+    const barStyle={background:'#c1c1c1',width:'100%'};
     return (
       show && <div id='diagSearch' className={style['search-box']}>
         <SearchOption handleChangeValue={handleChangeValue} pageTop={pageTop} windowHeight={windowHeight} height={180} visible={true}>
+          <ScrollArea speed={0.8}
+                      horizontal={false}
+                      stopScrollPropagation={true}
+                      style={{height:'225px'}}
+                      className={style["area"]}
+                      verticalContainerStyle={contStyle}
+                      verticalScrollbarStyle={barStyle}
+                      contentClassName="content">
           {this.getSearchList(searchResult)}
+          </ScrollArea>
         </SearchOption>
       </div>
     )

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

@@ -41,8 +41,8 @@
 // }
 
 .search-result {
-    overflow-y: auto;
-    max-height: 225px;
+    /*overflow-y: auto;
+    max-height: 225px;*/
     min-height: 80px;
 }
 

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

@@ -38,11 +38,12 @@ class EMRContainer extends Component {
     render() {
         const contStyle={
                           opacity:'1',
-                          right:'459px',
+                          top:'1px',
+                          right:'460px',
                           zIndex:'15',
                           width:'14px',
                           background:'#f1f1f1'};
-        const barStyle={background:'#c1c1c1',width:'100%'};
+        const barStyle={background:'#c1c1c1',width:'100%',marginLeft:'0'};
         return <div className={style['EMR-container']}
                     ref={this.$cont} id="addScrollEvent">
           <ScrollArea speed={0.8}