|
@@ -21,6 +21,7 @@ import {getAssessData} from '@store/async-actions/fetchModules';
|
|
|
import DetailsModal from '@components/PushItems/DetailsModal';
|
|
|
import tableIcon from '@common/images/table.png';
|
|
|
import { CONFIRM_TYPE } from "@store/types/typeConfig";
|
|
|
+import config from '@config/index';
|
|
|
import $ from "jquery";
|
|
|
import {getMRAnalyse} from '@store/async-actions/pushMessage';
|
|
|
|
|
@@ -41,7 +42,8 @@ class DiagnosticList extends Component {
|
|
|
hasOnIndex: -1,
|
|
|
activeItem:{},
|
|
|
hasEnterItem: -1,
|
|
|
- hasEnterImg: false
|
|
|
+ hasEnterImg: false,
|
|
|
+ timer:null
|
|
|
}
|
|
|
this.deleteItem = this.deleteItem.bind(this);
|
|
|
this.cancel = this.cancel.bind(this);
|
|
@@ -75,9 +77,9 @@ class DiagnosticList extends Component {
|
|
|
downDiagnostic && downDiagnostic(index)
|
|
|
}
|
|
|
deleteItem() {
|
|
|
- const { delItem } = this.state;
|
|
|
+ const { delItem,idxNum } = this.state;
|
|
|
const { delDiagnostic, delReact,delFollowUp } = this.props;
|
|
|
- delDiagnostic && delDiagnostic(delItem);
|
|
|
+ delDiagnostic && delDiagnostic(delItem,idxNum);
|
|
|
delReact && delReact(delItem);
|
|
|
delFollowUp && delFollowUp(delItem);
|
|
|
this.setState({
|
|
@@ -85,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
|
|
@@ -95,10 +104,11 @@ class DiagnosticList extends Component {
|
|
|
visible: false
|
|
|
})
|
|
|
}
|
|
|
- handleDeleteItem(item) {
|
|
|
+ handleDeleteItem(item,idx) {
|
|
|
this.setState({
|
|
|
visible: true,
|
|
|
delItem: item,
|
|
|
+ idxNum:idx
|
|
|
})
|
|
|
}
|
|
|
showTreat(item, idx) {
|
|
@@ -242,7 +252,7 @@ class DiagnosticList extends Component {
|
|
|
}
|
|
|
componentWillReceiveProps(nextprops) {
|
|
|
let flg = store.getState().print.mrInfo.mrId&&store.getState().print.mrInfo.mrId.indexOf('reStart')>-1
|
|
|
- if (this.props.diagnosticStr != nextprops.diagnosticStr&&!flg) {
|
|
|
+ if (this.props.diagnosticStr.split(',').length != nextprops.diagnosticStr.split(',').length&&!flg) {
|
|
|
this.props.getBilling({mode:10});
|
|
|
}
|
|
|
}
|
|
@@ -279,6 +289,19 @@ class DiagnosticList extends Component {
|
|
|
hasEnterImg: false
|
|
|
})
|
|
|
}
|
|
|
+ handleInput(e,index){
|
|
|
+ const {editDiagName,getBilling} = this.props;
|
|
|
+ let name = (e.target.value).trim()
|
|
|
+ editDiagName(index,name)
|
|
|
+ //右侧推送--延时推送
|
|
|
+ const stimer = this.state.timer;
|
|
|
+ clearTimeout(stimer);
|
|
|
+ let timer = setTimeout(function(){
|
|
|
+ getBilling&&getBilling({mode:10});
|
|
|
+ clearTimeout(stimer);
|
|
|
+ },config.delayPushTime);
|
|
|
+ this.setState({timer})
|
|
|
+ }
|
|
|
render(){
|
|
|
const { list, treatment,pushMessage, showReferRecord, showHistoryCase ,chronicMagItem,loading,refreshScroller,windowWidth,hideChronic} = this.props;
|
|
|
const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
@@ -295,7 +318,7 @@ class DiagnosticList extends Component {
|
|
|
/*const hasTreat = item.treat && ((item.treat.commonTreatment&&item.treat.commonTreatment.content) || (item.treat.surgeryTreatment&&item.treat.surgeryTreatment.content) || item.treat.treatment.length>0 ||(item.adverseReactions&&item.adverseReactions.length > 0)
|
|
|
|| (item.drugHistory && item.drugHistory['慢病用药内容'] && item.drugHistory['慢病用药内容'].length > 0) || (item.drugHistory &&item.drugHistory['普通病用药内容'] && item.drugHistory['普通病用药内容'].length > 0) ||item.follow)
|
|
|
isChronic = !hideChronic&&chronicMagItem&&item.type==2&&chronicList&&chronicList.findIndex((it)=>it.conceptId==item.conceptId)!=-1;*/
|
|
|
- return (<div draggable={true} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
|
|
|
+ return (<div draggable={false} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={item.conceptId} >
|
|
|
{index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></span>}
|
|
|
{list.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
|
|
|
<span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
|
|
@@ -304,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'}}>
|
|
|
- {item.name}
|
|
|
+ <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图标可查看详细说明'
|
|
@@ -326,7 +349,7 @@ class DiagnosticList extends Component {
|
|
|
onClick={this.showAssessFn.bind(this,item)}>
|
|
|
管理评估
|
|
|
</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>)
|
|
|
})}
|
|
|
{treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
|