fengxiang
2018-07-05 9200567a17b5a567ed14529fa0208618b4867938
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
44
45
46
47
48
49
50
51
52
53
54
55
<div class="modal-header">
    <div class="modal-title">配置传感器</div>
</div>
<nz-row nzGutter="0">
    <nz-col nzSpan="24" style="height: 520px;">
        <nz-table #nzTable [nzDataSource]="gridDataImage" [nzPageSize]="8" [nzLoading]="grid.loading" [nzShowTotal]="true">
            <thead nz-thead>
                <tr>
                    <th nz-th>
                    </th>
                    <th nz-th *ngFor="let col of grid.columns;let i = index;" [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
                        <span>{{ col.text }}</span>
                        <ng-container *ngIf="i === 0">
                            <span>
                                {{ '('+selectedCount+'/'+grid.data.length+')' }}
                            </span>
                            <nz-table-sort [(nzValue)]="col.sort" (nzValueChange)="sort(col.name,$event)"></nz-table-sort>
                            <nz-dropdown [nzTrigger]="'click'" [nzClickHide]="false">
                                <i class="anticon anticon-search ant-table-filter-icon" nz-dropdown></i>
                                <div nz-dropdown-custom class="custom-filter-dropdown">
                                    <nz-input [nzPlaceHolder]="'输入名称'" [ngModel]="searchValue" (ngModelChange)="setSearchValue($event)"></nz-input>
                                </div>
                            </nz-dropdown>
                        </ng-container>
                    </th>
                </tr>
            </thead>
            <tbody nz-tbody>
                <ng-container *ngFor="let row of nzTable.data">
                <tr nz-tbody-tr>
                    <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>
                </tr>
              </ng-container>
            </tbody>
        </nz-table>
    </nz-col>
</nz-row>
<div class="modal-footer">
    <button nz-button type="button" (click)="close()">关闭</button>
    <button nz-button [nzType]="'primary'" (click)="save($event,null,null)" [nzLoading]="isSaving">
        <span>
            保存
            <span *ngIf="isSaving">中</span>
        </span>
    </button>
</div>