浏览代码

修改主诊断判断条件

zhangxc 6 年之前
父节点
当前提交
da871643d1
共有 2 个文件被更改,包括 2 次插入2 次删除
  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) {
-        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
             })