| | |
| | | <p> |
| | | monitor-point works! |
| | | </p> |
| | | <pro-header [title]="grid.title"></pro-header> |
| | | <nz-card [nzBordered]="false"> |
| | | <div nz-row class="mb-sm"> |
| | | <div nz-col [nzSpan]="6"> |
| | | <button nz-button (click)="addOrModify($event)" [nzType]="'primary'" [nzSize]="'large'"> |
| | | <i class="anticon anticon-plus"></i><span>新建</span> |
| | | </button> |
| | | <ng-container *ngIf="grid.selectedIndexs.length > 0"> |
| | | <button nz-button [nzSize]="'large'" (click)="deleteSelected()">批量删除</button> |
| | | </ng-container> |
| | | </div> |
| | | <div nz-col style="text-align:right;padding: 5px 10px;" [nzSm]="6" [nzXs]="24"> |
| | | <label>组织:</label> |
| | | </div> |
| | | <div nz-col [nzSpan]="6"> |
| | | <nz-select style="width: 90%;" [(ngModel)]="queryMap.organizationId" (ngModelChange)="setOrganizationId($event)" [nzPlaceHolder]="'选择 组织(输入名称搜索)'" |
| | | nzAllowClear [nzFilter]="false" nzShowSearch (nzSearchChange)="orgSelectChange($event)" [nzNotFoundContent]="'无法找到'" > |
| | | <nz-option *ngFor="let option of orgOptions" [nzLabel]="option.name" [nzValue]="option.id" [nzDisabled]="option.disabled"> |
| | | </nz-option> |
| | | </nz-select> |
| | | </div> |
| | | <div nz-col [nzSpan]="6"> |
| | | <nz-input [(ngModel)]="queryMap.mpointName" name="" [nzPlaceHolder]="'请输入监控站名称'" |
| | | (keyup)="queryTextChanged($event)" (change)="queryTextChanged($event)" ></nz-input> |
| | | </div> |
| | | </div> |
| | | <div class="mb-md"> |
| | | <nz-alert *ngIf="grid.selectedIndexs.length > 0" [nzType]="'info'" [nzShowIcon]="true"> |
| | | <span alert-body> |
| | | 已选择<strong class="text-primary">{{grid.selectedIndexs.length}}</strong>项 |
| | | </span> |
| | | </nz-alert> |
| | | </div> |
| | | <nz-table #nzTable |
| | | [nzAjaxData]="grid.data" |
| | | [nzTotal]="grid.total" |
| | | [(nzPageIndex)]="grid.pageIndex" |
| | | [(nzPageSize)]="grid.pageSize" |
| | | [nzLoading]="grid.loading" |
| | | [nzShowTotal]="true" |
| | | (nzPageIndexChange)="load()"> |
| | | <thead nz-thead> |
| | | <tr> |
| | | <th nz-th [nzCheckbox]="true"> |
| | | <label nz-checkbox [(ngModel)]="grid.allChecked" [nzIndeterminate]="grid.indeterminate" (ngModelChange)="grid.checkAll($event)"></label> |
| | | </th> |
| | | <th nz-th *ngFor="let col of grid.columns" |
| | | [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}" > |
| | | <span>{{ col.text }}</span> |
| | | <nz-table-sort *ngIf="col.isSort" [(nzValue)]="col.sort" (nzValueChange)="sort(col.name,$event)"></nz-table-sort> |
| | | </th> |
| | | <th nz-th><span>操作</span></th> |
| | | </tr> |
| | | </thead> |
| | | <tbody nz-tbody> |
| | | <tr nz-tbody-tr *ngFor="let row of nzTable.data"> |
| | | <td nz-td [nzCheckbox]="true"> |
| | | <label nz-checkbox [(ngModel)]="row.checked" (ngModelChange)="grid.refreshStatus($event)"></label> |
| | | </td> |
| | | <td nz-td *ngFor="let col of grid.columns" |
| | | [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}"> |
| | | <span [ngSwitch]="col.type"> |
| | | <!-- 要使用管道,无法自动生成 --> |
| | | <span *ngSwitchDefault> {{ row[col.name]|tyepHandle:col:row }} </span> |
| | | <!-- 要使用管道,无法自动生成 --> |
| | | </span> |
| | | </td> |
| | | <td nz-td> |
| | | <a (click)="addOrModify(row)">编辑</a> |
| | | <span nz-table-divider></span> |
| | | <nz-popconfirm [nzTitle]="'确定要删除该'+grid.title+'吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="delete(row.id)" > |
| | | <a nz-popconfirm>删除</a> |
| | | </nz-popconfirm> |
| | | <span nz-table-divider></span> |
| | | <a (click)="configCoord(row)">配置坐标</a> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </nz-table> |
| | | </nz-card> |
| | | |
| | | |