<%@page import="com.dgt.graphdemo.utils.SysUser"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp" %>
<div id="LOGIN_CONTENT" style="width: 100%;position: absolute;top: 0;bottom: 0;z-index: 999999999;background-color: rgba(0,0,0,0.5);font-size: 32px;display: none;align-items: center;justify-content: center;">点击唤醒</div>
	<div class="logo" style="position:relative;">
		<img src="${ctx}/images/indexNew/logo.png" style="width: 110px;height:30px; margin: 5px 0px 0px 22px;">
		<h3>寿险反欺诈</h3>
	</div>
	<ul class="myNav">
		<li><a href="${ctx}/login/toIndex.do"><i></i>查询</a></li>
	   	<li>
            <a href = "${ctx}/login/toFLoop.do">
                <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;" src="${ctx}/images/indexNew/qzjc.png">
            欺诈检测</a>
        </li>
        <li>
            <a href = "${ctx}/sysTaskPlus/getModels.do">
            <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;" src="${ctx}/images/indexNew/model2.png">专项模型
            </a>
        </li>
	   <!--	<hna:permission privilege="sysTask.statisPage">
	   	<li style="display:none"><a href = "${ctx}/login/toAnalyze.do">以前的统计</a></li>	   	
	   	</hna:permission>-->
		<hna:permission privilege="sysPersonal.search">
		<li>
            <a href = "${ctx}/sysPersonal/taskApply.do">
                <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;"  src="${ctx}/images/indexNew/grgl.png">
            疑案管理</a></li>
			</hna:permission>
        <hna:permission privilege="sysTask.statisPage">
		<li>
            <a href = "${ctx}/login/toAnalyze2.do">
                <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;"  src="${ctx}/images/indexNew/tj.png">
            统计</a>
        </li>
		</hna:permission>
        <hna:permission privilege="sysTask.companyPage">
        <li>
            <a href = "${ctx}/login/toAnalyze3.do">
                <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;"  src="${ctx}/images/indexNew/zgstj.png">
            总公司统计</a>
        </li>
        </hna:permission>
        <hna:permission privilege="sysTask.branchPage">
        <li>
            <a href = "${ctx}/login/toAnalyze4.do">
                <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;"  src="${ctx}/images/indexNew/fgstj.png">
            分公司统计</a>
        </li>
        </hna:permission><!---->
	   	 <li>
            <a href = "${ctx}/sysUser/downloadFile.do" target="_blankHelp">
                <img style="width:24px;height:24px;padding-right:1px;margin-top: -5px;" src="${ctx}/images/indexNew/czsc.png">
            操作手册</a>
        </li>
	</ul>
	<div class="headRight">
       <!--  <img style="width: 84px;" src="${ctx}/images/newImg/dapin.png"> -->
        <!-- <input type="button" id="daPing" name="daPin" value="大屏可视化" style="border: 1px solid #00b591;background-color:#00bb9c;color:#fff;padding: 4px 5px;border-radius:5px;margin-right: 10px;"> -->
		<img class="userHead" src="${ctx}/images/person1.png">
		<span><a id="sysset">${currentUser.userCnName}</a><!-- span里面的 style="position: relative;" -->
		<ul class="syssetContent"><!--ul里面的  style="right:0px;" -->
			<hna:permission privilege="sysUser.view">
				<a href="${ctx}/sysUser/list.do"><li>用户管理</li></a>
			</hna:permission>
			<hna:permission privilege="sysRole.view">
				<a href="${ctx}/sysRole/list.do"><li>角色管理</li></a>
			</hna:permission>
			<hna:permission privilege="sysAuthority.view">
				<a href="${ctx}/sysAuthority/list.do"><li>权限管理</li></a>
			</hna:permission>
			<hna:permission privilege="sysLog.view">
				<a href="${ctx}/sysLog/list.do"><li>日志查看</li></a>
			</hna:permission>
			<hna:permission privilege="sysTask.issuing">
				<a href="${ctx}/sysTask/list.do"><li>任务管理</li></a>
			</hna:permission>
			<hna:permission privilege="sysTask.para">
            <a href="${ctx}/sysPara/taskApplyPara.do"><li>参数配置</li></a>
			</hna:permission>
            <hna:permission privilege="screen.showMessage">
            <a href="#" id="daPing"><li>大屏监控</li></a>
            </hna:permission>
			<hna:permission privilege="sysPara.codeLibrary">
            <a href="${ctx}/sysPara/codeLibrary.do"><li>codeLibrary</li></a>
            </hna:permission>
			<a href="${ctx}/login/logout.do"><li>退出登陆</li></a>
		</ul>
		</span>
	</div>
<script src="${ctx}/js/lib/jquery.min.js"></script>
<script type="text/javascript">
    var num="${param.index}";
    var url = "${ctx}";
    //导航条的链接，修改  20171017
    $(".myNav li").each(function(i){
        if(num==$(this).text().trim()){
            $(".myNav").find("li").eq(i).addClass("navActive");
        }
    });//20171017
    //大屏展示的权限判断
   /* $.ajax({
        type:"POST",
        url:"${ctx}/sysTask/daPingButton.do",
        data:{},
        dataType:"json",
        success:function(result){
            if(!result.buttonflag){
                $("#daPin").css("display","none");
            }else{
                $("#daPin").css("display","");
            }
        },
        error:function(){
            
        }
    });*/
    //去大屏展示的页面的验证
    $("#daPing").click(function(){
    	$.ajax({
            type:"POST",
            url:"${ctx}/sysTask/daPingDataFresh.do",
            data:{},
            dataType:"json",
            success:function(result){
                
            },
            error:function(){
                
            }
        });
        /*window.open('http://10.186.30.147:8080/scn/show');*/
        window.open("http://10.180.135.55/scn/show");
    })
    //$(".nav").find("li").eq(num).addClass("navActive");//以前的写法是传下标，现在传文字
    $("#sysset").bind("click",function(){
    	$(".syssetContent").toggle();
    });
    <%--$(function(){--%>
    	<%--$("#LOGIN_CONTENT").bind("click",function(){--%>
    		<%--$("#LOGIN_CONTENT").text("正在唤醒中……");--%>
    		<%--var $iframe = $("<iframe id='checkLoginIframe' style='height:0;width:0' src='${ctx}/login/checkedLoginWeb.do'></iframe>")--%>
			<%--$("body").append($iframe);--%>
    	<%--});--%>
    	<%----%>
    	<%--setInterval(function(){--%>
        	<%--$.ajax({--%>
    			<%--type:"POST",--%>
    			<%--url:"${ctx}/login/checkedLogin.do",--%>
    			<%--data:{},--%>
    			<%--dataType:"json",--%>
    			<%--success:function(result){--%>
    				<%--if(result == "succ"){--%>
    				<%--}else if(result.login == "fail"){--%>
    					<%--$("#LOGIN_CONTENT").css("display","flex");--%>
    				<%--}--%>
    			<%--},--%>
    			<%--error:function(){--%>
    				<%--$("#LOGIN_CONTENT").text("唤醒失败，3秒后重新登录！");--%>
    				<%--$("#LOGIN_CONTENT").css("display","flex");--%>
    				<%--setTimeout(function(){--%>
    					<%--window.location.reload();--%>
    				<%--},3000);--%>
    			<%--}--%>
    		<%--});--%>
        <%--},1000*60*10);--%>
    <%--});--%>
    var closeTheCheckLogin = function(){
    	$("#checkLoginIframe").remove();
    	$("#LOGIN_CONTENT").text("点击唤醒");
    	$("#LOGIN_CONTENT").css("display","none");
    }
    
</script>
