import React, { Component } from 'react'; import style from './index.less'; import { Button, ItemBox, ConfirmModal, Loading, Message, Add } from '@commonComp'; import DiagnosticList from '@containers/DiagnosticList.js'; // import TreatDrug from '@containers/TreatDrug.js' import { getPageCoordinate } from '@utils/tools'; import DiagResultSearch from '@containers/DiagResultSearch' import $ from 'jquery'; class Diagnosis extends Component { constructor(props) { super(props); this.state = { diagType: 0, showSearch: props.show, pageTop: '' } this.showSearch = this.showSearch.bind(this); this.hideSearch = this.hideSearch.bind(this); this.handleshowSearch = this.handleshowSearch.bind(this); } componentWillReceiveProps() { this.setState({ showSearch: this.props.show }) } showSearch() { const { showSearch } = this.props showSearch && showSearch() } hideSearch() { const { hideSearch } = this.props hideSearch && hideSearch() } handleshowSearch(e) { this.props.show ? this.hideSearch() : this.showSearch() this.setState({ pageTop:getPageCoordinate(e).boxTop }) } render() { return (
{/* */}
) } } export default Diagnosis;