|
@@ -238,7 +238,7 @@ class MainSuit extends Component{
|
|
|
if(currentData&¤tData.length==0){//现病史没有模板的时候才去获取
|
|
|
getSymptomFeature && getSymptomFeature(e.target.innerText);
|
|
|
}
|
|
|
- // e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="")
|
|
|
+ e.target.innerText?(e.target.innerText=""):(e.target.innerHTML="")
|
|
|
freeText && freeText(data.trim());
|
|
|
}else{
|
|
|
if(datas.length==0){
|
|
@@ -249,16 +249,13 @@ class MainSuit extends Component{
|
|
|
}
|
|
|
}
|
|
|
// 延时关闭常见症状下拉、清空搜索结果,不延时会影响选中
|
|
|
- // clearTimeout(this.state.clearTimer);
|
|
|
const clearTimer = setTimeout(function(){
|
|
|
clearSearch && clearSearch();
|
|
|
+ clearTimeout(clearTimer);
|
|
|
// that.setState({
|
|
|
// symptom:false
|
|
|
// })
|
|
|
- },config.delayTime-200);
|
|
|
- /*this.setState({
|
|
|
- clearTimer
|
|
|
- });*/
|
|
|
+ },config.delayTime-200);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -267,11 +264,13 @@ class MainSuit extends Component{
|
|
|
const {showModule,show,symptom,search} = this.state;
|
|
|
const symptomFlag = CommonSymptoms.length>0 ? true : false;
|
|
|
const searchFlag = searchData.length>0 ? true : false;
|
|
|
+ const boxTop1 = datas.length>0?boxTop:45;
|
|
|
+ const boxLeft1 = datas.length>0?boxLeft:85;
|
|
|
if(+type===1){ //文本模式
|
|
|
return <Textarea title='主诉' boxMark='1' isRead={isRead} value={saveText[0]} handlePush={fetchPushInfos} handleInput={handleInput} />;
|
|
|
}
|
|
|
return <div className={`${'mainsuit-box'} ${style['main-suit']}`} id="mainsuitBox">
|
|
|
- <ItemBox
|
|
|
+ <ItemBox
|
|
|
fuzhen={fuzhen}
|
|
|
title='主诉'
|
|
|
editable={editClear||datas.length==0?true:false}
|
|
@@ -285,7 +284,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={boxLeft} top={boxTop} />:"")}
|
|
|
+ {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}/>:"")}
|
|
|
</div>
|
|
|
}
|
|
|
}
|