瀏覽代碼

预览图

Luolei 6 年之前
父節點
當前提交
6bd24ad5d7

+ 4 - 1
src/components/EmergencyProcedure/EmergencyModal/index.jsx

@@ -9,6 +9,7 @@ import pic4 from '../img/pic4.png'
 import pic5 from '../img/pic5.png'
 import $ from 'jquery'
 import { dragBox } from '@utils/drag';
+import close from '@common/images/icon_close.png';
 
 class EmergencyModal extends React.Component{
   constructor(props){
@@ -64,9 +65,11 @@ class EmergencyModal extends React.Component{
               this.state.imgShow?<React.Fragment>
                 <div className={styles.imageModalWrap} onClick={()=>{this.handleImgShow(false)}}></div>
                 <div className={styles.imageModal} id="dragModalWrap">
-                  <img src={idx==1?pic1:idx==2?pic2:idx==3?pic3:idx==4?pic4:idx==5?pic5:null}/>
                   <div id="dragModalTitle" className={`${styles.dragImgWrap} drag-title`}>
+                    {data.emergencyname}
                   </div>
+                  <img className={styles.emergencyImg} src={idx==1?pic1:idx==2?pic2:idx==3?pic3:idx==4?pic4:idx==5?pic5:null}/>
+                  <img className={styles.img} src={close} onClick={()=>{this.handleImgShow(false)}} />
                 </div>
               </React.Fragment>:null
             }

+ 19 - 5
src/components/EmergencyProcedure/EmergencyModal/index.less

@@ -87,24 +87,38 @@
     overflow: hidden;
     z-index: 500;
     width: 1000px;
+    padding-top: 30px;
     margin-left: -500px;
-    margin-top: -400px;
-    height: 800px;
+    // margin-top: -400px;
+    // height: 800px;
+    // top: 50%;
     left: 50%;
-    top: 50%;
-    img{
+    top: 7%;
+    bottom: 7%;
+    .emergencyImg{
       height: 100%;
+      width: 100%;
       float: left;
       top: 0;
+      position: relative;
     }
   }
   .dragImgWrap {
     width: 100%;
-    height: 100%;
+    height: 30px;
+    line-height: 36px;
+    text-indent: 1em;
     z-index: 502;
     background-color: transparent;
     position: absolute;
     top: 0;
     left: 0;
   }
+  img.img{
+    cursor: pointer;
+    position: absolute;
+    top: 6px;
+    right: 10px;
+    z-index: 800;
+  }
 }

+ 1 - 0
src/utils/drag.js

@@ -65,6 +65,7 @@ function handleMove(event) {
       marginLeft: 0 + 'px',
       marginTop: 0 + 'px',
       top: dragY + 'px',
+      bottom:'auto',
       right:'inherit',
     })
   }