<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>
        <h3 ng-if="!loading && isAll && id == '-1'" class="center stable action-sheet-backdrop init-load">全部成员已设置考勤</h3>
        <ul ng-if="!loading" ng-show="showall && index == 0 ||isAll && id == '-1'">
            <li class="check-dept-li">
                <label class="list item-checkbox">
                    <div class="checkbox checkbox-input-hidden disable-pointer-events checkbox-circle">
                        <input ng-model="isallcheck" ng-click="isAllCheck()" type="checkbox" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                        <i class="checkbox-icon"></i>
                    </div>
                </label>
                <label ng-click="isAllCheck()">
                    <span class="deptname">全部成员</span>
                </label>
            </li>
        </ul>
        <div ng-if="!loading" ng-hide="isAll && id == '-1'" class="item item-divider divider-font" ng-show="deptlst.length > 0"><i class="icon ion-ios-star"></i>部门({{deptlst.length}})</div>
        <ul ng-if="!loading" class="list" ng-hide="isAll && id == '-1'">
            <li class="check-dept-li" ng-repeat="dept in deptlst track by $index" ng-class="{true:'clickactive',fasle:''}[actived]">
                <label class="list item-checkbox">
                    <div class="checkbox checkbox-input-hidden disable-pointer-events checkbox-circle">
                        <input ng-disabled="dept.isdisabled" ng-model="dept.selected" ng-change="change(dept)" type="checkbox" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                        <i class="checkbox-icon" ng-show="!dept.isdisabled"></i>
                    </div>
                </label>
                <label ng-click="tochilddept(dept);" ng-class="{true:'',false:'disabled'}[!dept.isdisabled]">
                    <span class="deptname">{{dept.depname}}{{dept.disableddesc}}</span>
                    <i class="icon ion-chevron-right icon-accessory" ng-if="dept.isShow"></i>
                </label>
            </li>
        </ul>
    </ion-content>
    <div class="bar bar-footer bar-dark footer-div" ng-class="{true:'bigview',false:''}[isUp]" style="">
        <i ng-class="{true:'ion-ios-arrow-down cirl-i',false:' ion-ios-arrow-up cirl-i'}[isUp]" ng-click="isUp = !isUp"></i>
        <ul class='ul-imgs dept-icon'>
            <li ng-repeat="dept in selecteddepts track by $index">{{dept.depname}}</li>
        </ul>
        <button ng-click="ok();" ng-disabled="selecteddepts.length==0" class="button pull-right button-calm">确定{{selectcount}}</button>
    </div>
</ion-view>
