|
@@ -1,26 +1,52 @@
|
|
|
import React, { Component } from 'react';
|
|
|
import style from './index.less';
|
|
|
import arrowIcon from '@images/arrowIcon.png';
|
|
|
+import {pushPage2} from '@utils/config';
|
|
|
+import {dragBox} from '@utils/drag';
|
|
|
|
|
|
class PushData extends Component{
|
|
|
constructor(props){
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
+ hashNum:0
|
|
|
}
|
|
|
+ this.showPushData = this.showPushData.bind(this)
|
|
|
+ this.hidePushData = this.hidePushData.bind(this)
|
|
|
}
|
|
|
+ showPushData(){
|
|
|
+ const {togglePushData} = this.props
|
|
|
+ setTimeout(function(){
|
|
|
+ dragBox('dragModalWrap','dragModalTitle','add')
|
|
|
+
|
|
|
+ })
|
|
|
+ togglePushData()
|
|
|
+ }
|
|
|
+ hidePushData(){
|
|
|
+ const {togglePushData} = this.props
|
|
|
+ dragBox('dragModalWrap','dragModalTitle','del')
|
|
|
+ togglePushData()
|
|
|
+ }
|
|
|
+ componentWillReceiveProps(next){
|
|
|
+ // if(next.update!=this.props.update){
|
|
|
+ this.setState({
|
|
|
+ hashNum:Math.random()
|
|
|
+ });
|
|
|
+ // }
|
|
|
+ }
|
|
|
|
|
|
render(){
|
|
|
+ const {hashNum } = this.state
|
|
|
const {mrId,planCode,showPushData,togglePushData } = this.props
|
|
|
- // const url =`${pushPage}?mrId=${mrId}&planCode=${planCode}`;
|
|
|
+ const url =`${pushPage2}?mrId=${mrId}&planCode=${planCode}&data=${hashNum}`;
|
|
|
return <div >
|
|
|
- {!showPushData&&<div className={style['slideButton']} onClick={togglePushData}>
|
|
|
+ {!showPushData&&<div className={style['slideButton']} onClick={this.showPushData}>
|
|
|
朗通智能提醒
|
|
|
<img class={style['arrowIcon']} src={arrowIcon} alt=""/>
|
|
|
|
|
|
</div>}
|
|
|
- {showPushData&&<div className={style['pushWrapper']}>
|
|
|
- <div className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={togglePushData}>收起</span></div>
|
|
|
- {/* <iframe id='embedPage' src={url} frameborder="0"></iframe> */}
|
|
|
+ {showPushData&&<div id="dragModalWrap" className={style['pushWrapper']}>
|
|
|
+ <div id="dragModalTitle" className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>收起</span></div>
|
|
|
+ <iframe id='embedPage' src={url} frameborder="0" width="400" height="560"></iframe>
|
|
|
|
|
|
</div>}
|
|
|
</div>
|