|
@@ -4,11 +4,8 @@ import style from "./index.less";
|
|
|
import ReactDom from "react-dom";
|
|
|
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 emergIcon from '../../common/images/emergency.png'
|
|
|
import {Notify} from '@commonComp';
|
|
|
-// import Emergency from '@components/Emergency';
|
|
|
import Emergency from '@containers/Emergency';
|
|
|
import {getAllHis} from '@store/async-actions/fetchModules.js';
|
|
|
import {timestampToTime,getCurrentDate} from '@utils/tools.js';
|
|
@@ -21,11 +18,9 @@ class Banner extends Component {
|
|
|
super(props)
|
|
|
this.state = {
|
|
|
mode: props.typeConfig,
|
|
|
- zIndex:204,
|
|
|
emergencyBox:false
|
|
|
};
|
|
|
this.showConfigModal = this.showConfigModal.bind(this);
|
|
|
- this.closeConfigModal = this.closeConfigModal.bind(this);
|
|
|
this.changeType = this.changeType.bind(this);
|
|
|
this.confirmType = this.confirmType.bind(this);
|
|
|
this.showHisModal = this.showHisModal.bind(this);
|
|
@@ -35,18 +30,10 @@ class Banner extends Component {
|
|
|
showConfigModal(){
|
|
|
this.setState({
|
|
|
mode:this.props.typeConfig,
|
|
|
- zIndex:206
|
|
|
});
|
|
|
this.props.showConfigModal()
|
|
|
}
|
|
|
|
|
|
- closeConfigModal(){
|
|
|
- this.props.closeConfigModal();
|
|
|
- this.setState({
|
|
|
- zIndex:204
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
changeType(typeConfig){
|
|
|
this.setState({
|
|
|
mode:typeConfig
|
|
@@ -54,27 +41,17 @@ class Banner extends Component {
|
|
|
}
|
|
|
|
|
|
confirmType(){
|
|
|
- const {typeConfig,confirmType,clearCommS} = this.props;
|
|
|
+ const {typeConfig,confirmType,clearCommS,closeConfigModal} = this.props;
|
|
|
const mode = this.state.mode;
|
|
|
// 清空主诉常见症状
|
|
|
clearCommS();
|
|
|
if(mode==typeConfig){
|
|
|
- this.closeConfigModal()
|
|
|
+ closeConfigModal()
|
|
|
return;
|
|
|
}
|
|
|
confirmType&&confirmType(mode);
|
|
|
- this.closeConfigModal()
|
|
|
- this.setState({
|
|
|
- zIndex:204
|
|
|
- })
|
|
|
+ closeConfigModal()
|
|
|
}
|
|
|
- /*componentDidUpdate(){
|
|
|
- const {failed} = this.props;
|
|
|
- if(failed){
|
|
|
- //弹窗提醒
|
|
|
- Notify.error("模式切换失败,请稍后再试");
|
|
|
- }
|
|
|
- }*/
|
|
|
showHisModal(){
|
|
|
const {getAllRecord} = this.props;
|
|
|
// 进入时默认展示当天的病例
|
|
@@ -86,20 +63,18 @@ class Banner extends Component {
|
|
|
getAllRecord&&getAllRecord(item);
|
|
|
this.setState({
|
|
|
emergencyBox:true,
|
|
|
- zIndex:206
|
|
|
})
|
|
|
}
|
|
|
handleHisClose(){
|
|
|
this.setState({
|
|
|
emergencyBox:false,
|
|
|
- zIndex:204
|
|
|
})
|
|
|
dragBox('previewWrapper','previewStatic','del')
|
|
|
}
|
|
|
render() {
|
|
|
- const {visible,disVisible,copyVisible,ifShow,deptName} = this.props;
|
|
|
- const {mode,zIndex,emergencyBox} = this.state;
|
|
|
- const {showConfigModal, closeConfigModal, changeType, confirmType} = this;
|
|
|
+ const {visible,ifShow,deptName, closeConfigModal} = this.props;
|
|
|
+ const {mode,emergencyBox} = this.state;
|
|
|
+ const {showConfigModal, changeType, confirmType} = this;
|
|
|
const domNode = document.getElementById('root');
|
|
|
return (
|
|
|
<div className={style["logo"]} >
|