From 2b76c020b627ed5cba7e1e0b33b49410e45dc8a6 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 14 Mar 2018 08:58:46 +0800
Subject: [PATCH] Merge branch 'develop' of http://blit.7drlb.com:8888/r/screen-frontend into develop

---
 src/app/routes/dashboard/workplace/workplace.component.html |  213 +++++++--------------
 src/app/routes/dashboard/workplace/workplace.component.ts   |  336 +++++++-------------------------
 2 files changed, 150 insertions(+), 399 deletions(-)

diff --git a/src/app/routes/dashboard/workplace/workplace.component.html b/src/app/routes/dashboard/workplace/workplace.component.html
index e74510f..be53386 100644
--- a/src/app/routes/dashboard/workplace/workplace.component.html
+++ b/src/app/routes/dashboard/workplace/workplace.component.html
@@ -40,12 +40,7 @@
 
 <div nz-row [nzGutter]="24" class="pt-lg" style="margin-top: -24px">
     <div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="6">
-        <chart-card
-            [title]="'���������������'"
-            total="{{totalDeviceCount}}"
-            contentHeight="46px"
-            [action]="action1"
-            [footer]="footer1">
+        <chart-card [title]="'���������������'" total="{{totalDeviceCount | number: '1.0'}}" contentHeight="46px" [action]="action1" [footer]="footer1">
             <ng-template #action1>
                 <nz-tooltip [nzTitle]="'���������������������������������������������������������'">
                     <nz-icon nz-tooltip nzType="info-circle-o"></nz-icon>
@@ -62,22 +57,13 @@
         </chart-card>
     </div>
     <div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="6">
-        <chart-card [title]="'������������������'"
-                    total="78%"
-                    contentHeight="46px"
-                    [action]="action2"
-                    [footer]="footer2">
+        <chart-card [title]="'������������������'" total="78%" contentHeight="46px" [action]="action2" [footer]="footer2">
             <ng-template #action2>
                 <nz-tooltip [nzTitle]="'������������������������������������������������������'">
                     <nz-icon nz-tooltip nzType="info-circle-o"></nz-icon>
                 </nz-tooltip>
             </ng-template>
-            <mini-progress
-                height="46"
-                percent="78"
-                strokeWidth="8"
-                target="80"
-                color="#13C2C2"></mini-progress>
+            <mini-progress height="46" percent="78" strokeWidth="8" target="80" color="#13C2C2"></mini-progress>
             <ng-template #footer2>
                 <div class="d-flex justify-content-between">
                     <trend flag="up">���������<span class="pl-sm">8%</span></trend>
@@ -87,11 +73,7 @@
         </chart-card>
     </div>
     <div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="6">
-        <chart-card [title]="'������������'"
-                    total="8,848"
-                    contentHeight="46px"
-                    [action]="action3"
-                    [footer]="footer3">
+        <chart-card [title]="'������������'" total="2,847" contentHeight="46px" [action]="action3" [footer]="footer3">
             <ng-template #action3>
                 <nz-tooltip [nzTitle]="'���������������������������������������������'">
                     <nz-icon nz-tooltip nzType="info-circle-o"></nz-icon>
@@ -107,11 +89,7 @@
         </chart-card>
     </div>
     <div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="6">
-        <chart-card [title]="'���������������'"
-                    total="6,560"
-                    contentHeight="46px"
-                    [action]="action4"
-                    [footer]="footer4">
+        <chart-card [title]="'������������������'" total="1,260" contentHeight="46px" [action]="action4" [footer]="footer4">
             <ng-template #action4>
                 <nz-tooltip [nzTitle]="'������������������������������������������������'">
                     <nz-icon nz-tooltip nzType="info-circle-o"></nz-icon>
@@ -119,10 +97,10 @@
             </ng-template>
             <mini-bar
                 height="46"
-                color="orange"
+                color="gray"
                 [data]="data.visitData"></mini-bar>
             <ng-template #footer4>
-                <p class="text-truncate">������������������:<span class="ml-sm">220</span></p>
+                <p class="text-truncate">������������������:<span class="ml-sm">60</span></p>
             </ng-template>
         </chart-card>
     </div>
@@ -131,71 +109,104 @@
     <ng-template #body>
         <nz-tabset>
             <nz-tab>
-                <ng-template #nzTabHeading>���������</ng-template>
+                <ng-template #nzTabHeading>������������</ng-template>
                 <div nz-row>
                     <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="16">
                         <div class="bar">
-                            <bar
-                                height="295"
-                                [title]="'���������������'"
-                                [data]="data.salesData"></bar>
+                            <bar height="295" [title]="'������������������������'" [data]="data.alarmData" color="purple"></bar>
                         </div>
                     </div>
                     <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="8">
                         <div class="rank-list">
-                            <h4 class="rank-title">���������������������</h4>
+                            <h4 class="rank-title">������������������</h4>
                             <ul>
                                 <li *ngFor="let i of rankingListData; let idx = index">
                                     <div>
                                         <span class="icon" [ngClass]="{'active': idx < 3}">{{idx+1}}</span>
                                         {{i.title}}
                                     </div>
-                                    <span>{{i.total | number: '3.0'}}</span>
+                                    <span>{{i.total | number: '1.0'}}</span>
                                 </li>
                             </ul>
                         </div>
                     </div>
                 </div>
             </nz-tab>
+
             <nz-tab>
-                <ng-template #nzTabHeading>���������</ng-template>
+                <ng-template #nzTabHeading>������������</ng-template>
                 <div nz-row>
                     <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="16">
                         <div class="bar">
-                            <bar
-                                height="295"
-                                [title]="'���������������'"
-                                [data]="data.salesData"></bar>
+                            <bar height="295" [title]="'������������������������'" [data]="data.alarmData_1" color="yellow"></bar>
                         </div>
                     </div>
                     <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="8">
                         <div class="rank-list">
-                            <h4 class="rank-title">���������������������</h4>
+                            <h4 class="rank-title">������������������</h4>
                             <ul>
                                 <li *ngFor="let i of rankingListData; let idx = index">
                                     <div>
                                         <span class="icon" [ngClass]="{'active': idx < 3}">{{idx+1}}</span>
                                         {{i.title}}
                                     </div>
-                                    <span>{{i.total | number: '3.0'}}</span>
+                                    <span>{{i.total | number: '1.0'}}</span>
                                 </li>
                             </ul>
                         </div>
                     </div>
                 </div>
             </nz-tab>
-            <ng-template #nzTabBarExtraContent>
-                <div class="sales-extra-wrap">
-                    <div class="sales-extra">
-                        <a (click)="setDate('today')">������</a>
-                        <a (click)="setDate('week')">������</a>
-                        <a (click)="setDate('month')">������</a>
-                        <a (click)="setDate('year')">������</a>
+
+            <nz-tab>
+                <ng-template #nzTabHeading>������������</ng-template>
+                <div nz-row>
+                    <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="16">
+                        <div class="bar">
+                            <bar height="295" [title]="'������������������������'" [data]="data.alarmData_2" color="orange"></bar>
+                        </div>
                     </div>
-                    <nz-datepicker style="width:120px" class="mr-md" [(ngModel)]="q.start" [nzFormat]="'YYYY-MM-DD'" [nzPlaceHolder]="'������������'"></nz-datepicker>
-                    <nz-datepicker style="width:120px" [(ngModel)]="q.end" [nzFormat]="'YYYY-MM-DD'" [nzPlaceHolder]="'������������'"></nz-datepicker>
+                    <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="8">
+                        <div class="rank-list">
+                            <h4 class="rank-title">������������������</h4>
+                            <ul>
+                                <li *ngFor="let i of rankingListData; let idx = index">
+                                    <div>
+                                        <span class="icon" [ngClass]="{'active': idx < 3}">{{idx+1}}</span>
+                                        {{i.title}}
+                                    </div>
+                                    <span>{{i.total | number: '1.0'}}</span>
+                                </li>
+                            </ul>
+                        </div>
+                    </div>
                 </div>
-            </ng-template>
+            </nz-tab>
+
+            <nz-tab>
+                <ng-template #nzTabHeading>������������</ng-template>
+                <div nz-row>
+                    <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="16">
+                        <div class="bar">
+                            <bar height="295" [title]="'������������������������'" [data]="data.alarmData_3" color="red"></bar>
+                        </div>
+                    </div>
+                    <div nz-col nzXs="24" nzSm="24" nzMd="12" nzLg="8">
+                        <div class="rank-list">
+                            <h4 class="rank-title">������������������</h4>
+                            <ul>
+                                <li *ngFor="let i of rankingListData; let idx = index">
+                                    <div>
+                                        <span class="icon" [ngClass]="{'active': idx < 3}">{{idx+1}}</span>
+                                        {{i.title}}
+                                    </div>
+                                    <span>{{i.total | number: '1.0'}}</span>
+                                </li>
+                            </ul>
+                        </div>
+                    </div>
+                </div>
+            </nz-tab>
         </nz-tabset>
     </ng-template>
 </nz-card>
@@ -261,101 +272,29 @@
         </nz-card>
     </div>
     <div nz-col nzXs="24" nzSm="24" nzMd="24" nzLg="12">
-        <nz-card [nzLoading]="loading" [nzBordered]="false" nzTitle="���������������������" [nzBodyStyle]="{'padding.px': 24}" class="sales-card" style="min-height: 482px;">
+        <nz-card [nzLoading]="loading" [nzBordered]="false" nzTitle="������������������" [nzBodyStyle]="{'padding.px': 24}" class="sales-card" style="min-height: 482px;">
             <ng-template #extra>
                 <div class="sales-card-extra">
-                    <nz-dropdown>
-                        <nz-icon class="icon-group" nz-dropdown nzType="ellipsis"></nz-icon>
-                        <ul nz-menu>
-                            <li nz-menu-item>���������</li>
-                            <li nz-menu-item>���������</li>
-                        </ul>
-                    </nz-dropdown>
                     <div class="sales-type-radio">
                         <nz-radio-group [(ngModel)]="salesType" (ngModelChange)="changeSaleType()" [nzSize]="'large'">
-                            <label nz-radio-button [nzValue]="'all'"><span>������������</span></label>
-                            <label nz-radio-button [nzValue]="'online'"><span>������</span></label>
-                            <label nz-radio-button [nzValue]="'offline'"><span>������</span></label>
+                            <label nz-radio-button [nzValue]="'0'"><span>������</span></label>
+                            <label nz-radio-button [nzValue]="'1'"><span>������</span></label>
+                            <label nz-radio-button [nzValue]="'2'"><span>������</span></label>
+                            <label nz-radio-button [nzValue]="'3'"><span>������</span></label>
                         </nz-radio-group>
                     </div>
                 </div>
             </ng-template>
             <ng-template #body>
-                <h4 class="margin:8px 0 32px 0;">���������</h4>
-                <pie
-                    [hasLegend]="true"
-                    subTitle="���������"
-                    [height]="248"
-                    [lineWidth]="4"
-                    [total]="salesTotal"
-                    [data]="salesPieData"
-                    [valueFormat]="handlePieValueFormat">
-                </pie>
+                <h4 class="margin:8px 0 32px 0;">������������</h4>
+                <pie [hasLegend]="true" subTitle="������������" [height]="248" [lineWidth]="4" [total]="salesTotal" [data]="salesPieData" [valueFormat]="handlePieValueFormat"></pie>
             </ng-template>
         </nz-card>
     </div>
 </div>
-<nz-card [nzLoading]="loading" [nzBordered]="false" [nzBodyStyle]="{'padding': '0 0 32px'}" class="offline-card mt-lg">
-    <ng-template #body>
-        <nz-tabset [(nzSelectedIndex)]="_activeTab" (nzSelectChange)="_tabChange($event)">
-            <nz-tab *ngFor="let tab of data.offlineData; let i = index;">
-                <ng-template #nzTabHeading>
-                    <div nz-row [nzGutter]="8" style="width: 138px; margin: 8px 0">
-                        <div nz-col [nzSpan]="12">
-                            <number-info
-                                [title]="tab.name"
-                                subTitle="���������"
-                                gap="2"
-                                [total]="(tab.cvr * 100) + '%'"
-                                [theme]="i !== _activeTab && 'light'"></number-info>
-                        </div>
-                        <div nz-col [nzSpan]="12" style="padding-top: 36px">
-                            <pie
-                                [animate]="false"
-                                [color]="i !== _activeTab && '#BDE4FF'"
-                                [inner]="0.55"
-                                [tooltip]="false"
-                                [padding]="[0, 0, 0, 0]"
-                                [percent]="tab.cvr * 100"
-                                [height]="64">
-                            </pie>
-                        </div>
-                    </div>
-                </ng-template>
-                <div class="px-lg">
-                    <timeline [data]="tab.chart"
-                              [titleMap]="{ y1: '���������', y2: '������������' }"></timeline>
-                </div>
-            </nz-tab>
-        </nz-tabset>
-    </ng-template>
-</nz-card>
 
 <div nz-row [nzGutter]="24">
     <div nz-col nzXs="24" nzSm="24" nzMd="16">
-        <nz-card nzTitle="������������������" [nzBordered]="false" [nzLoading]="loading" nzNoPadding class="mb-lg project-list">
-            <ng-template #extra>
-                <a (click)="msg.success('to')">������������</a>
-            </ng-template>
-            <div *ngFor="let item of notice" nz-card-grid class="project-grid">
-                <nz-card nzNoPadding [nzBordered]="false" class="mb0">
-                    <nz-card-meta [nzTitle]="noticeTitle" [nzDescription]="item.description">
-                        <ng-template #noticeTitle>
-                            <div class="card-title">
-                                <nz-avatar [nzSrc]="item.logo" [nzSize]="'small'"></nz-avatar>
-                                <a (click)="msg.info('to' + item.href)">{{item.title}}</a>
-                            </div>
-                        </ng-template>
-                    </nz-card-meta>
-                    <div class="project-item">
-                        <a (click)="msg.info('show user: ' + item.member)">{{item.member}}</a>
-                        <span *ngIf="item.updatedAt" class="datetime" title="{{item.updatedAt}}">
-                            {{item.updatedAt | _date: 'fn' }}
-                        </span>
-                    </div>
-                </nz-card>
-            </div>
-        </nz-card>
         <nz-card nzTitle="������" [nzBordered]="false" [nzLoading]="loading" nzNoPadding class="mb-lg active-card">
             <nz-list nzSize="large">
                 <nz-list-item *ngFor="let item of activities" class="activities">
@@ -377,18 +316,10 @@
         </nz-card>
     </div>
     <div nz-col nzXs="24" nzSm="24" nzMd="8">
-        <nz-card nzTitle="������������ / ������������" [nzBordered]="false" nzNoPadding class="mb-lg">
-            <div class="links">
-                <a *ngFor="let item of links" (click)="msg.success(item.title)">{{item.title}}</a>
-                <button nz-button (click)="links.push({title: 'new titel', href: 'href'})" [nzType]="'dashed'" [nzSize]="'small'">
-                    <i class="anticon anticon-plus"></i><span>������</span>
-                </button>
-            </div>
-        </nz-card>
         <nz-card nzTitle="XX ������" [nzBordered]="false" [nzLoading]="loading" class="mb-lg">
             <ng-template #body><radar [data]="radarData" [height]="343" [hasLegend]="true"></radar></ng-template>
         </nz-card>
-        <nz-card nzTitle="������" [nzBordered]="false" [nzBodyStyle]="{'padding-top.px': 12, 'padding-bottom.px': 12 }" class="mb-lg">
+        <nz-card nzTitle="������" [nzBordered]="false" [nzBodyStyle]="{'padding-top.px': 12, 'padding-bottom.px': 12 }" class="mb-lg">
             <div class="members">
                 <div nz-row [nzGutter]="48">
                     <div nz-col [nzSpan]="12" *ngFor="let i of members">
diff --git a/src/app/routes/dashboard/workplace/workplace.component.ts b/src/app/routes/dashboard/workplace/workplace.component.ts
index 7698053..6c5442a 100644
--- a/src/app/routes/dashboard/workplace/workplace.component.ts
+++ b/src/app/routes/dashboard/workplace/workplace.component.ts
@@ -17,97 +17,61 @@
     totalDeviceCount = 0;
     avgDeviceCount: string;
 
-    notice: any[] = [];
     activities: any[] = [];
     radarData: any[] = [];
     loading = true;
 
-    // region: mock data
-    links = [
-        {
-          title: '���������',
-          href: '',
-        },
-        {
-          title: '���������',
-          href: '',
-        },
-        {
-          title: '���������',
-          href: '',
-        },
-        {
-          title: '���������',
-          href: '',
-        },
-        {
-          title: '���������',
-          href: '',
-        },
-        {
-          title: '���������',
-          href: '',
-        },
-    ];
     members = [
         {
           id: 'members-1',
-          title: '���������������',
+          title: '������������',
           logo: 'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png',
           link: '',
         },
         {
           id: 'members-2',
-          title: '���������������',
+          title: '������������',
           logo: 'https://gw.alipayobjects.com/zos/rmsportal/zOsKZmFRdUtvpqCImOVY.png',
           link: '',
         },
         {
           id: 'members-3',
-          title: '������������',
+          title: '���������',
           logo: 'https://gw.alipayobjects.com/zos/rmsportal/dURIMkkrRFpPgTuzkwnB.png',
           link: '',
         },
         {
           id: 'members-4',
-          title: '���������������',
+          title: '���������',
           logo: 'https://gw.alipayobjects.com/zos/rmsportal/sfjbOqnsXXJgNCjCzDBL.png',
           link: '',
-        },
-        {
-          id: 'members-5',
-          title: '������������������',
-          logo: 'https://gw.alipayobjects.com/zos/rmsportal/siCrBXXhmvTQGWPNLBow.png',
-          link: '',
-        },
+        }
       ];
-    // endregion
 
-    ngOnDestroy(): void {
-    }
-
-
-    data: any = {
-        salesData: [],
-        offlineData: []
-    };
+    data: any = {};
 
     q: any = {
         start: null,
         end: null
     };
-    rankingListData: any[] = Array(7).fill({}).map((item, i) => {
-        return {
-            title: `��������� ${i} ������`,
-            total: 323234
-        };
-    });
 
-    constructor(private http: _HttpClient, public msg: NzMessageService,
-                private http2: HttpClient) {}
+    rankingListData: any[] = [
+        {title: `PM 2.5`, total: 230},
+        {title: `PM 10`, total: 175},
+        {title: `������������`, total: 123},
+        {title: `������������`, total: 92},
+        {title: `������`, total: 39},
+        {title: `������`, total: 24},
+        {title: `������������`, total: 8}
+    ];
+
+    constructor(
+        private http: _HttpClient,
+        public msg: NzMessageService,
+        private http2: HttpClient) {
+    }
 
     ngOnInit() {
-
         const today = new Date().getTime();
         const fakeDC = [60, 135, 70, 112, 80, 170, 200, 140, 52, 119, 164, 230];
         for (let i = 0; i < 12; i += 1) {
@@ -121,6 +85,27 @@
         }
         this.avgDeviceCount = (this.totalDeviceCount/12).toFixed(0);
 
+        const alarmData = [];
+        const alarmData_1 = [];
+        const alarmData_2 = [];
+        const alarmData_3 = [];
+        for (let i = 0; i < 12; i += 1) {
+            alarmData.push({ x: `${i + 1}���`, y: Math.floor(Math.random() * 1000) + 500 });
+            alarmData_1.push({ x: `${i + 1}���`, y: Math.floor(Math.random() * 1000) + 100 });
+            alarmData_2.push({ x: `${i + 1}���`, y: Math.floor(Math.random() * 1000) + 200 });
+            alarmData_3.push({ x: `${i + 1}���`, y: Math.floor(Math.random() * 1000) + 300 });
+        }
+
+        const alertData = [];
+        const alertData_1 = [];
+        const alertData_2 = [];
+        const alertData_3 = [];
+        for (let i = 0; i < 7; i += 1) {
+            alertData.push({ x: this.rankingListData[i].title, y: Math.floor(Math.random() * 1000) + 500 });
+            alertData_1.push({ x: this.rankingListData[i].title, y: Math.floor(Math.random() * 1000) + 100 });
+            alertData_2.push({ x: this.rankingListData[i].title, y: Math.floor(Math.random() * 1000) + 200 });
+            alertData_3.push({ x: this.rankingListData[i].title, y: Math.floor(Math.random() * 1000) + 300 });
+        }
 
         const visitData = [];
         const beginDay = new Date().getTime();
@@ -142,106 +127,6 @@
                     "YYYY-MM-DD"
                 ),
                 y: fakeY2[i]
-            });
-        }
-        const salesData = [];
-        for (let i = 0; i < 12; i += 1) {
-            salesData.push({
-                x: `${i + 1}���`,
-                y: Math.floor(Math.random() * 1000) + 200
-            });
-        }
-
-        const salesTypeData = [
-            {
-                x: "������������",
-                y: 4544
-            },
-            {
-                x: "������������",
-                y: 3321
-            },
-            {
-                x: "������������",
-                y: 3113
-            },
-            {
-                x: "������������",
-                y: 2341
-            },
-            {
-                x: "������������",
-                y: 1231
-            },
-            {
-                x: "������",
-                y: 1231
-            }
-        ];
-
-        const salesTypeDataOnline = [
-            {
-                x: "������������",
-                y: 244
-            },
-            {
-                x: "������������",
-                y: 321
-            },
-            {
-                x: "������������",
-                y: 311
-            },
-            {
-                x: "������������",
-                y: 41
-            },
-            {
-                x: "������������",
-                y: 121
-            },
-            {
-                x: '������',
-                y: 111
-            }
-        ];
-
-        const salesTypeDataOffline = [
-            {
-                x: '������������',
-                y: 99
-            },
-            {
-                x: '������������',
-                y: 188
-            },
-            {
-                x: '������������',
-                y: 344
-            },
-            {
-                x: '������������',
-                y: 255
-            },
-            {
-                x: '������',
-                y: 65
-            }
-        ];
-
-        const offlineData = [];
-        for (let i = 0; i < 10; i += 1) {
-            offlineData.push({
-                name: `������${i}`,
-                cvr: Math.ceil(Math.random() * 9) / 10
-            });
-        }
-        const offlineChartData = [];
-        for (let i = 0; i < 20; i += 1) {
-            offlineChartData.push({
-                x: new Date().getTime() + 1000 * 60 * 30 * i,
-                y1: Math.floor(Math.random() * 100) + 10,
-                y2: Math.floor(Math.random() * 100) + 10
             });
         }
 
@@ -302,38 +187,29 @@
             });
         }
         var res = {
+            alarmData: alarmData,
+            alarmData_1: alarmData_1,
+            alarmData_2: alarmData_2,
+            alarmData_3: alarmData_3,
+
+            alertData: alertData,
+            alertData_1: alertData_1,
+            alertData_2: alertData_2,
+            alertData_3: alertData_3,
+
             visitData: visitData,
-            salesData: salesData,
             visitData2: visitData2,
-            salesTypeData: salesTypeData,
-            salesTypeDataOnline: salesTypeDataOnline,
-            salesTypeDataOffline: salesTypeDataOffline,
-            offlineData: offlineData,
-            offlineChartData: offlineChartData,
+
             radarOriginData: radarOriginData,
             radarData: radarData,
             searchData: searchData
         };
 
-        res.offlineData.forEach((item: any) => {
-            item.chart = Object.assign([], res.offlineChartData);
-        });
         this.data = res;
         this.loading = false;
         this.changeSaleType();
 
         this.radarData = res.radarData;
-
-        const titles = [
-            'Alipay',
-            'Angular',
-            'Ant Design',
-            'Ant Design Pro',
-            'Bootstrap',
-            'React',
-            'Vue',
-            'Webpack'
-        ];
 
         const avatars = [
             'https://gw.alipayobjects.com/zos/rmsportal/WdGqmHpayyMjiEhcKoVE.png', // Alipay
@@ -345,70 +221,6 @@
             'https://gw.alipayobjects.com/zos/rmsportal/ComBAopevLwENQdKWiIn.png', // Vue
             'https://gw.alipayobjects.com/zos/rmsportal/nxkuOJlFJuAUhzlMTCEe.png'  // Webpack
         ];
-
-        var notice = [
-            {
-                id: 'xxx1',
-                title: titles[0],
-                logo: avatars[0],
-                description: '������������������������������ ���������������������������������������',
-                updatedAt: new Date(),
-                member: '���������������',
-                href: '',
-                memberLink: '',
-            },
-            {
-                id: 'xxx2',
-                title: titles[1],
-                logo: avatars[1],
-                description: '���������������������������������������������������������������������������',
-                updatedAt: new Date('2017-07-24'),
-                member: '���������������������',
-                href: '',
-                memberLink: '',
-            },
-            {
-                id: 'xxx3',
-                title: titles[2],
-                logo: avatars[2],
-                description: '������������������������������������������������������������������',
-                updatedAt: new Date(),
-                member: '���������������',
-                href: '',
-                memberLink: '',
-            },
-            {
-                id: 'xxx4',
-                title: titles[3],
-                logo: avatars[3],
-                description: '���������������������������������������������������������������������',
-                updatedAt: new Date('2017-07-23'),
-                member: '���������������',
-                href: '',
-                memberLink: '',
-            },
-            {
-                id: 'xxx5',
-                title: titles[4],
-                logo: avatars[4],
-                description: '������������',
-                updatedAt: new Date('2017-07-23'),
-                member: '���������������������',
-                href: '',
-                memberLink: '',
-            },
-            {
-                id: 'xxx6',
-                title: titles[5],
-                logo: avatars[5],
-                description: '������������������������������������������������������',
-                updatedAt: new Date('2017-07-23'),
-                member: '���������������������',
-                href: '',
-                memberLink: '',
-            },
-        ];
-        this.notice = notice;
 
         var activities = [
             {
@@ -509,6 +321,19 @@
                 },
                 template: '��� @{group} ������������ @{project}',
             },
+            {
+                id: 'trend-7',
+                updatedAt: new Date(),
+                user: {
+                    name: '���������',
+                    avatar: avatars[3],
+                },
+                project: {
+                    name: '���������������',
+                    link: 'http://github.com/',
+                },
+                template: '��� @{project} ���������������������',
+            }
         ];
         this.activities = activities.map((item: any) => {
             item.template = item.template.split(/@\{([^{}]*)\}/gi).map((key: string) => {
@@ -517,15 +342,9 @@
             });
             return item;
         });
-
-
-
     }
 
-    setDate(type: any) {
-        const rank = getTimeDistance(type);
-        this.q.start = rank[0];
-        this.q.end = rank[1];
+    ngOnDestroy(): void {
     }
 
     sort(sortName, sortValue) {
@@ -542,22 +361,23 @@
         ];
     }
 
-    salesType = 'all';
+    salesType = '0';
     salesPieData: any;
     salesTotal = 0;
     changeSaleType() {
-        this.salesPieData = this.salesType === 'all' ? this.data.salesTypeData : (
-            this.salesType === 'online' ? this.data.salesTypeDataOnline : this.data.salesTypeDataOffline
-        );
+        if(this.salesType == '0') {
+            this.salesPieData = this.data.alertData;
+        } else if(this.salesType == '1') {
+            this.salesPieData = this.data.alertData_1;
+        } else if(this.salesType == '2') {
+            this.salesPieData = this.data.alertData_2;
+        } 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 yuan(value);
-    }
-
-    _activeTab = 0;
-    _tabChange(value: any) {
-        console.log('tab', this._activeTab, value);
+        return value + "���";
     }
 }

--
Gitblit v1.8.0