<#macro left>
<div>
    <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar" id="menuTree">

            <!-- Sidebar user panel (optional) -->
            <#--<div class="user-panel">-->
                <#--<div class="pull-left image">-->
                    <#--<img src="/adminlte/dist/img/user2-160x160.jpg" class="img-circle"-->
                         <#--alt="User Image">-->
                <#--</div>-->
                <#--<div class="pull-left info">-->
                    <#--<p>Alexander Pierce</p>-->
                    <#--<!-- Status &ndash;&gt;-->
                    <#--<a href="#"><i class="fa fa-circle text-success"></i> Online</a>-->
                <#--</div>-->
            <#--</div>-->

            <!-- search form (Optional) -->
            <#--<form action="#" method="get" class="sidebar-form">-->
                <#--<div class="input-group">-->
                    <#--<input type="text" name="q" class="form-control"-->
                           <#--placeholder="Search..."> <span class="input-group-btn">-->
						<#--<button type="submit" name="search" id="search-btn"-->
                                <#--class="btn btn-flat">-->
							<#--<i class="fa fa-search"></i>-->
						<#--</button>-->
					<#--</span>-->
                <#--</div>-->
            <#--</form>-->
            <!-- /.search form -->
            <!-- Sidebar Menu -->
            <let-menu :folder="data"></let-menu>
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">@CopyRight</li>
                <li><a href="/manage/index"><i class="fa fa-link"></i> <span>后台管理员维护</span></a></li>
                <li><a href="/leaderManage/index"><i class="fa fa-link"></i> <span>领导账户维护</span></a></li>
                <li><a href="/statisticalPermissions/index"><i class="fa fa-link"></i> <span>微信统计查看权限维护</span></a></li>
                <li><a href="/inputInfo/index"><i class="fa fa-link"></i> <span>统计信息录入</span></a></li>
            </ul>
            <!--<ul class="sidebar-menu" data-widget="tree">
                <li class="header">HEADER</li>
                &lt;!&ndash; Optionally, you can add icons to the links &ndash;&gt;
                <li class="treeview"><a href="#"><i class="fa fa-link"></i>
                    <span>系统管理</span> <span class="pull-right-container">
							<i class="fa fa-angle-left pull-right"></i>
					</span> </a>
                    <ul class="treeview-menu">
                        <li><a href="/manage/index"><i class="fa fa-link"></i> <span>管理员管理</span></a></li>
                        <li><a href="/permission/index"><i class="fa fa-link"></i> <span>菜单管理</span></a></li>
                        <li><a href="/role/index"><i class="fa fa-link"></i> <span>角色管理</span></a></li>
                    </ul>
                </li>

                <li><a href="/scenic/index"><i class="fa fa-link"></i> <span>景区管理</span></a></li>
                <li><a href="/user/index"><i class="fa fa-link"></i> <span>会员管理</span></a></li>
                <li><a href="/good/index"><i class="fa fa-link"></i> <span>门票管理</span></a></li>

                <li class="active"><a href="#"><i class="fa fa-link"></i> <span>Link</span></a></li>
                <li><a href="#"><i class="fa fa-link"></i> <span>Another
							Link</span></a></li>
                <li class="treeview"><a href="#"><i class="fa fa-link"></i>
                    <span>Multilevel</span> <span class="pull-right-container">
							<i class="fa fa-angle-left pull-right"></i>
					</span> </a>
                    <ul class="treeview-menu">
                        <li><a href="/index" class="iframe-target">用户管理</a></li>
                        <li><a href="/type/list" class="iframe-target">分类管理</a></li>
                    </ul>
                </li>
                <li><a href="/orders/index"><i class="fa fa-link"></i> <span>订单管理</span></a></li>
                <li><a href="/news/index"><i class="fa fa-link"></i> <span>新闻管理</span></a></li>
                <li><a href="/errorOrder/index"><i class="fa fa-link"></i> <span>异常订单管理</span></a></li>
            </ul>-->
            <!-- /.sidebar-menu -->
        </section>

        <#--<script>
            // 左边菜单树注册
            Vue.component('let-menu', {
                name: 'let-menu',
                props: ["folder", "isFather"],
                template: '<ul :class="typeof(isFather)===\'undefined\'?\'sidebar-menu\':\'treeview-menu\'" data-widget="tree">' +
                '                <li :data-menu-id="item.id" :class="(item.children&&item.children.length>0)?\'treeview\':\'\'" v-for="item in folder">' +
                '                    <a :href="item.url" @click="menuSwitch(item.url,item.id,$event)">' +
                '                        <i :class="item.icon"></i>' +
                '                        <span>{{item.name}}</span>' +
                '                </li>' +
                '            </ul>',
                mounted: function () {
                    //改变菜单样式
                    let menuID = localStorage.getItem('menuID');
                    if (menuID != null) {
                        setTimeout(function () {
                            let liEl = $('li[data-menu-id="' + menuID + '"]');
                            liEl.addClass('active');
                            liEl.parentsUntil(".sidebar-menu").addClass('active menu-open')
                        }, 0);
                    }
                },
                methods: {
                    //菜单跳转
                    menuSwitch(url, menuID, event) {
                        if (url !== '#') {
                            localStorage.setItem('menuID', menuID);
                            event.preventDefault();
                            window.location.href = url;
                        }
                    }
                }
            })
            var option = {
                data() {
                    return {
                        data: [],//菜单信息
                    }
                },
                mounted: function () {
                    let _this = this;
                    let loading;
                    loading = _this.$loading({
                        lock: true,
                        text: 'Loading',
                        spinner: 'el-icon-loading',
                        background: 'rgba(0, 0, 0, 0.7)'
                    });
                    $.ajax({
                        url: '/permission/getListByManageAccount',
                        data: {},
                        type: 'post',
                        success: function (result, status, xhr) {
                            loading.close();
                            _this.data = result.data;
                        },
                        error: function (xhr, status, error) {
                            console.log(error)
                            loading.close();
                        }
                    });
                },
            };
            var app = Vue.extend(option);
            new app().$mount('#menuTree');
        </script>-->


        <!-- /.sidebar -->
    </aside>
</div>
</#macro>