morphone1995 %!s(int64=4) %!d(string=hai) anos
pai
achega
4438853b51

+ 36 - 17
src/components/HistoryCaseContainer/HistoryList/index.jsx

@@ -7,6 +7,7 @@ import sort from "./img/sort.png"
 import close from "./img/close.png";
 import PreviewBody from '@components/PreviewBody';
 import Empty from '@components/Empty'
+
 import { pushAllDataList,didPushParamChange } from '@utils/tools';
 // import { dragBox } from '@utils/drag';
 import { initItemList, setInitHistory } from '@store/async-actions/historyTemplates';
@@ -42,7 +43,8 @@ class HistoryCaseContainer extends React.Component {
           activeIndex: -1,  //字体显示蓝色高亮index
           showEditIcon: false,
           showDelIcon: false,
-          desc: true // 正序/逆序
+          desc: true, // 正序/逆序
+          overHeight: 0
         }
         this.handleCaseClick=this.handleCaseClick.bind(this)
         this.handleQuoteClick=this.handleQuoteClick.bind(this)
@@ -103,21 +105,25 @@ class HistoryCaseContainer extends React.Component {
         activeId: idx,
         activeHis: tmpItems,
         dataStr: JSON.parse(tmpItems.preview)||[],
-        activeIndex: idx
-      })
+        activeIndex: idx,
+        // overHeight: this.$scrollRef.current.scrollTop
+      },
+        // ()=> {
+        // setTimeout(() => {
+        //   this.$scrollRef.current.scrollTop = this.state.overHeight
+        // }, 0)}
+      )
+
+     
     }
     // 确认引用选中病历
     makeSure(){
         const {activeHis} = this.state;
-        // console.log(activeHis,'activeHis');
         this.setState({visible:false});
         store.dispatch(showHistory(false));
-        //store.dispatch({type: CONFIRM_TYPE, confirmType: activeHis.sign});
-        //store.dispatch({type: SET_READ_MODE, readMode: activeHis.sign});
         store.dispatch(getHistempDetail(activeHis));  // 获取引用数据
         const {handleQuoteClick} = this.props;
         handleQuoteClick && handleQuoteClick(activeHis);
-        // dragBox('hisWrapMove','closeHis','del');
     }
     //确认删除病历
     makeSureDel(){
@@ -144,7 +150,7 @@ class HistoryCaseContainer extends React.Component {
               // this.context.scrollArea.scrollYTo(40);
               // console.log(this.$scrollRef,'this.$scrollRef');
               // console.log(this.context,'this.context');
-              this.forceUpdate()
+              // this.forceUpdate()
             }
           })
         }
@@ -249,7 +255,6 @@ class HistoryCaseContainer extends React.Component {
 
       // 处理鼠标移入编辑按钮
     handleMouseEnterEdit(idx) {
-
         this.setState({
           showEditIcon: true
         })
@@ -257,7 +262,6 @@ class HistoryCaseContainer extends React.Component {
 
       // 处理鼠标移出编辑按钮
     handleMouseLeaveEdit(idx) {
-
       this.setState({
         showEditIcon: false
       })
@@ -265,7 +269,6 @@ class HistoryCaseContainer extends React.Component {
 
   // 处理鼠标移入删除按钮
   handleMouseEnterDel(idx) {
-
     this.setState({
       showDelIcon: true
     })
@@ -300,12 +303,7 @@ class HistoryCaseContainer extends React.Component {
     })
   }
 
-  componentDidUpdate() {  // 刷新组件
-    // console.log(this.$scrollRef.current.scrollTop);
-    // console.log(this.$scrollRef);
-    // this.$scrollRef.current.scrollTop = this.$scrollRef.current.scrollHeight;
 
-  }
 
     render(){
         const { items,handleSortClick,showHistoryBox,preInfo } = this.props;
@@ -348,7 +346,27 @@ class HistoryCaseContainer extends React.Component {
                         <span className={styles.sort} onClick={this.handleSortClick}>排序 <img src={sort} alt="排序"/></span>
                     </div>
                     <div className={styles.lists}>
-                        <ul id="hislistLeft" style={{ overflow:'auto' }} >
+                      {/* <List
+                        items = {items}
+                        handleCaseClick = {this.handleCaseClick}
+                        currentIndex ={ currentIndex}
+                        showEditIcon = {this.state.showEditIcon}
+                        activeIndex={activeIndex}
+                        showDelIcon={this.state.showDelIcon}
+                      ></List> */}
+
+                      <ScrollArea speed={0.8}
+                        key={items.length}
+                        // ref={this.$scrollRef}
+                        horizontal={false}
+                        // stopScrollPropagation={items.length > 6 ? true : false}
+                        style={{ height: '100%' }}
+                        onScroll={(value) => { }}
+                        className={styles["area"]}
+                        verticalContainerStyle={contStyle}
+                        verticalScrollbarStyle={barStyle}
+                        contentClassName="content">
+                        <ul id="hislistLeft" style={{ overflow:'auto' }}  ref={this.$scrollRef}>
                             {(items && items.length > 0) ? items.map((val,idx)=>{                                    
                               return <li key={val.id} onClick={() => { this.handleCaseClick(idx, val) }} onMouseEnter={() => this.handleMouseEnterLi(idx)} onMouseLeave={() => this.handleMouseLeaveLi(idx)}>
                                          <div className={styles.itemLeft}>
@@ -376,6 +394,7 @@ class HistoryCaseContainer extends React.Component {
                                 }):<Empty message={'无历史病历'}></Empty>
                             }
                         </ul>
+                      </ScrollArea>
                     </div>
                 </div>
                 <div className={styles.mainHistoryRight}>

+ 5 - 2
src/components/InfoTitle/index.jsx

@@ -21,10 +21,13 @@ class InfoTitle extends Component {
         this.showHistoryBox = this.showHistoryBox.bind(this)
     }
     showHistoryBox(){
+
+        console.log('关闭');
         const {showLoading,hideLoading}=this.props;
         showLoading();
-        // document.body.style.overflow = 'hidden';
-        // document.body.style.position = 'fixed';
+        // 底部页面禁止滚动
+        document.body.style.overflow = 'hidden';
+
         // store.dispatch(initItemList());
         // store.dispatch(showHistory(true))
         // initItemList().then((res)=>{

+ 8 - 8
src/components/PatInfo/index.less

@@ -142,13 +142,13 @@
       left: 38px;
       cursor: pointer;
       img{
-        width: 16px;
-        height: 10px;
+        width: 12px;
+        height: 8px;
         position: absolute;
         top: 50%;
         left: 50%;
-        margin-left: -8px;
-        margin-top: -5px;
+        margin-left: -6px;
+        margin-top: -4px;
         // width: 50%;
         // margin-bottom: 3px;
       }
@@ -164,13 +164,13 @@
       left: 38px;
       cursor: pointer;
       img{
-        width: 16px;
-        height: 10px;
+        width: 12px;
+        height: 8px;
         position: absolute;
         top: 50%;
         left: 50%;
-        margin-left: -8px;
-        margin-top: -5px;
+        margin-left: -6px;
+        margin-top: -4px;
         // width: 50%;
         // margin-bottom: 3px;
       }

+ 20 - 1
src/components/PreviewBody/index.jsx

@@ -9,7 +9,7 @@ import ItemPart from './ItemPart';
 import $ from "jquery";
 import AssessResultHis from '@containers/AssessResultHis';
 import { dragBox } from '@utils/drag';
-
+import ScrollArea from 'react-scrollbar';
 class PreviewBody extends Component {
   constructor(props) {
     super(props)
@@ -85,6 +85,15 @@ class PreviewBody extends Component {
     const { show, preInfo, dataJson, dataStr, baseObj, flg ,come,showAssessBtn,showHistoryCases} = this.props;
     let other_data={},lis_data={},pas_data={},other_yjs='',access='',adviceData={};
     let isShowSex = baseObj.sex !== 2 ? false : true
+    const contStyle = {
+      opacity: '0.4',
+      right: '0',
+      top: '1px',
+      zIndex: '15',
+      width: '14px',
+      background: '#f1f1f1'
+    };
+    const barStyle = { background: '#777', width: '100%' };
     // if(!come){
     //   other_data = JSON.parse(baseObj.detailList[2].contentJson)
     //   lis_data = JSON.parse(baseObj.detailList[4].contentJson)
@@ -99,6 +108,15 @@ class PreviewBody extends Component {
     // }
     // const noData = JSON.stringify(preInfo) == '{}';
     return <div className={style['content']} style={{ width: '700px'}} ref={this.$scrollRef}>
+      <ScrollArea speed={0.8}
+        horizontal={false}
+        // stopScrollPropagation={items.length > 6 ? true : false}
+        style={{ height: '100%' }}
+        onScroll={(value) => { }}
+        // className={styles["area"]}
+        verticalContainerStyle={contStyle}
+        verticalScrollbarStyle={barStyle}
+        contentClassName="content">
       <div className={style['contents']} id="content" style={{ margin: "0 auto", maxWidth: "620px" }}>
         {/* <div style={{height:'40px', backgroundColor: 'red', width:'100%'}}></div> */}
         <Information baseObj={baseObj} preInfo={preInfo}></Information>
@@ -123,6 +141,7 @@ class PreviewBody extends Component {
           display: show ? 'inline-block' : 'none',
         }}>打印</div>
       </div>
+      </ScrollArea>
     </div>
   }
 }

+ 2 - 0
src/containers/HistoryCases.js

@@ -22,6 +22,8 @@ function mapDispatchToProps(dispatch) {
         showHistoryBox(){
             dragBox('hisWrapMove','closeHis','del')
             dispatch(showHistory(false))
+            // 取消历史模态框后,页面设置为可滚动
+            document.body.style.overflow = 'auto';
         },
         handleCaseClick(e,val){
             e.stopPropagation();