<div nz-row class="breadcrumbs">
    <div nz-col nzSpan="6">
        <nz-breadcrumb class="padding-8-0">
            <nz-breadcrumb-item>
                首页
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                <a>环控</a>
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                <a (click)="getwebList()">设备及测点</a>
            </nz-breadcrumb-item>
        </nz-breadcrumb>
    </div>
</div>

<div nz-row class="search-form tag-form tag-warn">
    <div nz-col nzSpan="8" class="padding-5-0">
        <span>设备及测点数：{{totalNum}}</span>
        <span>设备状态：
      <span style="margin-right: 8px"> <nz-tag class="tag-green" [nzColor]="color.green"></nz-tag>
          <i *ngIf="!green && green !=0" class="anticon anticon-spin" style="font-size: 15px;"></i>
          在线
      </span>
      <span> <nz-tag [nzColor]="color.red"></nz-tag>
            <i *ngIf="!red && red!=0" class="anticon anticon-spin" style="font-size: 15px;"></i>
          断开
      </span>
    </span>
    </div>
</div>

<nz-table #nzTable [nzData]="dataSet" [nzLoading]="loading" [nzFrontPagination]="false" [nzShowPagination]="true"
          [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
          (nzPageIndexChange)="change($event)">
    <thead>
    <tr>
        <th>编号</th>
        <th>唯一ID编号</th>
        <th>设备名称</th>
        <th>父节点名称</th>
        <th>状态</th>
        <th>设备地址及端口号</th>
        <th>设备类型</th>
    </tr>
    </thead>
    <tbody>
    <ng-container *ngFor="let item of nzTable.data">
        <tr>
            <td class="default">
                <span>{{item.id}}</span>
            </td>
            <td class="default">
                <span>{{item.wyid}}</span>
            </td>
            <td class="cursor main-color">
                <span>{{item.name}}</span>
            </td>
            <td class="default">
                <span>{{item.parentName}}</span>
            </td>
            <td class="round-tag tag-form">
                <ng-container *ngIf="item.netStatus == 1">
                    <nz-tag class="tag-green" [nzColor]="color.green"></nz-tag>
                </ng-container>
                <ng-container *ngIf="item.netStatus == 0">
                    <nz-tag class="tag-red" [nzColor]="color.red"></nz-tag>
                </ng-container>
            </td>
            <td class="cursor">
                <span *ngIf="item.ip">{{item.ip}}</span>
                <span *ngIf="!item.ip">-</span>
            </td>
            <td class="cursor main-color">
                <span *ngFor="let list of subtype">
                    <span *ngIf="item.subtype == list.num">{{list.type}}</span>
                </span>
            </td>
        </tr>
    </ng-container>
    </tbody>
</nz-table>


