<!--事件分类统计-->
<div class="releative">
    <div class="time-div">
        <div nz-col nzSpan="6">
            <nz-radio-group style="width: 100%;" [(ngModel)]="timeType" (ngModelChange)="changeType()" [nzButtonStyle]="'solid'">
                <label nz-radio-button nzValue="1">日报</label>
                <label nz-radio-button nzValue="2">周报</label>
                <label nz-radio-button nzValue="3">月报</label>
                <label nz-radio-button nzValue="4">自定义</label>
            </nz-radio-group>
        </div>
        <div nz-col nzSpan="8" *ngIf="timeType == '4'">
            <nz-date-picker
                    nzShowTime
                    [(ngModel)]="startTime"
                    nzPlaceHolder="开始时间"
            ></nz-date-picker>
            <nz-date-picker
                    nzShowTime
                    nzFormat="yyyy-MM-dd HH:mm:ss"
                    [(ngModel)]="endTime"
                    nzPlaceHolder="结束时间"
            ></nz-date-picker>
        </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>
</div>

<nz-spin [nzSpinning]="isLoading">
    <div echarts [options]="chartOption" style="height: 400px;width: 100%"></div>
</nz-spin>
<nz-table #nzTable [nzData]="eventList">
    <thead>
    <tr>
        <th nzWidth="20%">事件分类</th>
        <th>事件数量</th>
        <th>解决状态</th>
        <th>处理人情况</th>
    </tr>
    </thead>
    <tbody>
    <ng-container *ngFor="let data of eventList">
        <tr>
            <td>{{data.typeName}}</td>
            <td>{{data.num}}</td>
            <td>未解决 {{data.unsolved}}  部分解决 {{data.solveLittle}}  解决 {{data.solved}}</td>
            <td>
                <ng-container *ngFor="let item of data.operates">
                    <span>{{item.username}} {{item.num}}</span>
                </ng-container>
            </td>
        </tr>
    </ng-container>
    </tbody>
</nz-table>
