From 0e25153037b06851846e80cc745e518ba07bf7af Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Mon, 26 Mar 2018 13:58:16 +0800 Subject: [PATCH] 数据查询和表单模块合并,修改密码用户输入框去除 --- src/app/routes/reports/query/query.component.ts | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/routes/analysis/query/query.component.ts b/src/app/routes/reports/query/query.component.ts similarity index 97% rename from src/app/routes/analysis/query/query.component.ts rename to src/app/routes/reports/query/query.component.ts index fca727c..b113d75 100644 --- a/src/app/routes/analysis/query/query.component.ts +++ b/src/app/routes/reports/query/query.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { _HttpClient } from '@delon/theme'; -import { Sensor, Device, DataCondition, MonitorPoint, Organization, LineChartCriteria, PairData } from '@business/entity/data'; +import { Sensor, Device, DataCondition, MonitorPoint, Organization, LineChartCriteria } from '@business/entity/data'; import { TimeUnits, AreaRange, ResultCode } from '@business/enum/types.enum'; import { SensorsService } from '@business/services/http/sensors.service'; import { PageBean, ResultBean, Grid } from '@business/entity/grid'; @@ -454,7 +454,7 @@ // ������������ this.grid.data = []; this.http.post(environment.SERVER_BASH_URL + '/report/line-chart', lineChartCriteria).subscribe( - (res: ResultBean<{[key: string]: Array<Array<PairData>>}>) => { + (res: ResultBean<{[key: string]: Array<Array<number>>}>) => { if (res.code === 1) { const data = res.data; if (!!data) { @@ -470,13 +470,13 @@ weight = !!weight ? weight : 101; // this.gridSensors.push(sensor); const sensorData = data[key][0].map( - pair => { + value => { if (weight > 100) { // pair.value ���null,������������ - weight = !!pair.value ? weight : weight + 1; + weight = !!value ? weight : weight + 1; } // ���������������������2��� - return !!pair.value ? String(Math.round(pair.value * 100) / 100) : '-'; + return !!value ? String(Math.round(value * 100) / 100) : '-'; } ); this.grid.data.push({sensor: sensor, data: sensorData, weight: weight}); @@ -560,6 +560,7 @@ } // ������������������ ������������ public _chartTitleTemp = ''; + public _tableTitleTemp = ''; public reloadChartTitle(): void { const names = ['������', '������', '������', '������']; switch ( this.dataCondition.areaRange ) { @@ -578,10 +579,14 @@ if ( this.grid.data.length > this.chartSelectedIndex) { names[3] = this.grid.data[this.chartSelectedIndex].sensor.name; } - const title = names.join(' ') + ' ������'; + const title = names.join(' ') + ' ������'; if (title.trim() !== this._chartTitleTemp.trim()) { this._chartTitleTemp = title; } + const tableTile = names.slice(0, -1).join(' ') + ' ������������'; + if (tableTile.trim() !== this._tableTitleTemp.trim()) { + this._tableTitleTemp = tableTile; + } } public switchSensor(index: number): void { this.chartSelectedIndex = index; -- Gitblit v1.8.0