<%@page import="com.cpic.icc.system.model.SysUser"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp" %>
<ul id="accordion" class="accordion">
	<li>
		<div class="link"><i class="fa fa-apply"></i>任务申请<i class="fa fa-chevron-down"></i></div>
		<ul class="submenu">
			<li><a href="${ctx}/sysPersonal/taskApply.do">串案模型申请</a></li>
			<li><a href="${ctx}/sysPersonal/modelTaskApply.do">专项模型申请</a></li>
			<!-- <li><a href="${ctx}/sysPersonal/machineTaskApply.do">机器学习申请</a></li>  -->
		</ul>
	</li>
	<li>
		<div class="link"><i class="fa fa-mark"></i>标注管理<i class="fa fa-chevron-down"></i></div>
		<ul class="submenu">
			<li><a href="${ctx}/sysPersonal/markExport.do">标注管理</a></li>
			<li><a href="${ctx}/sysPersonal/markkyExport.do">标注可疑统计</a></li>
		</ul>
	</li>
	<li>
		<div class="link"><i class="fa fa-send-view"></i>调查查看情况<i class="fa fa-chevron-down"></i></div>
		<ul class="submenu">
			<li><a href="${ctx}/outService/canSendM6.do">可发起调查</a></li>
			<li><a href="${ctx}/outService/alreadySendM6.do">已发起调查</a></li>
			<li><a href="${ctx}/outService/succSendM6.do">已完成调查</a></li>
			<li ><a href="${ctx}/outService/backSendM6.do">退回调查</a></li>
		</ul>
	</li>
	<li>
		<div class="link"><i class="fa fa-risk"></i>风险数据查询<i class="fa fa-chevron-down"></i></div>
		<ul class="submenu">
			<li><a href="${ctx}/sysRisk/RiskQuery.do">风险数据查询</a></li>
		</ul>
	</li>
</ul>
<script type="text/javascript">
	//给左列表加on
	var url = "${ctx}";
	var on_val="${param.index}";
	$(".submenu li").each(function(i){
		if(on_val==$(this).text().trim()){
            $(".submenu").find("li").eq(i).addClass("on");
        }
	})
	$(function(){
		//左侧js
		var Accordion = function(el, multiple) {
			this.el = el || {};
			this.multiple = multiple || false;		
			// Variables privadas
			var links = this.el.find('.link');
			// Evento
			links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
		}		
		Accordion.prototype.dropdown = function(e) {
			var $el = e.data.el;
				$this = $(this),
				$next = $this.next();
	
			$next.slideToggle();
			$this.parent().toggleClass('open');
	
			if (!e.data.multiple) {
				$el.find('.submenu').not($next).slideUp().parent().removeClass('open');
			};
		}			
		var accordion = new Accordion($('#accordion'), false);
		//判断是否有on存在

		if($("#accordion li").hasClass("on")){
			$("#accordion li.on").parent().parent().find(".link").click();
		}
		
	})
</script>