<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.status" nzPlaceHolder="计划状态">
            <nz-option nzLabel="未开始" nzValue="0"></nz-option>
            <nz-option nzLabel="进行中" nzValue="1"></nz-option>
            <nz-option nzLabel="结束" nzValue="2"></nz-option>
        </nz-select>
    </div>
    <div nz-col nzSpan="3">
        <nz-select style="width: 100%;"  [(ngModel)]="obj.typeId" nzPlaceHolder="计划类型">
            <nz-option nzLabel="待处理" nzValue="0"></nz-option>
            <nz-option nzLabel="已结束" nzValue="1"></nz-option>
        </nz-select>
    </div>
    <div nz-col nzSpan="8">
        <nz-input-group nzPrefixIcon="anticon anticon-search">
            <input type="text" nz-input [(ngModel)]="obj.searchStr" placeholder="输入资源名称">
        </nz-input-group>
    </div>
    <div nz-col nzSpan="3">
        <button  nz-button nzType="default"><i class="anticon anticon-plus"></i>新增计划</button>
    </div>
</div>

<nz-table #nzTable [nzData]="planList" [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 planList">
        <td class="round-tag tag-form">
            {{data.title}}
        </td>
        <td>
            {{data.typeName}}
        </td>
        <td>{{data.principals[0].username}}</td>
        <td>
            {{data.cycleNum}}/{{data.cycleType}}
        </td>
        <td>{{data.workload}}</td>
        <td>{{data.createTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
        <td>
            <span *ngIf="data.status == 0">未开始</span>
            <span *ngIf="data.status == 1">进行中</span>
            <span *ngIf="data.status == 2">已结束</span>
        </td>
        <td class="handle text-center">
            <span (click)="showEditModal(data)">查看</span>
            <span (click)="deleteSend(data)">删除</span>
        </td>
    </tr>
    </tbody>
</nz-table>