| | |
| | | $.get("/hxzkuwb/RightLeftImage", function (data) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | if (data[i].name == "大屏左") { |
| | | $.get("/hxzkuwb/RightLeftImage",function (data){ |
| | | for (var i = 0 ; i < data.length;i++){ |
| | | if (data[i].name == "大屏左"){ |
| | | var container = document.getElementById('border2s'); |
| | | container.style.backgroundImage = 'url("/hxzkuwb/Icon/' + data[i].image + '")'; |
| | | container.style.backgroundImage = 'url("/hxzkuwb/Icon/'+data[i].image+'")'; |
| | | container.style.backgroundSize = "cover"; |
| | | container.style.backgroundRepeat = "no-repeat"; |
| | | } else { |
| | | }else{ |
| | | var container = document.getElementById('border3s'); |
| | | container.style.backgroundImage = 'url("/hxzkuwb/Icon/' + data[i].image + '")'; |
| | | container.style.backgroundImage = 'url("/hxzkuwb/Icon/'+data[i].image+'")'; |
| | | container.style.backgroundSize = "cover"; |
| | | container.style.backgroundRepeat = "no-repeat"; |
| | | } |
| | |
| | | |
| | | |
| | | //判断勾选了哪些默认图标不显示 |
| | | $.get("/hxzkuwb/findHomeIcon", function (data) { |
| | | for (var i = 0; i < data.data.length; i++) { |
| | | if (data.data[i].none == 0) { |
| | | if (i == 1) { |
| | | $(".list").append('<li onclick=ck("' + data.data[i].class1 + '") style="margin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi(' + data.data[i].id + ')" style=";color: white" class="' + data.data[i].class1 + '" href="javascript:;"><img src="/hxzkuwb/Icon/' + data.data[i].hvoer + '" class="' + data.data[i].class2 + '" style="position: relative;top: -15px;left: 35px"/><img class="a' + (i + 1) + '" src="/hxzkuwb/Icon/' + data.data[i].icon + '" style="position: relative;top: -15px;"/><span id="iconback" style="color: ' + data.data[i].namecolor + '">' + data.data[i].name + '</span></a></li>') |
| | | } else if (i < 1) { |
| | | $(".list").append('<li onclick=ck("' + data.data[i].class1 + '") style="border: 1px solid redmargin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi(' + data.data[i].id + ')" style="color: white" class="' + data.data[i].class1 + '" href="javascript:;"><img src="/hxzkuwb/Icon/' + data.data[i].hvoer + '" class="' + data.data[i].class2 + '" style="position: relative;top: -15px;left: 35px"/><img class="a' + (i + 1) + '" src="/hxzkuwb/Icon/' + data.data[i].icon + '" style="position: relative;top: -15px;"/><span id="iconback" style="color: ' + data.data[i].namecolor + '">' + data.data[i].name + '</span></a></li>') |
| | | } else if (i == 7) { |
| | | $(".list").append('<li onclick=ck("' + data.data[i].class1 + '") style="margin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi(' + data.data[i].id + ')" style="color: white" class="' + data.data[i].class1 + '" href="javascript:;"><img src="/hxzkuwb/Icon/' + data.data[i].hvoer + '" class="' + data.data[i].class2 + '" style="position: relative;top: -15px;left: 35px"/><img class="a' + (i + 1) + '" src="/hxzkuwb/Icon/' + data.data[i].icon + '" style="position: relative;top: -14px;"/><span id="iconback" style="color: ' + data.data[i].namecolor + '">' + data.data[i].name + '</span></a></li>') |
| | | } else { |
| | | $(".list").append('<li onclick=ck("' + data.data[i].class1 + '") style="margin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi(' + data.data[i].id + ')" style="color: white" class="' + data.data[i].class1 + '" href="javascript:;"><img src="/hxzkuwb/Icon/' + data.data[i].hvoer + '" class="' + data.data[i].class2 + '" style="position: relative;top: -15px;left: 35px"/><img class="a' + (i + 1) + '" src="/hxzkuwb/Icon/' + data.data[i].icon + '" style="position: relative;top: -14px;"/><span id="iconback" style="color: ' + data.data[i].namecolor + '">' + data.data[i].name + '</span></a></li>') |
| | | $.get("/hxzkuwb/findHomeIcon",function (data){ |
| | | for (var i = 0; i<data.data.length;i++){ |
| | | if(data.data[i].none == 0){ |
| | | if(i==1){ |
| | | $(".list").append('<li onclick=ck("'+data.data[i].class1+'") style="margin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi('+data.data[i].id+')" style=";color: white" class="'+data.data[i].class1+'" href="javascript:;"><img src="/hxzkuwb/Icon/'+data.data[i].hvoer+'" class="'+data.data[i].class2+'" style="position: relative;top: -15px;left: 35px"/><img class="a'+(i+1)+'" src="/hxzkuwb/Icon/'+data.data[i].icon+'" style="position: relative;top: -15px;"/><span id="iconback" style="color: '+data.data[i].namecolor+'">'+data.data[i].name+'</span></a></li>') |
| | | }else if(i<1){ |
| | | $(".list").append('<li onclick=ck("'+data.data[i].class1+'") style="border: 1px solid redmargin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi('+data.data[i].id+')" style="color: white" class="'+data.data[i].class1+'" href="javascript:;"><img src="/hxzkuwb/Icon/'+data.data[i].hvoer+'" class="'+data.data[i].class2+'" style="position: relative;top: -15px;left: 35px"/><img class="a'+(i+1)+'" src="/hxzkuwb/Icon/'+data.data[i].icon+'" style="position: relative;top: -15px;"/><span id="iconback" style="color: '+data.data[i].namecolor+'">'+data.data[i].name+'</span></a></li>') |
| | | }else if(i==7){ |
| | | $(".list").append('<li onclick=ck("'+data.data[i].class1+'") style="margin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi('+data.data[i].id+')" style="color: white" class="'+data.data[i].class1+'" href="javascript:;"><img src="/hxzkuwb/Icon/'+data.data[i].hvoer+'" class="'+data.data[i].class2+'" style="position: relative;top: -15px;left: 35px"/><img class="a'+(i+1)+'" src="/hxzkuwb/Icon/'+data.data[i].icon+'" style="position: relative;top: -14px;"/><span id="iconback" style="color: '+data.data[i].namecolor+'">'+data.data[i].name+'</span></a></li>') |
| | | }else{ |
| | | $(".list").append('<li onclick=ck("'+data.data[i].class1+'") style="margin-top: 0px;width: 80px;padding: 0px"><a onclick="DanJi('+data.data[i].id+')" style="color: white" class="'+data.data[i].class1+'" href="javascript:;"><img src="/hxzkuwb/Icon/'+data.data[i].hvoer+'" class="'+data.data[i].class2+'" style="position: relative;top: -15px;left: 35px"/><img class="a'+(i+1)+'" src="/hxzkuwb/Icon/'+data.data[i].icon+'" style="position: relative;top: -14px;"/><span id="iconback" style="color: '+data.data[i].namecolor+'">'+data.data[i].name+'</span></a></li>') |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | |
| | | function ck(c) { |
| | | (c) |
| | | if (c == "Daping") { |
| | | function ck(c){ |
| | | console.log(c) |
| | | if(c=="Daping"){ |
| | | if (document.fullscreenElement) { |
| | | document.exitFullscreen(); |
| | | } else { |
| | | document.documentElement.requestFullscreen(); |
| | | } |
| | | } |
| | | if (c == "Weilan") { |
| | | if(c == "Weilan"){ |
| | | $("#ac").hide() |
| | | $("#fen").toggle() |
| | | $("#war").hide(); |
| | | $("#tags").hide(); |
| | | $("#gather").hide() |
| | | } |
| | | if (c == "Shebei") { |
| | | if(c == "Shebei"){ |
| | | $("#ac").toggle() |
| | | $("#fen").hide(); |
| | | $("#war").hide(); |
| | | $("#tags").hide(); |
| | | $("#gather").hide() |
| | | } |
| | | if (c == "Jinggao") { |
| | | if(c == "Jinggao"){ |
| | | $("#war").toggle() |
| | | $("#tags").hide(); |
| | | $("#ac").hide(); |
| | | $("#fen").hide(); |
| | | $("#gather").hide() |
| | | } |
| | | if (c == "Renyuan") { |
| | | if(c == "Renyuan"){ |
| | | $("#tags").toggle() |
| | | $("#ac").hide(); |
| | | $("#fen").hide(); |
| | | $("#war").hide(); |
| | | $("#gather").hide() |
| | | } |
| | | if (c == "Juji") { |
| | | if (c == "Juji"){ |
| | | $("#gather").toggle() |
| | | $("#tags").hide() |
| | | $("#ac").hide(); |
| | |
| | | } |
| | | |
| | | $.get("/hxzkuwb/findDaPingGaojing", function (data) { |
| | | if (data.length < 1 || data.length == 0) { |
| | | if(data.length <1 || data.length == 0){ |
| | | $("#gjimg").show() |
| | | } else if (data.length < 7 && data.length > 0) { |
| | | }else if(data.length<7 && data.length >0){ |
| | | |
| | | $("#gjimg").fadeOut(1000) |
| | | for (var i = 0; i < data.length; i++) { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi(' + data[i].id + ')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">' + data[i].pname + '' + data[i].objectid + ',' + data[i].type + '告警,电话' + data[i].pphone + '</a></p>') |
| | | } |
| | | setTimeout(function () { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi('+data[i].id+')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">'+data[i].pname+''+data[i].objectid+','+data[i].type+'告警,电话'+data[i].pphone+'</a></p>') } |
| | | setTimeout(function (){ |
| | | marquee.stop() |
| | | }, 10000) |
| | | } else { |
| | | },10000) |
| | | }else{ |
| | | $("#gjimg").fadeOut(1000) |
| | | for (var i = 0; i < data.length; i++) { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi(' + data[i].id + ')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">' + data[i].pname + '' + data[i].objectid + ',' + data[i].type + '告警,电话' + data[i].pphone + '</a></p>') |
| | | } |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi('+data[i].id+')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">'+data[i].pname+''+data[i].objectid+','+data[i].type+'告警,电话'+data[i].pphone+'</a></p>') } |
| | | } |
| | | }) |
| | | |
| | | //告警信息 |
| | | setInterval(function () { |
| | | (3333333333333) |
| | | $.get("/hxzkuwb/findDaPingGaojing", function (data) { |
| | | $(".gjxx").empty(); |
| | | if (data.length < 1 || data.length == 0) { |
| | | if(data.length <1 || data.length == 0){ |
| | | $("#gjimg").show() |
| | | } else if (data.length < 7 && data.length > 0) { |
| | | } else if(data.length<7 && data.length >0){ |
| | | $("#gjimg").fadeOut(1000) |
| | | for (var i = 0; i < data.length; i++) { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi(' + data[i].id + ')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">' + data[i].pname + '' + data[i].objectid + ',' + data[i].type + '告警,电话' + data[i].pphone + '</a></p>') |
| | | } |
| | | setTimeout(function () { |
| | | marquee.stop() |
| | | }, 10000) |
| | | } else { |
| | | $("#gjimg").fadeOut(1000) |
| | | for (var i = 0; i < data.length; i++) { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi(' + data[i].id + ')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">' + data[i].pname + '' + data[i].objectid + ',' + data[i].type + '告警,电话' + data[i].pphone + '</a></p>') |
| | | } |
| | | } |
| | | for (var i = 0; i < data.length; i++) { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi('+data[i].id+')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">'+data[i].pname+''+data[i].objectid+','+data[i].type+'告警,电话'+data[i].pphone+'</a></p>') |
| | | } |
| | | setTimeout(function (){ |
| | | marquee.stop() |
| | | },10000) |
| | | }else{ |
| | | $("#gjimg").fadeOut(1000) |
| | | for (var i = 0; i < data.length; i++) { |
| | | $(".gjxx").append('<p><a class="gjxxwz" href="javascript:;" onclick="ChuLi('+data[i].id+')" style="font-size: 14px;"><img src="/hxzkuwb/Home/HomeImg/msg.png" style="width: 25px;">'+data[i].pname+''+data[i].objectid+','+data[i].type+'告警,电话'+data[i].pphone+'</a></p>') } |
| | | } |
| | | |
| | | }) |
| | | }, 1000); |
| | | }, 3000); |
| | | |
| | | setInterval(function () { |
| | | $.get("/hxzkuwb/findDapingWeiChuLiCount", function (data) { |
| | | $(".wcl").html("未处理:" + data) |
| | | setInterval(function (){ |
| | | $.get("/hxzkuwb/findDapingWeiChuLiCount",function (data){ |
| | | $(".wcl").html("未处理:"+data) |
| | | }) |
| | | }, 10000) |
| | | },10000) |
| | | |
| | | |
| | | function ChuLi(id) { |
| | | function ChuLi(id){ |
| | | //获取选中告警数据的详细信息 |
| | | var data = "id=" + id |
| | | $.get("/hxzkuwb/findIdXiangXi", data, function (data) { |
| | | var data = "id="+id |
| | | $.get("/hxzkuwb/findIdXiangXi",data,function (data){ |
| | | $("#XiangXi").empty(); |
| | | $("#XiangXi").append('<p style="padding-top: 10px;margin-left: 20px;font-size: 16px">信息</p>') |
| | | $("#XiangXi").append('<p><hr></p>') |
| | | $("#XiangXi").append('<p style="font-size: 12px;margin-left: 10px;padding-top: 10px">名称:' + data.baoliu2 + ' 标签ID:' + data.objectid + ' <br>坐标:' + data.baoliu1 + '</p>') |
| | | $("#XiangXi").append('<p style="font-size: 12px;margin-left: 10px;padding-top: 10px">内容:' + data.type + '</p>') |
| | | $("#XiangXi").append('<p style="font-size: 12px;margin-left: 10px;padding-top: 10px">时间: ' + data.time + '</p>') |
| | | $("#XiangXi").append('<p style="font-size: 12px;margin-left: 10px;padding-top: 10px">快速处理: 无需处理 <input type="radio" onclick="cl(\'无需处理\')" name="baoliu5" value="无需处理" lay-filter="baoliu5" id="option1" title="无需处理"> 误报 <input type="radio" onclick="cl(\'误报\')" name="baoliu5" value="误报" lay-filter="baoliu5" id="option2" title="误报"> 已联系 <input type="radio" onclick="cl(\'已联系\')" name="baoliu5" value="已联系" lay-filter="baoliu5" title="已联系"></p></div>') |
| | | $("#XiangXi").append('<p style="font-size: 12px;margin-left: 10px;padding-top: 10px">处理记录:<textarea id="cl1" style="background-color: whitesmoke;border: none;width: 70%;height: 50px" required placeholder="请输入内容"></textarea></p></div>') |
| | | $("#XiangXi").append('<p style="font-size: 12px;margin-left: 10px;padding-top: 20px"> <button onClick="windQx()" style="float: right;margin-left: 20px;margin-right: 20px"class="layui-btn layui-btn-primary">关闭 </button><button onClick=windCl(' + data.objectid + ',"' + data.type + '") style="float: right" class="layui-btn layui-btn-normal">处理</button> </p>') |
| | | $("#XiangXi").append('<p style="padding-top: 10px;font-size: 16px;text-align: center">详细信息</p>') |
| | | $("#XiangXi").append('<p><hr></p>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;">名称:'+data.baoliu2+' 标签ID:'+data.objectid+'</p>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;padding-top: 2%">坐标:'+data.baoliu1+'</p>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;padding-top: 2%">内容:'+data.type+'</p>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;padding-top: 2%">时间: '+data.time+'</p>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;padding-top: 2%">快速处理: 无需处理 <input type="radio" onclick="cl(\'无需处理\')" name="baoliu5" value="无需处理" lay-filter="baoliu5" id="option1" title="无需处理"> 误报 <input type="radio" onclick="cl(\'误报\')" name="baoliu5" value="误报" lay-filter="baoliu5" id="option2" title="误报"> 已联系 <input type="radio" onclick="cl(\'已联系\')" name="baoliu5" value="已联系" lay-filter="baoliu5" title="已联系"></p></div>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;padding-top: 2%;width: 15%"><span style="position: relative;top: -5%">处理记录:</span></p></div>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;display: inline-block;width: 80%;position: relative;left: 15%;top: -20px"><textarea id="cl1" style="background-color: whitesmoke;border: none;width: 100%;height: 70px;background-color: rgba(255,255,255,0);border: 1px solid black;vertical-align: bottom" required placeholder="请输入内容"></textarea></p></div>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;margin-top: 3%;padding-bottom: 2%"><button onClick=windCl('+data.objectid+',"'+data.type+'") style="margin-left: 20%;text-align: center" class="layui-btn layui-btn-normal">处理</button><button onClick="windQx()" style="text-align: center;margin-left: 40%;"class="layui-btn layui-btn-primary">关闭 </button></p>') |
| | | $("#XiangXi").append('<p style="font-size: 15px;margin-left: 10px;margin-top: 3%;padding-bottom: 2%"> </p>') |
| | | |
| | | }) |
| | | $("#wind").fadeIn(1000) |
| | | } |
| | | |
| | | function cl(context) { |
| | | function cl(context){ |
| | | var text = document.getElementById("cl1") |
| | | text.value = context |
| | | text.value=context |
| | | } |
| | | |
| | | //跑马灯 |
| | | var marquee = document.getElementById('myMarquee'); |
| | | var winds = document.getElementById("wind"); |
| | | winds.addEventListener('mouseover', function () { |
| | | winds.addEventListener('mouseover', function() { |
| | | marquee.stop(); |
| | | }); |
| | | |
| | | winds.addEventListener('mouseout', function () { |
| | | winds.addEventListener('mouseout', function() { |
| | | marquee.start(); |
| | | }); |
| | | marquee.addEventListener('mouseover', function () { |
| | | marquee.addEventListener('mouseover', function() { |
| | | marquee.stop(); |
| | | }); |
| | | |
| | | marquee.addEventListener('mouseout', function () { |
| | | marquee.addEventListener('mouseout', function() { |
| | | marquee.start(); |
| | | }); |
| | | |
| | | //告警消息窗处理或取消 |
| | | function windQx() { |
| | | function windQx(){ |
| | | $("#wind").fadeOut(1000) |
| | | layer.msg("取消成功") |
| | | } |
| | | |
| | | function windCl(id, type) { |
| | | function windCl(id,type){ |
| | | var username = sessionStorage.getItem("username") |
| | | var data = "username=" + username |
| | | $.get("/hxzkuwb/findUserRole", data, function (data) { |
| | | if (data.uupdate == "Yes") { |
| | | (type) |
| | | var data = "id=" + id + "&username=" + username + "&baoliu5=" + $("#cl1").val() + "&type=" + type; |
| | | $.post("/hxzkuwb/DaPingDellWarning1", data, function (data) { |
| | | var data = "username="+username |
| | | $.get("/hxzkuwb/findUserRole",data,function (data){ |
| | | if(data.uupdate == "Yes"){ |
| | | var data = "id="+id+"&username="+username+"&baoliu5="+$("#cl1").val()+"&type="+type; |
| | | $.post("/hxzkuwb/DaPingDellWarning1",data,function (data){ |
| | | $("#wind").fadeOut(1000) |
| | | layer.msg("处理成功") |
| | | }) |
| | | } else { |
| | | }else{ |
| | | layer.msg('当前没有权限处理!请联系管理员') |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | //设置浏览器Title |
| | | var data = "username=" + sessionStorage.getItem("username") |
| | | $.get("/hxzkuwb/findCompanySystemName", data, function (data) { |
| | | var data = "username="+sessionStorage.getItem("username") |
| | | $.get("/hxzkuwb/findCompanySystemName",data,function (data) { |
| | | document.title = data.systemname; |
| | | $("#titles").text(data.systemname) |
| | | }) |
| | | // 页面加载完成后开始定时器 |
| | | |
| | | var pagebiaoqian = 0; |
| | | |
| | | function printMessage() { |
| | | // var intervalId = setInterval(function() { |
| | | $.get("/hxzkuwb/findpersonAll", function (data) { |
| | | $("#bqxj").empty(); |
| | | (data) |
| | | var num = 0; |
| | | if (data.length > 20) { |
| | | num = 20; |
| | | } else { |
| | | num = data.length; |
| | | } |
| | | for (var i = 0; i < num; i++) { |
| | | if (data[i].ppower == "-1") { |
| | | data[i].ppower = "0" |
| | | } |
| | | if (data[i].baoliu5 == "0" || data[i].baoliu5 == "-1" || data[i].baoliu5 == null) { |
| | | data[i].baoliu5 = "未充电,未拆除 " |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #f3cb02;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "1") { |
| | | data[i].baoliu5 = "充电" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #00fd00;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "2") { |
| | | data[i].baoliu5 = "拆除" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #ff0000;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "3") { |
| | | data[i].baoliu5 = "充电,拆除" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #f28332;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px;margin-left: 10px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | var intervalId = setInterval(printMessage, 1000); |
| | | |
| | | var persondata = []; |
| | | // }, 1000); |
| | | //标签信息 |
| | | function printMessage2() { |
| | | clearInterval(intervalId); |
| | | $.get("/hxzkuwb/findpersonAll", function (data) { |
| | | $("#bqxj").empty(); |
| | | for (var i = pagebiaoqian ; i < pagebiaoqian + 20; i++) { |
| | | if (!data[i]){ |
| | | break; |
| | | } |
| | | if (data[i].baoliu5 == "0" || data[i].baoliu5 == "-1" || data[i].baoliu5 == null) { |
| | | data[i].baoliu5 = "未充电,未拆除 " |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #f3cb02;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "1") { |
| | | data[i].baoliu5 = "充电" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #00fd00;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "2") { |
| | | data[i].baoliu5 = "拆除" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #ff0000;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "3") { |
| | | data[i].baoliu5 = "充电,拆除" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #f28332;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px;margin-left: 10px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | } |
| | | // }, 5000); |
| | | }) |
| | | } |
| | | |
| | | // 设置间隔时间(例如:每2秒执行一次) |
| | | var intervalId2 = setInterval(printMessage2, 2000); |
| | | |
| | | // 停止setInterval的执行 |
| | | clearInterval(intervalId2); |
| | | |
| | | // var pagePower = 0; |
| | | function nextpagebiaoqian(page) { |
| | | if (page == "上一页" && pagebiaoqian != 0) { |
| | | pagebiaoqian -= 20; |
| | | } else if (page == "上一页" && pagebiaoqian == 0) { |
| | | pagebiaoqian = 0; |
| | | } else { |
| | | pagebiaoqian += 20; |
| | | } |
| | | $.get("/hxzkuwb/findpersonAll", function (data) { |
| | | if (pagebiaoqian >= data.length) { |
| | | layer.msg("已经是最后一页了") |
| | | } else { |
| | | |
| | | if (pagebiaoqian == 0) { |
| | | |
| | | layer.msg("已经是第一页了") |
| | | intervalId = setInterval(printMessage, 2000); |
| | | clearInterval(intervalId2); |
| | | console.log(11111111111111) |
| | | $("#bqxj").empty(); |
| | | for (var i = pagebiaoqian; i < pagejizhan + 20; i++) { |
| | | if (data[i].power == "-1") { |
| | | data[i].power = "0" |
| | | } |
| | | if (data[i].baoliu5 == "0" || data[i].baoliu5 == "-1" || data[i].baoliu5 == null) { |
| | | data[i].baoliu5 = "未充电,未拆除 " |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #f3cb02;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "1") { |
| | | data[i].baoliu5 = "充电" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #00fd00;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "2") { |
| | | data[i].baoliu5 = "拆除" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #ff0000;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } else if (data[i].baoliu5 == "3") { |
| | | data[i].baoliu5 = "充电,拆除" |
| | | $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].ptagid + '</li><li style="font-size: 12px">' + data[i].ppower + '</li><li style="color: #f28332;font-size: 12px">' + data[i].baoliu5 + '</li><li style="font-size: 12px;width: 150px">' + data[i].paddtiem + '</li></ul>') |
| | | |
| | | } |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px;margin-left: 10px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px;margin-left: 10px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | } |
| | | } else { |
| | | clearInterval(intervalId2); |
| | | intervalId2 = setInterval(printMessage2, 2000); |
| | | // clearInterval(intervalId); |
| | | // var intervalId2 = setInterval(function() { |
| | | // $("#bqxj").empty(); |
| | | // |
| | | // for (var i = pagebiaoqian-1; i < pagebiaoqian + 20; i++) { |
| | | // if(data[i].power == "-1"){ |
| | | // data[i].power = "0" |
| | | // } |
| | | // if (data[i].baoliu5 == "0" || data[i].baoliu5 == "-1" || data[i].baoliu5 == null) { |
| | | // data[i].baoliu5 = "未充电,未拆除 " |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="color: #f3cb02;font-size: 12px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // |
| | | // } else if (data[i].baoliu5 == "1" ){ |
| | | // data[i].baoliu5 = "充电" |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="color: #00fd00;font-size: 12px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // |
| | | // } |
| | | // else if (data[i].baoliu5 == "2" ){ |
| | | // data[i].baoliu5 = "拆除" |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="color: #ff0000;font-size: 12px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // |
| | | // } |
| | | // else if (data[i].baoliu5 == "3" ){ |
| | | // data[i].baoliu5 = "充电,拆除" |
| | | // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="color: #f28332;font-size: 12px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // |
| | | // } |
| | | // // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px;margin-left: 10px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // |
| | | // // $("#bqxj").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].ptagid+'</li><li style="font-size: 12px">'+data[i].ppower+'</li><li style="font-size: 12px">'+data[i].baoliu5+'</li><li style="font-size: 12px;width: 150px">'+data[i].paddtiem+'</li></ul>') |
| | | // } |
| | | // }, 5000); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | // var intervalId1 = setInterval(function() { |
| | | function printMessage1() { |
| | | $.get("/hxzkuwb/findAnchorxinxi", function (data) { |
| | | |
| | | $("#jzxx").empty(); |
| | | var num = 0; |
| | | if (data.length > 20) { |
| | | num = 20; |
| | | } else { |
| | | num = data.length; |
| | | } |
| | | for (var i = 0; i < num; i++) { |
| | | if (data[i].anchormode == "0" || data[i].anchormode == "-1") { |
| | | data[i].anchormode = "离线" |
| | | $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #ff0000;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | |
| | | } else { |
| | | data[i].anchormode = "在线" |
| | | $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #00fd00;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 设置间隔时间(例如:每2秒执行一次) |
| | | var intervalId3 = setInterval(printMessage3, 1000); |
| | | |
| | | // 停止setInterval的执行 |
| | | clearInterval(intervalId3); |
| | | |
| | | function printMessage3() { |
| | | $.get("/hxzkuwb/findAnchorxinxi", function (data) { |
| | | $("#jzxx").empty(); |
| | | for (var i = pagejizhan - 1; i < pagejizhan + 20; i++) { |
| | | if (!data[i]){ |
| | | break; |
| | | } |
| | | if (data[i].anchormode == "0" || data[i].anchormode == "-1") { |
| | | data[i].anchormode = "离线" |
| | | $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #ff0000;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | |
| | | } else { |
| | | data[i].anchormode = "在线" |
| | | $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #00fd00;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | |
| | | } |
| | | // $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | var intervalId1 = setInterval(printMessage1, 1000); |
| | | // }, 1000); |
| | | var pagejizhan = 0; |
| | | |
| | | function nextpagejizhan(page) { |
| | | if (page == "上一页" && pagejizhan != 0) { |
| | | pagejizhan -= 20; |
| | | } else if (page == "上一页" && pagejizhan == 0) { |
| | | pagejizhan = 0; |
| | | } else { |
| | | pagejizhan += 20; |
| | | } |
| | | $.get("/hxzkuwb/findAnchorxinxi", function (data) { |
| | | if (pagejizhan >= data.length) { |
| | | layer.msg("已经是最后一页了") |
| | | } else { |
| | | if (pagejizhan == 0) { |
| | | intervalId1 = setInterval(printMessage1, 1000); |
| | | clearInterval(intervalId3); |
| | | // intervalId1 = setInterval(printMessage, 2000); |
| | | layer.msg("已经是第一页了") |
| | | $("#jzxx").empty(); |
| | | for (var i = pagejizhan; i < pagejizhan + 20; i++) { |
| | | if (data[i].anchormode == "0" || data[i].anchormode == "-1") { |
| | | data[i].anchormode = "离线" |
| | | $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #ff0000;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | |
| | | } else { |
| | | data[i].anchormode = "在线" |
| | | $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #00fd00;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | |
| | | } |
| | | // $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | } |
| | | } else { |
| | | clearInterval(intervalId3); |
| | | intervalId3 = setInterval(printMessage3, 1000); |
| | | // clearInterval(intervalId1); |
| | | // $("#jzxx").empty(); |
| | | // for(var i = pagejizhan-1; i<pagejizhan+20;i++){ |
| | | // if (data[i].anchormode == "0" || data[i].anchormode == "-1") { |
| | | // data[i].anchormode = "离线" |
| | | // $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #ff0000;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | // |
| | | // } else { |
| | | // data[i].anchormode = "在线" |
| | | // $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="color: #00fd00;font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | // |
| | | // } |
| | | // // $("#jzxx").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].anchorid + '</li><li style="font-size: 12px;">' + data[i].anchormode + '</li><li style="font-size: 12px;width: 150px">' + data[i].greatetime + '</li></ul>') |
| | | // } |
| | | } |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | var pageQuYu = 0; |
| | | |
| | | function nextpageQuYu(page) { |
| | | if (page == "上一页" && pageQuYu != 0) { |
| | | pageQuYu -= 9; |
| | | } else { |
| | | pageQuYu += 9; |
| | | function nextpageQuYu(page){ |
| | | if(page == "上一页" && pageQuYu !=0){ |
| | | pageQuYu -=9; |
| | | }else{ |
| | | pageQuYu +=9; |
| | | } |
| | | $.get("/hxzkuwb/findKaoQinQuYu", function (data) { |
| | | if (pageQuYu == 0) { |
| | | $.get("/hxzkuwb/findKaoQinQuYu",function (data){ |
| | | if (pageQuYu == 0){ |
| | | layer.msg("已经是第一页了") |
| | | $("#qytj").empty(); |
| | | for (var i = pageQuYu; i < pageQuYu + 9; i++) { |
| | | for(var i = pageQuYu; i<pageQuYu+9;i++){ |
| | | var tds = data[i].name |
| | | var tds1 = tds.split(' '); |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left">' + data[i].area + '</li><li style="color: #29D7C8;text-align: left;;margin-left: 30px">' + data[i].tagid + '</li><li style="margin-left: 0px;text-align: left">' + tds1[1] + '</li></ul>') |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left">'+data[i].area+'</li><li style="color: #29D7C8;text-align: left;;margin-left: 30px">'+data[i].tagid+'</li><li style="margin-left: 0px;text-align: left">'+tds1[1]+'</li></ul>') |
| | | } |
| | | } else { |
| | | }else{ |
| | | $("#qytj").empty(); |
| | | for (var i = pageQuYu; i < pageQuYu + 9; i++) { |
| | | for(var i = pageQuYu; i<pageQuYu+9;i++){ |
| | | var tds = data[i].name |
| | | var tds1 = tds.split(' '); |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left ">' + data[i].area + '</li><li style="color: #29D7C8;text-align: left;margin-left: 30px">' + data[i].tagid + '</li><li style="margin-left: 0px;text-align: left">' + tds1[1] + '</li></ul>') |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left ">'+data[i].area+'</li><li style="color: #29D7C8;text-align: left;margin-left: 30px">'+data[i].tagid+'</li><li style="margin-left: 0px;text-align: left">'+tds1[1]+'</li></ul>') |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //区域统计 |
| | | setInterval(function () { |
| | | $.get("/hxzkuwb/findKaoQinQuYu", function (data) { |
| | | if (data.length > 10) { |
| | | setInterval(function (){ |
| | | $.get("/hxzkuwb/findKaoQinQuYu",function (data){ |
| | | if(data.length > 10 ){ |
| | | $("#qytj").empty(); |
| | | for (var i = 0; i < 10; i++) { |
| | | for (var i = 0 ; i < 10 ; i ++){ |
| | | var tds = data[i].name |
| | | var tds1 = tds.split(' '); |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left">' + data[i].area + '</li><li style="color: #29D7C8;text-align: left;;margin-left: 30px">' + data[i].tagid + '</li><li style="margin-left: 0px;text-align: left">' + tds1[1] + '</li></ul>') |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left">'+data[i].area+'</li><li style="color: #29D7C8;text-align: left;;margin-left: 30px">'+data[i].tagid+'</li><li style="margin-left: 0px;text-align: left">'+tds1[1]+'</li></ul>') |
| | | } |
| | | } else { |
| | | }else{ |
| | | $("#qytj").empty(); |
| | | for (var i = 0; i < data.length; i++) { |
| | | for (var i = 0 ; i < data.length ; i ++){ |
| | | var tds = data[i].name |
| | | var tds1 = tds.split(' '); |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left ">' + data[i].area + '</li><li style="color: #29D7C8;text-align: left;margin-left: 30px">' + data[i].tagid + '</li><li style="margin-left: 0px;text-align: left">' + tds1[1] + '</li></ul>') |
| | | $("#qytj").append('<ul style="margin-left: 30px"><li style="text-align:left ">'+data[i].area+'</li><li style="color: #29D7C8;text-align: left;margin-left: 30px">'+data[i].tagid+'</li><li style="margin-left: 0px;text-align: left">'+tds1[1]+'</li></ul>') |
| | | } |
| | | } |
| | | }) |
| | | }, 10000) |
| | | },10000) |
| | | |
| | | |
| | | |
| | | //充电提示 |
| | | $.post("/hxzkuwb/findPowerTag", function (data) { |
| | | $.post("/hxzkuwb/findPowerTag",function (data){ |
| | | var num = 0; |
| | | if (data.length > 9) { |
| | | if(data.length>9){ |
| | | num = 9; |
| | | } else { |
| | | }else{ |
| | | num = data.length; |
| | | } |
| | | for (var i = 0; i < num; i++) { |
| | | if (data[i].power == "-1") { |
| | | for(var i = 0; i<num;i++){ |
| | | if(data[i].power == "-1"){ |
| | | data[i].power = "0" |
| | | } |
| | | $("#cdts").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].state + '</li><li style="font-size: 12px;color:#FF8B5D">' + data[i].power + '</li><li style="font-size: 12px;color: #29D7C8">' + data[i].tagId + '</li><li style="font-size: 12px"><img src="../Home/HomeImg/cddianchi.png" style="width: 20px"></li></ul>') |
| | | $("#cdts").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].state+'</li><li style="font-size: 12px;color:#FF8B5D">'+data[i].power+'</li><li style="font-size: 12px;color: #29D7C8">'+data[i].tagId+'</li><li style="font-size: 12px"><img src="../Home/HomeImg/cddianchi.png" style="width: 20px"></li></ul>') |
| | | } |
| | | }) |
| | | |
| | | |
| | | var pagePower = 0; |
| | | |
| | | function nextpagepower(page) { |
| | | (pagePower) |
| | | if (page == "上一页" && pagePower != 0) { |
| | | pagePower -= 9; |
| | | } else { |
| | | pagePower += 9; |
| | | function nextpagepower(page){ |
| | | console.log(pagePower) |
| | | if(page == "上一页" && pagePower !=0){ |
| | | pagePower -=9; |
| | | }else{ |
| | | pagePower +=9; |
| | | } |
| | | $.post("/hxzkuwb/findPowerTag", function (data) { |
| | | if (pagePower == 0) { |
| | | $.post("/hxzkuwb/findPowerTag",function (data){ |
| | | if (pagePower == 0){ |
| | | layer.msg("已经是第一页了") |
| | | $("#cdts").empty(); |
| | | for (var i = pagePower; i < pagePower + 9; i++) { |
| | | if (data[i].power == "-1") { |
| | | for(var i = pagePower; i<pagePower+9;i++){ |
| | | if(data[i].power == "-1"){ |
| | | data[i].power = "0" |
| | | } |
| | | $("#cdts").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].state + '</li><li style="font-size: 12px;color:#FF8B5D">' + data[i].power + '</li><li style="font-size: 12px;color: #29D7C8">' + data[i].tagId + '</li><li style="font-size: 12px"><img src="../Home/HomeImg/cddianchi.png" style="width: 20px"></li></ul>') |
| | | $("#cdts").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].state+'</li><li style="font-size: 12px;color:#FF8B5D">'+data[i].power+'</li><li style="font-size: 12px;color: #29D7C8">'+data[i].tagId+'</li><li style="font-size: 12px"><img src="../Home/HomeImg/cddianchi.png" style="width: 20px"></li></ul>') |
| | | } |
| | | } else { |
| | | }else{ |
| | | $("#cdts").empty(); |
| | | for (var i = pagePower; i < pagePower + 9; i++) { |
| | | if (data[i].power == "-1") { |
| | | for(var i = pagePower; i<pagePower+9;i++){ |
| | | if(data[i].power == "-1"){ |
| | | data[i].power = "0" |
| | | } |
| | | $("#cdts").append('<ul class="qytj2"><li style="font-size: 12px">' + data[i].state + '</li><li style="font-size: 12px;color:#FF8B5D">' + data[i].power + '</li><li style="font-size: 12px;color: #29D7C8">' + data[i].tagId + '</li><li style="font-size: 12px"><img src="../Home/HomeImg/cddianchi.png" style="width: 20px"></li></ul>') |
| | | $("#cdts").append('<ul class="qytj2"><li style="font-size: 12px">'+data[i].state+'</li><li style="font-size: 12px;color:#FF8B5D">'+data[i].power+'</li><li style="font-size: 12px;color: #29D7C8">'+data[i].tagId+'</li><li style="font-size: 12px"><img src="../Home/HomeImg/cddianchi.png" style="width: 20px"></li></ul>') |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //人员详细信息 |
| | | function personMsg(id) { |
| | | var data = "id=" + id |
| | | $.get("/hxzkuwb/findIdPerson", data, function (data) { |
| | | if (data.ponline == "1") { |
| | | function personMsg(id){ |
| | | var data = "id="+id |
| | | $.get("/hxzkuwb/findIdPerson",data,function (data){ |
| | | if(data.ponline == "1"){ |
| | | data.ponline = "在线" |
| | | } else { |
| | | }else{ |
| | | data.ponline = "离线" |
| | | } |
| | | $("#personImage").empty() |
| | | $("#personImage").append('<img style="width: 100px;height: 100px" src=/hxzkuwb/Icon/' + data.baoliu38 + '/>') |
| | | $("#personImage").append('<img style="width: 100px;height: 100px" src=/hxzkuwb/Icon/'+data.baoliu38+'/>') |
| | | $(".xingming").text(data.pname) |
| | | $(".xingbie").text(data.psex) |
| | | $(".bumen").text(data.pdepartment) |
| | |
| | | $("#personMsg").show() |
| | | } |
| | | |
| | | function personMsgtid(id) { |
| | | var data = "id=" + id |
| | | $.get("/hxzkuwb/findtIdPerson", data, function (data) { |
| | | if (data.ponline == "1") { |
| | | function personMsgtid(id){ |
| | | var data = "id="+id |
| | | $.get("/hxzkuwb/findtIdPerson",data,function (data){ |
| | | if(data.ponline == "1"){ |
| | | data.ponline = "在线" |
| | | } else { |
| | | }else{ |
| | | data.ponline = "离线" |
| | | } |
| | | $("#personImage").empty() |
| | | $("#personImage").append('<img style="width: 100px;height: 100px" src=/hxzkuwb/Icon/' + data.baoliu38 + '/>') |
| | | $("#personImage").append('<img style="width: 100px;height: 100px" src=/hxzkuwb/Icon/'+data.baoliu38+'/>') |
| | | $(".xingming").text(data.pname) |
| | | $(".xingbie").text(data.psex) |
| | | $(".bumen").text(data.pdepartment) |
| | |
| | | }) |
| | | $("#personMsg").show() |
| | | } |
| | | |
| | | function GuanMsg() { |
| | | function GuanMsg(){ |
| | | $("#personMsg").hide() |
| | | } |
| | | |
| | |
| | | function FenceKai() { |
| | | layer.msg('操作成功') |
| | | } |
| | | |
| | | function SheBeiGuan() { |
| | | function SheBeiGuan(){ |
| | | layer.msg('操作成功') |
| | | $("#ac").hide() |
| | | } |
| | | |
| | | function WeiLanGuan() { |
| | | function WeiLanGuan(){ |
| | | layer.msg('操作成功') |
| | | $("#fen").hide() |
| | | } |
| | | |
| | | function JingGaoGuan() { |
| | | function JingGaoGuan(){ |
| | | layer.msg('操作成功') |
| | | $("#war").hide() |
| | | } |
| | | |
| | | function RenYuanGuan() { |
| | | function RenYuanGuan(){ |
| | | layer.msg('操作成功') |
| | | $("#tags").hide() |
| | | } |
| | | |
| | | function JuJiGuan() { |
| | | function JuJiGuan(){ |
| | | layer.msg('操作成功') |
| | | $("#gather").hide() |
| | | } |
| | | |
| | | |
| | | //根据权限显示对应看板 |
| | | var data = "username=" + sessionStorage.getItem("username") |
| | | var data = "username="+sessionStorage.getItem("username") |
| | | var bgcolorwz = ""; |
| | | $.get("/hxzkuwb/findScreenRole", data, function (data) { |
| | | if (data.jizhanshow == "1") { |
| | | localStorage.setItem("jizhanshow", "1") |
| | | } else { |
| | | localStorage.setItem("jizhanshow", "0") |
| | | $.get("/hxzkuwb/findScreenRole",data,function (data){ |
| | | if (data.jizhanshow == "1"){ |
| | | localStorage.setItem("jizhanshow","1") |
| | | }else{ |
| | | localStorage.setItem("jizhanshow","0") |
| | | |
| | | } |
| | | if (data.wangguanshow == "1") { |
| | | localStorage.setItem("wangguanshow", "1") |
| | | } else { |
| | | localStorage.setItem("wangguanshow", "0") |
| | | } |
| | | if (data.wangguanshow == "1"){ |
| | | localStorage.setItem("wangguanshow","1") |
| | | }else{ |
| | | localStorage.setItem("wangguanshow","0") |
| | | |
| | | } |
| | | bgcolorwz = data.bgcolor |
| | | if (data.bgcolor != null || data.bgcolor != "") { |
| | | //使用默认文字颜色 |
| | | $(".htxx").css("color", data.bgcolor) |
| | | $(".htxx li").css("color", data.bgcolor) |
| | | $(".htxx li a").css("color", data.bgcolor) |
| | | $("#ykcbs").css("color", data.bgcolor) |
| | | $("#warningTongtitle").css("color", data.bgcolor) |
| | | $("#TongXuntitle").css("color", data.bgcolor) |
| | | $("#JinRiTongJititle").css("color", data.bgcolor) |
| | | $("#Powertitle").css("color", data.bgcolor) |
| | | $("#QuYutitle").css("color", data.bgcolor) |
| | | $("#personTongtitle").css("color", data.bgcolor) |
| | | $("#gouxuan").css("color", data.bgcolor) |
| | | $(".qytj li").css("color", data.bgcolor) |
| | | $(".JingWeiDu").css("color", data.bgcolor) |
| | | $("#biaoqiantitle").css("color", data.bgcolor) |
| | | $("#jizhantitle").css("color", data.bgcolor) |
| | | const style = document.createElement('style'); |
| | | style.innerHTML = '::placeholder { color: ' + data.bgcolor + '; }'; |
| | | document.head.appendChild(style); //将样式添加到<head>中 |
| | | $("#sousuotags").css("border", "1px solid " + data.bgcolor) |
| | | } |
| | | bgcolorwz = data.bgcolor |
| | | if (data.bgcolor != null || data.bgcolor != ""){ |
| | | //使用默认文字颜色 |
| | | $(".htxx").css("color",data.bgcolor) |
| | | $(".htxx li").css("color",data.bgcolor) |
| | | $(".htxx li a").css("color",data.bgcolor) |
| | | $("#ykcbs").css("color",data.bgcolor) |
| | | $("#warningTongtitle").css("color",data.bgcolor) |
| | | $("#TongXuntitle").css("color",data.bgcolor) |
| | | $("#JinRiTongJititle").css("color",data.bgcolor) |
| | | $("#Powertitle").css("color",data.bgcolor) |
| | | $("#QuYutitle").css("color",data.bgcolor) |
| | | $("#personTongtitle").css("color",data.bgcolor) |
| | | $("#gouxuan").css("color",data.bgcolor) |
| | | $(".qytj li").css("color",data.bgcolor) |
| | | $(".JingWeiDu").css("color",data.bgcolor) |
| | | const style = document.createElement('style'); |
| | | style.innerHTML = '::placeholder { color: '+data.bgcolor+'; }'; |
| | | document.head.appendChild(style); //将样式添加到<head>中 |
| | | $("#sousuotags").css("border","1px solid "+data.bgcolor) |
| | | |
| | | } |
| | | if (data.quyu != "No") { |
| | | $("#tong2").fadeIn(500) |
| | | } |
| | | if (data.power != "No") { |
| | | $("#tong3").fadeIn(500) |
| | | } |
| | | if (data.tongji != "No") { |
| | | $("#tong1").fadeIn(500) |
| | | } |
| | | if (data.warning != "No") { |
| | | $(".gjxx").fadeIn(500) |
| | | $("#warningTong").fadeIn(500) |
| | | } |
| | | if (data.say != "No") { |
| | | $("#txin").fadeIn(500) |
| | | } |
| | | if (data.biaoqian != "No") { |
| | | $("#biaoqian").fadeIn(500) |
| | | } |
| | | if (data.jizhan != "No") { |
| | | $("#jizhan").fadeIn(500) |
| | | } |
| | | // if(data.person!="No"){ |
| | | // $("#personTong").fadeIn(500) |
| | | // } |
| | | }) |
| | | } |
| | | if(data.quyu != "No"){ |
| | | $("#tong2").fadeIn(500) |
| | | } |
| | | if(data.power != "No"){ |
| | | $("#tong3").fadeIn(500) |
| | | } |
| | | if(data.tongji != "No"){ |
| | | $("#tong1").fadeIn(500) |
| | | } |
| | | if(data.warning != "No"){ |
| | | $(".gjxx").fadeIn(500) |
| | | $("#warningTong").fadeIn(500) |
| | | } |
| | | if(data.say != "No"){ |
| | | $("#txin").fadeIn(500) |
| | | } |
| | | // if(data.person!="No"){ |
| | | // $("#personTong").fadeIn(500) |
| | | // } |
| | | }) |
| | | //根据看板XY进行排版 |
| | | $.get("/hxzkuwb/findsmallXY", function (data) { |
| | | $("#warningTongtitle").text(data[0].name) |
| | | $("#TongXuntitle").text(data[1].name) |
| | | $("#JinRiTongJititle").text(data[2].name) |
| | | $("#Powertitle").text(data[3].name) |
| | | $("#QuYutitle").text(data[4].name) |
| | | $("#personTongtitle").text(data[5].name) |
| | | $("#biaoqiantitle").text(data[6].name) |
| | | $("#jizhantitle").text(data[7].name) |
| | | if (data[0].posx != "0") { |
| | | $("#warningTong").css("left", data[0].posx) |
| | | if (data[0].posy != "0") { |
| | | $("#warningTong").css("top", data[0].posy) |
| | | $.get("/hxzkuwb/findsmallXY",function (data){ |
| | | $("#warningTongtitle").text(data[0].name) |
| | | $("#TongXuntitle").text(data[1].name) |
| | | $("#JinRiTongJititle").text(data[2].name) |
| | | $("#Powertitle").text(data[3].name) |
| | | $("#QuYutitle").text(data[4].name) |
| | | $("#personTongtitle").text(data[5].name) |
| | | if(data[0].posx != "0"){ |
| | | $("#warningTong").css("left",data[0].posx) |
| | | if(data[0].posy != "0"){ |
| | | $("#warningTong").css("top",data[0].posy) |
| | | } |
| | | } |
| | | } |
| | | if (data[1].posx != "0") { |
| | | $("#txin").css("left", data[1].posx) |
| | | if (data[1].posy != 0) { |
| | | $("#txin").css("bottom", data[1].posy) |
| | | if(data[1].posx != "0"){ |
| | | $("#txin").css("left",data[1].posx) |
| | | if(data[1].posy != 0){ |
| | | $("#txin").css("bottom",data[1].posy) |
| | | } |
| | | } |
| | | } |
| | | if (data[2].posx != "0") { |
| | | $("#tong1").css("right", data[2].posx) |
| | | if (data[2].posy != "0") { |
| | | $("#tong1").css("top", data[2].posy) |
| | | if(data[2].posx != "0"){ |
| | | $("#tong1").css("right",data[2].posx) |
| | | if(data[2].posy != "0"){ |
| | | $("#tong1").css("top",data[2].posy) |
| | | |
| | | } |
| | | } |
| | | } |
| | | if (data[3].posx != "0") { |
| | | $("#tong3").css("right", data[3].posx) |
| | | if (data[3].posy != "0") { |
| | | $("#tong3").css("bottom", data[3].posy) |
| | | if(data[3].posx != "0"){ |
| | | $("#tong3").css("right",data[3].posx) |
| | | if(data[3].posy != "0"){ |
| | | $("#tong3").css("bottom",data[3].posy) |
| | | } |
| | | } |
| | | } |
| | | if (data[4].posx != "0") { |
| | | $("#tong2").css("right", data[4].posx) |
| | | if (data[4].posy != "0") { |
| | | $("#tong2").css("bottom", data[4].posy) |
| | | if(data[4].posx != "0"){ |
| | | $("#tong2").css("right",data[4].posx) |
| | | if(data[4].posy != "0"){ |
| | | $("#tong2").css("bottom",data[4].posy) |
| | | } |
| | | } |
| | | } |
| | | if (data[5].posx != "0") { |
| | | $("#personTong").css("left", data[5].posx) |
| | | if (data[5].posy != "0") { |
| | | $("#personTong").css("bottom", data[5].posx) |
| | | if(data[5].posx != "0"){ |
| | | $("#personTong").css("left",data[5].posx) |
| | | if(data[5].posy != "0"){ |
| | | $("#personTong").css("bottom",data[5].posx) |
| | | } |
| | | } |
| | | } |
| | | if (data[6].posx != "0") { |
| | | $("#biaoqian").css("right", data[6].posx) |
| | | if (data[6].posy != "0") { |
| | | $("#biaoqian").css("top", data[6].posy) |
| | | } |
| | | } |
| | | if (data[7].posx != "0") { |
| | | $("#jizhan").css("left", data[7].posx) |
| | | if (data[7].posy != "0") { |
| | | $("#jizhan").css("top", data[7].posy) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | let num = 0 |
| | | |
| | | |
| | | |
| | | //根据权限显示对应看板 |
| | | function yckb() { |
| | | function yckb(){ |
| | | num++; |
| | | var data = "username=" + sessionStorage.getItem("username") |
| | | $.get("/hxzkuwb/findScreenRole", data, function (data) { |
| | | if (num % 2 == 0) { |
| | | $("#ykcbs").text("隐藏看板") |
| | | if (data.quyu != "No") { |
| | | var data = "username="+sessionStorage.getItem("username") |
| | | $.get("/hxzkuwb/findScreenRole",data,function (data){ |
| | | if(num %2 == 0){ |
| | | $("#yckbtext").text("显示看板") |
| | | if(data.quyu != "No"){ |
| | | $("#tong2").fadeIn(500) |
| | | } |
| | | if (data.power != "No") { |
| | | if(data.power != "No"){ |
| | | $("#tong3").fadeIn(500) |
| | | } |
| | | if (data.tongji != "No") { |
| | | if(data.tongji != "No"){ |
| | | $("#tong1").fadeIn(500) |
| | | } |
| | | if (data.warning != "No") { |
| | | if(data.warning != "No"){ |
| | | $("#warningTong").fadeIn(500) |
| | | $(".gjxx").fadeIn(500) |
| | | } |
| | | if (data.say != "No") { |
| | | if(data.say != "No"){ |
| | | $("#txin").fadeIn(500); |
| | | } |
| | | if (data.biaoqian != "No") { |
| | | $("#biaoqian").fadeIn(500) |
| | | } |
| | | if (data.jizhan != "No") { |
| | | $("#jizhan").fadeIn(500) |
| | | } |
| | | |
| | | $("#border2s").fadeIn(500) |
| | | $("#border3s").fadeIn(500) |
| | | } else { |
| | | $("#ykcbs").text("显示看板") |
| | | if (data.quyu != "No") { |
| | | }else{ |
| | | $("#yckbtext").text("隐藏看板") |
| | | if(data.quyu != "No"){ |
| | | $("#tong2").fadeOut(500) |
| | | } |
| | | if (data.power != "No") { |
| | | if(data.power != "No"){ |
| | | $("#tong3").fadeOut(500) |
| | | } |
| | | if (data.tongji != "No") { |
| | | if(data.tongji != "No"){ |
| | | $("#tong1").fadeOut(500) |
| | | } |
| | | if (data.warning != "No") { |
| | | if(data.warning != "No"){ |
| | | $("#warningTong").fadeOut(500) |
| | | } |
| | | if (data.say != "No") { |
| | | if(data.say != "No"){ |
| | | $("#txin").fadeOut(500); |
| | | } |
| | | if (data.biaoqian != "No") { |
| | | $("#biaoqian").fadeIn(500) |
| | | } |
| | | if (data.jizhan != "No") { |
| | | $("#jizhan").fadeIn(500) |
| | | } |
| | | $("#border2s").fadeOut(500) |
| | | $("#border3s").fadeOut(500) |
| | |
| | | layer.msg('操作成功') |
| | | } |
| | | |
| | | function warningqx() { |
| | | function warningqx(){ |
| | | $("#warningMsg").hide() |
| | | $("#warningMsg1").hide() |
| | | } |
| | | |
| | | function warningbc() { |
| | | function warningbc(){ |
| | | var textwar = $("#warningwb").val() |
| | | if (textwar == "") { |
| | | if(textwar == ""){ |
| | | layer.msg("请先输入处理内容") |
| | | } else { |
| | | }else{ |
| | | // 获取单选框选中的值 |
| | | var selectedValue = document.querySelector('input[name="baoliu5"]:checked').value; |
| | | var id = $("#warningid").val(); |
| | | var texts = $("#warningwb").val() |
| | | var types = $("#warningidtype").text(); |
| | | var username = localStorage.getItem("username") |
| | | var data = "objectid=" + id + "&baoliu5=" + selectedValue + "&baoliu6=" + texts + "&baoliu4=" + username + "&type=" + types + "&id=" + $("#idwar").val() + "&username=" + sessionStorage.getItem("username"); |
| | | $.post("/hxzkuwb/DaPingDellWarning", data, function (data) { |
| | | layer.msg('操作成功') |
| | | $("#warningMsg").hide() |
| | | }) |
| | | var data = "objectid="+id+"&baoliu5="+selectedValue+"&baoliu6="+texts+"&baoliu4="+username+"&type="+types+"&id="+$("#idwar").val()+"&username="+sessionStorage.getItem("username"); |
| | | $.ajax({ |
| | | url: "/hxzkuwb/DaPingDellWarning", |
| | | type: "POST", |
| | | data: data, |
| | | async: false, // 将 async 选项设置为 false |
| | | success: function(data) { |
| | | layui.use('table', function() { |
| | | var table = layui.table; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | table.reload('warning', { |
| | | url: "/hxzkuwb/findwarning", |
| | | method: 'get', |
| | | page: { |
| | | curr: 1 // 重新从第 1 页开始 |
| | | } |
| | | }); |
| | | }) |
| | | $("#warningMsg").hide() |
| | | layer.msg('操作成功') |
| | | }, |
| | | error: function(xhr, status, error) { |
| | | // 失败回调函数 |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function gjxzt(nr) { |
| | | $("#warningwb").val(nr) |
| | | function gjxzt(nr){ |
| | | $("#warningwb").val(nr) |
| | | } |
| | | |
| | | var textColor = $("#Ht").css("color"); |
| | | $("#Ht").hover(function () { |
| | | $("#Ht").hover(function (){ |
| | | $(this).css("color", "#36F5EF"); |
| | | }, function () { |
| | | (bgcolorwz) |
| | | },function (){ |
| | | console.log(bgcolorwz) |
| | | $(this).css("color", bgcolorwz); |
| | | }) |