Explorar el Código

急诊科全科病历入口

liucf hace 6 años
padre
commit
32595c33d1
Se han modificado 1 ficheros con 7 adiciones y 5 borrados
  1. 7 5
      src/components/Banner/index.jsx

+ 7 - 5
src/components/Banner/index.jsx

@@ -19,7 +19,6 @@ class Banner extends Component {
     this.state = {
       mode: props.typeConfig,
       zIndex:204,
-      emergency:true,
       emergencyBox:false
     };
     this.showConfigModal = this.showConfigModal.bind(this);
@@ -90,8 +89,8 @@ class Banner extends Component {
     dragBox('previewWrapper','previewStatic','del')    
   }
   render() {
-    const {visible,disVisible,copyVisible} = this.props;
-    const {mode,zIndex,emergency,emergencyBox} = this.state;
+    const {visible,disVisible,copyVisible,ifShow,deptName} = this.props;
+    const {mode,zIndex,emergencyBox} = this.state;
     const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
 
     return (
@@ -99,7 +98,7 @@ class Banner extends Component {
         <img src={logo} />
         <span className={style["logo-name"]}>|&nbsp;&nbsp;智能辅助临床决策系统</span>
         <div className={style["buon"]}>
-          {emergency?<div className={style["buon1"]} onClick={this.showHisModal}>
+          {ifShow==1&&deptName=='急诊科'?<div className={style["buon1"]} onClick={this.showHisModal}>
                       <img className={`${style["st"]} ${style["his"]}`} src={emergIcon} />
                       本科室近期全部病历
                     </div>:''}
@@ -131,8 +130,11 @@ class Banner extends Component {
 }
 
 const mapStateToProps = function(state){
+  const {sysConfig} = state.homePage;
+  const {message} = state.patInfo;
   return {
-
+    ifShow:sysConfig.general_show,
+    deptName:message.selfDeptName
   }
 }