Browse Source

修改主诊断判断条件

zhangxc 6 years atrás
parent
commit
da871643d1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/components/DiagnosticList/index.jsx
  2. 1 1
      src/store/async-actions/treat.js

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

@@ -63,7 +63,7 @@ class DiagnosticList extends Component {
         })
         })
     }
     }
     showTreat(item, index) {
     showTreat(item, index) {
-        item.treatIndex = index
+        // item.treatIndex = index
         const  { showTreat, getTreatResult } = this.props;
         const  { showTreat, getTreatResult } = this.props;
         getTreatResult && getTreatResult(item);
         getTreatResult && getTreatResult(item);
         showTreat && showTreat();
         showTreat && showTreat();

+ 1 - 1
src/store/async-actions/treat.js

@@ -293,7 +293,7 @@ export const  getInstroduceMore = (drugIdList) =>{
 export const commonTreatAddToAdvice = () => {
 export const commonTreatAddToAdvice = () => {
     return (dispatch, getState) => {
     return (dispatch, getState) => {
         const state = getState();
         const state = getState();
-        if(state.treat.treatItem.treatIndex === 0 && state.treat.isFirstMainDiag) {
+        if(state.treat.treatItem.id === state.diagnosticList.diagnosticList[0].id && state.treat.isFirstMainDiag) {
             dispatch({
             dispatch({
                 type: IS_FIRST_MAIN_DIAG
                 type: IS_FIRST_MAIN_DIAG
             })
             })