Explorar o código

修改主诊断判断条件

zhangxc %!s(int64=6) %!d(string=hai) anos
pai
achega
da871643d1

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

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

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

@@ -293,7 +293,7 @@ export const  getInstroduceMore = (drugIdList) =>{
 export const commonTreatAddToAdvice = () => {
     return (dispatch, 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({
                 type: IS_FIRST_MAIN_DIAG
             })