12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import React, { Component } from 'react';
- import style from './index.less';
- import {Button, ItemBox, ConfirmModal, Loading, Message} from '@commonComp';
- import DiagnosticList from '@containers/DiagnosticList.js';
- // import TreatDrug from '@containers/TreatDrug.js'
- import DiagResultSearch from '@containers/DiagResultSearch'
- import $ from 'jquery';
- import more from '@common/images/addItem1.png';
- class Diagnosis extends Component {
- constructor(props) {
- super(props);
- this.state = {
- diagType: 0,
- showSearch: props.show,
- }
- 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() {
- this.props.show ? this.hideSearch() : this.showSearch()
- }
- render() {
-
-
- return (<div>
- <ItemBox id="diagnosis" title='诊断' boxHeight='auto' titleTop='22px' marginTop='9px' backgroundColor='#EAF7FD'>
- <DiagnosticList></DiagnosticList>
- <div style={{marginLeft:'10px'}}>
- <img src={more} style={{verticalAlign:'middle',marginRight:'2px'}}/>
- <span id='addDiag' className={style['add-diag']} onClick={this.handleshowSearch}>添加诊断结果</span>
- </div>
- <DiagResultSearch></DiagResultSearch>
-
- </ItemBox>
- {/* <TreatDrug></TreatDrug> */}
- <Message></Message>
- </div>)
- }
- }
- export default Diagnosis;
|