zhitong.yu
2024-05-11 b72f8f8d58417eb6fb29672d8ac17cfafa46775c
src/main/webapp/Home/Home.jsp
@@ -1,4 +1,4 @@
<%--
<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2023/11/13
@@ -12,17 +12,16 @@
    <title></title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="../CSS/layui.css">
    <link rel="stylesheet" href="../Home/HomeCss/Home.css"/>
    <link rel="stylesheet" href="../CSS/layui1.css"/>
    <link rel="stylesheet" href="../Home/HomeCss/Time.css/">
    <link rel="stylesheet" href="Search/css/style.css"/>
    <link rel="stylesheet" href="Search/css/style-search.css"/>
    <style>
        .layui-table-click {
            background-color: #10DB3E !important;
            color: black; /*设置文字颜色为白色*/
        }
        /*.layui-table-click {*/
        /*    background-color: #10DB3E !important;*/
        /*    color: black; !*设置文字颜色为白色*!*/
        /*}*/
        .BMap_noprint{
            z-index: 9999;
        }
@@ -61,8 +60,8 @@
        }
        .layui-laypage{
            position: relative;
            left: 380px;
        }
        .layui-table th{
            color: white;
            border: none !important;
@@ -75,8 +74,8 @@
            background-color: rgba(28, 52, 89, 0) !important;
            border: none !important;
        }
        .layui-table tr:hover{
            background-color: black !important;
        .layui-table tr:hover td{
            color: #57E1E0;
        }
        .layui-laypage {
            background-color: rgba(5, 73, 146, 0) !important;
@@ -134,6 +133,34 @@
            background: url("/hxzkuwb/Home/HomeImg/title.png")no-repeat;
            background-position: center;
        }
        .loading {
            width: 200px;
            height: 200px;
            box-sizing: border-box;
            border-radius: 50%;
            border-top: 10px solid #63a69f;
            /* 相对定位 */
            position: relative;
            /* 执行动画(动画a1 时长 线性的 无限次播放) */
            animation: a1 2s linear infinite;
        }
        .loading::before,
        .loading::after {
            content: "";
        }
        .loading::before {
            border-top: 10px solid #f2e1ac;
            /* 旋转120度 */
            transform: rotate(120deg);
        }
        .loading::after {
            border-top: 10px solid #f2836b;
            /* 旋转240度 */
            transform: rotate(240deg);
        }
    </style>
</head>
<body>
@@ -152,14 +179,14 @@
                <h1 style="text-align: center;height: 70px;line-height: 65px;color: white;font-size: 25px;width: 100%;position: relative;top: -8px" id="titles"></h1>
        </div>
    </div>
     <div class="layui-row" style="position: fixed;top: 30px;right: 15px;z-index: 9999999999">
     <div class="layui-row" id="wealcome" style="position: fixed;top: 30px;right: 15px;z-index: 999999999">
            <div class="layui-col-xs12 layui-col-md12" style="width: 100%">
                <ul class="htxx" style="width: 100%;">
                    <li style="display: inline-block"><img src="HomeImg/date.png" style="position: relative;top: 0px"/></li>
                    <li id="current-time" style="display: inline-block;font-size: 12px;margin-left: 10px;">日期:2024-00-00 00:00:00</li>
                    <li style="font-size: 12px">欢迎:</li>
                    <li id="yhm" style="font-size: 12px;margin-left: 15px"></li>
                    <li style="margin-left: 15px;"><a href="javascript:;" onclick="joinHouTai()" style="font-size: 12px;position: relative;top: -2px">后台</a></li>
                    <li style="margin-left: 15px;"><a id="Ht" href="javascript:;" onclick="joinHouTai()" style="font-size: 12px;position: relative;top: -2px">后台</a></li>
                    <li style="margin-left: 15px;"><a href="javascript:;" onclick="out()" title="点击退出登录系统"><img src="HomeImg/logout.png" style="width: 20px;position: relative;top: -3px"> </a> </li>
                </ul>
            </div>
@@ -168,7 +195,8 @@
    <div class="layui-row" id="warningTong"  style="width: 19.5%;height:39%;margin-left: 12px;z-index: 999;position: fixed;margin-top:117px;display: none">
        <div class="layui-col-xs12 layui-col-md12">
            <div style="width: 100%;">
                <span id="warningTongtitle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;padding-left: 78px;color: white;font-size: 16px">告警统计</span>
                <span id="warningTongtitle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;text-align: center;color: white;font-size: 16px">告警统计</span>
                <span id="warningBorder" style="width: 100%;height: 1px;display: inline-block"></span>
            </div>
            <div id="warningTongbody"  style="width: 100%;height: 90%">
                <marquee direction="up" scrollamount="2" id="myMarquee" class="gjxx" style="height: 300px;width: 18%;z-index: 99999999;display: none">
@@ -183,7 +211,8 @@
    <div id="txin" class="layui-row" style="display: none;width: 19.5%;height: 39%;margin-left: 12px;;margin-top: 3.5%;position: fixed;z-index: 999;">
        <div class="layui-col-xs12 layui-col-md12">
            <div style="width: 100%;">
                <span id="TongXuntitle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;padding-left: 78px;color: white;font-size: 16px">即时通讯</span>
                <span id="TongXuntitle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;text-align: center;color: white;font-size: 16px">即时通讯</span>
                <span id="warningBorder" style="width: 100%;height: 1px;display: inline-block"></span>
            </div>
            <div id="TongXunbody" style="width: 100%;height: 90%;padding-top: 10px;text-align: center;overflow:hidden;">
                <p style=""><img src="HomeImg/bs2.png" width="360" style="height: 15%"/><br><input type="text" id="username" style="position: relative;height: 40px;top: -46px;left: 0px;width: 300px;background-color: transparent;;left: -20px;border: none" placeholder="请输入设备ID" /></p>
@@ -197,7 +226,9 @@
    <div class="layui-row" id="tong1" style="display:none;width: 19.5%;height: 39%">
        <div class="layui-col-xs12 layui-col-md12">
            <div style="width: 100%;">
                <span id="JinRiTongJititle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;padding-left: 78px;color: white;font-size: 16px">今日统计</span>
                <span id="JinRiTongJititle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;text-align: center;color: white;font-size: 16px">今日统计</span>
                <span id="warningBorder" style="width: 100%;height: 1px;display: inline-block"></span>
            </div>
            <div id="JinRiTongJibody" style="width: 100%;height: 90%;text-align: center;overflow:hidden;">
            <div class="weichuli" ><img src="HomeImg/WeiChuLi.png" style="width: 120px;position: relative;top: 90px;left: 50px"></div>
@@ -225,10 +256,16 @@
        </div>
    </div>
    <%--    区域统计--%>
    <a href="javascript:;" id="PowerShuaXin" onclick="ChongDianPowerShuaXin()" style="width: 60px;height: 40px;text-align: center;font-size: 12px;line-height: 40px;background-color: #00bff4;display: inline-block;position:fixed;right: 7%;bottom: 40%;z-index: 99999999999999;color: white;display: none">刷新</a>
    <a href="javascript:;" onclick="ChongDianPower()" style="width: 60px;height: 40px;text-align: center;font-size: 12px;line-height: 40px;background-color: #00bff4;display: inline-block;position:fixed;right: 2%;bottom: 40%;z-index: 99999999999999;color: white">充电人员</a>
    <a style="width: 20%;height: 8%;text-align: center;font-size: 12px;display: inline-block;position:fixed;right: 2%;bottom: 30%;z-index: 99999999999999;color: white"><img src="/hxzkuwb/Home/HomeImg/border1.png"></a>
    <div class="layui-row" id="tong2" style="width: 19.5%;height: 39%;z-index: 999999;display: none;">
        <div class="layui-col-xs12 layui-col-md12">
            <div style="width: 100%;">
                <span id="QuYutitle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;padding-left: 78px;color: white;font-size: 16px">区域统计</span><span style="position: absolute;top: 10px;left: 310px"><a href="javascript:;" title="上一页" onclick="nextpageQuYu('上一页')"><img src="HomeImg/jt1.png" style="width: 20px"/></a>&nbsp;<a href="javascript:;" title="下一页" onclick="nextpageQuYu('下一页')"><img src="HomeImg/jt2.png" style="width: 20px"/></a></span>
                <span id="QuYutitle" style="display: inline-block;width: 100%;height: 10%;line-height: 35px;text-align: center;color: white;font-size: 16px">区域统计</span><span style="position: absolute;top: 10px;left: 310px"><a href="javascript:;" title="上一页" onclick="nextpageQuYu('上一页')"><img src="HomeImg/jt1.png" style="width: 20px"/></a>&nbsp;<a href="javascript:;" title="下一页" onclick="nextpageQuYu('下一页')"><img src="HomeImg/jt2.png" style="width: 20px"/></a></span>
                <span id="warningBorder" style="width: 100%;height: 1px;display: inline-block"></span>
            </div>
            <div id="QuYubody" style="width: 100%;height: 90%;padding-top: 10px;text-align: left;overflow:hidden;">
            <div style="z-index: 9999;color: white;width: 360px;">
@@ -261,6 +298,10 @@
            </div>
        </div>
    </div>
<%--    <div id="cxgjs" style="width: 55%;height: 50%;z-index: 99999999999;position: fixed;top: 10%;left: 20%;background-color: white;padding: 2%;padding-bottom: 5%;border-radius: 10px">--%>
<%--        <span onclick="Cxgj()" style="cursor: pointer;display: inline-block;float: right"><img src="HomeImg/clos.png" width="25"/></span><br>--%>
<%--        <iframe src="../HouTai/ChaXunGuiJi/ChaXunGuiJi1.jsp" style="width: 100%;height: 50%;z-index: 99999999999;border: 0px;position: fixed"></iframe>--%>
<%--    </div>--%>
    <div class="layui-row" style="height: 100%;width: 100%;position: fixed;top: 0px;opacity: 0" id="ditu1">
        <div class="layui-col-xs12 layui-col-md12">
           <iframe src="Home1.jsp" style="width: 100%;height: 100%;border: none;"></iframe>
@@ -298,6 +339,15 @@
                <table id="fence" lay-filter="fence"></table>
            </div>
            <div class="boxfoot6"></div>
        </div>
    </div>
<%--    充电信息--%>
    <div class="layui-row" id="fen1" style="background-color: rgb(255, 255, 255,0)">
        <div class="layui-col-xs12 layui-col-md12">
            <div style="padding-top: 30px;padding-left: 20px;padding-right: 20px">
                <table id="PowerPerson"  lay-filter="PowerPerson" style="background-color: rgb(255, 255, 255,1)" ></table>
            </div>
            <div></div>
        </div>
    </div>
    <%--    警告信息--%>
@@ -427,8 +477,14 @@
    <div class="layui-row" id="Ditu">
        <div class="layui-col-xs12 layui-col-md12" style="text-align: center">
            <div style="text-align: center;z-index: 99999">
                <ul style="margin: auto;text-align: center;width: 100%;padding: 5px;background-color: rgb(35, 48, 73,0.7);z-index: 999999" class="MapShow">
                <ul style="margin: auto;text-align: center;width: 100%;padding: 5px;z-index: 999999;" class="MapShow">
                    <li id="topbottom" style="display: none;margin-left: 12.8%"><img src="HomeImg/tobottom.png" style="width:1%"></li>
                    <li style="font-size: 12px;color: #07F4F6;width: 10%;display: inline-block;text-align: right"><img src="/hxzkuwb/Icon/隐藏看板.png" alt="隐藏看板" title="隐藏看板" onClick="yckb()"
                                                                                                                       style="width: 22%;cursor:pointer;margin-right:2%"><br><span id ="yckbtext">隐藏看板</span></li>
                    <li  style="font-size: 12px;color: #07F4F6;width: 10%;display: inline-block" id="maps"><input  type="checkbox" id="sanweis" onClick="Qh1()"  style="display: none;position: relative;top:
2px"/><img src="/hxzkuwb/Icon/3D地图.png" title="切换地图" alt="切换地图"  onClick="Qh1()" style="width: 22%;cursor:pointer;"><br>三维地图</li>
                    <li style="font-size: 12px;color:#07F4F6;width: 10%;display: inline-block;text-align: left" ><img src="/hxzkuwb/Icon/查看更多.png"  onclick="ello()" title="更多操作" style="margin-
left:1%;width: 22%;cursor:pointer;" alt="更多操作"><br><span style="margin-right: 1%">更多操作</span></li>
                </ul>
            </div>
        </div>
@@ -436,8 +492,8 @@
    <%--    告警信息处理窗口--%>
    <div class="layui-row" id="wind" style="display: none">
        <div class="layui-col-xs12 layui-col-md12" style="">
            <img src="HomeImg/zuosj.png" style="width: 25px;position: relative;left: -19px;top: 115px">
            <div style="width: 320px;height: 300px;background-color: white" id="XiangXi">
            <img src="HomeImg/zuosj.png" style="width: 25px;position: relative;left: -19px;top: 140px">
            <div style="width: 200%;color: black;overflow-y: hidden;background-color: white;border: 3px solid #7CCEFF;" id="XiangXi">
            </div>
        </div>
    </div>
@@ -490,10 +546,10 @@
    </div>
<%--    人员详细数据--%>
    <div class="layui-row" id="personMsg" style="z-index: 9999999">
        <div class="layui-col-xs12 layui-col-md12" style="">
            <div style="width: 55%;height: 70%;background-color: #F2F2F2;padding: 15px">
                <div>
    <div class="layui-row" id="personMsg"  style="z-index: 9999999;">
        <div class="layui-col-xs4 layui-col-md4" style="">
            <div id="boxses" class="boxallsMSG" style="color: black;width: 80%;height: 70%;padding: 15px;margin-left: 110%">
                <div style="">
                    <a href="javascript:;" onclick="ShuaXinShuJu()"><span style="width: 100px;display: inline-block;background-color: #0357D1;text-align: center;color: white;height: 25px;line-height: 25px;">刷新数据</span><span id="personDate" style="color: black;margin-left: 30px"></span></a>
                    <a href="javascript:;" onclick="GuanMsg()"><span style="width: 60px;display: inline-block;background-color: #0357D1;text-align: center;color: white;height: 25px;line-height: 25px;float: right">关闭</span></a>
                </div>
@@ -538,9 +594,10 @@
                <div style="margin-top: 30px;float: left;position: relative;top: -110px;width: 100%;">
                    <span>文字:</span>
                    <span><input type="text" id="context1" style="width: 70%;height: 25px;border: 1px solid #BFE4F2"></span>
                    <a href="javascript:;" onclick="sendMsg()"><span style="border: 1px solid #BFE4F2;height: 23px;line-height: 23px;width: 40px;background-color:#BFE4F2;display: inline-block;text-align: center;position: relative;left: -5px;top: -1px">发送</span></a>
                    <a href="javascript:;" onclick="sendMsg()"><span style="border: 1px solid #BFE4F2;height: 23px;line-height: 24px;width: 40px;background-color:#BFE4F2;display: inline-block;text-align: center;position: relative;left: -5px;top: 0px">发送</span></a>
                </div>
            </div>
            <div class="boxfootMSG" style="width: 100%"></div>
        </div>
    </div>
<%--    告警详细处理--%>
@@ -550,9 +607,9 @@
                   <li style="margin: 15px 0px">序号:<input type="text" id="warningid" name="ids" readonly style="background-color: whitesmoke;width: 200px;border: none;padding: 5px"></li>
                   <span style="display:none" id="warningidtype"></span>
                   <li style="margin: 15px 0px">快速处理:
                       <input type="radio" name="baoliu5" value="无需处理" title="无需处理" checked>无需处理
                       <input type="radio" name="baoliu5" value="误报" title="误报">误报
                       <input type="radio" name="baoliu5" value="已联系" title="已联系">已联系
                       <input type="radio" name="baoliu5" onclick="gjxzt('无需处理')" value="无需处理" title="无需处理" checked>无需处理
                       <input type="radio" name="baoliu5"  onclick="gjxzt('误报')" value="误报" title="误报">误报
                       <input type="radio" name="baoliu5"  onclick="gjxzt('已联系')" value="已联系" title="已联系">已联系
                   </li>
                   <li style="margin: 15px 0px">详细处理记录:</li>
                   <li style="margin: 15px 0px">
@@ -562,6 +619,7 @@
                       <button type="submit" class="layui-btn" lay-submit="" lay-filter="" onclick="warningbc()">保存</button>
                       <button type="button" class="layui-btn layui-btn-normal" lay-filter="" onclick="warningqx()"  style="margin-left: 50px">取消</button>
                   </li>
                   <input type="hidden" value="" id="idwar">
               </ul>
        </div>
    </div>
@@ -596,20 +654,48 @@
        </div>
    </div>
</div>
<span class="JingWeiDu" style="position: fixed;bottom: 0px;display: inline-block;height: 20px;z-index: 9;right: 0px">
<%--更多--%>
<div style="width: 100%">
<div id="ello" style="display: none;z-index: 999999999;width: 14%;height: 10%;position: fixed;bottom: 11.6%;right: 36%;background-color: rgba(50,101,159,0.6);border-radius: 5px">
    <ul style="padding-top: 5%;">
        <li style="color: white;display: inline-block;width: 45%;text-align: center"><span>显示基站</span> &nbsp;<input onclick="showJiZhan()" style="" id="showJiZhan" type="checkbox"/></li>
        <li style="color: white;display: inline-block;width: 45%;text-align: center"><span>显示网关</span> &nbsp;<input onclick="showWangGuan()" style="" id="ShowWangGuan" type="checkbox"/></li>
        <li style="color: white;display: inline-block;width: 45%;text-align: center"><span>显示离线</span> &nbsp;<input onclick="showLiXian()" style="" id="ShowLiXianes" type="checkbox"/></li>
        <li style="color: white;display: inline-block;width: 45%;text-align: center"><span>区域框选</span> &nbsp;<input onclick="QuYuKuangXuan()" style="" id="QuYuKuangXuan" type="checkbox"/></li>
        <li style="color: white;display: inline-block;width: 45%;text-align: center"><span>聚集显示</span> &nbsp;<input onclick="JuJiXianShi()" style="" id="JuJiXianShi" type="checkbox"/></li>
<%--        <li style="width: 40%;border: 1px solid red;color: white;height: 15%;line-height: 15%"><span>显示基站</span><input onclick="showJiZhan()" style="margin-left: 10%;margin-top: 5%" id="showJiZhan" type="checkbox"/></li>--%>
<%--        <li style="width: 40%;color: white;height: 15%;line-height: 15%"><span>显示网关</span><input onclick="showWangGuan()" style="margin-left: 10%;margin-top: 5%" id="ShowWangGuan" type="checkbox"/></li>--%>
<%--        <li style="color: white;height: 15%;line-height: 15%"><span>显示离线</span><input onclick="showLiXian()" style="margin-left: 10%;margin-top: 5%" id="ShowLiXianes" type="checkbox"/></li>--%>
<%--        <li style="color: white;height: 15%;line-height: 15%"><span>区域框选</span><input onclick="QuYuKuangXuan()" style="margin-left: 10%;margin-top: 5%" id="QuYuKuangXuan" type="checkbox"/></li>--%>
<%--        <li style="color: white;height: 15%;line-height: 15%"><span>聚集显示</span><input onclick="JuJiXianShi()" style="margin-left: 10%;margin-top: 8%" id="JuJiXianShi" type="checkbox"/></li>--%>
    </ul>
</div>
</div>
<span class="JingWeiDu" style="position: fixed;bottom: 0px;display: inline-block;height: 20px;z-index: 9999;right: 0px">
</span>
<div class="heimu" style="display: none;width: 100%;height: 100%;position: fixed;top: 0px;left: 0px;z-index: 9999;background-color: black;opacity: 0.8"></div>
<span class="heimu1" style="display: none;z-index: 99999999;position: fixed;top: 0px;width: 100%;text-align: center;margin-top: 20%">
   <span style="display: inline-block;width: 200px;height: 40px;line-height: 40px;background-color: rgba(0,0,0,0.6);color: white"> 正在加载中.....</span>
</span>
</body>
<div style="height: 100%;width: 24%;position: fixed;top: 0px;left: 0px;z-index: 9;" id="border2s"></div>
<div style="height: 100%;width: 24%;position: fixed;top: 0px;right: 0px;z-index: 9;" id="border3s"></div>
<%--三维建筑内人员数量信息--%>
<div id="JianZhuMsg" style="background: url(../Home/HomeImg/FloorBg1.png) no-repeat; background-size: 100% 200%;position: fixed;top: -2%;right: -25%;width: 25%;height: 105%;z-index: 999999999999">
<div id="Kuanges">
</div>
</div>
<%--<div style="height: 5%;width: 100%;position: fixed;bottom: 0px;left: 0px;z-index: 9;background: linear-gradient(to top, rgba(0, 0, 0, 1) 1%, rgba(0, 0, 0, 0));"></div>--%>
</body>·
<script type="text/html" id="titleTpl">
    {{# if(d.anchormode === '0' || d.anchormode === '-1' ) { }}
    <span class="" style="color: white;display: inline-block;width: 35px;height: 20px;line-height: 20px;text-align:center;background-color: #666666;border-radius: 5px;font-size: 12px;position: relative;left: -3px">离线</span>
    {{# } else if(d.anchormode === '1') { }}
    <span class="" style="color: white;display: inline-block;width: 35px;height: 20px;line-height: 20px;text-align:center;background-color: limegreen;border-radius: 5px;font-size: 12px;position: relative;left: -3px">在线</span>
    {{# } }}
</script>
<script type="text/html" id="titleTplPower">
    <span>{{d.power}}%</span>
</script>
<script type="text/html" id="titleTpl1">
    {{# if(d.ponline === '0' || d.ponline === '-1' ) { }}
@@ -652,6 +738,7 @@
<script src="HomeJs/Time.js"></script>
<script src="../Home/HomeJs/TuBiao.js"></script>
<script src="HomeJs/checkdJs.js"></script>
<script>
    var login = sessionStorage.getItem('username')
    $("#warningusername").val(login)
@@ -689,6 +776,7 @@
    //二维地图默认为否
    localStorage.setItem("二维地图","不执行")
    //从部门查询图标背景颜色:并显示到 三维/二维/百度
    var mapess;
    function findBuMenColor(dename){
        var data = "departmentname="+dename
        var color = "";
@@ -723,7 +811,7 @@
        });
    }
    loadJScript();
    //loadJScript();
    function loadJScript() {
        var script = document.createElement('script');
@@ -735,6 +823,7 @@
    //百度
    function Qh(){
        mapess++;
        $(".qhWeiLan").css("display","inline-block");
        $("#ditu2").css("opacity","1")
        $("#ditu2").css("z-index","7")
@@ -742,23 +831,23 @@
        $("#ChaXuns").show();
        $(".ctrls").show();
        $(".MapType").show();
        $(".qhPingMian").hide();
        localStorage.setItem("百度地图","执行")
        localStorage.setItem("三维地图","不执行")
        var sanweis = document.getElementById("sanweis")
        var erweis = document.getElementById("erweis")
        var baidus = document.getElementById("baidus")
        sanweis.checked = false;
        baidus.checked = true;
        layer.msg('操作成功')
    }
    //三维
    Qh1()
    function Qh1(){
        mapess++;
        $("#maps").empty();
        $("#maps").append('<li class="MapType" onclick="inits()" style="cursor: pointer;font-size: 12px;width: 100px;display: inline-block;color: '+data[0].color+'"><a href="javascript:;" style="font-size: 12px;cursor:pointer;color: '+data[0].color+'" title=""><img src="/hxzkuwb/Icon/GIS地图.png" style="width: 40%"><br><span style="color: #07F4F6">百度地图</span></a></li>')
        $(".qhWeiLan").css("display","none");
        $("#ditu2").hide();
        $("#ChaXuns").hide();
        $(".qhPingMian").hide();
        $("#ditu1").css("opacity","1");
        $("#ditu1").css("z-index","6")
        $("#ditu3").css("opacity","0")
@@ -766,10 +855,6 @@
        localStorage.setItem("三维地图","执行")
        localStorage.setItem("百度地图","不执行")
        var sanweis = document.getElementById("sanweis")
        var erweis = document.getElementById("erweis")
        var baidus = document.getElementById("baidus")
        sanweis.checked = true;
        baidus.checked = false;
        layer.msg('操作成功')
        $(".MapType").hide();
        $("#weilanxs").hide();
@@ -777,6 +862,7 @@
    var qhWeiLanNum = 0;
    var qhOnline = 0
    var qhJiZhan = 0;
</script>
<script>
@@ -788,7 +874,7 @@
            url: "/hxzkuwb/baidufence.do",
            dataType: "json",
            success: function (data) {
                fences = data.fences;
                fences.push(data.fences);
            },
        });
        return fences;
@@ -982,19 +1068,25 @@
        }
    };
    var maptypesnum = 0;
    if (localStorage.getItem("maptypesnum") == null || localStorage.getItem("maptypesnum") == ""){
        localStorage.setItem("maptypesnum",0)
    }else{
        localStorage.setItem("maptypesnum",localStorage.getItem("maptypesnum"))
    }
    var onLine = 0;
    var onFence = 0;
    function init() {
        maptypesnum=maptypesnum+1;
        var mapts = $(".MapType").text();
        if( maptypesnum%2==0){
            $(".MapType").text("地图");
    var onJiZhan = 0;
    function inits(){
        localStorage.setItem("maptypesnum",parseInt(localStorage.getItem("maptypesnum"))+parseInt(1));
        if(localStorage.getItem("maptypesnum")%2==0){
            localStorage.setItem("mapType","地球模式")
        }else{
            localStorage.setItem("mapType","路网模式")
            $(".MapType").text("地球");
        }
        location.reload();
    }
    function init() {
        var shijiao;
        var zhongxindian;
        var gao;
@@ -1036,6 +1128,19 @@
        //添加地图类型控件
        bm.setHeading(shijiao);   //设置地图旋转角度
        bm.setTilt(gao);
        var zuobiaoxi = "";
        //从数据库查询当前选择的什么系坐标
        $.ajax({
            url: "/hxzkuwb/findbaidumapList",
            type: "GET",
            async: false,
            success: function(data) {
                zuobiaoxi = data[0].zhuanhuan
            }
        });
        var tileLayer = new BMapGL.TileLayer();
        tileLayer.getTilesUrl = function(tileCoord, zoom) {
@@ -1090,11 +1195,17 @@
                        if (data == "") {
                            layer.msg("该人员不存在!")
                        } else {
                            if (zuobiaoxi == "百度"){
                                var c = new Convertor();
                                var rr1 = c.WGS2BD09({
                                    lng: parseFloat(data.baoliu2),
                                    lat: parseFloat(data.baoliu3)
                                });
                            }else{
                                var rr1 = ({lng: parseFloat(data.baoliu2), lat: parseFloat(data.baoliu3)});
                            }
                            var c = new Convertor();
                            var rr1 = c.WGS2BD09({
                                lng: parseFloat(data.baoliu2),
                                lat: parseFloat(data.baoliu3)
                            });
                            var targetPoint = new BMapGL.Point(rr1.lng, rr1.lat);
                            bm.panTo(targetPoint);
                            bm.removeOverlay(markers[pTagid]);
@@ -1111,8 +1222,13 @@
                                        lng: parseFloat(gpsInfo.baoliu2),
                                        lat: parseFloat(gpsInfo.baoliu3)
                                    });
                                    var lng = parseFloat(rr.lng);
                                    var lat = parseFloat(rr.lat);
                                    if (zuobiaoxi == "百度"){
                                        var lng = parseFloat(rr.lng);
                                        var lat = parseFloat(rr.lat);
                                    }else{
                                        var lng = parseFloat(gpsInfo.baoliu2);
                                        var lat = parseFloat(gpsInfo.baoliu3);
                                    }
                                    var userId = gpsInfo.ptagid;
                                    // 判断在线状态
                                    if (gpsInfo.ponline == "1" || gpsInfo.ponline == "0") {
@@ -1260,12 +1376,9 @@
            })
        })
        $("#sousuo2sx").click(function (){
            window.location.reload();
        })
        quxiao = quxiao2;
        // 增加矩形图层
@@ -1286,21 +1399,105 @@
        var tt = 0;
        var tt2 = true;
        var tt3 = 0;
        //获取基站数据。
        var jizhanes = FindShowJiZhan();
        var wangguanes = FindShowWangGuan();
        //获取网关数据
        //var t = 300; 每600ms从后台请求一次最新的数据
        var markers = {};
        var markers1 = {};
        var timer = setInterval(function() {
            if (localStorage.getItem("百度地图") == "不执行"){
                console.log("百度地图不执行")
                return
            }
            markers = {};
            bm.clearOverlays();
            if(onFence == 0){
                //显示围栏
                var polygon = new BMapGL.Polygon(points, { strokeColor: "red",  strokeOpacity: 0.5, fillColor: "red", fillOpacity: 0.3 });
                bm.addOverlay(polygon);
            }
            // bm.addOverlay(polygon);
            if (localStorage.getItem("jizhanshow") == "1"){
                //显示基站
               if (zuobiaoxi == "百度"){
                   for (var i = 0 ; i <jizhanes.length; i ++){
                       var c = new Convertor();
                       var rr = c.WGS2BD09({ lng: parseFloat(jizhanes[i].baoliu6), lat: parseFloat(jizhanes[i].baoliu7)});
                       var point = new BMapGL.Point(rr.lng,rr.lat);
                       // 创建标记
                       var myIcon = new BMapGL.Icon("../Icon/jizhan.png", new BMapGL.Size(40, 40), {
                           anchor: new BMapGL.Size(20, 40)
                       });
                       var jizhan = new BMapGL.Marker(point, { icon: myIcon });
                       var label = new BMapGL.Label(jizhanes[i].anchorid, {offset: new BMapGL.Size(0, -70)});
                       label.setStyle({
                           color: "black",
                           fontSize: "14px",
                           borderRadius: "5px",
                           padding: "5px 5px",
                           border: "0",
                           transform: 'translateX(-50%)',
                       });
                       jizhan.setLabel(label);
                       bm.addOverlay(jizhan);
                       console.log("添加成功")
                   }
               }else{
                   for (var i = 0 ; i <jizhanes.length; i ++){
                       var point = new BMapGL.Point(jizhanes[i].baoliu6,jizhanes[i].baoliu7);
                       // 创建标记
                       var myIcon = new BMapGL.Icon("../Icon/jizhan.png", new BMapGL.Size(40, 40), {
                           anchor: new BMapGL.Size(20, 40)
                       });
                       var jizhan = new BMapGL.Marker(point, { icon: myIcon });
                       bm.addOverlay(jizhan);
                   }
               }
            }
            if (localStorage.getItem("wangguanshow") == "1"){
                if (zuobiaoxi == "百度"){
                    for (var i = 0 ; i <wangguanes.length; i ++){
                        //显示网关
                        var c = new Convertor();
                        var rr = c.WGS2BD09({ lng: parseFloat(wangguanes[i].lon), lat: parseFloat(wangguanes[i].lat)});
                        var point = new BMapGL.Point(rr.lng,rr.lat);
                        // 创建标记
                        var myIcon = new BMapGL.Icon("../Icon/wangguan.png", new BMapGL.Size(40, 40), {
                            anchor: new BMapGL.Size(20, 40)
                        });
                        var wangguan = new BMapGL.Marker(point, { icon: myIcon });
                        var label = new BMapGL.Label(wangguanes[i].loragwid, {offset: new BMapGL.Size(0, -70)});
                        label.setStyle({
                            color: "black",
                            fontSize: "14px",
                            borderRadius: "5px",
                            padding: "5px 5px",
                            border: "0",
                            transform: 'translateX(-50%)',
                        });
                        wangguan.setLabel(label);
                        bm.addOverlay(wangguan);
                        console.log("添加网关成功")
                    }
                }else{
                    for (var i = 0 ; i <wangguanes.length; i ++){
                        //显示网关
                        var point = new BMapGL.Point(wangguanes[i].lon,wangguanes[i].lat);
                        // 创建标记
                        var myIcon = new BMapGL.Icon("../Icon/wangguan.png", new BMapGL.Size(40, 40), {
                            anchor: new BMapGL.Size(20, 40)
                        });
                        var wangguan = new BMapGL.Marker(point, { icon: myIcon });
                        bm.addOverlay(wangguan);
                    }
                }
            }
           if(onLine == 0){
               //只显示在线
               var gps_node_list1 = getGPS();
@@ -1308,14 +1505,17 @@
                   var gpsInfo = gps_node_list1[i];
                   var c = new Convertor();
                   if(gpsInfo.baoliu2!= "-1" && gpsInfo.baoliu2 !=""){
                       // var rr = c.WGS2BD09({ lng: parseFloat(105.883329), lat: parseFloat(37.228208)});
                       // var lng = parseFloat(gpsInfo.baoliu2);
                       // var lat = parseFloat(gpsInfo.baoliu3);
                       var rr = c.WGS2BD09({ lng: parseFloat(gpsInfo.baoliu2), lat: parseFloat(gpsInfo.baoliu3)});
                       var lng = parseFloat(rr.lng);
                       var lat = parseFloat(rr.lat);
                       if (zuobiaoxi == "百度"){
                           var lng = parseFloat(rr.lng);
                           var lat = parseFloat(rr.lat);
                       }else{
                           var lng = parseFloat(gpsInfo.baoliu2);
                           var lat = parseFloat(gpsInfo.baoliu3);
                       }
                       var userId = gpsInfo.ptagid;
                       // 判断在线状态
                       localStorage.setItem("username","超级管理员")
                           if(gpsInfo.psos == "1") {
                               if (markers1.hasOwnProperty(userId)) {
                                   // 如果已经存在该标记,则移除原来的标记
@@ -1355,6 +1555,7 @@
                               anchor: new BMapGL.Size(20, 40)
                           });
                           var marker = new BMapGL.Marker(point, { icon: myIcon });
                           // 将标记添加到地图上
                           bm.addOverlay(marker);
                           var label = new BMapGL.Label(gpsInfo.pname+" "+userId, {offset: new BMapGL.Size(0, -70)});
@@ -1529,7 +1730,7 @@
                   }
               }
           }
        }, 2000); // 为每一个icon 添加点击事件
        }, 3000); // 为每一个icon 添加点击事件
        // bm.addEventListener("dragstart", function() {
        //     clearInterval(timer); // 拖动开始时停止定时器
@@ -1567,12 +1768,17 @@
            var lixian = document.getElementById("xianshilixian")
            lixian.checked = false;
            onLine = "0"
            localStorage.setItem("oNLine","No")
        }else{
            var lixian = document.getElementById("xianshilixian")
            lixian.checked = true;
            onLine = "1"
            localStorage.setItem("oNLine","Yes")
        }
        layer.msg('操作成功')
    }
    function getdateTime() {
        var date = new Date();
@@ -1643,6 +1849,25 @@
    $("#switc").fadeIn(4000);
    $("#switc1").fadeIn(4000);
    $("#switc2").fadeIn(4000);
    mercatorTolonlat()
    function mercatorTolonlat(){
        let lonlat={lon:0,lat:0};
        let x = 13521642.21136821/20037508.34*180;
        let y = 3584507.2560229967/20037508.34*180;
        y= 180/Math.PI*(2*Math.atan(Math.exp(y*Math.PI/180))-Math.PI/2);
        lonlat.lon = x;
        lonlat.lat = y;
        return lonlat;
    };
</script>
<%--<script>--%>
<%--    var result;--%>
@@ -2039,7 +2264,6 @@
<%--        //矩形下边线--%>
<%--        cxt.lineTo(radius, height);--%>
<%--        //左下角圆弧,弧度从1/2PI到PI--%>
<%--        cxt.arc(radius, height - radius, radius, Math.PI / 2, Math.PI);--%>
@@ -2065,5 +2289,175 @@
<!-- > END PAGE FUNCTION SCRIPTS -->
<!-- > END PAGE FUNCTION SCRIPTS -->
<script>
    function FindShowJiZhan() {
        var realposition = [];
        $.ajax({
            async: false,
            type: 'Get',
            url: "/hxzkuwb/FindSanWeiJiZhan",
            dataType: 'json',
            success: function (data) {
                realposition = data;
            },
        });
        return realposition
    };
    function FindShowWangGuan() {
        var realposition = [];
        $.ajax({
            async: false,
            type: 'Get',
            url: "/hxzkuwb/FindGateWayList",
            dataType: 'json',
            success: function (data) {
                realposition = data;
            },
        });
        return realposition
    };
    //显示更多
    function ello(){
        var td = $("#ello").css("display");
        if(td == "block"){
            $("#ello").fadeOut(600)
            $("#topbottom").fadeOut(600)
        }else{
            $("#ello").fadeIn(600)
            $("#topbottom").fadeIn(600)
        }
    }
    var showData = "username="+localStorage.getItem("username")
    $.get("/hxzkuwb/findScreenRole",showData,function (data){
       if (data.jizhanshow == "1"){
                document.getElementById("showJiZhan").checked = true;
       }
       if (data.wangguanshow == "1"){
           document.getElementById("ShowWangGuan").checked = true;
       }
       if (sessionStorage.getItem("PerCircles") == "Yes"){
           document.getElementById("JuJiXianShi").checked = true
       }else{
           document.getElementById("JuJiXianShi").checked = false
       }
    })
    function showWangGuan(){
        var flag = document.getElementById("ShowWangGuan")
        var wangguanshow;
        if (flag.checked) {
          //设置网关显示
            wangguanshow = "1";
            localStorage.setItem("wangguanshow","1")
        } else {
           //设置网关隐藏
            wangguanshow = "0";
            localStorage.setItem("wangguanshow","0")
        }
        var data = "wangguanshow="+wangguanshow;
        $.get("/hxzkuwb/upScreenSheZhi",data,function (data){
        })
    }
    function showJiZhan(){
        var flag = document.getElementById("showJiZhan")
        var jizhanshow;
        if (flag.checked) {
           //设置基站显示
            jizhanshow = "1";
            localStorage.setItem("jizhanshow","1")
        } else {
            //设置基站隐藏
            jizhanshow = "0";
            localStorage.setItem("jizhanshow","0")
        }
        var data = "jizhanshow="+jizhanshow;
        $.get("/hxzkuwb/upScreenSheZhi",data,function (data){
        })
    }
    function QuYuKuangXuan(){
        var flag = document.getElementById("QuYuKuangXuan")
        if (flag.checked) {
            //开启区域框选
           sessionStorage.setItem("QuYuKuangXuan","1")
            sessionStorage.setItem("kqhuizhi",true)
        } else {
            //关闭区域框选
            sessionStorage.setItem("QuYuKuangXuan","0")
            sessionStorage.setItem("kqhuizhi","false1")
        }
    }
    function JuJiXianShi(){
        var flag = document.getElementById("JuJiXianShi")
        if (flag.checked) {
            //开启聚集显示
            sessionStorage.setItem("PerCircles","Yes")
        } else {
            //关闭聚集显示
            sessionStorage.setItem("PerCircles","No")
        }
    }
    function showLiXian(){
        var flag = document.getElementById("ShowLiXianes")
        if (flag.checked) {
            //开启离线显示
            sessionStorage.setItem("oNLine","Yes")
            onLine = 1;
        } else {
            //关闭离线显示
            sessionStorage.setItem("oNLine","No")
            onLine = 0;
        }
    }
    sessionStorage.setItem("oNLine","No")
    // $.get("/hxzkuwb/findMapShow",function (data){
    //     // $(".MapShow").append('<li id="topbottom" style="display: none;"><img src="HomeImg/tobottom.png" style="width:3%"></li>')
    //     $(".MapShow").append('<li style="width: 40%;display: inline-block"><a href="javascript:;"  onClick="yckb()" style="display: inline-block;font-size: 12px;color: '+data[0].coolr+'" id="ykcbs"><img src="/hxzkuwb/Icon/隐藏看板.png" alt="隐藏看板" title="隐藏看板" style="width: 20%"></a><span style="color: #07F4F6">隐藏看板</span></li>')
    //     if(data[0].ishow == "显示"){
    //         $(".MapShow").append('<li  style="width: 40%;display: inline-block" id="maps"><input  type="checkbox" id="sanweis" onClick="Qh1()"  style="display: none;position: relative;top: 2px"/><a href="javascript:;"  class="ts1" style="font-size: 12px;color: #07F4F6" onClick="Qh1()" id="qh1"><img src="/hxzkuwb/Icon/3D地图.png" title="切换地图" alt="切换地图" style="width: 20%"></a><br><span style="color: #07F4F6">三维地图</span></li>')
    //     }else{
    //         Qh()
    //     }
    //     if(data[1].ishow == "显示"){
    //
    //     }
    //     $(".MapShow").append('<li onclick="ello()" style="margin-left: 3%;cursor:pointer;display: inline-block;color: #07F4F6 "><img src="/hxzkuwb/Icon/查看更多.png" title="更多操作" style="width: 20%" alt="更多操作"><br>更多操作</li>')
    // })
    function Cxgj(){
        $("#cxgjs").fadeOut(500)
    }
    var table = layui.table;
    function ChongDianPower(){
        $("#fen1").toggle()
        $("#PowerShuaXin").toggle()
        layer.msg('操作成功')
    }
    function ChongDianPowerShuaXin(){
        table.reload('PowerPerson', {
            url: '/hxzkuwb/findPowerPerson' // 新的数据接口地址
        });
        $("#fen1").toggle()
        setTimeout(function (){
            $("#fen1").toggle()
        },300)
        layer.msg('刷新成功')
    }
</script>
</html>