Преглед на файлове

历史病例未选择病例直接点确定的情况处理

liucf преди 6 години
родител
ревизия
1e5597f3e9
променени са 1 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 9 4
      src/components/DiagnosticList/index.jsx

+ 9 - 4
src/components/DiagnosticList/index.jsx

@@ -102,7 +102,7 @@ class DiagnosticList extends Component {
               store.dispatch(setInitHistory(result.data));
               showHistoryCaseModal && showHistoryCaseModal();
             }else{
-              Notify.info("暂无历史病例,默认引用通用模板");
+              Notify.info("暂无历史病例,已默认展示慢病相关内容");
               const timer = setTimeout(function(){
                 autoFillModules && autoFillModules();
                 clearTimeout(timer);
@@ -116,9 +116,14 @@ class DiagnosticList extends Component {
         autoFillModules&&autoFillModules();
     }
     referCase() {
-        const { hideHistoryCaseModal, items } = this.props
+        const { hideHistoryCaseModal, items ,autoFillModules} = this.props
         hideHistoryCaseModal && hideHistoryCaseModal()
-        if (this.state.activeHistory === -1) {
+        if (this.state.activeHistory === -1) {//没有选择历史病例直接点确定
+            Notify.info("未选择历史病历,已默认展示慢病相关内容");
+              const timer = setTimeout(function(){
+                autoFillModules && autoFillModules();
+                clearTimeout(timer);
+              },1000)
             return
         }
         let baseList = store.getState();
@@ -152,7 +157,7 @@ class DiagnosticList extends Component {
         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: '#3B9ED0'} : ''}>
-                    <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose}
+                    <img src={this.state.activeHistory === index ? iconRadioActive : iconRadioDefault}/>{item.diagnose + '(' + item.inquiryDate + ')'}
                 </div>
             })}
         </div>)