Преглед на файлове

端子地址为空的不显示

“yueshang” преди 1 година
родител
ревизия
9074bfdc9e
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 1 0
      src/pages/netStructPicture/components/Gsix.vue
  2. 4 2
      src/pages/netStructPicture/components/VirtualTable.vue

+ 1 - 0
src/pages/netStructPicture/components/Gsix.vue

@@ -180,6 +180,7 @@ const getData = async () => {
   if (res.data && cClickCode.value != "scd.ied") {
     res.data.forEach((item) => {
       let text;
+      if(!item.diff_desc) return;
       text = item.diff_desc.replace(/[\r|\n|\t]/g, ""); //处理返回的数据中换行等,整理好规整数据
       item.diff_desc = JSON.parse(text);
       commonGetData(item);

+ 4 - 2
src/pages/netStructPicture/components/VirtualTable.vue

@@ -118,7 +118,7 @@ let needScdName = ref(""); //需要的scd名称
 let needFlashName = ref(""); //需要的变电站名称
 let tableList = ref([]); //crc效验结果表格数据
 const getData = async () => {
-  tableList.value = null;
+  tableList.value = [];
   let loading = ElLoading.service({
     lock: true,
     text: "正在查询数据",
@@ -130,7 +130,9 @@ const getData = async () => {
     ied_name: queryParams.value.ied_name,
   });
   if (!data) return;
-  tableList.value = data.data;
+  data.data.forEach(item=>{
+    if(item.doi_addr) tableList.value.push(item);
+  })
   loading.close();
 };
 const chooseInterval = ref(null); //间隔下拉框选中的数据