|
@@ -35,7 +35,7 @@ class MainSuit extends Component{
|
|
this.handleClick = this.handleClick.bind(this);
|
|
this.handleClick = this.handleClick.bind(this);
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
}
|
|
}
|
|
- toggleEditable(){console.log("切换编辑状态")
|
|
|
|
|
|
+ toggleEditable(){
|
|
this.setState({
|
|
this.setState({
|
|
boxEditable:!this.state.boxEditable
|
|
boxEditable:!this.state.boxEditable
|
|
})
|
|
})
|
|
@@ -60,7 +60,7 @@ class MainSuit extends Component{
|
|
handleFocus(e){
|
|
handleFocus(e){
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
const {getCommonSymptoms,datas} = this.props;
|
|
const {getCommonSymptoms,datas} = this.props;
|
|
- let innerText = e.target.innerText;console.log("聚焦");
|
|
|
|
|
|
+ let innerText = e.target.innerText;
|
|
if(!isIE()){//IE会触发onfocus和onblur事件
|
|
if(!isIE()){//IE会触发onfocus和onblur事件
|
|
if(!innerText.trim()){//有内容就走搜索接口
|
|
if(!innerText.trim()){//有内容就走搜索接口
|
|
getCommonSymptoms && getCommonSymptoms();
|
|
getCommonSymptoms && getCommonSymptoms();
|
|
@@ -74,7 +74,7 @@ class MainSuit extends Component{
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- if(datas.length==0){
|
|
|
|
|
|
+ if(datas.length==0 && !innerText.trim()){
|
|
getCommonSymptoms && getCommonSymptoms();
|
|
getCommonSymptoms && getCommonSymptoms();
|
|
this.setState({
|
|
this.setState({
|
|
symptom:true
|
|
symptom:true
|
|
@@ -93,7 +93,6 @@ class MainSuit extends Component{
|
|
}*/
|
|
}*/
|
|
|
|
|
|
handleSelect(item){//选中的常见症状
|
|
handleSelect(item){//选中的常见症状
|
|
- console.log("主诉选中下拉",item);
|
|
|
|
const {clearCommS,insertMain,getData} = this.props;
|
|
const {clearCommS,insertMain,getData} = this.props;
|
|
// 获取主诉模板
|
|
// 获取主诉模板
|
|
getData && getData();
|
|
getData && getData();
|
|
@@ -109,7 +108,7 @@ class MainSuit extends Component{
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- handleSearchSelect(item){console.log("选中搜索");
|
|
|
|
|
|
+ handleSearchSelect(item){
|
|
const {clearSearch,insertSearch,datas,span} = this.props;
|
|
const {clearSearch,insertSearch,datas,span} = this.props;
|
|
clearTimeout(this.state.timer);
|
|
clearTimeout(this.state.timer);
|
|
if(datas.length==0){//没有使用模板时点击搜索结构要展开模板
|
|
if(datas.length==0){//没有使用模板时点击搜索结构要展开模板
|
|
@@ -131,7 +130,7 @@ class MainSuit extends Component{
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- handleClick(e){console.log("主诉框点击事件");//让搜索框跟随鼠标点击移动
|
|
|
|
|
|
+ handleClick(e){//让搜索框跟随鼠标点击移动
|
|
// e.stopPropagation(); //冒泡到最顶层关闭其他下拉
|
|
// e.stopPropagation(); //冒泡到最顶层关闭其他下拉
|
|
let boxLeft = e.pageX -32 + 'px';
|
|
let boxLeft = e.pageX -32 + 'px';
|
|
// let boxTop = e.pageY - 112 + 'px';
|
|
// let boxTop = e.pageY - 112 + 'px';
|
|
@@ -143,7 +142,7 @@ class MainSuit extends Component{
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- handleChange(e){console.log("主诉onchange");
|
|
|
|
|
|
+ handleChange(e){
|
|
const data = e.target.innerText;
|
|
const data = e.target.innerText;
|
|
const {getSearchData,searchData,datas,pushMessage,reTotalHide} = this.props;
|
|
const {getSearchData,searchData,datas,pushMessage,reTotalHide} = this.props;
|
|
const {overFlag,inpText} = this.state;
|
|
const {overFlag,inpText} = this.state;
|
|
@@ -196,7 +195,7 @@ class MainSuit extends Component{
|
|
handleBlur(e){//隐藏常见症状下拉、存自由输入的值
|
|
handleBlur(e){//隐藏常见症状下拉、存自由输入的值
|
|
const {freeText,saveText,datas} = this.props;
|
|
const {freeText,saveText,datas} = this.props;
|
|
const that = this;
|
|
const that = this;
|
|
- let data = this.state.inpText;console.log("主诉框失焦",data);
|
|
|
|
|
|
+ let data = this.state.inpText;
|
|
if(!isIE()){
|
|
if(!isIE()){
|
|
e.target.innerText="";
|
|
e.target.innerText="";
|
|
freeText && freeText(data.trim());
|
|
freeText && freeText(data.trim());
|