<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="14">
        类型:
        <nz-radio-group [(ngModel)]="obj.type">
            <label *ngFor="let item of teamType" (click)="search()" nz-radio-button
                   [nzValue]="item.value">{{item.label}}</label>
        </nz-radio-group>
    </div>
    <div nz-col nzSpan="3">
        <button (click)="handleAdd()"
                nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增运维团队
        </button>
    </div>
    <div nz-col nzSpan="5">
        <input type="text" (keyup.enter)="search()" nz-input [(ngModel)]="obj.name" placeholder="团队名称">
    </div>
    <div nz-col nzSpan="2">
        <button (click)="search()"
                nz-button nzType="default"><i class="anticon anticon-search"></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 nzWidth="20%">团队名称</th>
        <th>团队类型</th>
        <th>所在公司</th>
        <th>关联项目</th>
        <th>团队负责人</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data">
        <td>{{data.name}}</td>
        <td>
            <span *ngIf="data.type == 0">驻场团队</span>
            <span *ngIf="data.type == 1">非驻场团队</span>
        </td>
        <td>{{data.companyName}}</td>
        <td>{{data.projectName}}</td>
        <td>{{data.principal}}</td>
        <td class="handle main-color">
            <span (click)="handleEdit(data)">更新团队信息</span>
            <span (click)="handleUpdateTeam(data)">编辑团队成员</span>
        </td>
    </tr>
    </tbody>
</nz-table>

<smart-create-team #smartCreateTeam (done)="getList()"></smart-create-team>
<smart-team-modal #smartTeamModal (done)="getList()"></smart-team-modal>
