xufenglei
2018-03-29 7d4045bb727ac6e86939569258cbce1bd2adda58
报表优化
4 files modified
12 ■■■■ changed files
src/app/routes/reports/demo/demo.component.html 2 ●●● patch | view | raw | blame | history
src/app/routes/reports/demo/demo.component.ts 4 ●●●● patch | view | raw | blame | history
src/app/routes/reports/excel/excel.component.html 2 ●●● patch | view | raw | blame | history
src/app/routes/reports/excel/excel.component.ts 4 ●●●● patch | view | raw | blame | history
src/app/routes/reports/demo/demo.component.html
@@ -8,7 +8,7 @@
                        <label>&nbsp;&nbsp;&nbsp;项&nbsp;&nbsp;&nbsp;&nbsp;目</label>
                    </div>
                    <div nz-form-control class="flex-1">
                        <nz-select [nzMode]="'multiple'" [(ngModel)]="query.sensorKey" name="sensorKey" [nzSize]="'large'" [nzPlaceHolder]="'请选择'">
                        <nz-select [nzMode]="'multiple'" [(ngModel)]="query.sensorKeys" name="sensorKeys" [nzSize]="'large'" [nzPlaceHolder]="'请选择'">
                            <nz-option *ngFor="let option of sensorOptions" [nzLabel]="option.name" [nzValue]="option.sensorKey + '-' + option.name + '-' + option.unit"></nz-option>
                        </nz-select>
                    </div>
src/app/routes/reports/demo/demo.component.ts
@@ -131,8 +131,8 @@
      }
    }
    if (validate && this.timeType && query.reportType) {
      if (query.sensorKey && query.sensorKey.length > 0) {
        query.sensors = JSON.stringify(query.sensorKey);
      if (query.sensorKeys && query.sensorKeys.length > 0) {
        query.sensors = JSON.stringify(query.sensorKeys);
      }
      query.items = JSON.stringify(queryItems);
      query.type = this.timeType.value;
src/app/routes/reports/excel/excel.component.html
@@ -8,7 +8,7 @@
                        <label>&nbsp;&nbsp;项目</label>
                    </div>
                    <div nz-form-control class="flex-1">
                        <nz-select [(ngModel)]="query.sensorKey" name="sensorKey" [nzSize]="'large'" [nzPlaceHolder]="'请选择'" [nzMode]="'multiple'">
                        <nz-select [(ngModel)]="query.sensorKeys" name="sensorKeys" [nzSize]="'large'" [nzPlaceHolder]="'请选择'" [nzMode]="'multiple'">
                            <nz-option *ngFor="let option of sensorOptions" [nzLabel]="option.name" [nzValue]="option.sensorKey + '-' + option.name + '-' + option.unit" ></nz-option>
                        </nz-select>
                    </div>
src/app/routes/reports/excel/excel.component.ts
@@ -80,8 +80,8 @@
      if (query.timeb) {
        query.timeb = this.dateSrv.date_format(query.timeb, this.timeType.format);
      }
      if (query.sensorKey && query.sensorKey.length > 0) {
        query.sensors = JSON.stringify(query.sensorKey);
      if (query.sensorKeys && query.sensorKeys.length > 0) {
        query.sensors = JSON.stringify(query.sensorKeys);
      }
      query.type = this.timeType.value;
      let url = environment.SERVER_BASH_URL + 'report/excel?';