<div nz-row class="breadcrumbs" >
  <div nz-col nzSpan="16">
    <nz-breadcrumb class="padding-8-0">
      <nz-breadcrumb-item>
        首页
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        <a>运维工作</a>
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        运维事件
      </nz-breadcrumb-item>
    </nz-breadcrumb>
  </div>
  <div nz-col nzSpan="8" class="text-right">
    <button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
    <button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
    <button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
  </div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
  <div nz-col nzSpan="3">
    <nz-select style="width: 100%;" [(ngModel)]="obj.type" nzPlaceHolder="事件分类">
      <nz-option nzLabel="告警" nzValue="告警"></nz-option>
      <nz-option nzLabel="严重" nzValue="严重"></nz-option>
    </nz-select>
  </div>
  <div nz-col nzSpan="3">
    <nz-select style="width: 100%;"  [(ngModel)]="obj.status" nzPlaceHolder="事件状态">
        <nz-option nzLabel="待处理" nzValue="0"></nz-option>
        <nz-option nzLabel="已结束" nzValue="1"></nz-option>
    </nz-select>
  </div>
  <div nz-col nzSpan="3">
    <nz-select style="width: 100%;" [(ngModel)]="obj.source" nzPlaceHolder="事件来源">
        <nz-option nzLabel="系统警告" nzValue="0"></nz-option>
        <nz-option nzLabel="手动新增" nzValue="1"></nz-option>
    </nz-select>
  </div>
  <div nz-col nzSpan="8">
    <nz-date-picker
            nzShowTime
            [nzFormat]="timeFormat"
            [(ngModel)]="timeBegin"
            nzPlaceHolder="开始时间"></nz-date-picker>
    <nz-date-picker
            nzShowTime
            [nzFormat]="timeFormat"
            [(ngModel)]="timeEnd"
            nzPlaceHolder="结束时间"></nz-date-picker>
  </div>
  <div nz-col nzSpan="3">
    <button  nz-button nzType="default"><i class="anticon anticon-plus"></i>新增事件</button>
  </div>
</div>

<nz-table #nzTable [nzData]="eventList" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)">
  <thead>
  <tr>
    <th>事件编号</th>
    <th>标题</th>
    <th>时间</th>
    <th>时间来源</th>
    <th>事件分类</th>
    <th>处理人</th>
    <th>状态</th>
    <th style="text-align: center">操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of eventList">
    <td class="round-tag tag-form">
      {{data.description}}
    </td>
    <td>
    {{data.title}}
    </td>
    <td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
    <td>
     事件来源
    </td>
    <td>时间分类</td>
    <td>
      {{data.operators[0].username}}
    </td>
    <td>
      <span *ngIf="data.status == 0">待处理</span>
      <span *ngIf="data.status == 1">已结束</span>
    </td>
    <td class="handle text-center">
      <span (click)="showEditModal(data)">编辑</span>
      <span (click)="deleteSend(data)">删除</span>
    </td>
  </tr>
  </tbody>
</nz-table>