<?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;
}
.el-menu-item{
  height: 45px !important;
  line-height: 45px !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
	 <?if(isset($layout_pages["menu_clicked"])){?>
	 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" v-if="checkAuthority3" @click="fn11()">学校管理</el-menu-item>
          <el-menu-item index="1-2" v-if="checkAuthority3" @click="fn12()">年级设定</el-menu-item>
          <el-menu-item index="1-3" v-if="checkAuthority4" @click="fn13()">班级设定</el-menu-item>
          <el-menu-item index="1-4" v-if="checkAuthority1" @click="fn14()">人员列表</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" v-if="checkAuthority13" @click="fn21()">机构认证</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-bell"></i>
          <span>活动管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="3-1" v-if="checkAuthority14" @click="fn31()">活动列表</el-menu-item>
          <el-menu-item index="3-2" v-if="checkAuthority14" @click="fn32()">活动发布</el-menu-item>
          <el-menu-item index="3-3" v-if="checkAuthority15" @click="fn33()">活动审核</el-menu-item>
          <el-menu-item index="3-4" v-if="checkAuthority1" @click="fn34()">募捐活动列表</el-menu-item>
          <el-menu-item index="3-5" v-if="checkAuthority1" @click="fn35()">募捐活动审核</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-news"></i>
          <span>视频管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="4-1" v-if="checkAuthority11" @click="fn41()">合集视频</el-menu-item>
		  		<el-menu-item index="4-2" v-if="checkAuthority11" @click="fn42()">视频列表</el-menu-item>
		  		<el-menu-item index="4-3" v-if="checkAuthority11" @click="fn43()">视频上传</el-menu-item>
		  		<el-menu-item index="4-4" v-if="checkAuthority11" @click="fn44()">公益收益</el-menu-item>
		  		<el-menu-item index="4-5" v-if="checkAuthority11" @click="fn45()">课程分类</el-menu-item>
		  		<el-menu-item index="4-6" v-if="checkAuthority" @click="fn46()">会员缴费</el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="5">
        <template slot="title">
          <i class="el-icon-setting"></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="checkAuthority1" @click="fn53()">常量设定</el-menu-item>
		  		<el-menu-item index="5-4" v-if="checkAuthority16" @click="fn54()">证书管理</el-menu-item>
		  		<el-menu-item index="5-5" v-if="checkAuthority17" @click="fn55()">证书申请</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',
			checkAuthority:<?=($_account->role == 10 || $_account->role == 99)?'true':'false'?>,
			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'?>,
			checkAuthority14:<?=checkAuthority("14")?'true':'false'?>,
			checkAuthority15:<?=checkAuthority("15")?'true':'false'?>,
			checkAuthority16:<?=checkAuthority("16")?'true':'false'?>,
			checkAuthority17:<?=checkAuthority("17")?'true':'false'?>,
		},
		methods:{
			handleOpen(key, keyPath) {
	        console.log(key, keyPath);
	      },
	      handleClose(key, keyPath) {
	        console.log(key, keyPath);
	      },
	      fn11(){
	      	window.location.href='school_list.php'
	      },
	      fn12(){
	      	window.location.href='grade_list.php'
	      },
	      fn13(){
	      	window.location.href='class_list.php'
	      },
	      fn14(){
	      	window.location.href='user_list.php'
	      },
	      fn21(){
	      	window.location.href='org_accredited_list.php'
	      },
	      fn31(){
	      	window.location.href='event_list.php'
	      },
	      fn32(){
	      	window.location.href='event_publishing.php'
	      },
	      fn33(){
	      	window.location.href='event_examine.php'
	      },
	      fn34(){
	      	window.location.href='donations_event_list.php'
	      },
	      fn35(){
	      	window.location.href='donations_examine_list.php'
	      },
	      fn41(){
	      	window.location.href='collection_media_list.php'
	      },
	      fn42(){
	      	window.location.href='media_list.php'
	      },
	      fn43(){
	      	window.location.href='media_upload.php'
	      },
	      fn44(){
	      	window.location.href='proceeds_list.php'
	      },
	      fn45(){
	      	window.location.href='course_category_list.php'
	      },
	      fn46(){
	      	window.location.href='user_pay_list.php'
	      },
	      fn51(){
	      	window.location.href='account_list.php'
	      },
	      fn52(){
	      	window.location.href='government_list.php'
	      },
	      fn53(){
	      	window.location.href='system_const_list.php'
	      },
	      fn54(){
	      	window.location.href='certificate_list.php'
	      },
	      fn55(){
	      	window.location.href='certificate_apply_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>
<?
}
?>