|
@@ -87,6 +87,13 @@ class DiagnosticList extends Component {
|
|
|
})
|
|
|
Notify.success('删除成功')
|
|
|
}
|
|
|
+ handleBlur(e,delItem,idxNum){
|
|
|
+ const { delDiagnostic } = this.props;
|
|
|
+ let name = e.target.value
|
|
|
+ if(name.trim() == ''){
|
|
|
+ delDiagnostic && delDiagnostic(delItem,idxNum);
|
|
|
+ }
|
|
|
+ }
|
|
|
cancel() {
|
|
|
this.setState({
|
|
|
visible: false
|
|
@@ -296,7 +303,7 @@ class DiagnosticList extends Component {
|
|
|
this.setState({timer})
|
|
|
}
|
|
|
render(){
|
|
|
- const { list, treatment,pushMessage,delDiagnostic, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
|
|
|
+ const { list, treatment,pushMessage, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
|
|
|
const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
|
const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg,delItem} = this.state;
|
|
|
const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
|
|
@@ -320,7 +327,7 @@ class DiagnosticList extends Component {
|
|
|
onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
|
>
|
|
|
<span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
|
- <input type="text" value={item.name} onBlur={()=>{delDiagnostic(item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
|
|
|
+ <input type="text" value={item.name} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
|
|
|
</span>
|
|
|
{/* <img className={`${style['info-img']}`}
|
|
|
title='点击i图标可查看详细说明'
|