luolei 4 лет назад
Родитель
Сommit
ae794293b5
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/store/actions/diagnosticList.js

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

@@ -29,7 +29,7 @@ export const addDiagnostic = (state, action) => {
         }
     }
     if(num == tmpLis.length){
-        tmpLis[0].hasTreat = 1
+        tmpLis[0]['hasTreat'] = 1
         let obj = {
             "dateValue": '',
             "name": tmpLis[0].name,
@@ -50,8 +50,8 @@ export const delDiagnostic = (state, action) => {
             ++num
         }
     }
-    if(num == tmpLis.length){
-        tmpLis[0].hasTreat = 1
+    if(tmpLis.length>0&&num == tmpLis.length){
+        tmpLis[0]['hasTreat'] = 1
         let obj = {
             "dateValue": '',
             "name": tmpLis[0].name,