Browse Source

修改系统集成报告刷新列表某行 bug

haojianlong 5 years ago
parent
commit
3ecd6b9f8f
1 changed files with 11 additions and 7 deletions
  1. 11 7
      src/components/point/report/tabFunNumOverview.vue

+ 11 - 7
src/components/point/report/tabFunNumOverview.vue

@@ -153,13 +153,17 @@ export default {
         MeterFunc: row.MeterFunc
       }
       getTabFunNumOverview(pa, res => {
-        if (res.Content[0].Data) {
-          this.tableData[index].Data.Data = res.Content[0].Data.Data;
-          this.tableData[index].Data.Time = res.Content[0].Data.Time;
-        }
-        this.tableData[index].DataQuality = res.Content[0].DataQuality;
-        this.tableData[index].RelatedInstance = res.Content[0].RelatedInstance;
-        this.tableData[index].RelatedPoint = res.Content[0].RelatedPoint;
+        res.Content.forEach(t => {
+          if (t.MeterFunc == row.MeterFunc) {
+            if (t.Data) {
+              this.tableData[index].Data.Data = t.Data.Data || '';
+              this.tableData[index].Data.Time = t.Data.Time || '';
+            }
+            this.tableData[index].DataQuality = t.DataQuality;
+            this.tableData[index].RelatedInstance = t.RelatedInstance;
+            this.tableData[index].RelatedPoint = t.RelatedPoint;
+          }
+        })
         Message.success('已刷新');
       });
     },