|
@@ -35,8 +35,6 @@ class MainSuit extends Component{
|
|
|
overFlag:false,
|
|
|
tmpScroll:0,
|
|
|
tmpTop:0,
|
|
|
- activeHistory: -1,
|
|
|
- showHistoryCase:false
|
|
|
};
|
|
|
this.toggleEditable = this.toggleEditable.bind(this);
|
|
|
this.handleFocus = this.handleFocus.bind(this);
|
|
@@ -45,11 +43,6 @@ class MainSuit extends Component{
|
|
|
this.handleChange = this.handleChange.bind(this);
|
|
|
this.handleClick = this.handleClick.bind(this);
|
|
|
this.handleBlur = this.handleBlur.bind(this);
|
|
|
- this.referRecord = this.referRecord.bind(this);
|
|
|
- this.noReferRecord = this.noReferRecord.bind(this);
|
|
|
- this.referCase = this.referCase.bind(this);
|
|
|
- this.closeHistoryCaseModal = this.closeHistoryCaseModal.bind(this);
|
|
|
- this.handleQuoteClick = this.handleQuoteClick.bind(this);
|
|
|
}
|
|
|
componentWillReceiveProps(nextProps){
|
|
|
this.setState({boxLeft:nextProps.boxLeft})
|
|
@@ -280,83 +273,10 @@ class MainSuit extends Component{
|
|
|
},config.delayTime-200);
|
|
|
}
|
|
|
|
|
|
- // 慢病
|
|
|
- referRecord() {//是否引用历史病例弹窗--是
|
|
|
- const { chronicDesease,closeHisBox ,autoFillModules} = this.props;
|
|
|
- const that = this;
|
|
|
- closeHisBox&&closeHisBox();//关闭
|
|
|
- initItemList(chronicDesease).then((res)=>{
|
|
|
- const result = res.data;
|
|
|
- if(result.code==0 && result.data){
|
|
|
- store.dispatch(setInitHistory(result.data));
|
|
|
- that.setState({
|
|
|
- showHistoryCase:true
|
|
|
- })
|
|
|
- }else{
|
|
|
- Notify.info("暂无历史病例,默认引用通用模板");
|
|
|
- const timer = setTimeout(function(){
|
|
|
- autoFillModules && autoFillModules();
|
|
|
- clearTimeout(timer);
|
|
|
- },1000)
|
|
|
- }
|
|
|
- })
|
|
|
- // this.setState({
|
|
|
- // showHistoryCase:true
|
|
|
- // })
|
|
|
- // store.dispatch(initItemList(chronicDesease));
|
|
|
- }
|
|
|
- noReferRecord() {//否
|
|
|
- const {closeHisBox,autoFillModules} = this.props;
|
|
|
- closeHisBox&&closeHisBox();
|
|
|
- autoFillModules && autoFillModules()
|
|
|
- }
|
|
|
- referCase() {
|
|
|
- const { items ,pureSaveChronic} = this.props
|
|
|
- this.setState({
|
|
|
- showHistoryCase:false
|
|
|
- })
|
|
|
- if (this.state.activeHistory === -1) {
|
|
|
- return
|
|
|
- }
|
|
|
- // let baseList = store.getState();
|
|
|
- let baseObj = items[this.state.activeHistory];
|
|
|
- pushAllDataList(baseObj.sign,'push',baseObj,'history') //引用
|
|
|
- pureSaveChronic && pureSaveChronic({name:'糖尿病',id:21773}); //储存慢病疾病
|
|
|
- this.props.getBilling();
|
|
|
- this.setState({
|
|
|
- activeHistory: -1
|
|
|
- })
|
|
|
- }
|
|
|
- closeHistoryCaseModal() {//关闭病例列表
|
|
|
- const {autoFillMoudles} = this.props;
|
|
|
- this.setState({
|
|
|
- activeHistory: -1,
|
|
|
- showHistoryCase:false
|
|
|
- })
|
|
|
- // 不引用病例直接分发模板进行填充
|
|
|
- autoFillMoudles&&autoFillMoudles();
|
|
|
- }
|
|
|
- handleQuoteClick(item, index) {
|
|
|
- console.log('asadsd', item)
|
|
|
- this.setState({
|
|
|
- activeHistory: index
|
|
|
- })
|
|
|
- }
|
|
|
- getHistoryCase() {
|
|
|
- const { items } = this.props
|
|
|
- return (<div className={style['history-info']}>
|
|
|
- {items.map((item, index) => {
|
|
|
- return<div onClick={this.handleQuoteClick.bind(this, item, index)} style={this.state.activeHistory === index ? {color: '#abcdef'} : ''}>
|
|
|
- <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose}
|
|
|
- </div>
|
|
|
- })}
|
|
|
- </div>)
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
render(){
|
|
|
const {type,CommonSymptoms,searchData,fetchPushInfos,isRead,totalHide,handleInput,fuzhen,saveText,editClear,datas,commSymHide,boxLeft,boxTop,showHisBox} = this.props;
|
|
|
- const {showModule,show,symptom,search,showHistoryCase} = this.state;
|
|
|
+ const {showModule,show,symptom,search} = this.state;
|
|
|
const symptomFlag = CommonSymptoms.length>0 ? true : false;
|
|
|
const searchFlag = searchData.length>0 ? true : false;
|
|
|
const boxTop1 = datas.length>0?boxTop:45;
|
|
@@ -380,13 +300,6 @@ class MainSuit extends Component{
|
|
|
</ItemBox>
|
|
|
{/*没有推送结果就不显示*/}
|
|
|
{symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}
|
|
|
- <ConfirmModal visible={showHisBox} 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>
|
|
|
</div>
|
|
|
}
|
|
|
}
|