Browse Source

急诊显示后点击空白下拉消失

Luolei 5 years ago
parent
commit
8c15baf1ec

+ 2 - 2
src/components/EmergencyProcedure/index.jsx

@@ -36,9 +36,9 @@ class EmergencyProcedure extends React.Component {
     !type&&this.slideToggle(0)
     !type&&this.slideToggle(0)
   }
   }
   render(){
   render(){
-    const {data,setDataIdx,idx,windowHeight} = this.props;
+    const {data,setDataIdx,idx,windowHeight,hideAllDrop} = this.props;
     const domNode = document.getElementById('root');
     const domNode = document.getElementById('root');
-    return ReactDom.createPortal(<div className={styles.emergencyProdureWrap}>
+    return ReactDom.createPortal(<div className={styles.emergencyProdureWrap} onClick={hideAllDrop}>
       <div id="emergencyWrap" className={styles.emergencyWrap}>
       <div id="emergencyWrap" className={styles.emergencyWrap}>
         <span id="emergencys" onClick={()=>this.slideToggle(1)} className={styles.emergency}>急</span>
         <span id="emergencys" onClick={()=>this.slideToggle(1)} className={styles.emergency}>急</span>
         <span id="emergency" className={`${styles.emergency}`} onClick={()=>this.slideToggle(0)}>急</span>
         <span id="emergency" className={`${styles.emergency}`} onClick={()=>this.slideToggle(0)}>急</span>

+ 2 - 2
src/components/PushItems/index.jsx

@@ -160,7 +160,7 @@ class PushItems extends Component {
       tipsDetails,
       tipsDetails,
       tmpFlg,
       tmpFlg,
     } = this.props.pushMessage;
     } = this.props.pushMessage;
-    const { tipsDiscalimer,chronicPushItems,wholeIndexs,setPushEmergencyIdx,sysConfig,windowHeight} = this.props;
+    const { tipsDiscalimer,chronicPushItems,wholeIndexs,setPushEmergencyIdx,sysConfig,windowHeight,hideAllDrop} = this.props;
     const {
     const {
       billing,
       billing,
       changeCheck,
       changeCheck,
@@ -281,7 +281,7 @@ class PushItems extends Component {
             tipsDetails = {tipsDetails}/>}
             tipsDetails = {tipsDetails}/>}
             
             
             {
             {
-              (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure windowHeight={windowHeight} data={dataLis[this.state.idx]||dataLis[setPushEmergencyIdx]} idx={this.state.idx||setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
+              (setPushEmergencyIdx+'')&&(sysConfig.emergency_show==1)&&<EmergencyProcedure hideAllDrop={hideAllDrop} windowHeight={windowHeight} data={dataLis[this.state.idx]||dataLis[setPushEmergencyIdx]} idx={this.state.idx||setPushEmergencyIdx} setDataIdx={this.setDataIdx}></EmergencyProcedure>
             }
             }
       </div>
       </div>
     );
     );

+ 6 - 0
src/containers/PushItemsContainer.js

@@ -5,6 +5,7 @@ import {CHANGE_ASSAY, CHANGE_CHECK, ADD_BILLING, SHOW_TIPS_DETAILS, HIDE_TIPS_DE
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList';
 import { ADD_DIAGNOSTIC, GET_DIAGNOSTIC_STR } from '@store/types/diagnosticList';
 import {billing, getAllConceptDetail} from '../store/async-actions/pushMessage';
 import {billing, getAllConceptDetail} from '../store/async-actions/pushMessage';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
+import { HIDEDROP } from '@store/types/homePage.js';
 
 
 function mapStateToProps(state) {//console.log(state)
 function mapStateToProps(state) {//console.log(state)
   const {pushMessage,diagnosticList} = state;
   const {pushMessage,diagnosticList} = state;
@@ -24,6 +25,11 @@ function mapStateToProps(state) {//console.log(state)
 
 
 function mapDispatchToProps(dispatch) {
 function mapDispatchToProps(dispatch) {
     return {
     return {
+        hideAllDrop(){
+            dispatch({
+              type:HIDEDROP
+            });
+        },
         changeAssay: (item) => {
         changeAssay: (item) => {
             dispatch({type: CHANGE_ASSAY, item})
             dispatch({type: CHANGE_ASSAY, item})
         },
         },