<!--解决状态统计-->
<div class="releative">
  <div class="time-div">
    <div nz-col nzSpan="6">
      <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()"
                      >
        <label nz-radio-button nzValue="1">日报</label>
        <label nz-radio-button nzValue="4">周报</label>
        <label nz-radio-button nzValue="5">月报</label>
        <label nz-radio-button nzValue="99">自定义</label>
      </nz-radio-group>
    </div>
    <div nz-col nzSpan="8" >
      <ng-container *ngIf="timeType == '99'">
        <nz-date-picker
                nzFormat="yyyy-MM-dd"
                [(ngModel)]="startTime"
                nzPlaceHolder="开始时间"
        ></nz-date-picker>
        <nz-date-picker
                nzFormat="yyyy-MM-dd"
                [(ngModel)]="endTime"
                nzPlaceHolder="结束时间"
        ></nz-date-picker>
      </ng-container>
    </div>
    <div nz-col nzSpan="6"></div>
    <div nz-col nzSpan="2" class="text-right">
      <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索
      </button>
    </div>
    <div nz-col nzSpan="2" class="text-center">
        <button (click)="downLoad()" [nzLoading]="isDownload" nz-button nzType="default"><i class="anticon anticon-download"></i>下载</button>
    </div>
  </div>
</div>


<nz-spin [nzSpinning]="isLoading">
  <div style="height: 500px">
    <ng-container *ngIf="noData">
      <div class="img-noData">
        <div class="noData" title="暂无数据"></div>
      </div>
    </ng-container>
    <ng-container *ngIf="!noData">
      <div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
    </ng-container>
  </div>
</nz-spin>

<nz-table #nzTable [nzData]="statusList">
  <thead>
  <tr>
    <th nzWidth="20%">解决状态</th>
    <th>事件数量</th>
    <th>处理人情况</th>
    <th>事件分类</th>
  </tr>
  </thead>
  <tbody>
  <ng-container *ngFor="let data of statusList">
    <tr>
      <td>{{data.operateStatusName}}</td>
      <td>{{data.num}}</td>
      <td>
        <ng-container *ngFor="let item of data.operates">
          <span>{{item.username}} {{item.num}}</span>
        </ng-container>
      </td>
      <td>
        <ng-container *ngFor="let item of data.eventTypes">
          <span>{{item.typeName}} {{item.num}}</span>
        </ng-container>
      </td>
    </tr>
  </ng-container>
  </tbody>
</nz-table>

<ng-template #indicatorTemplate><i class="anticon anticon-spin anticon-loading" style="font-size: 24px;"></i></ng-template>
