<ion-view view-title="选择添加的成员" hide-back-button="true">
    <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>
        <div class="item item-divider divider-font" ng-if="deptlst.length>0"><i class="icon ion-ios-star"></i>部门({{deptlst.length}})</div>
        <ion-list>
            <!--部门列表-->
            <ion-item class="item item-icon-right" ng-repeat="dept in deptlst" ng-click="changedept(dept);">
                {{dept.depname}}
                <i class="icon ion-chevron-right icon-accessory" ng-if="dept.isShow"></i>
            </ion-item>
        </ion-list>
        <!--员工-->
        <div class="item item-divider divider-font"><i class="icon ion-ios-star"></i>联系人({{emplst.length}})</div>
        <ion-list>
            <ion-checkbox ng-repeat="emp in emplst" ng-disabled="emp.disabled" ng-change="change(emp)" ng-model="emp.selected" class="ion-checkbox-class">
                <img ng-src="../../../img/panda.png"/>
                <label class="labelname">{{emp.username}}</label>
                <label class="labelrole">{{emp.degree}}</label>
            </ion-checkbox>
            <ion-list>
            <div class='obligate-item'></div>
    </ion-content>
    <div ng-class="{true:'bar bar-footer bar-dark footer-div bigview',false:'bar bar-footer footer-div bar-dark'}[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="user in selectedemplst track by $index">{{user.username}}</li>
        </ul>
        <button ng-disabled="selectedemplst.length==0" ng-click="ok();" class="button pull-right button-calm">确定{{selectedemplst.length>0?"("+selectedemplst.length+")":""}}</button>
    </div>
</ion-view>