import React, { Component } from "react"; import style from "./index.less"; import logo from "../../common/images/logoa.png"; import setup from "../../common/images/setup.png"; import close from '../../common/images/icon_close.png'; import ok from '../../common/images/confirm.png' import {Notify} from '@commonComp'; class Banner extends Component { constructor(props){ super(props) this.state = { mode: props.typeConfig, zIndex:40 }; this.showConfigModal = this.showConfigModal.bind(this); this.closeConfigModal = this.closeConfigModal.bind(this); this.changeType = this.changeType.bind(this); this.confirmType = this.confirmType.bind(this); } showConfigModal(){ this.setState({ mode:this.props.typeConfig, zIndex:202 }); this.props.showConfigModal() } closeConfigModal(){ this.props.closeConfigModal(); this.setState({ zIndex:40 }) } changeType(typeConfig){ this.setState({ mode:typeConfig }); } confirmType(){ const {typeConfig,confirmType} = this.props; const mode = this.state.mode; if(mode==typeConfig){ this.closeConfigModal() return; } confirmType&&confirmType(mode); this.closeConfigModal() this.setState({ zIndex:40 }) } /*componentDidUpdate(){ const {failed} = this.props; if(failed){ //弹窗提醒 Notify.error("模式切换失败,请稍后再试"); } }*/ render() { const {visible} = this.props; const {mode,zIndex} = this.state; const {showConfigModal, closeConfigModal, changeType, confirmType} = this; return (
|  智能辅助临床决策系统
设置
{visible?
设置

模式切换(模式说明:切换模式会清空当前所有的数据)

  • changeType(0)}>智能推送模式
  • changeType(1)}>纯文本模式
确认
:''}
); } } export default Banner;