|
@@ -144,7 +144,7 @@ class MainSuit extends Component{
|
|
|
handleChange(e){
|
|
|
const ev = e || window.event;
|
|
|
const data = ev.target.innerText || ev.target.innerHTML;
|
|
|
- const {getSearchData,searchData,datas,pushMessage,reTotalHide,saveText} = this.props;
|
|
|
+ const {getSearchData,searchData,datas,pushMessage,reTotalHide,saveText,clearSearch} = this.props;
|
|
|
const {overFlag,inpText} = this.state;
|
|
|
reTotalHide && reTotalHide();//重置homePage中的控制项
|
|
|
const that = this;
|
|
@@ -172,16 +172,26 @@ class MainSuit extends Component{
|
|
|
return false;
|
|
|
}
|
|
|
// 有输入内容或搜索结果时关闭,否则显示
|
|
|
- if(data && data.trim()||searchData.length>0){
|
|
|
+ // if(data && data.trim()||searchData.length>0){
|
|
|
+ if(data && data.trim()){
|
|
|
+ clearTimeout(this.state.timer);
|
|
|
+ const timer = setTimeout(function(){
|
|
|
+ pushMessage && pushMessage(data);
|
|
|
+ //调搜索接口 使用模板走EditableSpan里的搜索方法
|
|
|
+ getSearchData && getSearchData({inpStr:data,boxMark:1,itemType:0});
|
|
|
+ },config.delayTime);
|
|
|
this.setState({
|
|
|
- symptom:false
|
|
|
+ symptom:false,
|
|
|
+ timer
|
|
|
})
|
|
|
}else{
|
|
|
+ // 内容为空-清空搜索数据-显示常见
|
|
|
+ clearSearch();
|
|
|
this.setState({
|
|
|
symptom:true
|
|
|
})
|
|
|
}
|
|
|
- clearTimeout(this.state.timer);
|
|
|
+ /*clearTimeout(this.state.timer);
|
|
|
const timer = setTimeout(function(){
|
|
|
pushMessage && pushMessage(data);
|
|
|
//调搜索接口 使用模板走EditableSpan里的搜索方法
|
|
@@ -189,7 +199,7 @@ class MainSuit extends Component{
|
|
|
},config.delayTime);
|
|
|
this.setState({
|
|
|
timer
|
|
|
- });
|
|
|
+ });*/
|
|
|
|
|
|
}
|
|
|
//除主诉外 其他是否为空
|