|
@@ -30,7 +30,6 @@ class DiagnosticList extends Component {
|
|
constructor(props) {
|
|
constructor(props) {
|
|
super(props);
|
|
super(props);
|
|
this.state = {
|
|
this.state = {
|
|
- editStatus:[], //是否被编辑过
|
|
|
|
visible: false,
|
|
visible: false,
|
|
delItem: {},
|
|
delItem: {},
|
|
treatTitle: '',
|
|
treatTitle: '',
|
|
@@ -96,21 +95,10 @@ class DiagnosticList extends Component {
|
|
}
|
|
}
|
|
handleBlur(e,delItem,idxNum){
|
|
handleBlur(e,delItem,idxNum){
|
|
const { delDiagnostic,isTcm } = this.props;
|
|
const { delDiagnostic,isTcm } = this.props;
|
|
- let name = e.target.value;
|
|
|
|
- if(isTcm){
|
|
|
|
- if(!delItem.tcmDiag.trim()&&!delItem.tcmSyndrome){
|
|
|
|
- const arr = [...this.state.editStatus];
|
|
|
|
- arr.splice(idxNum,1);
|
|
|
|
- this.setState({editStatus:arr})
|
|
|
|
- delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
|
|
|
|
- }
|
|
|
|
- return;
|
|
|
|
- }else{
|
|
|
|
- if(name.trim() == ''){
|
|
|
|
- delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
|
|
|
|
- }
|
|
|
|
|
|
+ let name = e.target.value
|
|
|
|
+ if(name.trim() == ''){
|
|
|
|
+ delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
handleTcmShowSearch(e) {
|
|
handleTcmShowSearch(e) {
|
|
this.props.showTcm ? this.hideTcmSearch() : this.showTcmSearch()
|
|
this.props.showTcm ? this.hideTcmSearch() : this.showTcmSearch()
|
|
@@ -343,11 +331,6 @@ class DiagnosticList extends Component {
|
|
const {editDiagName,getBilling} = this.props;
|
|
const {editDiagName,getBilling} = this.props;
|
|
let name = (e.target.value).trim()
|
|
let name = (e.target.value).trim()
|
|
editDiagName(index,name,isTcm)
|
|
editDiagName(index,name,isTcm)
|
|
- if(isTcm){
|
|
|
|
- const arr = [...this.state.editStatus];
|
|
|
|
- arr[index] = true;
|
|
|
|
- this.setState({editStatus:arr})
|
|
|
|
- }
|
|
|
|
//右侧推送--延时推送
|
|
//右侧推送--延时推送
|
|
const stimer = this.state.timer;
|
|
const stimer = this.state.timer;
|
|
clearTimeout(stimer);
|
|
clearTimeout(stimer);
|
|
@@ -360,7 +343,7 @@ class DiagnosticList extends Component {
|
|
render(){
|
|
render(){
|
|
const { list,tcmList, treatment,pushMessage, loading,refreshScroller,windowHeight,setHighter,isTcm} = this.props;
|
|
const { list,tcmList, treatment,pushMessage, loading,refreshScroller,windowHeight,setHighter,isTcm} = this.props;
|
|
const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
- const {visible, treatTitle, hasOndel, hasOnIndex,delItem,editStatus} = this.state;
|
|
|
|
|
|
+ const {visible, treatTitle, hasOndel, hasOnIndex,delItem} = this.state;
|
|
const diagList = isTcm?tcmList:list;
|
|
const diagList = isTcm?tcmList:list;
|
|
if(isTcm){ //中医,添加中医诊断后才显示中医症候添加按钮
|
|
if(isTcm){ //中医,添加中医诊断后才显示中医症候添加按钮
|
|
return(
|
|
return(
|
|
@@ -372,15 +355,15 @@ class DiagnosticList extends Component {
|
|
{diagList.length === 1 ? '' : index !== 0 ? '' : <span onClick={() => {this.downDiagnostic(index)}} className={style['diag-down']}><img className={style["diag-down"]} src={diagDown}/></span>}
|
|
{diagList.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>
|
|
<span className={style['diag-number']} style={{fontWeight:index === 0 ?'bold':'normal'}}>{index === 0 ? '1' : index+1}</span>
|
|
|
|
|
|
- {editStatus[index]||tcmDiag?<span className={style['diag-name']}>
|
|
|
|
|
|
+ {tcmDiag?<span className={style['diag-name']}>
|
|
<span title={tcmDiag} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
<span title={tcmDiag} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
- <input type="text" value={tcmDiag} onFocus={(e)=>{this.handleFocus(true)}} onBlur={(e)=>{this.handleBlur(e,item,index,'tcmDiag')}} onInput={(e)=>this.handleInput(e,index,'tcmDiag')}/>
|
|
|
|
|
|
+ <input type="text" value={tcmDiag} disabled={true}/>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
</span>:<Add showText="添加中医诊断结果" isTcm={isTcm} handleClick={this.handleTcmShowSearch} id="addTcmDiag" height="50px" />}
|
|
</span>:<Add showText="添加中医诊断结果" isTcm={isTcm} handleClick={this.handleTcmShowSearch} id="addTcmDiag" height="50px" />}
|
|
- {editStatus[index]||tcmSyndrome?<span className={style['diag-name']}>
|
|
|
|
|
|
+ {tcmSyndrome?<span className={style['diag-name']}>
|
|
<span title={tcmSyndrome} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
<span title={tcmSyndrome} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
- <input type="text" value={tcmSyndrome} onFocus={(e)=>{this.handleFocus(true)}} onBlur={(e)=>{this.handleBlur(e,item,index,'tcmSyndrome')}} onInput={(e)=>this.handleInput(e,index,'tcmSyndrome')}/>
|
|
|
|
|
|
+ <input type="text" value={tcmSyndrome} disabled={true}/>
|
|
</span>
|
|
</span>
|
|
|
|
|
|
</span>:(tcmDiag?<Add showText="添加中医证候" isTcm={isTcm} handleClick={this.handleSymShowSearch} id="addSymDiag" height="50px" />:'')}
|
|
</span>:(tcmDiag?<Add showText="添加中医证候" isTcm={isTcm} handleClick={this.handleSymShowSearch} id="addSymDiag" height="50px" />:'')}
|
|
@@ -392,7 +375,7 @@ class DiagnosticList extends Component {
|
|
isTcm={isTcm}
|
|
isTcm={isTcm}
|
|
height={150}>
|
|
height={150}>
|
|
</DiagResultSearch>}
|
|
</DiagResultSearch>}
|
|
- {editStatus[index]||(tcmDiag&&tcmSyndrome)?<span className={style['treat']}
|
|
|
|
|
|
+ {tcmDiag&&tcmSyndrome?<span className={style['treat']}
|
|
onClick={() =>{this.showTreat(item, index)}}>
|
|
onClick={() =>{this.showTreat(item, index)}}>
|
|
<img src={item.hasTreat?singleB:singleL} alt=""/>
|
|
<img src={item.hasTreat?singleB:singleL} alt=""/>
|
|
治疗方案
|
|
治疗方案
|