<ion-header>
    <ion-toolbar color="secondary">
        <ion-buttons slot="start">
          <ion-back-button text="" ></ion-back-button>
        </ion-buttons>
        <ion-title mode="ios" class="title">{{item.fieldRegionName}}详情</ion-title>
        <ion-buttons slot="end">
          <ion-button style="font-size: medium" (click)="toHistory(item)">历史</ion-button>
        </ion-buttons>
    </ion-toolbar>
    <div class="top">
        <span [ngClass]="{'online': item.online, 'offline': !item.online}">{{item.online ? '在线' : '离线'}}    </span>
        <span *ngIf="item.operationModel === 1 || item.operationModel === 0" class="online">{{item.operationModel ? '远控' :'现控'}}    </span>
        <span *ngIf="item.operationModel === 4" class="offline">现控    </span>
        <span *ngIf="item.operationModel" [ngClass]="{'online': item.isWisdomModel, 'offline': !item.isWisdomModel}" class="online">智控    </span>
        <span *ngIf="item.ts" class="right" style="padding-top: 3px;">{{item.ts | date: 'yyyy-MM-dd HH:mm'}}</span>
    </div>
    <div style="background-color: #F0F0F0;" align="center">
          <v-kanban class="home-bar" name="温度" [inData]="item.temp" iconClass="vo v-wendu" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
          <v-kanban class="home-bar" name="湿度" [inData]="item.humi" iconClass="vo v-shidu" iconColor="#285B90" iconSize="20px"  fontSize="14px"></v-kanban>
          <v-kanban class="home-bar" name="热应激" [inData]="item.heatStressLevelName" iconClass="vo v-nav-ico" [iconColor]="item.heatStressColor" iconSize="20px" fontSize="14px"></v-kanban>
          <v-kanban class="home-bar" name="在舍状态" [inData]="inHouseName" iconClass="vo v-dapeng-" iconColor="#285B90" iconSize="20px" fontSize="14px"></v-kanban>
    </div>
    <div class="inHouseDiv">
           <ion-label class="inHouseLabel">在离舍开关控制</ion-label>
           <ion-toggle [(ngModel)]="inHouseState" [checked]="inHouseState" (click)="inHouseControl(inHouseState)"></ion-toggle>
           <!--<v-switch (click)="inHouseControl(item.inHouse)" [value]="item.inHouse.inHouse" [loading]="loading"></v-switch>-->
    </div>
</ion-header>
<ion-content style="background-color: #F3F4F4;">
  <ion-router-outlet></ion-router-outlet>
    <ion-tabs>
        <ion-tab-bar slot="top">
            <ion-tab-button tab="fan" class="tabSelected" >
                <ion-label>风机</ion-label>
            </ion-tab-button>
            <ion-tab-button tab="shower" class="tabSelected" [routerLink]="showerLink">  <!--[rootParams]="fieldRegionNo"-->
                <ion-label>喷淋</ion-label>
            </ion-tab-button>
            <ion-tab-button tab="light" class="tabSelected" [routerLink]="lightLink">
                <ion-label>照明</ion-label>
            </ion-tab-button>
            <ion-tab-button tab="waterchannel" class="tabSelected" [routerLink]="waterchannelLink">
                <ion-label>水槽</ion-label>
            </ion-tab-button>
        </ion-tab-bar>
    </ion-tabs>

    <!--<ion-tabs>-->
        <!--<ion-tab-bar slot="top">-->
            <!--<ion-tab-button tab="fan" class="tabSelected">-->
                <!--<ion-label>风机</ion-label>-->
            <!--</ion-tab-button>-->
            <!--&lt;!&ndash;<ion-tab-button tab="shower" class="tabSelected">  &lt;!&ndash;[rootParams]="fieldRegionNo"&ndash;&gt;&ndash;&gt;-->
                <!--&lt;!&ndash;<ion-label>喷淋</ion-label>&ndash;&gt;-->
            <!--&lt;!&ndash;</ion-tab-button>&ndash;&gt;-->
            <!--<ion-tab-button tab="light" class="tabSelected">-->
                <!--<ion-label>照明</ion-label>-->
            <!--</ion-tab-button>-->
            <!--<ion-tab-button tab="waterchannel" class="tabSelected">-->
                <!--<ion-label>水槽</ion-label>-->
            <!--</ion-tab-button>-->
        <!--</ion-tab-bar>-->
    <!--</ion-tabs>-->

</ion-content>
