| | |
| | | public toggleChartCollapse() { |
| | | // 打开的时候 |
| | | if (this.isChartCollapse && !!this.echartsIntance) { |
| | | this.reloadChart(); |
| | | this.switchSensor(this.chartSelectedIndex); |
| | | // this.chartLoading = false; |
| | | } |
| | |
| | | ); |
| | | } |
| | | public setTimeUnit(val: {label: string, value: TimeUnits} ) { |
| | | this.tableWidth = this.tableWidthOption[val.value]; |
| | | switch (val.value) { |
| | | // YYYY-MM-DD HH:mm:ss |
| | | case TimeUnits.MONTH: |
| | |
| | | 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; |
| | |
| | | break; |
| | | } |
| | | names[2] = moment(this.actualTime).format(this._timeType.dateFormat); |
| | | if ( this.grid.data.length > this.chartSelectedIndex) { |
| | | names[3] = this.grid.data[this.chartSelectedIndex].sensor.name; |
| | | } |
| | | return names.join(' ') + ' 报表'; |
| | | } |
| | | public switchSensor(index: number): void { |