<ion-header style="background-color: #F3F4F4;">
  <!--<div class="topIcon" (click)="toIndex()">-->
    <!--<i class="vo v-back"></i>-->
  <!--</div>-->
  <!--<div class="topSearch">-->
    <!--<SearchBar [placeholder]="'点击此处进行搜索'" [(ngModel)]="searchText"-->
               <!--(onCancel)="searchText ='';toggleFocus(false);"-->
               <!--[setFocus]="false" (onFocus)="toggleFocus(true)" (onBlur)="toggleFocus(false)"-->
               <!--(onClear)="searchText ='';toggleFocus(false);"></SearchBar>-->
  <!--</div>-->
  <ion-toolbar>
    <ion-button [routerLink]="['/index']" slot="start" size ="small" color="light">Home</ion-button>
    <ion-searchbar></ion-searchbar>
  </ion-toolbar>
  <ion-slides style="width: 100%;height: 125px;" mode="ios"
              [options]="lunbo" #slide (ionSlideTouchEnd)="slideDidChange()">
    <ion-slide class="slideCon" *ngFor="let one of imgs">
      <div class="inBox">
        <img [src]="'../../../assets/lunbo/' + one">
      </div>
    </ion-slide>
  </ion-slides>
</ion-header>

<ion-content color='light'>
  <h1 style="
            font-size: 16px;
            padding-left: 5px;
            border-left: 5px solid #28c9bd;
            line-height: 25px;
            margin-bottom: 5px;">故障统计</h1>
  <div style="margin-left:1%">
  <v-kanban class="home-bar" name="热应激" iconClass="vo v-youxuan" iconColor="#285B90" iconSize="30px"></v-kanban>
  <v-kanban class="home-bar" name="热应激" iconClass="vo v-yujing" iconColor="#D27440" iconSize="30px"></v-kanban>
  <v-kanban class="home-bar" name="故障总数"  iconClass="vo v-guzhang2" iconColor="#FAB139" iconSize="30px"></v-kanban>
  </div>
  <h1 style="
            font-size: 16px;
            padding-left: 5px;
            border-left: 5px solid #28c9bd;
            line-height: 25px;
            margin-bottom: 5px;">牛舍列表</h1>
  <ion-list mode="md" class="listview" insert = "false" line="none" style="width:96%;margin-left: 2%">
    <ion-item *ngFor="let item of items" (click)="toControl(item)" class="ion-item" style="width: 100%; --padding-start: 0px">
      <div class="item">
        <div class="top">
          <i class="vo v-tixing"></i> {{item.name}}
        </div>
        <div class="content">
          <span class="block2" *ngIf="item.temp">温度: &nbsp;&nbsp;{{item.temp}} ℃ &nbsp;&nbsp;</span>
          <span class="block1" *ngIf="item.humi">湿度: &nbsp;&nbsp;{{item.humi}} %  &nbsp;&nbsp;</span>
          <span class="block1" *ngIf="item.thi">热应激等级: &nbsp;&nbsp;{{item.thi}}</span>
        </div>
        <div class="bottom">
          <span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}}    </span>
          <span *ngIf="item.online" class="online">{{item.remoteMode ? '平控' :'现控'}}    </span>
          <span *ngIf="item.online && item.remoteMode && item.wokeMode === 2" class="online">智控    </span>
          <span *ngIf="item.online && item.remoteMode && item.wokeMode === 1" class="online">自控    </span>
          <span *ngIf="item.online && item.remoteMode && item.wokeMode === 0" class="online">手控    </span>
          <!--<div class="block1" *ngIf="item.yewei || item.yewei === 0">池体液位: &nbsp;&nbsp;{{item.yewei}} m</div>-->
          <!--<div class="block2" *ngIf="item.temp || item.temp === 0">液体温度: &nbsp;&nbsp;{{item.temp}} ℃</div>-->
          <!--<div class="block2">运行状态: &nbsp;&nbsp;{{item.state ? '工作中' : '未运行'}} </div>-->
          <span class="right">{{item.time | date: 'yyyy-MM-dd HH:mm:ss'}}</span>
        </div>
      </div>
    </ion-item>
  </ion-list>
</ion-content>
