linqilong 2 周之前
父节点
当前提交
146f1b8357
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/views/Inspect/history.vue

+ 2 - 2
src/views/Inspect/history.vue

@@ -44,11 +44,11 @@ function getInspBase(value, level = 1) {
       return;
     }
     if (level === 2) {
-      twoBatchs.value = res.data.map(item => ({text: item.prsnTitle, value: item.plnaId}))
+      twoBatchs.value = res.data?.map(item => ({text: item.prsnTitle, value: item.plnaId}))
       twoBatch.value = twoBatchs.value[0].value;
       return;
     }
-    baseBatchs.value = res.data.map(item => ({text: item.prsnTitle, value: item.plnaId})).reverse();
+    baseBatchs.value = res.data?.map(item => ({text: item.prsnTitle, value: item.plnaId})).reverse();
     baseBatch.value = baseBatchs.value[0].value;
   });
 }