|
@@ -45,20 +45,18 @@ class MainSuit extends Component{
|
|
|
|
|
|
|
|
|
handleFocus(e){
|
|
|
- //e.stopPropagation();
|
|
|
- const {getCommonSymptoms,datas,clearDiagnose} = this.props;
|
|
|
+ const {getCommonSymptoms,datas,clearDiagnose,handleShow} = this.props;
|
|
|
let innerText = e.target.innerText || e.target.innerHTML;//兼容火狐43
|
|
|
clearDiagnose&&clearDiagnose();//清除复诊数据
|
|
|
if(!isIE()){//IE会触发onfocus和onblur事件
|
|
|
if(!innerText.trim()){//有内容就走搜索接口
|
|
|
getCommonSymptoms && getCommonSymptoms();
|
|
|
+ handleShow&&handleShow({ikey:'common'});
|
|
|
this.setState({
|
|
|
- symptom:true,
|
|
|
inpText:innerText
|
|
|
})
|
|
|
}else{
|
|
|
this.setState({
|
|
|
- symptom:false,
|
|
|
inpText:innerText
|
|
|
})
|
|
|
}
|
|
@@ -68,9 +66,6 @@ class MainSuit extends Component{
|
|
|
// if(datas.length==0 && !innerText.trim()){
|
|
|
if(datas.length==0 && innerText == '<br>'){
|
|
|
getCommonSymptoms && getCommonSymptoms();
|
|
|
- this.setState({
|
|
|
- symptom:true
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -272,7 +267,7 @@ class MainSuit extends Component{
|
|
|
}
|
|
|
}*/
|
|
|
render(){
|
|
|
- const {saveChronic,readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide} = this.props;
|
|
|
+ const {saveChronic,readMode,type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,showArr} = this.props;
|
|
|
const {symptom,boxLeft,boxTop} = this.state;
|
|
|
const symptomFlag = CommonSymptoms.length>0 ? true : false;
|
|
|
const searchFlag = searchData.length>0 ? true : false;
|
|
@@ -298,7 +293,7 @@ class MainSuit extends Component{
|
|
|
{''}{datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
|
|
|
</ItemBox>
|
|
|
{/*没有推送结果就不显示*/}
|
|
|
- {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
|
|
|
+ {symptomFlag && !searchFlag&&datas.length===0 ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&showArr['common']} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
|
|
|
</div>
|
|
|
}
|
|
|
}
|