From 7f8bc74444b8ddf4ccf07c217b92b044e385de4a Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Mon, 14 May 2018 16:40:20 +0800
Subject: [PATCH] 优化
---
src/app/routes/report/report.component.ts | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/app/routes/report/report.component.ts b/src/app/routes/report/report.component.ts
index 07536a4..49d5917 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]) {
--
Gitblit v1.8.0