<?php
/**
 * 菜单文件
 * $Id: menu.inc,v 1.2 2015/10/08 11:49:32 huang Exp $
 * @author mocho
 * @access public
 * @package manager.templates
 */
?>
<style type="text/css">
.viewbutton_used {
	color: #000
}
html,body{
	width: 100%;
	height: 100%;
	overflow: hidden;
}
.el-menu{
	border-right: none!important;
}
/*a{
	color: #000;
	text-decoration: none;
}
a:hover{
	text-align: none;
}
.el-menu-item.is-active{
	color: #409EFF;!important
}*/
</style>
<script type="text/javascript" src="scripts/vue.min.js" ></script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="scripts/axios.min.js" ></script>

<!--<div id="menus" class="menus">
	<div class="menu_title">信息设定</div>
	<div class="menu_item" id="menu_info"><a href="#nogo">学校管理</a></div>
	<div class="menu_item" id="menu_grade"><a href="grade_list.php">年级设定</a></div>
	<div class="menu_item" id="menu_class"><a href="class_list.php">班级设定</a></div>
	
	<div class="menu_title">审核管理</div>
	<div class="menu_item" id="menu_organization"><a href="organization_list.php">机构认证</a></div>
	
	<div class="menu_title">活动管理</div>
	<div class="menu_item" id="menu_class"><a href="class_list.php">活动列表</a></div>
	<div class="menu_item" id="menu_class"><a href="class_list.php">活动发布</a></div>
	<div class="menu_item" id="menu_class"><a href="class_list.php">活动审核</a></div>
	
	<div class="menu_title">系统设定</div>
	<div class="menu_item" id="menu_account"><a href="government_list.php">厅县局管理</a></div>
	<div class="menu_item" id="menu_account"><a href="account_list.php">账户管理</a></div>
	<div class="menu_item" id="menu_account"><a href="system_const_list.php">常量设定</a></div>
</div>-->
<div id="leftMenu">
	<el-menu
      default-active="<?=$layout_pages["menu_clicked"] ?>"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
       unique-opened="true"
       background-color="#000"
       text-color="#fff">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span>信息设定</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1-1" @click="fn11()">学校管理</el-menu-item>
          <el-menu-item index="1-2" @click="fn12()">年级设定</el-menu-item>
          <el-menu-item index="1-3" @click="fn13()">班级设定</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>审核管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="2-1" @click="fn21()">机构认证</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span>活动管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="3-1" @click="fn31()">活动列表</el-menu-item>
          <el-menu-item index="3-2" @click="fn32()">活动发布</el-menu-item>
          <el-menu-item index="3-3" v-if="checkAuthority2" @click="fn33()">活动审核</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span>视频管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="4-1" v-if="checkAuthority1" @click="fn41()">合集视频</el-menu-item>
		  <el-menu-item index="4-2" v-if="checkAuthority2" @click="fn42()">视频列表</el-menu-item>
		  <el-menu-item index="4-3" v-if="checkAuthority2" @click="fn43()">公益收益</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="5">
        <template slot="title">
          <i class="el-icon-menu"></i>
          <span>系统设定</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="5-1" v-if="checkAuthority1" @click="fn51()">账户管理</el-menu-item>
		  <el-menu-item index="5-2" v-if="checkAuthority2" @click="fn52()">领导机构</el-menu-item>
		  <el-menu-item index="5-3" v-if="checkAuthority2" @click="fn53()">常量设定</el-menu-item>
        </el-menu-item-group>
      </el-submenu>

    </el-menu>
</div>
<script type="text/javascript">
	new Vue({
		el:'#leftMenu',
		data:{
			default_active:'1-1',
			checkAuthority1:<?=checkAuthority("1")?'true':'false'?>,
			checkAuthority2:<?=checkAuthority("2")?'true':'false'?>,
			checkAuthority3:<?=checkAuthority("3")?'true':'false'?>,
			checkAuthority4:<?=checkAuthority("4")?'true':'false'?>,
			checkAuthority5:<?=checkAuthority("5")?'true':'false'?>,
			checkAuthority6:<?=checkAuthority("6")?'true':'false'?>,
			checkAuthority7:<?=checkAuthority("7")?'true':'false'?>,
			checkAuthority8:<?=checkAuthority("8")?'true':'false'?>,
			checkAuthority9:<?=checkAuthority("9")?'true':'false'?>,
			checkAuthority10:<?=checkAuthority("10")?'true':'false'?>,
			checkAuthority11:<?=checkAuthority("11")?'true':'false'?>,
			checkAuthority12:<?=checkAuthority("12")?'true':'false'?>,
			checkAuthority13:<?=checkAuthority("13")?'true':'false'?>
		},
		methods:{
			handleOpen(key, keyPath) {
	        console.log(key, keyPath);
	      },
	      handleClose(key, keyPath) {
	        console.log(key, keyPath);
	      },
	      fn11(){
	      	window.location.href='#nogo'
	      },
	      fn12(){
	      	window.location.href='grade_list.php'
	      },
	      fn13(){
	      	window.location.href='class_list.php'
	      },
	      fn21(){
	      	window.location.href='class_list.php'
	      },
	      fn31(){
	      	window.location.href='class_list.php'
	      },
	      fn32(){
	      	window.location.href='class_list.php'
	      },
	      fn33(){
	      	window.location.href='class_list.php'
	      },
	      fn41(){
	      	window.location.href='account_list.php'
	      },
	      fn42(){
	      	window.location.href='account_list.php'
	      },
	      fn43(){
	      	window.location.href='account_list.php'
	      },
	      fn51(){
	      	window.location.href='account_list.php'
	      },
	      fn52(){
	      	window.location.href='government_list.php'
	      },
	      fn53(){
	      	window.location.href='system_const_list.php'
	      }
		}
	})
</script>

<?
// 选中当前操作的菜单
if (isset($layout_pages["menu_clicked"])) {
?>
<script language="javascript">
	var menu_id = '<?=$layout_pages["menu_clicked"] ?>';
	$("#" + menu_id).addClass("menu_item_clicked").removeClass("menu_item");
</script>
<?
}
?>