luolei před 4 roky
rodič
revize
b998db92da

+ 8 - 7
src/components/PushData/index.jsx

@@ -36,17 +36,18 @@ class PushData extends Component{
 
     render(){
         const {hashNum } = this.state
-        const {mrId,planCode,showPushData,togglePushData } = this.props
+        const {mrId,planCode,showPushData,togglePushData ,windowWidth,windowHeight} = this.props
+        console.log(windowWidth,windowHeight)
         const url =`${pushPage2}?mrId=${mrId}&planCode=${planCode}&data=${hashNum}`;
         return <div >
-            {!showPushData&&<div className={style['slideButton']} onClick={this.showPushData}> 
+            {!showPushData&&<div className={style['slideButton']} style={{right:(windowWidth-1000)/2+'px'}} onClick={this.showPushData}> 
                 朗通智能提醒 
-                    <img class={style['arrowIcon']} src={arrowIcon} alt=""/>
-              
+                <img class={style['arrowIcon']} src={arrowIcon} alt=""/>
             </div>}
-            {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>
+            {showPushData&&<div id="dragModalWrap" className={style['pushWrapper']} style={{right:(windowWidth-1000)/2+'px'}}>
+                {/* <div id="dragModalTitle"  className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>收起</span></div> */}
+                <div className={style['pushDataTitle']}>朗通智能提醒 <span className={style['pushDataHide']} onClick={this.hidePushData}>收起</span></div>
+                <iframe id='embedPage'  src={url} frameborder="0" width="400" height="563"></iframe>
               
             </div>}
         </div>

+ 4 - 4
src/components/PushData/index.less

@@ -1,5 +1,5 @@
 .slideButton{
-    position: absolute;
+    position: fixed;
     width:158px;
     height:40px;
     padding: 0 0 0 15px;
@@ -24,8 +24,8 @@
     height:600px;
     border-radius:4px;
     border: 1px solid #E6E6E6;
-    position: absolute;
-    bottom: 70px;
+    position: fixed;
+    top: 10px;
     right: 10px;
     background: #fff;
     z-index: 31;
@@ -39,7 +39,7 @@
     font-size:16px;
     text-align: center;
     position: relative;
-    cursor:move
+    // cursor:move
 }
 .pushDataHide{
     display: inline-block;

+ 4 - 2
src/containers/PushDataContainer.js

@@ -3,14 +3,16 @@ import { connect } from 'react-redux';
 import PushData from '@components/PushData';
 import { TOGGLE_PUSH_DATA } from '@store/types/homePage.js';
 function mapStateToProps(state){
-    console.log('state',state.print.mrInfo)
+    // console.log('state',state.print.mrInfo)
     const {showPushData } = state.homePage;
     const {mrInfo } = state.print;
 
     return {
         showPushData:showPushData,
         mrId:mrInfo.mrId,
-        planCode:mrInfo.mode
+        planCode:mrInfo.mode,
+        windowHeight:state.homePage.windowHeight,
+        windowWidth:state.homePage.windowWidth,
     }
 }
 

+ 1 - 1
src/utils/config.js

@@ -13,5 +13,5 @@ module.exports={
     prefix:'',            //带权限验证的api
     pushPage:'http://192.168.2.241:5488/icssIndex.html',        //右侧推送页面的地址
     imageUrlPrefix,
-    pushPage2:'http://192.168.2.241:5488/icssIndex.html',        //右侧推送页面的地址
+    pushPage2:'http://192.168.2.241:5654/cdss.html',        //右侧推送页面的地址
 };