<ion-view view-title="个人信息">
    <ion-content>
        <ion-spinner ng-if="loading" class="center init-load" icon="android"></ion-spinner>
        <div class="item item-divider"></div>
        <div class="list" ng-if="!loading">
            <ion-item class="item item-icon-right item-group item-comp" ng-click="selectimg()">
                <label class="compname">头像</label>
                <img ng-src="{{userinfo.photo}}">
                <i class="icon ion-chevron-right icon-accessory"></i>
            </ion-item>
            <ion-item class="item item-icon-right" ng-click="editInfo('姓名','text','username',userinfo.username)">
                姓名
                <p class="label-right-text" ng-bind="userinfo.username"></p>
                <i class="icon ion-chevron-right icon-accessory"></i>
            </ion-item>
            <label class="item item-input item-select">
                <div class="input-label">
                    性别
                </div>
                <select ng-model="userinfo.sex" ng-options="x.id as x.name for x in selectdatas" ng-change="updateInfo()"></select>
            </label>
            <div class="item item-divider"></div>
            <ion-item class="item">
                公司
                <p class="item-note">{{userinfo.compname}}&nbsp;(代号:{{userinfo.compno}})</p>
            </ion-item>
            <ion-item class="item item-icon-right" ng-href="#/editdeptdegree">
                部门职位
                <p class="label-right-text">{{userinfo.depname}}&nbsp;&nbsp;&nbsp;&nbsp;{{userinfo.degree}}</p>
                <i class="icon ion-chevron-right icon-accessory"></i>
            </ion-item>
            <ion-item class="item item-icon-right">
                联系方式
                <p class="label-right-text">{{userinfo.cellphone}}</p>
                <i class="icon ion-chevron-right icon-accessory"></i>
            </ion-item>
            <ion-item class="item item-icon-right" ng-click="editInfo('邮箱','email','email',userinfo.email)">
                邮箱
                <p class="label-right-text" ng-bind="userinfo.email"></p>
                <i class="icon ion-chevron-right icon-accessory"></i>
            </ion-item>
        </div>
    </ion-content>
</ion-view>