fengxiang
2018-03-23 ffa0c63b06be82359b92004324e4d66949fe890a
报表查看 部分bug修改
2 files modified
8 ■■■■ changed files
src/app/routes/analysis/query/query.component.html 2 ●●● patch | view | raw | blame | history
src/app/routes/analysis/query/query.component.ts 6 ●●●● patch | view | raw | blame | history
src/app/routes/analysis/query/query.component.html
@@ -142,7 +142,7 @@
                <ng-template #nzFixedHeader>
                <thead nz-thead>
                    <tr>
                        <th nz-th [nzWidth]="'140px'" [ngStyle]="{'position': 'relative','text-align': 'center', 'left':sensorNameScrollLeft}">
                        <th nz-th [nzWidth]="'160px'" [ngStyle]="{'position': 'relative','text-align': 'center', 'left':sensorNameScrollLeft}">
                            <span>监测项目</span>
                        </th>
                        <th nz-th [nzWidth]="'80px'" *ngFor="let col of grid.columns" [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
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;
         }        
@@ -321,7 +322,6 @@
        );
    }
    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:
@@ -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);
        if ( this.grid.data.length > this.chartSelectedIndex) {
        names[3] = this.grid.data[this.chartSelectedIndex].sensor.name;
        }
        return names.join('  ') + '  报表';
    }
    public switchSensor(index: number): void {