Bladeren bron

8109,8102

zhouna 4 jaren geleden
bovenliggende
commit
fdeefca9b8
3 gewijzigde bestanden met toevoegingen van 12 en 2 verwijderingen
  1. 4 2
      src/store/actions/diagnosticList.js
  2. 5 0
      src/store/reducers/diagnosticList.js
  3. 3 0
      src/utils/tools.js

+ 4 - 2
src/store/actions/diagnosticList.js

@@ -264,7 +264,9 @@ export function reDiagData(state, action) {
     res.diagnosticStrNoType = action.params[10].contentJson;
     res.diseaseName = action.params[10].diseaseName;
     //中医数据
-    res.tcmList =action.params[12].contentValue;
-    res.otherIndex = action.params[12].diseaseName;
+    if(action.params[12]){
+        res.tcmList =action.params[12].contentValue;
+        res.otherIndex = action.params[12].diseaseName;
+    }
     return res;
 }

+ 5 - 0
src/store/reducers/diagnosticList.js

@@ -117,6 +117,11 @@ export default function (state=initState, action) {
         newState.diseaseName = {};
         newState.diagnosticStrNoType = '';
         return newState;
+      case 'CLEARTCMDIAGDATA':
+          let newSt = Object.assign({}, state);
+          newSt.otherIndex={};
+          newSt.tcmList=[];
+          return newSt;
       default:
         return state;
     }

+ 3 - 0
src/utils/tools.js

@@ -347,6 +347,9 @@ const delHistoryDataList = () =>{
   store.dispatch({
     type: CLEARDIAGDATA,
   });
+  store.dispatch({
+      type: 'CLEARTCMDIAGDATA',
+  });
   store.dispatch({
     type: CLEARNEWADVICEDATA,
   });