Selaa lähdekoodia

operationName/diseaseName为空传null

zhouna 3 vuotta sitten
vanhempi
commit
2d6b715451

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

@@ -131,7 +131,7 @@ export const delDiagnostic = (state, action) => {
         if(isTcm){
             res.otherIndex=tmpLis[0];
         }else{
-            res.diseaseName = {}
+            res.diseaseName = null
         }
     }
     res[k] = [...tmpLis]
@@ -207,7 +207,7 @@ export const clearAllDiag = (state, action) => {
     res.mainSuitStr = action.mainSuitStr
     res.diagnosticStrNoType = action.saveText
     res.chronicMagItem = action.chronicMagItem
-    res.diseaseName = {}
+    res.diseaseName = null
     return res;
 }
 

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

@@ -54,9 +54,7 @@ const initState = {
     mainSuitStr:'',
     diagnosticStrNoType:'',
     diagnosticStr:'',
-    diseaseName: {
-      
-    },
+    diseaseName: null,
     otherIndex:{}
 }
 
@@ -114,7 +112,7 @@ export default function (state=initState, action) {
         let newState = Object.assign({}, state);
         newState.diagnosticStr = '';
         newState.diagnosticList = [];
-        newState.diseaseName = {};
+        newState.diseaseName = null;
         newState.diagnosticStrNoType = '';
         return newState;
       case 'CLEARTCMDIAGDATA':

+ 3 - 3
src/store/reducers/newAdvice.js

@@ -46,7 +46,7 @@ const initSearchList = {
     operationOrder: [],//开单项
     transfusionOrder: [],
     activeIdx: '',
-    operationName: {}
+    operationName: null
 }
 
 export default (state = initSearchList, action) => {
@@ -160,7 +160,7 @@ export default (state = initSearchList, action) => {
                 }
             })
             if (tempArrs.length == 0) {
-                newState.operationName = {}
+                newState.operationName = null
             } else {
                 for (let i = 0; i < tempArrs.length; i++) {
                     if (tempArrs[i].hasTreat != 1) {
@@ -452,7 +452,7 @@ export default (state = initSearchList, action) => {
         newState.operationOrder = [];
         newState.labelListBlood = [];
         newState.transfusionOrder = [];
-        newState.operationName = {};
+        newState.operationName = null;
         return newState;
     }
     return state;

+ 1 - 1
src/utils/tools.js

@@ -1084,7 +1084,7 @@ function getEMRParams() {
     "menstrual": menstruationHistory.saveText[0] || '',  //月经史
     "diseaseName": diagnosticList.diseaseName,
     "otherIndex": diagnosticList.otherIndex,
-    "operationName": tempOperationName,
+    "operationName": (tempOperationName&&Object.keys(tempOperationName).length===0)?null:tempOperationName,
     "infectious": "",
     "operation": tempoperation,
     "allergy": "",