浏览代码

历史病例点击颜色修改,主诉共用诊断历史病例

liucf 6 年之前
父节点
当前提交
a3b0f48843

+ 1 - 1
src/components/ChronicInfo/index.jsx

@@ -457,7 +457,7 @@ class ChronicInfo extends React.Component{
     return list;
   }
 
-  render(){console.log('chronic更新')
+  render(){
     const footer = <div className={style['footer']}>
       <span className={style['print']} onClick={this.onPrint}><img src={printIcon} alt=""/>打印</span>
       <span className={style['okBtn']} onClick={()=>this.handleSaveAssess()}>确定</span>

+ 0 - 1
src/components/CopyRight/index.jsx

@@ -60,7 +60,6 @@ class CopyRight extends Component {
   render() {
     const { number, date, content, copyVisible, disVisible, disContent, hasNewVersion } = this.props.copyRight;
     const { showCopyModal, closeCopyModal, showDisclatmerModal, closeDisclatmerModal } = this;
-    console.log(disVisible,77777)
     const copyContent = content&&content.map(item => {
       return (
         <div className={style['message']}>

+ 1 - 2
src/components/DiagnosticList/index.jsx

@@ -141,7 +141,6 @@ class DiagnosticList extends Component {
         autoFillModules && autoFillModules();
     }
     handleQuoteClick(item, index) {
-        console.log('asadsd', item)
         const { handleQuoteClick } = this.props
         // handleQuoteClick && handleQuoteClick(item)
         this.setState({
@@ -152,7 +151,7 @@ class DiagnosticList extends Component {
         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'} : ''}>
+                return<div onClick={this.handleQuoteClick.bind(this, item, index)} style={this.state.activeHistory === index ? {color: '#3B9ED0'} : ''}>
                     <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose}
                 </div>
             })}

+ 1 - 88
src/components/MainSuit/index.jsx

@@ -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>
   }
 }

+ 3 - 1
src/containers/MainSuit.js

@@ -14,6 +14,7 @@ import {Notify} from '@commonComp';
 import {getInitModules} from '@store/async-actions/homePage.js';
 import {CURRENT_CHRONIC} from '@store/types/currentIll';
 import {SET} from '@types/checkBody';
+import {SHOW_REFER_RECORD} from '@store/types/diagnosticList';
 
 function mapStateToProps(state) {//console.log(11,state);
   return {
@@ -203,7 +204,8 @@ function mapDispatchToProps(dispatch) {
         // 模板回来关闭;loading
         dispatch({type:MODI_LOADING,flag:false});
         // 弹窗是否引用历史病例?
-        dispatch({type:SHOW_HISTORY_BOX});
+        // dispatch({type:SHOW_HISTORY_BOX});
+        dispatch({type:SHOW_REFER_RECORD});
 
       },
       pureSaveChronic(item){//引用病例时储存