<ion-header>
  <ion-navbar>
    <ion-title>个人信息</ion-title>
    <span *ngIf="edit.room || edit.telephone || edit.email" (click)="editDone()" float-right class="margin-right-10 color-999">完成</span>
  </ion-navbar>
</ion-header>


<ion-content class="content">


  <ion-list>
    <p class="person-tips">基础信息(如需修改，请联系人事处)</p>
    <ion-item>
      <div class="info-item">
        <span class="info-span">头像</span>
        <div class="info-item-content">

        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="info-item">
        <span class="info-span">姓名</span>
        <div class="info-item-content">
          <span class="info">{{contactPersonInfo.name}}</span>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="info-item">
        <span class="info-span">手机号</span>
        <div class="info-item-content">
          <span class="info">{{contactPersonInfo.mobile}}</span>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="info-item">
        <span class="info-span">性别</span>
        <div class="info-item-content">
          <span class="info">
            <span *ngIf="contactPersonInfo.gender == '1' || contactPersonInfo.gender == null">男</span>
            <span *ngIf="contactPersonInfo.gender == 0">女</span>
          </span>
        </div>
      </div>
    </ion-item>
    <p  class="person-tips">补充信息</p>
    <ion-item>
      <div class="info-item">
        <span class="info-span">房间号</span>
        <div *ngIf="!edit.room" class="info-item-content" (click)="editFun('room')">
          <span class="info">{{contactPersonInfo.abbreviation}}</span>
          <ion-icon  ios="ios-create-outline" md="md-create-outline"></ion-icon>
        </div>
        <div *ngIf="edit.room" class="info-item-content">
          <input type="text" [(ngModel)]="abbreviation">
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="info-item">
        <span class="info-span">座机</span>
        <div *ngIf="!edit.telephone" class="info-item-content" (click)="editFun('telephone')">
          <span class="info">{{contactPersonInfo.telephone}}</span>
          <ion-icon  ios="ios-create-outline" md="md-create-outline"></ion-icon>
        </div>
        <div *ngIf="edit.telephone" class="info-item-content">
          <input type="text" [(ngModel)]="telephone">
        </div>
      </div>
    </ion-item>


    <ion-item>
      <div class="info-item">
        <span class="info-span">邮箱</span>
        <div *ngIf="!edit.email" class="info-item-content" (click)="editFun('email')">
          <span class="info">{{contactPersonInfo.email}}</span>
          <ion-icon  ios="ios-create-outline" md="md-create-outline"></ion-icon>
        </div>
        <div *ngIf="edit.email" class="info-item-content">
          <input type="text" [(ngModel)]="email">
        </div>
      </div>
    </ion-item>
  </ion-list>


  <button class="call-btn" (click)="call(contactPersonInfo.telephone)">拨打座机</button>

  <button class="call-btn" (click)="call(contactPersonInfo.mobile)">拨打手机</button>

  <button class="call-btn" (click)="addcontactPersons()" *ngIf="!contactPersonInfo.hasgeneralpersonsflag">添加常用联系人</button>

  <button class="call-btn" (click)="cancelGenaralPersons()" *ngIf="contactPersonInfo.hasgeneralpersonsflag">移除常用联系人</button>

  <button class="call-btn" (click)="usualContactSet()">设置分组</button>

</ion-content>