Explorar o código

修改病例标注子项没内容容错

zhangxc %!s(int64=5) %!d(string=hai) anos
pai
achega
34a475348a
Modificáronse 1 ficheiros con 12 adicións e 9 borrados
  1. 12 9
      src/components/recordInput/AddRecord.vue

+ 12 - 9
src/components/recordInput/AddRecord.vue

@@ -174,17 +174,20 @@
         const caseLIstCopy = JSON.parse(JSON.stringify(this.caseLIst))
         for(let i = 0; i < caseLIstCopy.length; i++){
           const CheckList = this.checkAllMap[caseLIstCopy[i].remark]
-          for(let j = 0; j < caseLIstCopy[i].qcCasesEntry.length; j++){
-            let item = {
-              casesEntryId: caseLIstCopy[i].qcCasesEntry[j].id,
-              casesId: caseLIstCopy[i].id,
-              pass: 0
+          if(caseLIstCopy[i].qcCasesEntry){
+            for(let j = 0; j < caseLIstCopy[i].qcCasesEntry.length; j++){
+              let item = {
+                casesEntryId: caseLIstCopy[i].qcCasesEntry[j].id,
+                casesId: caseLIstCopy[i].id,
+                pass: 0
+              }
+              if(CheckList.findIndex(item => item == caseLIstCopy[i].qcCasesEntry[j].id) > -1){
+                item.pass = -1
+              }
+              qcInputMappingSaveVO.push(item)
             }
-            if(CheckList.findIndex(item => item == caseLIstCopy[i].qcCasesEntry[j].id) > -1){
-              item.pass = -1
-            }
-            qcInputMappingSaveVO.push(item)
           }
+          
         }
         // for(let i = 0; i < noCheckList.length; i++) {
         //   qcInputMappingSaveVO.push({