<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 companyType" (click)="search()" nz-radio-button
             [nzValue]="item.key">{{item.value}}</label>
    </nz-radio-group>
  </div>
  <div nz-col nzSpan="3">
    <button (click)="handleAddModal()"
            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>维护公司名称</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>{{data.principal}}</td>
    <td>
      <span *ngIf="data.type == 0">中心驻场</span>
      <span *ngIf="data.type == 1">中心运维</span>
      <span *ngIf="data.type == 2">外单位驻场</span>
      <span *ngIf="data.type == 3">外单位运维</span>
    </td>
    <td>{{data.projectNum}}</td>
    <td>{{data.totalAmount}}</td>
    <td class="handle text-center main-color">
      <span (click)="handleEditModa(data)">编辑</span>
      <span>查看</span>
    </td>
  </tr>
  </tbody>
</nz-table>

<smart-create-company #smartCreateCompany (done)="getList()"></smart-create-company>
