<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 (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
        <smart-full-screen></smart-full-screen>
    </div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
    <div nz-col nzSpan="8">
        项目状态:
        <nz-radio-group [(ngModel)]="obj.status">
            <label *ngFor="let item of statusList" (click)="search()" nz-radio-button
                   [nzValue]="item.value">{{item.label}}</label>
        </nz-radio-group>
    </div>
    <div nz-col nzSpan="4">
        <nz-select nzAllowClear style="width: 100%;" [(ngModel)]="obj.yearly" nzPlaceHolder="项目年度">
            <ng-container *ngFor="let item of yearList">
                <nz-option [nzLabel]="item.label" [nzValue]="item.value"></nz-option>
            </ng-container>
        </nz-select>
    </div>
    <div nz-col nzSpan="4">
    </div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
    <div nz-col nzSpan="8">
        <input type="text" (keyup.enter)="search()" nz-input [(ngModel)]="obj.keyword"
               placeholder="项目名称、甲方名称、乙方名称、甲方负责人">
    </div>
    <div nz-col nzSpan="2">
        <button (click)="search()"
                nz-button nzType="default"><i class="anticon anticon-search"></i>搜索
        </button>
    </div>
    <div nz-col nzOffset="9" nzSpan="3">
        <button (click)="handleOpenModal()"
                nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增运维项目
        </button>
    </div>
    <div nz-col nzSpan="2">
        <button (click)="exportFile()"
                nz-button nzType="default"><i class="anticon anticon-upload"></i>导出
        </button>
    </div>
</div>
<nz-table #nzTable [nzData]="page.list" [nzLoading]="page.isLoading" [nzFrontPagination]="false"
          [nzTotal]="page.totalNum"
          [nzPageIndex]="page.pageNum" [nzPageSize]="page.pageCount" (nzPageIndexChange)="change($event)">
    <thead>
    <tr>
        <th>项目单位</th>
        <th nzWidth="10%">项目名称</th>
        <th>项目负责人</th>
        <th>项目年度</th>
        <th>项目状态</th>
        <th>乙方公司</th>
        <th>乙方维护组长</th>
        <th>维护周期</th>
        <th>项目金额</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data">
        <td class="round-tag tag-form">
            {{data.officeName}}
        </td>
        <td>
            {{data.name}}
        </td>
        <td>{{data.officePrincipal}}</td>
        <td>
            {{data.yearly}}
        </td>
        <td>
            <span *ngIf="data.status == 0">执行中</span>
            <span *ngIf="data.status == 1">已完成</span>
            <span *ngIf="data.status == 2">待启动</span>
        </td>
        <td>{{data.companyName}}</td>
        <td>{{data.bprincipalName}}</td>
        <td>
            {{data.startDate | date:'yyyy-MM-dd'}}至{{data.endDate | date:'yyyy-MM-dd'}}
        </td>
        <td>{{data.amount}}</td>
        <td class="handle main-color">
            <span (click)="handleEdit(data)">编辑</span>
        </td>
    </tr>
    </tbody>
</nz-table>

<smart-create-project #smartCreateProject (done)="getList()"></smart-create-project>
