|
@@ -10,7 +10,7 @@ class DrugTreat extends Component {
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
this.state = {
|
|
|
- currentImg: -1
|
|
|
+ currentImg: -1,
|
|
|
}
|
|
|
this.handleSelect = this.handleSelect.bind(this);
|
|
|
this.setOtherRecommend = this.setOtherRecommend.bind(this);
|
|
@@ -43,6 +43,19 @@ class DrugTreat extends Component {
|
|
|
const { setDrugInfo } = this.props;
|
|
|
setDrugInfo && setDrugInfo(item);
|
|
|
}
|
|
|
+ //搜索药品说明书(查看数据用)
|
|
|
+ handleInputDrug(e) {
|
|
|
+ this.setState({
|
|
|
+ drugId: e.target.value
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //搜索药品说明书(查看数据用)
|
|
|
+ searchDrug() {
|
|
|
+ const { showDrugInfo } = this.props
|
|
|
+ this.setDrugInfo({id: this.state.drugId})
|
|
|
+ showDrugInfo && showDrugInfo();
|
|
|
+
|
|
|
+ }
|
|
|
showTreatDesc() {
|
|
|
$('#treatDescBox').css({'display': 'block'});
|
|
|
$('#treatWrapper').animate({'margin-left': '-470px'}, 300);
|
|
@@ -58,6 +71,8 @@ class DrugTreat extends Component {
|
|
|
return(
|
|
|
treatment && treatment.length > 0 && <div className={style['drug-box']}>
|
|
|
<h3 className={style['drug-title']}><img className={style['drug-icon']} src={drugIcon}/> 常用药物治疗</h3>
|
|
|
+ {/* 查看药物说明书 */}
|
|
|
+ <div> <input onInput={this.handleInputDrug.bind(this)} style={{border:'1px solid #000'}} type="text"/><button onClick = {this.searchDrug.bind(this)}>搜索药品说明</button></div>
|
|
|
{treatment.map((item, index) => {
|
|
|
return(<div className={style['drug-content']}>
|
|
|
<div className={style['drug-name-box']}>
|