fengxiang
2018-07-06 309d1f9d649daa08bb9b068af014749f6d4a5bce
src/app/routes/devices/version/version.component.html
@@ -1,7 +1,7 @@
<pro-header [title]="grid.title"></pro-header>
<nz-card [nzBordered]="false">
       <div class="mb-md">
                <button nz-button (click)="addOrModify()" [nzType]="'primary'" [nzSize]="'large'">
                <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"> &nbsp;
@@ -22,10 +22,9 @@
              [nzTotal]="grid.total"
              [(nzPageIndex)]="grid.pageIndex"
              [(nzPageSize)]="grid.pageSize"
              [nzLoading]="versionService.loading"
              [nzLoading]="grid.loading"
              [nzShowTotal]="true"
              (nzPageIndexChange)="load()"
              (nzDataChange)="dataChange($event)">
              (nzPageIndexChange)="load()">
              <thead nz-thead>
                  <tr>
                    <th nz-th [nzCheckbox]="true">
@@ -34,6 +33,7 @@
                    <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>
@@ -47,16 +47,18 @@
                    [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
                        <span [ngSwitch]="col.type">
                             <!-- 要使用管道,无法自动生成 -->
                            <span *ngSwitchDefault> {{ row[col.name]|tyepHandle:col }} </span>
                            <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]="'确定要删除该用户吗?'" [nzOkText]="'Yes'" [nzCancelText]="'No'" (nzOnConfirm)="delete(row.id)" >
                              <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)="configSensor(row)">配置传感器</a>
                     </td>
                </tr>
              </tbody>