<ion-header>
  <ion-navbar>
    <ion-navbar>
      <div class="search-header">
        <ion-input type="text" placeholder="按姓名搜索" [(ngModel)]="searchValue" (ionChange)="searchUser()"></ion-input>
        <ion-icon name="close" class="clear" (click)="clearValue()"></ion-icon>
      </div>
    </ion-navbar>
  </ion-navbar>
</ion-header>
<ion-content>
  <ion-list>
    <ion-item *ngFor="let item of items">
      <div class="group">
        <div class="inner-group">
          <img src="./assets/imgs/head.png" class="person-photo">
          <div class="item-box">
            <p class="person-name">{{item.name}}
              <ion-icon class="person-sex-male" *ngIf="item.gender === 1" name="male"></ion-icon>
              <ion-icon class="person-sex-female" *ngIf="item.gender === 0" name="female"></ion-icon>
            </p>
            <p *ngIf="type == 2" class="person-batch">离沪时间：{{item.leaveDate}}-{{item.backDate}}</p>
            <p *ngIf="type == 2" class="person-batch">离沪地点：{{item.address}}</p>
          </div>
        </div>
        <div>
          <p>
            <button ion-button round class="btn color1" *ngIf="item.type == 2">未报备</button>
            <button ion-button round class="btn color2" *ngIf="item.type == 1">离沪</button>
            <button ion-button round class="btn color3" *ngIf="item.type == 0">不离沪</button>
          </p>
          <p *ngIf="item.type == 2" (click)="goReport(item)" style="color:#24bafc;margin-top: 6px">协助报备</p>
        </div>

      </div>
    </ion-item>
  </ion-list>
</ion-content>