|
@@ -77,9 +77,9 @@ class DiagnosticList extends Component {
|
|
downDiagnostic && downDiagnostic(index)
|
|
downDiagnostic && downDiagnostic(index)
|
|
}
|
|
}
|
|
deleteItem() {
|
|
deleteItem() {
|
|
- const { delItem } = this.state;
|
|
|
|
|
|
+ const { delItem,idxNum } = this.state;
|
|
const { delDiagnostic, delReact,delFollowUp } = this.props;
|
|
const { delDiagnostic, delReact,delFollowUp } = this.props;
|
|
- delDiagnostic && delDiagnostic(delItem);
|
|
|
|
|
|
+ delDiagnostic && delDiagnostic(delItem,idxNum);
|
|
delReact && delReact(delItem);
|
|
delReact && delReact(delItem);
|
|
delFollowUp && delFollowUp(delItem);
|
|
delFollowUp && delFollowUp(delItem);
|
|
this.setState({
|
|
this.setState({
|
|
@@ -97,10 +97,11 @@ class DiagnosticList extends Component {
|
|
visible: false
|
|
visible: false
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- handleDeleteItem(item) {
|
|
|
|
|
|
+ handleDeleteItem(item,idx) {
|
|
this.setState({
|
|
this.setState({
|
|
visible: true,
|
|
visible: true,
|
|
delItem: item,
|
|
delItem: item,
|
|
|
|
+ idxNum:idx
|
|
})
|
|
})
|
|
}
|
|
}
|
|
showTreat(item, idx) {
|
|
showTreat(item, idx) {
|
|
@@ -295,7 +296,7 @@ class DiagnosticList extends Component {
|
|
this.setState({timer})
|
|
this.setState({timer})
|
|
}
|
|
}
|
|
render(){
|
|
render(){
|
|
- const { list, treatment,pushMessage, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
|
|
|
|
|
|
+ const { list, treatment,pushMessage,delDiagnostic, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
|
|
const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg,delItem} = this.state;
|
|
const {visible, treatTitle, showAssess, isAssessConfirm, assessId, disName, hasOndel, hasOnIndex,hasEnterItem,hasEnterImg,delItem} = this.state;
|
|
const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
|
|
const chronicList = JSON.parse(localStorage.getItem('chronic')||null);
|
|
@@ -319,7 +320,7 @@ class DiagnosticList extends Component {
|
|
onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
>
|
|
>
|
|
<span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
<span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
- <input type="text" value={item.name} onInput={(e)=>this.handleInput(e,index)}/>
|
|
|
|
|
|
+ <input type="text" value={item.name} onBlur={()=>{delDiagnostic(item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
|
|
</span>
|
|
</span>
|
|
{/* <img className={`${style['info-img']}`}
|
|
{/* <img className={`${style['info-img']}`}
|
|
title='点击i图标可查看详细说明'
|
|
title='点击i图标可查看详细说明'
|
|
@@ -341,7 +342,7 @@ class DiagnosticList extends Component {
|
|
onClick={this.showAssessFn.bind(this,item)}>
|
|
onClick={this.showAssessFn.bind(this,item)}>
|
|
管理评估
|
|
管理评估
|
|
</span>:''}*/}
|
|
</span>:''}*/}
|
|
- <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item)}}/>
|
|
|
|
|
|
+ <img className={style['diag-del']} src={hasOnIndex == index ? hasOndel ? del_on : del_icon : del_icon} onMouseEnter={this.handleEnterDel.bind(this,index)} onMouseLeave={this.handleLeaveDel.bind(this)} onClick={()=>{this.handleDeleteItem(item,index)}}/>
|
|
</div>)
|
|
</div>)
|
|
})}
|
|
})}
|
|
{treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
|
|
{treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
|