<ion-header>
  <ion-navbar>
    <ion-title text-center>信息编辑</ion-title>
  </ion-navbar>
</ion-header>
<ion-content class="content">

  <div class="content-title">
    基础信息（如需修改请联系人事处）
  </div>
  <ion-list>
    <ion-item>
      <div class="info-item">
        <span class="info-span">头像</span>
        <img src="./assets/imgs/head.png" class="img">
      </div>
    </ion-item>
    <ion-item>
      <div class="info-item">
        <span class="info-span">姓名/性别</span>
        <div>
          <span class="info">{{user?.userName}}</span>
          <ion-icon name="male" class="sex" *ngIf="gender == null || gender == '1'"></ion-icon>
          <ion-icon name="female" class="sex" *ngIf="gender == 0"></ion-icon>
        </div>
      </div>
    </ion-item>
    <ion-item>
      <div class="info-item">
        <span class="info-span">部门</span>
        <div>
          <span class="info">{{orgName}}</span>
        </div>
      </div>
    </ion-item>
    <ion-item class="info-item">
      <div class="info-item">
        <span class="info-span">手机（已绑定）</span>
        <div>
          <span class="info">{{user?.userDetail?.user.mobile}}</span>
        </div>
      </div>
    </ion-item>
  </ion-list>
  <div class="content-title">
    补充信息（可编辑）
  </div>
  <div class="content-box">
    <div class="info-item content-box-group">
      <!-- <div class="info-item">
        <span class="info-span">房间号</span>
        <span class="info" *ngIf="edit11">{{user?.userDetail?.user.abbreviation}}</span>
        <div class="info-item-box" *ngIf="edit12">
            <div class="info-input">
                <input type="text" maxlength="20" [(ngModel)] = "userinfo.abbreviation">
            </div>
            <img src="./assets/imgs/confirm.png" class="confirm" (click)="updateUserInfo()">
        </div>
      </div> -->
      <!-- <ion-label class="info-span">房间号</ion-label> -->
      <label class="info-span">房间号</label>
      <ion-label class="content-label info" *ngIf="edit11">{{user?.userDetail?.user.abbreviation}}</ion-label>
      <ion-input class="info-input" *ngIf="edit12" type="text" maxlength="20" [(ngModel)]="userinfo.abbreviation"></ion-input>

      <!-- <div class="button button-icon icon ion-settings"></div> -->
      <!-- <ion-label *ngIf="edit12" class="button button-positive button-small" ng-click="updateUserInfo()">保存</ion-label> -->

      <!-- <ion-label class="title-label">房间号</ion-label>
      <ion-label class="content-label" *ngIf="edit11">{{user?.userDetail?.user.abbreviation}}</ion-label>
      <ion-input *ngIf="edit12" type="text" maxlength="20" [(ngModel)]="userinfo.abbreviation"></ion-input>
      <p item-end *ngIf="edit12" tappable  (click)="updateUserInfo()">
        <img src="./assets/imgs/confirm.png" class="confirm" >
      </p> -->

      <p item-end *ngIf="edit12">
        <img src="./assets/imgs/confirm.png" class="confirm" (click)="updateUserInfo()">
      </p>

    </div>

    <div class="info-item content-box-group">
      <!-- <div class="info-item">
        <span class="info-span">座机</span>
        <span class="info" *ngIf="edit21">{{user?.userDetail?.user.telephone}}</span>
        <div class="info-item-box" *ngIf="edit22">
          <div class="info-input">
              <input type="text" maxlength="20"  [(ngModel)] = "userinfo.telephone">
          </div>
          <img src="./assets/imgs/confirm.png" class="confirm" (click)="updateUserInfo()">
        </div>
      </div> -->

      <label class="info-span">座机</label>
      <ion-label class="content-label info" *ngIf="edit21">{{user?.userDetail?.user.telephone}}</ion-label>
      <ion-input class="info-input" *ngIf="edit22" type="text" maxlength="20" [(ngModel)]="userinfo.telephone"></ion-input>
      <p item-end *ngIf="edit22">
        <img src="./assets/imgs/confirm.png" class="confirm" (click)="updateUserInfo()">
      </p>


      <!-- <ion-label class="title-label">座机</ion-label>
      <ion-label class="content-label" *ngIf="edit21">{{user?.userDetail?.user.telephone}}</ion-label>
      <ion-input *ngIf="edit22" type="text" maxlength="20" [(ngModel)]="userinfo.telephone"></ion-input>
      <p item-end *ngIf="edit22" tappable  (click)="updateUserInfo()">
        <img src="./assets/imgs/confirm.png" class="confirm" >
      </p> -->

    </div>

    <div class="info-item content-box-group">
      <!-- <div class="info-item">
        <span class="info-span">邮箱</span>
        <span class="info" *ngIf="edit31">{{user?.userDetail?.user.email}}</span>
        <div class="info-item-box" *ngIf="edit32">
            <div class="info-input">
                <input type="text" maxlength="20" [(ngModel)] = "userinfo.email" (ionFocus)="focusFun()">
                <input type="text" maxlength="20" [(ngModel)] = "userinfo.email">
            </div>
            <img src="./assets/imgs/confirm.png" class="confirm" (click)="updateUserInfo()">
        </div>
      </div> -->
      <label class="info-span">邮箱</label>
      <ion-label class="content-label info" *ngIf="edit31">{{user?.userDetail?.user.email}}</ion-label>
      <ion-input class="info-input" *ngIf="edit32" type="text" maxlength="20" [(ngModel)]="userinfo.email"></ion-input>
      <p item-end *ngIf="edit32">
        <img src="./assets/imgs/confirm.png" class="confirm" (click)="updateUserInfo()">
      </p>
      <!-- <ion-label class="title-label">邮箱</ion-label>
      <ion-label class="content-label" *ngIf="edit31">{{user?.userDetail?.user.email}}</ion-label>
      <ion-input *ngIf="edit32" type="text" maxlength="20" [(ngModel)]="userinfo.email"></ion-input>
      <p item-end *ngIf="edit32" tappable  (click)="updateUserInfo()">
        <img src="./assets/imgs/confirm.png" class="confirm" >
      </p> -->

    </div>
  </div>
</ion-content>