沈斌
2018-07-12 1dfc8bc300a6ae0822514ddf2e1399d4762fa1b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<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>