<!-- author：广州银云信息科技有限公司 -->
<div class="home-project-inside-group">
    <article class="group-article-0">
        <ul class="title-ul" ng-if="!$ctrl.funObject.unTop||($ctrl.funObject.unTop&&($ctrl.authorityObject.readWrite||$ctrl.authorityObject.export))">
            <li class="btn-group-li" ng-if="$ctrl.authorityObject.readWrite||$ctrl.funObject.itemQueryAuthority">
                <a ng-repeat="(key,item) in $ctrl.funObject.btnGroupList" class="{{item.class}} common-btn" ng-click="item.fun()" ng-show="$ctrl.funObject.showObject[$ctrl.funObject.showVar]==item.showable" ng-if="!item.authority||$ctrl.authorityObject[item.authority]">
                    <span class="tips-span" ng-if="item.tips">{{item.key}}</span><span class="pull-left triangle-bottom" ng-if="item.tips"></span>
                    <span class="iconfont icon-{{item.icon}}"></span><span class="btn-name" ng-if="!item.tips">{{item.key}}</span>
                </a>
            </li>
        </ul>
        <ul class="group-ul group-form-ul" ng-if="$ctrl.sortObject.sortable" sv-root sv-part="$ctrl.sortObject.originQuery" ng-show="$ctrl.funObject.showObject[$ctrl.funObject.showVar]">
            <li class="title-li"><b>{{$ctrl.mainObject.baseInfo.title||$ctrl.data.info.filter.grouping}}</b></li>
            <li class="item-li">
                <ul>
                    <li class="sort-group-li " ng-repeat='item in $ctrl.sortObject.originQuery track by $index' sv-element="$ctrl.sortObject.sortForm">
                        <div class="group-li" sv-handle>
                            <span class="title-icon iconfont icon-xiangxia" ng-if="item[$ctrl.mainObject.baseInfo.child].length>0"></span>
                            <span class="group-name pull-left" ng-class="{'is-no-child':(!item[$ctrl.mainObject.baseInfo.child])||(item.childGroupList.length<=0)}">
                            {{item[$ctrl.mainObject.baseInfo.name]}}
                        </span>
                        </div>
                        <div class="child-group-div">
                            <ul class="child-group-form-ul" sv-root sv-part="item[$ctrl.mainObject.baseInfo.child]">
                                <li class="group-li api-list-li" ng-repeat='childItem in item[$ctrl.mainObject.baseInfo.child] track by $index' sv-element="$ctrl.sortObject.sortForm.child" sv-handle>
                                    <span class="group-name pull-left child-group-name">
                                    {{childItem[$ctrl.mainObject.baseInfo.name]}}
                                </span>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </li>
        </ul>
        <ul class="group-ul" ng-hide="$ctrl.funObject.showObject[$ctrl.funObject.showVar]">
            <li class="title-li"><b>{{$ctrl.mainObject.baseInfo.title||$ctrl.data.info.filter.grouping}}</b></li>
            <li class="item-li">
                <ul>
                    <li class="background-group-li" ng-class="{'elem-active':item[$ctrl.mainObject.baseInfo.id]==$ctrl.mainObject.baseInfo.interaction[$ctrl.mainObject.baseInfo.id]}" ng-repeat='item in $ctrl.mainObject.staticQuery track by $index'>
                        <div class="group-li" ng-click="$ctrl.mainObject.baseFun.parentClick({item:item})">
                            <span class="title-icon iconfont icon-{{item.icon}}" ></span>
                            <span class="group-name">{{item[$ctrl.mainObject.baseInfo.name]}}</span>
                        </div>
                    </li>
                    <li class="background-group-li" ng-class="{'elem-active':item[$ctrl.mainObject.baseInfo.id]==$ctrl.mainObject.baseInfo.interaction[$ctrl.mainObject.baseInfo.id]}" ng-repeat='($outerIndex,item) in $ctrl.list track by $index' ng-init="item.$index=$index;item.isSpreed=true;">
                        <div class="group-li" ng-click="$ctrl.mainObject.baseFun.parentClick({item:item})">
                            <span class="title-icon iconfont " ng-class="{'icon-xiangyou':(item[$ctrl.mainObject.baseInfo.id]!=$ctrl.mainObject.baseInfo.interaction[$ctrl.mainObject.baseInfo.id]||!item.isSpreed)&&item[$ctrl.mainObject.baseInfo.child].length>0,'icon-xiangxia':item[$ctrl.mainObject.baseInfo.id]==$ctrl.mainObject.baseInfo.interaction[$ctrl.mainObject.baseInfo.id]&&item[$ctrl.mainObject.baseInfo.child].length>0&&item.isSpreed}" ng-click="$ctrl.mainObject.baseFun.spreed({item:item,$event:$event})"></span>
                            <span class="group-name" ng-class="{'pull-left':item[$ctrl.mainObject.baseInfo.id]>0,'is-no-child':((!item[$ctrl.mainObject.baseInfo.child])||(item[$ctrl.mainObject.baseInfo.child].length<=0))&&$ctrl.mainObject.level>1}">
                            {{item[$ctrl.mainObject.baseInfo.name]}}
                        </span>
                            <span class="active " ng-if="item[$ctrl.mainObject.baseInfo.id]>0&&$ctrl.authorityObject.readWrite" ng-click="$ctrl.data.fun.more({item:item,$event:$event})">
                            <a class="iconfont icon-caidan"  ng-mouseleave="item.listIsClick=false">
                                <ul class="group-function" ng-class="{'envFirst':$first}" ng-show="item.listIsClick">
                                    <li ng-repeat="(funKey,funItem) in $ctrl.mainObject.parentFun" class="{{funItem.class}}" ng-click="$ctrl.data.fun.common(funItem,{item:item,$outerIndex:$outerIndex,$index:$outerIndex})">{{funItem.key}}</li>
                                </ul>
                            </a>
                        </span>
                        </div>
                        <div class="child-group-div" ng-show="item[$ctrl.mainObject.baseInfo.id]==$ctrl.mainObject.baseInfo.interaction[$ctrl.mainObject.baseInfo.id]&&item.isSpreed" ng-if="$ctrl.mainObject.level">
                            <ul>
                                <li class="group-li api-list-li" ng-repeat='($childIndex,childItem) in item[$ctrl.mainObject.baseInfo.child] track by $index' ng-class="{'elem-active':childItem[$ctrl.mainObject.baseInfo.id]==$ctrl.mainObject.baseInfo.interaction[$ctrl.mainObject.baseInfo.childID]}" ng-click="$ctrl.mainObject.baseFun.childClick({item:childItem})" ng-init="childItem.$index=$index;">
                                    <span class="group-name pull-left child-group-name">
                                    {{childItem[$ctrl.mainObject.baseInfo.name]}}
                                </span>
                                    <span class="active " ng-if="$ctrl.authorityObject.readWrite" ng-click="$ctrl.data.fun.more({item:item,$event:$event})">
                            <a class="iconfont icon-caidan" ng-mouseleave="item.listIsClick=false">
                                <ul class="group-function" ng-class="{'envFirst':$first}" ng-show="item.listIsClick">
                                    <li ng-repeat="(funKey,funItem) in $ctrl.mainObject.childFun" ng-click="$ctrl.data.fun.common(funItem,{item:item,childItem:childItem,$outerIndex:$outerIndex,$index:$childIndex})">{{funItem.key}}</li>
                                </ul>
                            </a>
                        </span>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </li>
        </ul>
    </article>
</div>
