Browse Source

Merge branch 'optimize-ll' into optimize

Luolei 6 years ago
parent
commit
0d24f5d693

+ 2 - 0
src/components/Banner/index.jsx

@@ -11,6 +11,7 @@ import {Notify} from '@commonComp';
 import Emergency from '@containers/Emergency';
 import {getAllHis} from '@store/async-actions/fetchModules.js';
 import {timestampToTime} from '@utils/tools.js';
+import {dragBox} from '@utils/drag';
 
 class Banner extends Component {
   constructor(props){
@@ -86,6 +87,7 @@ class Banner extends Component {
       emergencyBox:false,
       zIndex:204
     })
+    dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
     const {visible,disVisible,copyVisible} = this.props;

+ 7 - 2
src/components/Emergency/index.jsx

@@ -4,6 +4,7 @@ import closeIcon from '@common/images/close-icon.png';
 import HisList from './HisList';
 import PreviewBody from '@components/PreviewBody';
 import config from '@config/index';
+import {dragBox} from '@utils/drag';
 
 /**
   急诊:全科历史病历
@@ -28,9 +29,13 @@ class EmergencyHis extends Component{
     this.handleAdd = this.handleAdd.bind(this);
   }
 
+  componentDidMount(){
+    dragBox('previewWrapper','previewStatic','add')
+  }
   handleClose(){
     const {close} = this.props;
     close&&close();
+    dragBox('previewWrapper','previewStatic','del')
   }
 
   getMore(){//点击更多
@@ -138,9 +143,9 @@ class EmergencyHis extends Component{
         return jsonDataString;
     }
     if(show){
-    return <div className={style['emer-box']}>      
+    return <div className={style['emer-box']} id="previewWrapper">      
             <div className={style['emer-content']}>
-              <img src={closeIcon} className={style['img']} onClick={this.handleClose}/>
+              <div id="previewStatic" className={`${style['closeModal']} drag-title`}><img src={closeIcon} className={style['img']} onClick={this.handleClose}/></div>
               <div className={style['emer-left']}>
                 <HisList data={data} 
                         total={total} 

+ 11 - 2
src/components/Emergency/index.less

@@ -6,14 +6,23 @@
   width: 1060px;
   height: 700px;
   position: fixed;
-  left: 110px;
-  top: 70px;
+  top: 50%;
+  left:50%;
+  margin-top: -350px;
+  margin-left: -530px;
   z-index: 2002;
   background: #fff;
   // overflow: hidden;
   .emer-content{
     position: relative;
   }
+  .closeModal {
+    width: 100%;
+    position: absolute;
+    height: 45px;
+    top: 0px;
+    z-index: 800;
+  }
   .img{
     width: 40px;
     height: 40px;