<div class="mainCon">
    <Navbar [leftContent]="icon"
            (onLeftClick)="onLeftClick()"
            style="background-color: #28c9bd"
    >报警信息</Navbar>

    <!--<SegmentedControl class = "nav-title" [values]="['今日报警信息', '近一周报警信息']"-->
                      <!--(onChange)="choose($event)"></SegmentedControl>-->

    <ion-segment class = "nav-title" (ionChange)="choose($event)" color="secondary">
        <ion-segment-button value="day">
            <ion-label>今日报警信息</ion-label>
        </ion-segment-button>
        <ion-segment-button value="week">
            <ion-label>近一周报警信息</ion-label>
        </ion-segment-button>
    </ion-segment>

    <div class="alarmCon">
        <div class="alarmItemBefore" *ngIf="itemExit;else other_content">
            <div class="alarmItem" *ngFor="let one of data">
                <i class="vo v-shebeiguanli1"></i><span class = "title">设备名称 : </span><span>{{one.name}}</span><br>
                <i class="vo v-guzhang"></i><span class = "title">故障内容 : </span><span>{{one.con}}</span><br>
                <i class="vo v-rili"></i><span class = "title">发生时间 : </span><span>{{one.time | date: 'yyyy-MM-dd HH:mm:ss'}}</span><br>
            </div>
        </div>
    </div>
</div>
<ng-template #icon>
    <span class="vo v-back"></span>
</ng-template>

<ng-template #other_content>
    <div class="empty-content">
        <i class="vo v-shebeiguanli1"></i><br><br>
        <span class="empty">没有报警信息</span>
    </div>
</ng-template>
