<!--事件分类统计-->
<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" >
            <ng-container *ngIf="timeType == '4'">
                <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]="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>

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

