<form nz-form>
|
<ng-container *ngIf="!!osuList.length; else elseTemplate">
|
<nz-row nzGutter="8">
|
<ng-container *ngFor="let osu of osuList,index as i">
|
|
<div nz-form-label nz-col [nzSm]="3">
|
<label>{{osu.sensor.description}}</label>
|
</div>
|
<div nz-form-control nz-col [nzSm]="3">
|
<nz-select [nzMode]="'default'" nzAllowClear
|
nzPlaceHolder="{{osu.sensor.unit}}(默认单位)" [(ngModel)]="osu.sensorUnitId" name="sensorUnit_{{i}}">
|
<nz-option
|
*ngFor="let option of sensorUnitMap[osu.sensor.id]"
|
[nzLabel]="option.name"
|
[nzValue]="option.id">
|
</nz-option>
|
</nz-select>
|
</div>
|
</ng-container>
|
</nz-row>
|
</ng-container>
|
<ng-template #elseTemplate>
|
<div nz-form-item nz-row>
|
<div nz-form-label nz-col [nzSm]="24" style="text-align: center;">
|
<h2>该组织下没有设备或者没有可选单位</h2>
|
</div>
|
</div>
|
</ng-template>
|
|
|
|
</form>
|
<footer-toolbar>
|
<label>组织名称:</label>
|
<span [ngStyle]="{'font-size': '16px','font-weight': 'bold','margin-right':'30px'}">{{ organization.name }}</span>
|
<button nz-button type="button" (click)="backToList()">返回</button>
|
<button nz-button [nzType]="'primary'" (click)="save()" [nzLoading]="isSaving">
|
<span>
|
保存
|
<span *ngIf="isSaving">中</span>
|
</span>
|
</button>
|
</footer-toolbar>
|