|
@@ -5,6 +5,10 @@ import BannerContainer from '@containers/TypeConfigContainer';
|
|
|
import BodyContainer from "@components/BodyContainer";
|
|
|
|
|
|
import {HIDEDROP,SETMINSCREEN,SETSYSTEMCONFIG} from '@store/types/homePage.js';
|
|
|
+import {CLEAR_SEARCH} from '@types/mainSuit';
|
|
|
+import {CURRENT_CLEAR} from '@types/currentIll';
|
|
|
+import {OTHERHIS_CLEAR} from '@types/otherHistory';
|
|
|
+import {CHECKBODY_CLEAR} from '@types/checkBody';
|
|
|
import style from './index.less';
|
|
|
import {getInitModules,getChronic,getSystemConfig} from '@store/async-actions/homePage.js';
|
|
|
import { getUrlArgObject,parseNameVal } from "@utils/tools";
|
|
@@ -15,7 +19,8 @@ class HomePage extends Component {
|
|
|
super();
|
|
|
this.state={
|
|
|
timer:null,
|
|
|
- }
|
|
|
+ };
|
|
|
+ this.hidePops = this.hidePops.bind(this);
|
|
|
}
|
|
|
componentDidMount(){
|
|
|
const {setWindow,getChronicList,getConfig} = this.props;
|
|
@@ -43,9 +48,14 @@ class HomePage extends Component {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ hidePops(){
|
|
|
+ const {hideAllDrop,handleClear } = this.props;
|
|
|
+ hideAllDrop(); //隐藏填写单
|
|
|
+ handleClear&&handleClear(); //清空搜索结果
|
|
|
+ }
|
|
|
render() {
|
|
|
const {flag} = this.props;
|
|
|
- return <div className={style['home-page']} onClick={this.props.hideAllDrop}>
|
|
|
+ return <div className={style['home-page']} onClick={this.hidePops}>
|
|
|
<BannerContainer />
|
|
|
{/* <InfoTitle /> */}
|
|
|
<BodyContainer></BodyContainer>
|
|
@@ -63,6 +73,12 @@ const mapStateToProps = function (state) {
|
|
|
};
|
|
|
const mapDispatchToProps = function (dispatch) {
|
|
|
return {
|
|
|
+ handleClear(){//清空搜索结果
|
|
|
+ dispatch({type:CLEAR_SEARCH});
|
|
|
+ dispatch({type:CURRENT_CLEAR});
|
|
|
+ dispatch({type:OTHERHIS_CLEAR});
|
|
|
+ dispatch({type:CHECKBODY_CLEAR});
|
|
|
+ },
|
|
|
hideAllDrop(){
|
|
|
dispatch({
|
|
|
type:HIDEDROP
|