<ion-view view-title="{{titlename}}" hide-back-button="true" cache-view="false">
    <ion-nav-buttons side="left">
        <button class="button button-clear" ng-click="this[leftbtn[index].click]();">{{leftbtn[index].text}}</button>
    </ion-nav-buttons>
    <ion-content>
        <ion-spinner ng-if="loading" class="center init-load" icon="android"></ion-spinner>
        <ul ng-show="showall" ng-if="!loading">
            <li class="check-dept-li">
                <label class="list item-checkbox">
                    <div class="checkbox checkbox-input-hidden disable-pointer-events checkbox-circle">
                        <input ng-model="selecteditems.all" ng-click="selectAll()" type="checkbox" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                        <i class="checkbox-icon"></i>
                    </div>
                </label>
                <label ng-click="selectAll();">
                    <span class="deptname">全部成员</span>
                </label>
            </li>
        </ul>
        <!--<ion-item class="item item-icon-right item-text-wrap" ng-show="showgroup" ng-click="toselectgroup();">
            选择一个小组
            <i class="icon ion-chevron-right icon-accessory"></i>
        </ion-item>-->
        <div ng-if="!loading" class="item item-divider divider-font" ng-show="deptlst.length>0"><i class="icon ion-ios-star"></i>部门({{deptlst.length}})</div>
        <ion-list ng-if="!loading">
            <item-dept ng-repeat="dept in deptlst"></item-dept>
        </ion-list>
        <ion-list ng-if="!loading" ng-show="emplst.length>0">
            <div class="item item-divider divder divider-font"><i class="icon ion-ios-star"></i>联系人({{emplst.length}})</div>
            <item-member ng-repeat="emp in emplst"></item-member>
            <div class='obligate-item'></div>
        </ion-list>
    </ion-content>
    <footer-member ng-if="!loading"></footer-member>
</ion-view>