Browse Source

推送弹窗

zhangxc 4 years ago
parent
commit
995f006633

BIN
src/common/images/arrowIcon.png


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

@@ -14,6 +14,7 @@ import PersonalHistory from './PersonalHistory'
 import FamilyHistory from './FamilyHistory'
 import MarriageHistory from './marriageHistory'
 import NewAdvice from '@containers/NewAdvice';
+import PushDataContainer from '@containers/PushDataContainer'
 import MenstruationHistory from './MenstruationHistory'
 // import OtherHistory from './OtherHistory';
 import CheckBody from './CheckBody';
@@ -109,6 +110,7 @@ class BlockEMRCont extends Component {
           {/* <AdviceContainer></AdviceContainer> */}
         </div>
       </ScrollArea>
+      <PushDataContainer></PushDataContainer>
       <OperationContainer hideLabel={true}></OperationContainer>
     </div>
   }

+ 30 - 0
src/components/PushData/index.jsx

@@ -0,0 +1,30 @@
+import React, { Component } from 'react';
+import style from './index.less';
+import arrowIcon from '@images/arrowIcon.png';
+
+class PushData extends Component{
+    constructor(props){
+        super(props);
+        this.state = {
+        }
+    }
+
+    render(){
+        const {mrId,planCode,showPushData,togglePushData } = this.props
+        // const url =`${pushPage}?mrId=${mrId}&planCode=${planCode}`;
+        return <div >
+            {!showPushData&&<div className={style['slideButton']} onClick={togglePushData}> 
+                朗通智能提醒 
+                    <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> */}
+              
+            </div>}
+        </div>
+    }
+}
+
+export default PushData;

+ 46 - 0
src/components/PushData/index.less

@@ -0,0 +1,46 @@
+.slideButton{
+    position: fixed;
+    width:158px;
+    height:40px;
+    padding: 0 0 0 15px;
+    line-height: 40px;
+    bottom: 150px;
+    right: 20px;
+    font-size:16px;
+    background: #7AC1DE;
+    color: #fff;
+    border-radius:100px 0px 0px 100px;
+}
+.arrowIcon{
+    width: 22px;
+    position: absolute;
+    right: 15px;
+    top: 8px;
+}
+.pushWrapper{
+    width:400px;
+    height:600px;
+    border-radius:4px;
+    border: 1px solid #E6E6E6;
+    position: fixed;
+    bottom: 84px;
+    right: 30px;
+    background: #fff;
+}
+.pushDataTitle{
+    height: 40px;
+    line-height: 40px;
+    background: #7AC1DE;
+    color: #fff;
+    font-size:16px;
+    text-align: center;
+    position: relative;
+}
+.pushDataHide{
+    display: inline-block;
+    position: absolute;
+    height: 40px;
+    padding: 0 10px;
+    font-size:16px;
+    right: 10px;
+}

+ 27 - 0
src/containers/PushDataContainer.js

@@ -0,0 +1,27 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PushData from '@components/PushData';
+import { TOGGLE_PUSH_DATA } from '@store/types/homePage.js';
+function mapStateToProps(state){
+    const {showPushData } = state.homePage;
+    return {
+        showPushData:showPushData
+
+    }
+}
+
+
+function mapDispatchToProps(dispatch) {
+    return {
+        togglePushData: ()=>{
+            dispatch({type: TOGGLE_PUSH_DATA})
+        }
+    }
+}
+
+const PushDataContainer = connect(
+    mapStateToProps,
+    mapDispatchToProps
+)(PushData)
+
+export default PushDataContainer;

+ 6 - 2
src/store/reducers/homePage.js

@@ -1,6 +1,6 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,SETPREDATA,
   HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,
-  SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA,SETADMIN,SET_CURRENT_MODULE} from '../types/homePage.js';
+  SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA,SETADMIN,SET_CURRENT_MODULE,TOGGLE_PUSH_DATA} from '../types/homePage.js';
 import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList,setSelectArea,resetSelectArea, setCurrentModule} from '../actions/homePage.js';
 import {getMRAnalyse} from '@store/async-actions/pushMessage';
 
@@ -25,6 +25,7 @@ const initState = {
   item:{},
   admin:false,
   moduleName:'',
+  showPushData: false,
   moduleObj: {
     "common": "主诉",
     "1": "主诉",
@@ -103,7 +104,10 @@ export default function (state=initState,action) {
       return resetSelectArea(state,action);
     case SET_CURRENT_MODULE: 
       res.moduleName = action.moduleName
-    return res;
+      return res;
+    case TOGGLE_PUSH_DATA:
+      res.showPushData = ! res.showPushData
+      return res;
     default:
       return res;
   }

+ 1 - 0
src/store/types/homePage.js

@@ -22,3 +22,4 @@ export const SETADMIN = 'SETADMIN';   //设置管理员身份
 export const RESET_SELECT_TAG='RESET_SELECT_TAG';   //重置选中标签的各标记
 export const SET_SELECTED_AREA='SET_SELECTED_AREA'; 
 export const SET_CURRENT_MODULE = 'SET_CURRENT_MODULE'
+export const TOGGLE_PUSH_DATA = 'TOGGLE_PUSH_DATA' //切换推送框