From ffa0c63b06be82359b92004324e4d66949fe890a Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Fri, 23 Mar 2018 15:25:11 +0800 Subject: [PATCH] 报表查看 部分bug修改 --- src/app/routes/analysis/query/query.component.ts | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/routes/analysis/query/query.component.ts b/src/app/routes/analysis/query/query.component.ts index 3f41f21..3d63222 100644 --- a/src/app/routes/analysis/query/query.component.ts +++ b/src/app/routes/analysis/query/query.component.ts @@ -79,6 +79,7 @@ public toggleChartCollapse() { // ��������������� if (this.isChartCollapse && !!this.echartsIntance) { + this.reloadChart(); this.switchSensor(this.chartSelectedIndex); // this.chartLoading = false; } @@ -320,8 +321,7 @@ } ); } - public setTimeUnit(val: {label: string, value: TimeUnits} ) { - this.tableWidth = this.tableWidthOption[val.value]; + public setTimeUnit(val: {label: string, value: TimeUnits} ) { switch (val.value) { // YYYY-MM-DD HH:mm:ss case TimeUnits.MONTH: @@ -387,6 +387,8 @@ const end: Date = this.getPeriodDate(this.actualTime , 'end'); this.dataCondition['actualTime'] = null; this.dataCondition['timeUnits'] = this.timeUnit.value; + // ��������������������������������� + this.tableWidth = this.tableWidthOption[this.timeUnit.value]; // ��������������� const mptValue: number = !!this._monitorPoint ? this._monitorPoint.id : null; const devValue: number = !!this._device ? this._device.id : null; @@ -563,7 +565,9 @@ break; } names[2] = moment(this.actualTime).format(this._timeType.dateFormat); - names[3] = this.grid.data[this.chartSelectedIndex].sensor.name; + if ( this.grid.data.length > this.chartSelectedIndex) { + names[3] = this.grid.data[this.chartSelectedIndex].sensor.name; + } return names.join(' ') + ' ������'; } public switchSensor(index: number): void { -- Gitblit v1.8.0