<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>pqs9900</title>
    <link rel="shortcut icon" href="/pqs9900/images/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="${ctx}/css/plugin/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/datatimepicker/bootstrap-datetimepicker.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/animate/animate.min.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/jquery/jquery-ui.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/iconfont/iconfont.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/fontawesome/font-awesome.min.css">
    <link rel="stylesheet" href="${ctx}/css/plugin/jquery/jquery.dataTables.min.css">
    <link rel="stylesheet" href="${ctx}/css/switchCss.css">
    <link rel="stylesheet" href="${ctx}/css/basic.css">
    <style>
        body {
            min-width: 1300px;
        }

        #swapSystem {
            color: #FFF;
            cursor: pointer;
            top: 10px;
        }

        .subSystem {
            top: 18px !important;
            opacity: 1 !important;
            left: -70px !important;
            padding: 5px;
            border: 1px solid;
            border-radius: 3px !important;
            width: 140px;
        }

        .subSystem a {
            color: #fff;
            font-size: 12px !important;
            display: block;
            height: 20px !important;
            line-height: 20px !important;
            width: 130px !important;
            text-align: center;
        }

        .small_traggle {
            width: 0;
            height: 0;
            border: 8px solid;
            border-color: transparent transparent #fff;
            position: relative;
            top: -12px;
            left: 25px;
            display: none;
        }

        .switchSystem {
            margin-right: 0px !important;
        }

        #userDiv {
            position: fixed;
            right: 10px;
            top: 10px;
            width: 80px;
        }
    </style>
</head>
<body class="bg-main">
<header id="page_header">
    <div class="logow fadeInLeft f20 fb fl mt-3">
        <a href="javascript:void(0)"><img src="${ctx}/images/logo.png" style="height: 68px"/></a>
    </div>
    <div class="fl top-menu">
        <span class="ml10 disinlineb mt-6" id="bigTitle">电能质量监测系统</span>
        <shiro:lacksRole name="root">
            <c:choose>
                <c:when test="${sessionScope.sysType eq '1cfcd6e2-c5fe-4b15-988a-32b90f1170c1'}">
                    <span class="f14" id="smallTitle">PQS-9200暂降监测系统v1.1.0</span>
                </c:when>
                <c:otherwise>
                    <span class="f14" id="smallTitle">PQS-9000谐波监测系统v1.1.0</span>
                </c:otherwise>
            </c:choose>
            <c:if test="${false}">
                <div id="userDiv">
                <span id="swapSystem">
                        <ul>
                         <li class="switchSystem">
                              <i class="fa fa-exchange">
                                </i>
                                <a href="javascript:void(0)" class="menuone switchSystem">模块切换</a>
                                <div class="small_traggle"></div>
                                <div class="menutwo subSystem">
                                    <a href="javascript:void(0)" item="${item}">${name}</a>
                                </div>
                            </li>
                        </ul>
                  </span>
                </div>
            </c:if>
        </shiro:lacksRole>
        <ul class="f20 ml10 menu">
            <%-- 用户信息的处理页面 --%>
            <shiro:hasRole name="root">
                <input type="hidden" name="role" value="root">
                <li><a href="javascript:void(0);" class="menuone"><i class="fa fa-users mr10"></i>系统配置</a>
                    <div class="menutwo">
                        <a href="javascript:void(0)" onclick="addTab('managers','管理员列表')">管理员列表</a>
                        <a href="javascript:void(0)" onclick="addTab('managesystem','系统项目配置')">系统项目配置</a>
                    </div>
                </li>
            </shiro:hasRole>
            <shiro:hasRole name="system">
                <input type="hidden" name="role" value="sys">
                <li><a href="javascript:void(0);" class="menuone"><i class="fa fa-users mr10"></i>权限配置</a>
                    <div class="menutwo">
                        <a href="javascript:void(0)" onclick="addTab('user','用户管理')">用户管理</a>
                            <%--                        <a href="javascript:void(0)" onclick="addTab('rolelist','角色列表')">角色列表</a>--%>
                        <a href="javascript:void(0)" onclick="addTab('roledistribute','角色分配')">角色分配</a>
                        <a href="javascript:void(0)" onclick="addTab('sys','基础信息管理')">基础信息管理</a>
                        <a href="javascript:void(0)" onclick="addTab('menu','菜单管理')">菜单管理</a>
                        <a href="javascript:void(0)" onclick="addTab('timermanage','定时器管理')">定时器管理</a>
                            <%--<a href="javascript:void(0)" onclick="addTab('permissonlist','资源列表')">资源列表</a>--%>
                            <%--<a href="javascript:void(0)" onclick="addTab('permissiondistribute','资源分配')">资源分配</a>--%>
                    </div>
                </li>
                <li><a href="javascript:void(0);" class="menuone"><i class="fa fa-wrench mr10"></i>基础功能</a>
                    <div class="menutwo">
                        <a href="javascript:void(0)" onclick="addTab('dictype','字典管理')">字典管理</a>
                        <a href="javascript:void(0)" onclick="addTab('depets','部门管理')">部门管理</a>
                        <a href="javascript:void(0)" onclick="addTab('managelist','资源管理')">资源管理</a>
<%--                        <a href="javascript:void(0)" onclick="addTab('webinfo','网站信息管理')">网站信息管理</a>--%>
                    </div>
                </li>
<%--                <li><a href="javascript:void(0);" class="menuone"><i class="fa fa-mobile mr10"></i>短信模块</a>--%>
<%--                    <div class="menutwo">--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('message','已发信息查询')">已发信息查询</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('messageConf','短信配置')">短信配置</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('virtualSend','模拟短信发送')">模拟短信发送</a>--%>
<%--                    </div>--%>
<%--                </li>--%>
<%--                <li><a href="javascript:void(0);" class="menuone"><i class="fa fa-steam mr10"></i>web功能</a>--%>
<%--                    <div class="menutwo">--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('xbcsv','数据导出')">监测点数据导出</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('datacomplet','数据完整性')">手动数据完整性</a>--%>
<%--                    </div>--%>
<%--                </li>--%>
            </shiro:hasRole>
            <shiro:hasRole name="business">
                <input type="hidden" name="role" value="ser">
                <li><a href="javascript:void(0);" class="menuone"><i class="glyphicon glyphicon-cloud mr10"></i>终端管理</a>
                    <div class="menutwo">
                            <%--<a href="javascript:void(0)" onclick="addTab('importgridtop','电网拓扑管理')">电网拓扑管理</a>--%>
                            <%--<a href="javascript:void(0)" onclick="addTab('addrpdata','报告字典管理')">报告字典管理</a> --%>
                        <a href="javascript:void(0);" onclick="addTab('devmanage','终端台账管理')">终端台账管理</a>
                        <a href="javascript:void(0);" onclick="addTab('gwdevmanage','国网台账管理')">国网台账管理</a>
<%--                        <a href="javascript:void(0);" onclick="addTab('deviceversion','终端程序版本管理')">终端程序版本管理</a>--%>
                            <%--<a href="javascript:void(0);" onclick="addTab('electparam','电镀参数读取')">电镀参数读取</a>--%>
<%--                        <a href="javascript:void(0);" onclick="addTab('terminalmaintenance','终端运维管理')">终端运维管理</a>--%>
                        <a href="javascript:void(0);" onclick="addTab('nodeinfo','前置机管理')">前置机管理</a>
                        <c:if test="${sessionScope.sysType eq '1cfcd6e2-c5fe-4b15-988a-32b90f1170c1'}">
                            <a href="javascript:void(0)" onclick="addTab('tflgploy','变压器策略')">变压器策略</a>
                        </c:if>
                        <a href="javascript:void(0)" onclick="addTab('deviceunit','数据单位管理')">数据单位管理</a>
                    </div>
                </li>
                <%--<li><a href="javascript:void(0);" class="menuone"><i class="fa fa-server mr10"></i>综合管理</a>--%>
                <%--<div class="menutwo">--%>
                <%--<a href="javascript:void(0)" onclick="addTab('sysacoding','系统检测')">系统检测</a>--%>
                <%--<a href="javascript:void(0)" onclick="addTab('modulerunning','模块运行状态')">模块运行状态</a>--%>
                <%--<a href="javascript:void(0)" onclick="addTab('databaserunning','数据库运行状态')">数据库运行状态</a>--%>
                <%--<a href="javascript:void(0)" onclick="addTab('dataloss','数据缺失情况')">数据缺失情况</a>--%>
                <%--<a href="javascript:void(0)" onclick="addTab('communicationtraffic','通讯流量记录')">通讯流量记录</a>--%>
                <%--<a href="javascript:void(0)" onclick="addTab('vpncommunication','VPN通讯状态')">VPN通讯状态</a>--%>
                <%--<a href="javascript:void(0)" onclick="addTab('serverrunning','服务器运行状态')">服务器运行状态</a>--%>
                <%--</div>--%>
                <%--</li>--%>
                <li>
                    <a href="javascript:void(0);" class="menuone"><i
                            class="icon iconfont icon-xitong mr10"></i>运行管理</a>
                    <div class="menutwo">
                        <c:if test="${sessionScope.sysType eq '1cfcd6e2-c5fe-4b15-988a-32b90f1170c1'}">
                            <a href="javascript:void(0)" onclick="addTab('offlinedata','暂态数据管理')">暂态数据管理</a>
                        </c:if>
                        <a href="javascript:void(0);" onclick="addTab('deviceproperty','终端运行管理')">终端运行管理</a>
<%--                        <a href="javascript:void(0)" onclick="addTab('viewwave','离线波形查看')">离线波形查看</a>--%>
<%--                        <c:if test="${sessionScope.sysType eq '983f9dfe-4f9a-4c96-89d8-7d425a1f1d6c'}">--%>
<%--                            <a href="javascript:void(0)" onclick="addTab('offpoint','离线监测点')">离线监测点管理</a>--%>
<%--                        </c:if>--%>

                    </div>
                </li>
<%--                <li><a href="javascript:void(0);" class="menuone"><i--%>
<%--                        class="glyphicon glyphicon-pencil mr10"></i>监测点评分</a>--%>
<%--                    <div class="menutwo">--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('linemark','监测点评分管理')">监测点评分管理</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('linemarkweight','监测点评分权重')">监测点评分权重</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('terminalrunexception','终端运行异常')">终端运行异常</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('areaonlinerate','区域终端在线率')">区域终端在线率</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('onlineratecld','终端在线率列表')">终端在线率列表</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('areadataintegrity','区域数据完整性')">区域数据完整性</a>--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('dataintegrity','数据完整性列表')">数据完整性列表</a>--%>
<%--                        <a href="javascript:void(0);" onclick="addTab('terminalrunstrategy','告警策略管理')">告警策略管理</a>--%>
<%--                        <a href="javascript:void(0);" onclick="addTab('halfreport','半月报功能')">半月报功能</a>--%>
<%--                    </div>--%>
<%--                </li>--%>
                <li><a href="javascript:void(0);" class="menuone"><i
                        class="fa fa-cubes mr10"></i>配置管理</a>
                    <div class="menutwo">
                        <c:choose>
                            <c:when test="${sessionScope.sysType eq '1cfcd6e2-c5fe-4b15-988a-32b90f1170c1'}">
                                <a href="javascript:void(0)" onclick="addTab('addrpploy','监测点报告')">监测点报告</a>
                                <a href="javascript:void(0)" onclick="addTab('areaploy','区域报告')">区域报告</a>
                            </c:when>
                            <c:otherwise>
                                <a href="javascript:void(0)" onclick="addTab('showExcelPloy','监测点报表')">监测点报表</a>
<%--                                <a href="javascript:void(0);" onclick="addTab('flowcombamain','流量套餐管理')">流量套餐管理</a>--%>
<%--                                <a href="javascript:void(0);" onclick="addTab('flowstratemain','流量策略管理')">流量策略管理</a>--%>


                            </c:otherwise>
                        </c:choose>
                    </div>
                </li>
<%--                <li><a href="javascript:void(0);" class="menuone"><i class="glyphicon glyphicon-bell mr10"></i>告警管理</a>--%>
<%--                    <div class="menutwo">--%>
<%--                        <a href="javascript:void(0)" onclick="addTab('alarm','告警信息')">告警信息</a>--%>
<%--                            &lt;%&ndash;                             <a href="javascript:void(0)" onclick="addTab('devstate','终端状态')">终端状态</a>&ndash;%&gt;--%>
<%--                            &lt;%&ndash;                             <a href="javascript:void(0)" onclick="addTab('flow','终端流量')">终端流量</a>&ndash;%&gt;--%>
<%--                            &lt;%&ndash;  <a href="javascript:void(0)" onclick="addTab('server','服务器状态')">服务器状态</a>--%>
<%--                              <a href="javascript:void(0)" onclick="addTab('middrun','中间件状态')">中间件状态</a>&ndash;%&gt;--%>
<%--                    </div>--%>
<%--                </li>--%>
<%--                <li><a href="javascript:void(0);" class="menuone"><i class="fa fa-cloud-download mr10"></i>日志管理</a>--%>
<%--                    <div class="menutwo">--%>
<%--                        <a href="javascript:void(0);" onclick="addTab('terminallog','系统运维日志')">系统运维日志</a>--%>
<%--                        <a href="javascript:void(0);" onclick="addTab('eventlog','暂降消息推送日志')">暂降消息推送日志</a>--%>
<%--                    </div>--%>
<%--                </li>--%>
            </shiro:hasRole>
            <shiro:hasRole name="audit">
                <input type="hidden" name="role" value="sj">
                <li><a href="javascript:void(0);" class="menuone"><i class="icon iconfont icon-xitong mr10"></i>设置</a>
                    <div class="menutwo">
                        <a href="javascript:void(0)" onclick="addTab('sj','审计权限')">审计权限</a>
                        <a href="javascript:void(0)" onclick="addTab('online','在线用户')">在线用户</a>
                        <a href="javascript:void(0)" onclick="addTab('loginmanage','用户登录信息')">用户登录信息</a>
                    </div>
                </li>
            </shiro:hasRole>
            <shiro:hasRole name="check">
                <input type="hidden" name="role" value="sh">
                <li><a href="javascript:void(0);" class="menuone"><i class="icon iconfont icon-xitong mr10"></i>设置</a>
                    <div class="menutwo">
                        <a href="javascript:void(0)" onclick="addTab('examiner','审核用户')">审核用户</a></div>
                </li>
            </shiro:hasRole>
        </ul>
        <ul class="user-checkout pa" style="right: 5px;z-index: -10">

            <li style="margin-right: 0px"><i class="icon iconfont icon-ren"></i> <input id="user_name" type='hidden'
                                                                                        value=<shiro:principal
                    property="loginName"/>/>
                <shiro:authenticated>
                    <shiro:principal property="name"/>
                </shiro:authenticated>&nbsp;
            </li>
            <li id="destory"><i class="icon iconfont icon-8fuzhi"></i>注销</li>
        </ul>
    </div>
</header>
<div class="footer-copy clearfix">
    <div class="fr f13"></div>
</div>

<div id="rightContent" style="position: absolute; left: 270px; right: 20px; top: 80px;">
    <div id="tabs" style="width: 100%; height: 100%;">
        <ul>
        </ul>
    </div>
</div>

<c:if test="${displayFlag eq true}">
    <img class="switchImg" src="/pqs9900/images/switchSystem/switch.png" onclick="openDiv('div1')">
    <div id="div1" class="opendiv">
        <div class="switchTitle">系统切换 <p class="closeX" onclick="tkClose()">x</p></div>
        <div id="switchDiv" class="fdz1">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-md-12" style="text-align: center">
                        <c:if test="${item == 'pqs9000'}">
                            <img class="dz" item="${item}" src="/pqs9900/images/switchSystem/pqs9000.png"/>
                        </c:if>
                        <c:if test="${item == 'pqs9200'}">
                            <img class="dz" item="${item}" src="/pqs9900/images/switchSystem/pqs9200.png"/>
                        </c:if>
                    </div>
                </div>
            </div>
        </div>
    </div>
</c:if>
<div id="bgdiv"></div>

<script src="${ctx}/js/plugin/jquery/jquery.min.js"></script>
<script src="${ctx}/js/plugin/jquery/jquery.dataTables.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap.min.js"></script>
<script src="${ctx}/js/plugin/bootstrap-table/dataTables.bootstrap.js"></script>
<script src="${ctx}/js/plugin/layui/layer.js"></script>
<script src="${ctx}/js/plugin/jquery/jquery.contextMenu.js"></script>
<script src="${ctx}/js/plugin/jquery/jquery.cleverTabs.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.js"></script>
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${ctx}/jspJS/utils/judgeAjaxStatus.js"></script>
<script src="${ctx}/js/basic.js"></script>
<script src="${ctx}/jspJS/main.js"></script>
<script src="${ctx}/jspJS/filebackup/FileBackUp.js"></script>
<script>
    $("#swapSystem").on('mouseover', function () {
        $(".small_traggle").css("display", "block")
    })
    $("#swapSystem").on('mouseleave', function () {
        $(".small_traggle").css("display", "none")
    })


    $("#switchDiv img").on("click", function () {
        window.location.href = "/sso/user/judgeLogin?item=" + $(this).attr("item");
    })


    function getDiv(id) {
        return document.getElementById(id);
    }

    function openDiv(obj) {
        if (!getDiv(obj)) return false;
        var b = getDiv('bgdiv');
        var d = getDiv(obj);
        b.style.visibility = 'visible';
        d.style.visibility = 'visible';
        var wd = window.top.document.documentElement.clientWidth - d.offsetWidth;
        var ht = window.top.document.documentElement.clientHeight - d.offsetHeight;
        d.style.left = (wd / 2) + 'px';//横向居中
        d.style.top = (ht / 2) + 'px';//垂直居中

        b.onclick = function () {
            closeDiv(obj);
            window.onresize = null;
        };  //点击背景关闭弹出层
    }

    //关闭弹出层
    function closeDiv(obj) {
        var b = getDiv('bgdiv');
        var d = getDiv(obj);
        b.style.visibility = 'hidden';
        d.style.visibility = 'hidden';
    }

    function tkClose() {
        var tk = document.getElementById("div1");
        var tk2 = document.getElementById("bgdiv");
        tk.style.visibility = 'hidden';
        tk2.style.visibility = 'hidden';
    }
</script>
</body>
</html>
