Browse Source

端子地址为空的不显示

“yueshang” 1 year ago
parent
commit
9074bfdc9e

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

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

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

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