| | |
| | | <pro-header [title]="'报表示例'"></pro-header> |
| | | <pro-header [title]="'报表展示'"></pro-header> |
| | | <nz-card [nzBordered]="false"> |
| | | <form nz-form (ngSubmit)="reportQuery()" [nzLayout]="'inline'"> |
| | | <div nz-row [nzGutter]="24"> |
| | | <div nz-col [nzSpan]="6" class="mb-md"> |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label> 项 目</label> |
| | | <label> 项 目</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-select [(ngModel)]="query.sensorKey" name="sensorKey" [nzSize]="'large'" [nzPlaceHolder]="'请选择'" nzAllowClear> |
| | | <nz-option *ngFor="let option of sensorOptions" [nzLabel]="option.name" [nzValue]="option.sensorKey" ></nz-option> |
| | | <!-- <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> --> |
| | | <nz-popover [nzPlacement]="'bottomLeft'" [nzTrigger]="'hover'"> |
| | | <nz-input [nzType]="'input'" nz-popover [ngModel]="sensorNames" name="sensorKeys" [nzReadonly]="true" [nzPlaceHolder]="'请选择 项目'"> |
| | | <ng-template #suffix> |
| | | <i class="anticon anticon-down ant-cascader-picker-arrow "></i> |
| | | </ng-template> |
| | | </nz-input> |
| | | <ng-template #nzTemplate> |
| | | <div [ngStyle]="{'width': '240px', 'height': '240px', 'overflow-y' :'auto'}"> |
| | | <nz-tree [nzNodes]="sensorOptions" (nzActivate)="onTreeClickSelect($event)" (nzDeactivate)="onTreeClickSelect($event)" [nzCheckable]="true" (nzCheck)="onSensorSelect($event)"></nz-tree> |
| | | </div> |
| | | </ng-template> |
| | | </nz-popover> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label nz-form-item-required>类 型</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-select [(ngModel)]="timeType" name="timeType" [nzSize]="'large'" [nzPlaceHolder]="'请选择'"> |
| | | <nz-option *ngFor="let option of typeOptions" [nzLabel]="option.label" [nzValue]="option" ></nz-option> |
| | | </nz-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div nz-col [nzSpan]="6" class="mb-md"> |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label nz-form-item-required>类型</label> |
| | | <label nz-form-item-required>图型</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-select [(ngModel)]="query.type" name="type" [nzSize]="'large'" [nzPlaceHolder]="'请选择'" (ngModelChange)="typeChange($event)"> |
| | | <nz-option *ngFor="let option of typeOptions" [nzLabel]="option.label" [nzValue]="option.value" ></nz-option> |
| | | <nz-select [(ngModel)]="query.reportType" name="reportType" [nzSize]="'large'" [nzPlaceHolder]="'请选择'"> |
| | | <nz-option *ngFor="let option of reportOptions" [nzLabel]="option.label" [nzValue]="option.value" ></nz-option> |
| | | </nz-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div nz-col [nzSpan]="6" class="mb-md" *ngIf="items.length!=5"> |
| | | <div nz-col [nzSpan]="5" class="mb-md" *ngIf="items.length < 2"> |
| | | <button nz-button type="button" [nzType]="'primary'" [nzSize]="'large'" (click)="addItem()"> |
| | | <!-- <i class="anticon anticon-plus"></i> --> |
| | | <i class="anticon anticon-plus-circle-o"></i> |
| | |
| | | </div> |
| | | |
| | | <div nz-row [nzGutter]="24" *ngFor="let item of items;let i = index"> |
| | | <div nz-col [nzSpan]="6" class="mb-md"> |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label nz-form-item-required>监测点</label> |
| | | <label nz-form-item-required>省市区</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-select [(ngModel)]="item.monitorPoint" name="monitorPoint{{item.id}}" nzAllowClear [nzPlaceHolder]="'请输入'" [nzFilter]="false" [nzSize]="'large'" |
| | | (nzSearchChange)="searchChange($event,i)" [nzNotFoundContent]="'无法找到'" (ngModelChange)="monitorPointChange($event,i)" nzShowSearch> |
| | | <nz-option *ngFor="let option of monitorPointOptions" [nzLabel]="option['name']" [nzValue]="option['id']"> </nz-option> |
| | | <nz-cascader (nzLoad)="areaLazyLoad($event,i)" [nzPlaceHolder]="'请选择 省/市/区'" [nzAllowClear]="false" [nzChangeOnSelect]="true" (nzSelect)="regionChange($event,i)"> |
| | | </nz-cascader> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label>监测点</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-select [(ngModel)]="item.monitorPoint" name="monitorPoint{{item.id}}" [nzPlaceHolder]="'请选择 监测点'" [nzSize]="'large'" |
| | | [nzNotFoundContent]="'无法找到'" (ngModelChange)="monitorPointChange($event,i)" nzShowSearch nzAllowClear> |
| | | <nz-option *ngFor="let option of item.monitorPointOptions" [nzLabel]="option['name']" [nzValue]="option"> </nz-option> |
| | | </nz-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div nz-col [nzSpan]="6" class="mb-md"> |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label> 设备</label> |
| | | <label> 设 备</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-select [(ngModel)]="item.mac" name="mac{{item.id}}" [nzSize]="'large'" nzAllowClear [nzPlaceHolder]="'请选择'" (ngModelChange)="deviceChange($event,i)"> |
| | | <nz-option *ngFor="let option of deviceOptions" [nzLabel]="option.name" [nzValue]="option.mac" ></nz-option> |
| | | <nz-select [(ngModel)]="item.device" name="mac{{item.id}}" [nzSize]="'large'" [nzPlaceHolder]="'请选择 设备'" [nzNotFoundContent]="'无法找到'" nzShowSearch nzAllowClear> |
| | | <nz-option *ngFor="let option of item.deviceOptions" [nzLabel]="option.name" [nzValue]="option" ></nz-option> |
| | | </nz-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div nz-col [nzSpan]="6" class="mb-md"> |
| | | <div nz-col [nzSpan]="5" class="mb-md"> |
| | | <div nz-form-item class="d-flex"> |
| | | <div nz-form-label> |
| | | <label nz-form-item-required>时间</label> |
| | | </div> |
| | | <div nz-form-control class="flex-1"> |
| | | <nz-datepicker style="width: 100%;" value="" [(ngModel)]="item.time" name="time{{item.id}}" id="{{item.time}}" [nzPlaceHolder]="'请选择'" [nzFormat]="time.format" [nzMode]="time.mode" [nzSize]="'large'" nzShowTime [nzDisabledDate]="_disabledDate"></nz-datepicker> |
| | | <nz-datepicker style="width: 100%;" [(ngModel)]="item.time" name="time{{item.id}}" [nzPlaceHolder]="'请选择 时间'" [nzFormat]="timeType.format" [nzDisabledDate]="_disabledDate" |
| | | [nzMode]="timeType.value=='hour'||timeType.value=='day'?'day':'month'" [nzShowTime]="timeType.value=='hour'?true:false" [nzSize]="'large'"></nz-datepicker> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div nz-col [nzSpan]="6" class="mb-md" *ngIf="items.length!=1"> |
| | | <button nz-button type="button" [nzType]="'danger'" [nzSize]="'large'" (click)="items.splice(i, 1)" nzGhost> |
| | | <div nz-col [nzSpan]="4" class="mb-md" *ngIf="items.length > 1"> |
| | | <button nz-button type="button" [nzType]="'danger'" [nzSize]="'large'" (click)="items.splice(i, 1)"> |
| | | <i class="anticon anticon-minus-circle-o dynamic-delete-button"></i> |
| | | <span>删除查询条目</span> |
| | | </button> |
| | |
| | | |
| | | <div nz-row [nzGutter]="24"> |
| | | <div nz-col [nzSpan]="6" class="mb-md"> |
| | | <button nz-button type="submit" [nzType]="'primary'" [nzSize]="'large'">查询</button> |
| | | <button nz-button type="reset" [nzSize]="'large'" class="mx-sm">重置</button> |
| | | <button nz-button type="submit" [nzType]="'primary'" [nzSize]="'large'"> |
| | | <a target="_blank" [routerLink]="['/report']" (click)="reportQuery()">查询</a> |
| | | </button> |
| | | <!-- <button nz-button type="reset" [nzSize]="'large'" class="mx-sm" (click)="load()">重置</button> --> |
| | | </div> |
| | | </div> |
| | | </form> |