From 05b767cc5fbe3cf21b2853212bafe426803f02f2 Mon Sep 17 00:00:00 2001
From: xufenglei <xufenglei>
Date: Fri, 27 Jul 2018 15:40:39 +0800
Subject: [PATCH] 优化 查询速度
---
src/app/routes/home-page/home-page/home-page.component.html | 156 +++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 143 insertions(+), 13 deletions(-)
diff --git a/src/app/routes/home-page/home-page/home-page.component.html b/src/app/routes/home-page/home-page/home-page.component.html
index 2b8d1c7..a503f58 100644
--- a/src/app/routes/home-page/home-page/home-page.component.html
+++ b/src/app/routes/home-page/home-page/home-page.component.html
@@ -37,17 +37,17 @@
</div>
<div nz-row [nzGutter]="24" class="pt-lg">
<div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="8">
- <chart-card [title]="'API������������'" total="216���" contentHeight="46px">
+ <chart-card [title]="'AQI������������'" total="112���" contentHeight="46px">
<mini-progress height="46" percent="60" target="60" strokeWidth="8" color="#13C2C2"></mini-progress>
</chart-card>
</div>
<div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="8">
- <chart-card [title]="'PM2.5������������'" total="158���" contentHeight="46px">
+ <chart-card [title]="'PM2.5������������'" total="148���" contentHeight="46px">
<mini-progress height="46" percent="50" target="50" strokeWidth="8" color="#108ee9"></mini-progress>
</chart-card>
</div>
<div nz-col nzXs="24" nzSm="12" nzMd="12" nzLg="8">
- <chart-card [title]="'PM10������������'" total="112���" contentHeight="46px">
+ <chart-card [title]="'PM10������������'" total="156���" contentHeight="46px">
<mini-progress height="46" percent="40" target="40" strokeWidth="8" color="#00a854"></mini-progress>
</chart-card>
</div>
@@ -96,14 +96,144 @@
</div>
</div>
<div nz-row [nzGutter]="24" class="pt-lg">
- <div nz-col nzXs="24" nzMd="12">
- <nz-card [nzBordered]="false">
- <!-- <div echarts style="margin-top: 12px;" [options]="chartOption" [loading]="aqiChartLoading" class="line-chart" (chartInit)="onApiChartInit($event)"></div> -->
- </nz-card>
- </div>
- <div nz-col nzXs="24" nzMd="12">
- <nz-card [nzBordered]="false">
- 22222222222
- </nz-card>
- </div>
+ <div nz-col style="display: block;" nzXs="24" nzMd="24">
+ <nz-card [nzBordered]="false">
+ <ng-template #title>
+ ������������������
+ <nz-dropdown>
+ <a class="ant-dropdown-link" nz-dropdown>
+ PM2.5 <i class="anticon anticon-down"></i>
+ </a>
+ <ul nz-menu>
+ <li nz-menu-item>
+ PM10
+ </li>
+ <li nz-menu-item>
+ ������������
+ </li>
+ <li nz-menu-item>
+ ������������
+ </li>
+ <li nz-menu-item>
+ ������������
+ </li>
+ <li nz-menu-item>
+ ������
+ </li>
+ </ul>
+ </nz-dropdown>
+ </ng-template>
+ <div echarts style="margin-top: 12px;" class="line-chart" [options]="aqiChartOption" [loading]="aqiChartLoading" (chartInit)="onApiChartInit($event)"></div>
+ </nz-card>
+ </div>
</div>
+ <div nz-row [nzGutter]="24" class="pt-lg">
+ <div nz-col style="display: block;" nzXs="24" nzMd="24">
+ <nz-card [nzBordered]="false">
+ <ng-template #title>
+ ������������
+ <nz-dropdown>
+ <a class="ant-dropdown-link" nz-dropdown>
+ ������<i class="anticon anticon-down"></i>
+ </a>
+ <ul nz-menu>
+ <li nz-menu-item>
+ ������
+ </li>
+ <li nz-menu-item>
+ ������
+ </li>
+ <li nz-menu-item>
+ ������
+ </li>
+ <li nz-menu-item>
+ ������
+ </li>
+ </ul>
+ </nz-dropdown>
+ </ng-template>
+ <div echarts style="margin-top: 12px;" class="line-chart" [options]="meteChartOption" [loading]="meteChartLoading" (chartInit)="onMeteChartInit($event)"></div>
+ </nz-card>
+ </div>
+ </div>
+ <div nz-row [nzGutter]="24">
+ <div nz-col nzXs="24" nzSm="24" nzMd="24" nzLg="12">
+ <nz-card [nzLoading]="loading" [nzBordered]="false" nzTitle="������������������">
+ <ng-template #extra>
+ <nz-dropdown>
+ <nz-dropdown>
+ <a class="ant-dropdown-link" nz-dropdown>
+ PM2.5 <i class="anticon anticon-down"></i>
+ </a>
+ <ul nz-menu>
+ <li nz-menu-item>
+ PM10
+ </li>
+ <li nz-menu-item>
+ ������������
+ </li>
+ <li nz-menu-item>
+ ������������
+ </li>
+ <li nz-menu-item>
+ ������������
+ </li>
+ <li nz-menu-item>
+ ������
+ </li>
+ </ul>
+ </nz-dropdown>
+ </nz-dropdown>
+ </ng-template>
+ <ng-template #body>
+ <nz-table #keyTable [nzDataSource]="data.searchData" [nzPageSize]="5" nzSize="small">
+ <thead nz-thead>
+ <tr>
+ <th nz-th><span>������</span></th>
+ <th nz-th><span>������������������</span></th>
+ <th nz-th class="text-right">
+ <span>������������������</span>
+ <nz-table-sort (nzValueChange)="sort('count',$event)"></nz-table-sort>
+ </th>
+ </tr>
+ </thead>
+ <tbody nz-tbody>
+ <tr nz-tbody-tr *ngFor="let i of keyTable.data">
+ <td nz-td>{{i.index}}</td>
+ <td nz-td><a (click)="msg.success(i.keyword)">{{i.keyword}}</a></td>
+ <td nz-td class="text-right">{{i.count}}</td>
+ </tr>
+ </tbody>
+ </nz-table>
+ </ng-template>
+ </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;">
+ <ng-template #extra>
+ <div class="sales-card-extra">
+ <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]="'online2'"><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>
+ </ng-template>
+ </nz-card>
+ </div>
+ </div>
--
Gitblit v1.8.0