|
@@ -10,7 +10,8 @@ import pic5 from '../img/pic5.png'
|
|
|
import $ from 'jquery'
|
|
|
import { dragBox } from '@utils/drag';
|
|
|
import close from '@common/images/icon_close.png';
|
|
|
-
|
|
|
+import {windowEventHandler} from '@utils/tools';
|
|
|
+let a = 0
|
|
|
class EmergencyModal extends React.Component{
|
|
|
constructor(props){
|
|
|
super(props)
|
|
@@ -33,6 +34,10 @@ class EmergencyModal extends React.Component{
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ // const {windowHeight} = this.props;
|
|
|
+ // windowEventHandler('resize', ()=>{
|
|
|
+ // $("#preImg").css("height",(windowHeight-120)+'px')
|
|
|
+ // });
|
|
|
}
|
|
|
handleSlideShow(){
|
|
|
let flg = this.state.show
|
|
@@ -45,9 +50,9 @@ class EmergencyModal extends React.Component{
|
|
|
handleImgShow(flg){
|
|
|
this.setState({imgShow:flg},()=>{
|
|
|
if(flg){
|
|
|
- dragBox('dragModalWrap','dragModalTitle','add')
|
|
|
+ dragBox('dragModalWrap','dragModalTitle','add',false,true)
|
|
|
}else{
|
|
|
- dragBox('dragModalWrap','dragModalTitle','del')
|
|
|
+ dragBox('dragModalWrap','dragModalTitle','del',false,false)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -56,10 +61,10 @@ class EmergencyModal extends React.Component{
|
|
|
return <div className={styles.emergencyProdure} style={{display:show?'block':'none'}}>
|
|
|
<div className={`${styles.modalTop} clearfix`}>
|
|
|
<div className={styles.modalTopL}>
|
|
|
- <img onClick={()=>handleShow(false)} src={small} alt=""/>
|
|
|
+ <img className={styles.imgs} onClick={()=>handleShow(false)} src={small} alt=""/>
|
|
|
<p className="ellipsOver">{data.emergencyname}</p>
|
|
|
{
|
|
|
- idx == 0?null:<img src={pic} onClick={()=>{this.handleImgShow(true)}} alt=""/>
|
|
|
+ idx == 0?null:<img className={styles.imgs} src={pic} onClick={()=>{this.handleImgShow(true)}} alt=""/>
|
|
|
}
|
|
|
{
|
|
|
this.state.imgShow?<React.Fragment>
|
|
@@ -68,7 +73,7 @@ class EmergencyModal extends React.Component{
|
|
|
<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 id="preImg" 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
|