From 39ea49edce74ae063ca0afd9b2966f861e256a3e Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Tue, 17 Apr 2018 13:18:36 +0800
Subject: [PATCH] ts fix,组织报警间隔时间设置

---
 src/app/routes/dashboard/workplace/workplace.component.ts |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/app/routes/dashboard/workplace/workplace.component.ts b/src/app/routes/dashboard/workplace/workplace.component.ts
index 6c5442a..968fad1 100644
--- a/src/app/routes/dashboard/workplace/workplace.component.ts
+++ b/src/app/routes/dashboard/workplace/workplace.component.ts
@@ -76,14 +76,14 @@
         const fakeDC = [60, 135, 70, 112, 80, 170, 200, 140, 52, 119, 164, 230];
         for (let i = 0; i < 12; i += 1) {
             this.totalDeviceCountList.push({
-                x: moment(today).subtract(-1*i, 'months').format(
-                    "YYYY-MM"
+                x: moment(today).subtract(-1 * i, 'months').format(
+                    'YYYY-MM'
                 ),
                 y: fakeDC[i]
             });
             this.totalDeviceCount += fakeDC[i];
         }
-        this.avgDeviceCount = (this.totalDeviceCount/12).toFixed(0);
+        this.avgDeviceCount = (this.totalDeviceCount / 12).toFixed(0);
 
         const alarmData = [];
         const alarmData_1 = [];
@@ -114,7 +114,7 @@
         for (let i = 0; i < fakeY.length; i += 1) {
             visitData.push({
                 x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format(
-                    "YYYY-MM-DD"
+                    'YYYY-MM-DD'
                 ),
                 y: fakeY[i]
             });
@@ -124,7 +124,7 @@
         for (let i = 0; i < fakeY2.length; i += 1) {
             visitData2.push({
                 x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format(
-                    "YYYY-MM-DD"
+                    'YYYY-MM-DD'
                 ),
                 y: fakeY2[i]
             });
@@ -186,7 +186,7 @@
                 status: Math.floor((Math.random() * 10) % 2)
             });
         }
-        var res = {
+        const res = {
             alarmData: alarmData,
             alarmData_1: alarmData_1,
             alarmData_2: alarmData_2,
@@ -222,7 +222,7 @@
             'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png'  // Webpack
         ];
 
-        var activities = [
+        const activities = [
             {
                 id: 'trend-1',
                 updatedAt: new Date(),
@@ -365,19 +365,19 @@
     salesPieData: any;
     salesTotal = 0;
     changeSaleType() {
-        if(this.salesType == '0') {
+        if (this.salesType == '0') {
             this.salesPieData = this.data.alertData;
-        } else if(this.salesType == '1') {
+        } else if (this.salesType == '1') {
             this.salesPieData = this.data.alertData_1;
-        } else if(this.salesType == '2') {
+        } else if (this.salesType == '2') {
             this.salesPieData = this.data.alertData_2;
-        } else if(this.salesType == '3') {
+        } else if (this.salesType == '3') {
             this.salesPieData = this.data.alertData_3;
         }
         if (this.salesPieData) this.salesTotal = this.salesPieData.reduce((pre, now) => now.y + pre, 0);
     }
 
     handlePieValueFormat(value: any) {
-        return value + "���";
+        return value + '���';
     }
 }

--
Gitblit v1.8.0