<ion-header>
  <ion-navbar>
    <ion-title text-center>
      <span>{{orgName}}</span>
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content direction="y" scrollbar-y="true">
  <div class="additem" (click)="showPersonModal()">
      <span class="icon-span">
        <ion-icon ios="ios-add" class="add-icon-contact" md="md-add"></ion-icon>
      </span>
    <span class="contact-title color-999">添加联系人</span>
  </div>
  <p class="padding-10 color-666">(左滑删除该组联系人)</p>
  <ion-list>
    <ion-item-sliding *ngFor="let contactPerson of contactPersons">
        <ion-item>
          <div class="contact-box" (click)="contactPersonInfo(contactPerson)">

            <ng-container *ngIf="contactPerson?.picUrl && contactPerson?.picUrl != ''">
              <img src="{{picture+contactPerson.picUrl}}" class="contact-img">
            </ng-container>
            <ng-container *ngIf="!contactPerson?.picUrl || contactPerson?.picUrl == ''">
              <img src="./assets/imgs/man.png" class="contact-img" *ngIf="contactPerson.gender =='1'||contactPerson.gender==null">
              <img src="./assets/imgs/woman.png" class="contact-img" *ngIf="contactPerson.gender =='0'">
            </ng-container>

            <div class="contact-box-right">
              <div>
                <span class="contact-name">{{contactPerson.name}}</span>
              </div>
              <div class="contact-organization">{{contactPerson.orgName}}</div>
              <div>
                <span class="contact-handphone">手机：{{contactPerson.mobile}}</span>
                <span class="contact-telphone">座机：{{contactPerson.telephone}}</span>
              </div>
            </div>
          </div>
        </ion-item>
        <ion-item-options>
          <button ion-button color="danger" (click)="removeItem(contactPerson)">删除</button>
        </ion-item-options>
    </ion-item-sliding>

  </ion-list>
</ion-content>