From 6f1ab8e489e791734a2c63550b63ad1cb74b4f57 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 04 Jul 2018 17:19:29 +0800
Subject: [PATCH] 设备页面bug 修复
---
src/app/routes/report/report.component.ts | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/routes/report/report.component.ts b/src/app/routes/report/report.component.ts
index 07536a4..85643f5 100644
--- a/src/app/routes/report/report.component.ts
+++ b/src/app/routes/report/report.component.ts
@@ -126,7 +126,9 @@
/* if (!(items[i].monitorPointId)) {
items[i].monitorPointName = items[i].areaName;
} */
- const showName = items[i].showName = items[i].mac ? '������:' + items[i].deviceName : (items[i].monitorPointId ? '���������:' + items[i].monitorPointName : items[i].areaName) + items[i].professionName;
+ const showName = this.items[i].showName =
+ items[i].mac ? ('������:' + items[i].deviceName) :
+ ((items[i].monitorPointId ? '���������:' + items[i].monitorPointName : items[i].areaName) + (items[i].professionName ? items[i].professionName : ''));
const legendName = items[i].formatTime + label + showName;
items[i].legendName = option.legend.data[i] = legendName;
if (res.data.datas[i][sensorKey]) {
@@ -232,7 +234,7 @@
for (const key in res.data.sortList[i]) {
const split = key.split('-');
this.sensorKeys.forEach(sensor => {
- if (sensor.key === split[0]) {
+ if (sensor.key === split[0] && res.data.sortList[i][key] != 0) {
this.resultArr.push({
sensorName: sensor.name,
monitorPointName: this.items[split[1]].showName,
--
Gitblit v1.8.0