|
@@ -7,18 +7,19 @@ import diagDown from './img/diagDown.png'
|
|
|
import manageIcon from '@common/images/manage.png';
|
|
|
import singleB from './img/singleB.png';
|
|
|
import singleL from './img/singleL.png';
|
|
|
-import {ConfirmModal, Message,ComplexModal,Footer,Loading} from '@commonComp';
|
|
|
+import {ConfirmModal, Message,ComplexModal,Footer,Loading, Add} from '@commonComp';
|
|
|
import Notify from '@commonComp/Notify';
|
|
|
import Treat from '@containers/Treat'
|
|
|
import store from '@store';
|
|
|
import { initItemList ,setInitHistory,getHistempDetail} from '@store/async-actions/historyTemplates';
|
|
|
-import { pushAllDataList,inspectAndAssist ,deepClone,setFontColorSize} from '@utils/tools';
|
|
|
+import { getPageCoordinate,setPosition,pushAllDataList,inspectAndAssist ,deepClone,setFontColorSize} from '@utils/tools';
|
|
|
import { dragBox } from '@utils/drag';
|
|
|
import iconRadioDefault from '@common/images/icon-radio-default.png'
|
|
|
import iconRadioActive from '@common/images/icon-radio-active.png'
|
|
|
import AssessResult from '@containers/AssessResult';
|
|
|
import {getAssessData} from '@store/async-actions/fetchModules';
|
|
|
import DetailsModal from '@components/PushItems/DetailsModal';
|
|
|
+import DiagResultSearch from '@containers/DiagResultSearch';
|
|
|
import tableIcon from '@common/images/table.png';
|
|
|
import { CONFIRM_TYPE } from "@store/types/typeConfig";
|
|
|
import config from '@config/index';
|
|
@@ -43,7 +44,8 @@ class DiagnosticList extends Component {
|
|
|
activeItem:{},
|
|
|
hasEnterItem: -1,
|
|
|
hasEnterImg: false,
|
|
|
- timer:null
|
|
|
+ timer:null,
|
|
|
+ pageTop:''
|
|
|
}
|
|
|
this.deleteItem = this.deleteItem.bind(this);
|
|
|
this.cancel = this.cancel.bind(this);
|
|
@@ -58,6 +60,10 @@ class DiagnosticList extends Component {
|
|
|
this.handleSaveAssess = this.handleSaveAssess.bind(this); //评估弹窗确定
|
|
|
this.onPrint = this.onPrint.bind(this);
|
|
|
this.hideTips=this.hideTips.bind(this);
|
|
|
+ this.handleTcmShowSearch = this.handleTcmShowSearch.bind(this);
|
|
|
+ this.handleSymShowSearch = this.handleSymShowSearch.bind(this);
|
|
|
+ this.showTcmSearch=this.showTcmSearch.bind(this);
|
|
|
+ this.showSymSearch=this.showSymSearch.bind(this);
|
|
|
}
|
|
|
onPrint() {
|
|
|
let dom = $("#AssistResult");
|
|
@@ -69,31 +75,59 @@ class DiagnosticList extends Component {
|
|
|
});
|
|
|
}
|
|
|
upDiagnostic(index) {
|
|
|
- const { upDiagnostic } = this.props;
|
|
|
- upDiagnostic && upDiagnostic(index)
|
|
|
+ const { upDiagnostic,isTcm } = this.props;
|
|
|
+ upDiagnostic && upDiagnostic(index,isTcm)
|
|
|
}
|
|
|
downDiagnostic(index) {
|
|
|
- const { downDiagnostic } = this.props;
|
|
|
- downDiagnostic && downDiagnostic(index)
|
|
|
+ const { downDiagnostic,isTcm } = this.props;
|
|
|
+ downDiagnostic && downDiagnostic(index,isTcm)
|
|
|
}
|
|
|
deleteItem() {
|
|
|
const { delItem,idxNum } = this.state;
|
|
|
- const { delDiagnostic, delReact,delFollowUp } = this.props;
|
|
|
- delDiagnostic && delDiagnostic(delItem,idxNum);
|
|
|
- delReact && delReact(delItem);
|
|
|
- delFollowUp && delFollowUp(delItem);
|
|
|
+ const { delDiagnostic, delReact,delFollowUp,isTcm } = this.props;
|
|
|
+ delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
|
|
|
+ delReact && delReact(delItem); //删除对应不良反应
|
|
|
+ delFollowUp && delFollowUp(delItem); //删除对应回访记录
|
|
|
this.setState({
|
|
|
visible: false,
|
|
|
})
|
|
|
Notify.success('删除成功')
|
|
|
}
|
|
|
handleBlur(e,delItem,idxNum){
|
|
|
- const { delDiagnostic } = this.props;
|
|
|
+ const { delDiagnostic,isTcm } = this.props;
|
|
|
let name = e.target.value
|
|
|
if(name.trim() == ''){
|
|
|
- delDiagnostic && delDiagnostic(delItem,idxNum);
|
|
|
+ delDiagnostic && delDiagnostic(delItem,idxNum,isTcm);
|
|
|
}
|
|
|
}
|
|
|
+ handleTcmShowSearch(e) {
|
|
|
+ this.props.showTcm ? this.hideTcmSearch() : this.showTcmSearch()
|
|
|
+ this.setState({pageTop: getPageCoordinate(e).boxTop})
|
|
|
+ if (this.props.showTcm) {
|
|
|
+ this.props.setHighter(48)
|
|
|
+ } else {
|
|
|
+ //this.props.getBilling({mode: 10});
|
|
|
+ setPosition(e, "#searchOption", this.props.setHighter)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ handleSymShowSearch(e) {
|
|
|
+ this.showSymSearch(this.props.showSym ? false : true)
|
|
|
+ this.setState({pageTop: getPageCoordinate(e).boxTop})
|
|
|
+ if (this.props.showSym) {
|
|
|
+ this.props.setHighter(48)
|
|
|
+ } else {
|
|
|
+ //this.props.getBilling({mode: 10});
|
|
|
+ setPosition(e, "#searchOption", this.props.setHighter)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ showTcmSearch(flag) {
|
|
|
+ const {showTcmSearch} = this.props;
|
|
|
+ showTcmSearch && showTcmSearch(flag)
|
|
|
+ }
|
|
|
+ showSymSearch(flag) {
|
|
|
+ const {showSymSearch} = this.props;
|
|
|
+ showSymSearch && showSymSearch(flag)
|
|
|
+ }
|
|
|
cancel() {
|
|
|
this.setState({
|
|
|
visible: false
|
|
@@ -112,8 +146,8 @@ class DiagnosticList extends Component {
|
|
|
})
|
|
|
}
|
|
|
showTreat(item, idx) {
|
|
|
- const { getTreatResult,getBilling } = this.props;
|
|
|
- getTreatResult && getTreatResult(item,idx);
|
|
|
+ const { getTreatResult,getBilling,isTcm } = this.props;
|
|
|
+ getTreatResult && getTreatResult(item,idx,isTcm);
|
|
|
getBilling({mode:10});
|
|
|
}
|
|
|
handleClickDiag(item) {
|
|
@@ -307,24 +341,78 @@ class DiagnosticList extends Component {
|
|
|
this.setState({timer})
|
|
|
}
|
|
|
render(){
|
|
|
- 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);
|
|
|
- //let isChronic = false; //是否要显示管理评估
|
|
|
- const footer = <Footer print={true}
|
|
|
- footText="确定"
|
|
|
- handlePrint={this.onPrint}
|
|
|
- handleConfirm={this.handleSaveAssess}/>;
|
|
|
+ const { list,tcmList, treatment,pushMessage, loading,refreshScroller,windowHeight,setHighter,isTcm} = this.props;
|
|
|
+ const {showTipsDetails,tipsDetails,showAllName}=pushMessage;
|
|
|
+ const {visible, treatTitle, hasOndel, hasOnIndex,delItem} = this.state;
|
|
|
+ const diagList = isTcm?tcmList:list;
|
|
|
+ if(isTcm){ //中医,添加中医诊断后才显示中医症候添加按钮
|
|
|
+ return(
|
|
|
+ <div className={style['diaglist-wrap']}>
|
|
|
+ {diagList && (diagList.length > 0) && diagList.map((item, index) => {
|
|
|
+ const {tcmDiag,tcmSyndrome} = item;
|
|
|
+ return (<div draggable={false} className={`${style['diag-box']} ${setFontColorSize(2,3)} clearfix`} id="diagListBox" key={index} >
|
|
|
+ {index === 0 ? '' : <span className={style['diag-up']} onClick={() => {this.upDiagnostic(index)}}><img className={style["diag-up"]} src={diagUp}/></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>
|
|
|
+
|
|
|
+ {tcmDiag?<span className={style['diag-name']}
|
|
|
+ onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
|
|
|
+ onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}
|
|
|
+ >
|
|
|
+ <span title={tcmDiag} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
|
+ <input type="text" value={tcmDiag} onFocus={(e)=>{this.handleFocus()}} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ </span>:<Add showText="添加中医诊断结果" isTcm={isTcm} handleClick={this.handleTcmShowSearch} id="addTcmDiag" height="50px" />}
|
|
|
+ {tcmSyndrome?<span className={style['diag-name']} onMouseEnter={this.handleMouseEnterDrug.bind(this,index)} onMouseLeave = {this.handleMouseLeaveDrug.bind(this)}>
|
|
|
+ <span title={tcmSyndrome} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
|
+ <input type="text" value={tcmSyndrome} onFocus={(e)=>{this.handleFocus()}} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ </span>:(tcmDiag?<Add showText="添加中医症候" isTcm={isTcm} handleClick={this.handleSymShowSearch} id="addSymDiag" height="50px" />:'')}
|
|
|
+ {tcmDiag&&tcmSyndrome?'':<DiagResultSearch
|
|
|
+ refreshScroller={refreshScroller}
|
|
|
+ setHighter={setHighter}
|
|
|
+ windowHeight={windowHeight}
|
|
|
+ pageTop={this.state.pageTop}
|
|
|
+ isTcm={isTcm}
|
|
|
+ height={150}>
|
|
|
+ </DiagResultSearch>}
|
|
|
+ {tcmDiag&&tcmSyndrome?<span className={style['treat']}
|
|
|
+ onClick={() =>{this.showTreat(item, index)}}>
|
|
|
+ <img src={item.hasTreat?singleB:singleL} alt=""/>
|
|
|
+ 治疗方案
|
|
|
+ </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,index)}}/>
|
|
|
+ </div>)
|
|
|
+ })}
|
|
|
+ {treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
|
|
|
+ {showTipsDetails &&<DetailsModal
|
|
|
+ showTipsDetails = {showTipsDetails}
|
|
|
+ hideTips = {this.hideTips}
|
|
|
+ showAllName = {showAllName}
|
|
|
+ tipsDetails = {tipsDetails}/>}
|
|
|
+ <ConfirmModal visible={visible}
|
|
|
+ okText='删除'
|
|
|
+ cancelText='取消'
|
|
|
+ confirm={this.deleteItem}
|
|
|
+ cancel={this.cancel}
|
|
|
+ close={this.close}
|
|
|
+ >
|
|
|
+ <div className={style['del-msg']}>是否删除中医诊断{delItem.tcmDiag}?</div>
|
|
|
+ </ConfirmModal>
|
|
|
+ <Loading show={loading}/>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ )
|
|
|
+ }
|
|
|
return(
|
|
|
<div className={style['diaglist-wrap']}>
|
|
|
- {list && (list.length > 0) && list.map((item, index) => {
|
|
|
- /*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;*/
|
|
|
+ {diagList && (diagList.length > 0) && diagList.map((item, index) => {console.log(diagList,item)
|
|
|
+
|
|
|
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>}
|
|
|
+ {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-name']}
|
|
|
onMouseEnter={this.handleMouseEnterDrug.bind(this,index)}
|
|
@@ -333,44 +421,17 @@ class DiagnosticList extends Component {
|
|
|
<span title={item.name} className={style['diag-name-box']} style={{'max-width': '300px'}}>
|
|
|
<input type="text" value={item.name} onFocus={(e)=>{this.handleFocus()}} onBlur={(e)=>{this.handleBlur(e,item,index)}} onInput={(e)=>this.handleInput(e,index)}/>
|
|
|
</span>
|
|
|
- {/* <img className={`${style['info-img']}`}
|
|
|
- title='点击i图标可查看详细说明'
|
|
|
- style ={hasEnterItem===index ? {display: "inline-block"} : {display: "none"}}
|
|
|
- src={hasEnterImg ? infoMove : infoShow}
|
|
|
- onMouseEnter={this.handleMouseEnterImg.bind(this)}
|
|
|
- onMouseLeave = {this.handleMouseLeaveImg.bind(this)}
|
|
|
- onClick={this.handleClickDiag.bind(this,item,false,false,false)}
|
|
|
- /> */}
|
|
|
- </span>
|
|
|
- {/* {item.type === 1 ? <span className={style['diag-first']}>初诊</span> :<span className={style['diag-second']}> 复诊</span>} */}
|
|
|
+
|
|
|
+ </span>
|
|
|
<span className={style['treat']}
|
|
|
- // style ={hasTreat ? '' : { color: 'gray', cursor: 'text'}}
|
|
|
onClick={() =>{this.showTreat(item, index)}}>
|
|
|
<img src={item.hasTreat?singleB:singleL} alt=""/>
|
|
|
治疗方案
|
|
|
</span>
|
|
|
- {/*{isChronic&&index===0&&item.conceptId===chronicMagItem.conceptId?<span className={style['assess']}
|
|
|
- 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,index)}}/>
|
|
|
</div>)
|
|
|
})}
|
|
|
{treatment&&<Treat title={treatTitle} refreshScroller={refreshScroller}></Treat>}
|
|
|
- {/*{showAssess?<ComplexModal onclose={this.showAssessFn.bind(this)} footer={footer}
|
|
|
- title='管理和评估'
|
|
|
- icon={manageIcon}
|
|
|
- top={'3%'}
|
|
|
- bottom={'3%'}
|
|
|
- width={820}>
|
|
|
-
|
|
|
- <AssessResult closeAssess={this.showAssessFn.bind(this)}
|
|
|
- disId={assessId}
|
|
|
- disName={disName}
|
|
|
- chronicMagItemName={list[0].name}
|
|
|
- isAssessConfirm={isAssessConfirm}
|
|
|
- ></AssessResult>
|
|
|
- </ComplexModal>:''}*/}
|
|
|
{showTipsDetails &&<DetailsModal
|
|
|
showTipsDetails = {showTipsDetails}
|
|
|
hideTips = {this.hideTips}
|
|
@@ -385,13 +446,6 @@ class DiagnosticList extends Component {
|
|
|
>
|
|
|
<div className={style['del-msg']}>是否删除诊断{delItem.name}?</div>
|
|
|
</ConfirmModal>
|
|
|
- {/*<ConfirmModal visible={showReferRecord} okText='是' cancelText='否' confirm={this.referRecord} cancel={this.noReferRecord} close={this.noReferRecord}>
|
|
|
- <div className={style['confirm-info']}>是否引用往期病历</div>
|
|
|
- </ConfirmModal>
|
|
|
- <ConfirmModal visible={showHistoryCase} noFooter='true' title='请选择历史病历' close={this.closeHistoryCaseModal} titleBg="#DFEAFE" icon={tableIcon} height={300}>
|
|
|
- {this.getHistoryCase()}
|
|
|
- <div className={style['confirm-history']}><span className={style['confirm-history-btn']} onClick={this.referCase}>确定</span></div>
|
|
|
- </ConfirmModal>*/}
|
|
|
<Loading show={loading}/>
|
|
|
</div>
|
|
|
|