| | |
| | | $(".MapShow").append('<li style="width: 100px;display: inline-block"><a href="javascript:;" onClick="yckb()" style="width: 100px;display: inline-block;font-size: 12px;color: '+data[0].color+'" id="ykcbs">隐藏看板</a></li>') |
| | | if(data[0].ishow == "显示"){ |
| | | $(".MapShow").append('<li style="width: 100px;display: inline-block"><input type="checkbox" id="sanweis" onClick="Qh1()" style="position: relative;top: 2px"/><a href="javascript:;" class="ts1" style="font-size: 12px;color: '+data[0].color+'" onClick="Qh1()" id="qh1">三维地图</a></li>') |
| | | $(".MapShow").append('<li onclick="xianshilixians()" style="width: 100px;display: inline-block"><input type="checkbox" id="xianshilixian" style="position: relative;top: 2px"/><a href="javascript:;" style="font-size: 12px;color: '+data[0].color+'">显示离线</a></li>') |
| | | $(".MapShow").append('<li class="ctrls" style="width: 100px;display: inline-block"><a href="javascript:;" style="font-size: 12px;color: '+data[0].color+'" title="按住CTRL按键可以旋转改变地图视角">CTRL旋转地图</a></li>') |
| | | }else{ |
| | | Qh2(); |
| | | } |
| | | if(data[1].ishow == "显示"){ |
| | | $(".MapShow").append('<li style="width: 100px;display: inline-block"><input type="checkbox" id="baidus" onClick="Qh()" style="position: relative;top: 2px"/><a href="javascript:;" class="ts1" style="font-size: 12px;color: '+data[0].color+'" onClick="Qh()" id="qh2">'+data[1].type+'</a></li>') |
| | | $(".MapShow").append('<li class="qhWeiLan" style="display: inline-block;font-size: 12px;color: white;width: 100px;"><a onclick="qhweil()" id="weilanxs" style="color: '+data[0].color+'" href="javascript:;">隐藏围栏</a></li>') |
| | | $(".MapShow").append('<li onclick="xianshilixians()" style="width: 100px;display: inline-block"><input type="checkbox" id="xianshilixian" style="position: relative;top: 2px"/><a href="javascript:;" style="font-size: 12px;color: '+data[0].color+'">显示离线</a></li>') |
| | | $(".MapShow").append('<li class="ctrls" style="width: 100px;display: inline-block"><a href="javascript:;" style="font-size: 12px;color: '+data[0].color+'" title="按住CTRL按键可以旋转改变地图视角">CTRL旋转地图</a></li>') |
| | | $(".MapShow").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="">切换类型</a></li>') |
| | | }else{ |
| | | // $("#ditu2").hide(); |
| | | Qh1(); |
| | | } |
| | | $(".MapShow").append('<li onclick="xianshilixians()" style="width: 100px;display: inline-block"><input type="checkbox" id="xianshilixian" style="position: relative;top: 2px"/><a href="javascript:;" style="font-size: 12px;color: '+data[0].color+'">显示离线</a></li>') |
| | | $(".MapShow").append('<li class="ctrls" style="width: 100px;display: inline-block"><a href="javascript:;" style="font-size: 12px;color: '+data[0].color+'" title="按住CTRL按键可以旋转改变地图视角">CTRL旋转地图</a></li>') |
| | | $(".MapShow").append('<li class="qhPingMian" style="font-size: 12px;width: 100px;display: inline-block"><select id="mySelect" onchange="TuCeng()" style="border: none;background: none;color: '+data[0].color+'"><option style="color: black">切换图层</option></select></li>') |
| | | $(".MapShow").append('<li class="qhWeiLan" style="display: inline-block;font-size: 12px;color: white;width: 100px;"><a onclick="qhweil()" id="weilanxs" style="color: '+data[0].color+'" href="javascript:;">隐藏围栏</a></li>') |
| | | $(".MapShow").append('<li class="MapType" onclick="init()" style="cursor: pointer;font-size: 12px;width: 100px;display: inline-block;color: '+data[0].color+'"><a href="javascript:;" style="font-size: 12px;cursor:pointer" title="">地球</a></li>') |
| | | // $(".MapShow").append('<li class="qhPingMian" style="font-size: 12px;width: 100px;display: inline-block"><select id="mySelect" onchange="TuCeng()" style="border: none;background: none;color: '+data[0].color+'"><option style="color: black">切换图层</option></select></li>') |
| | | $(".qhPingMian").hide(); |
| | | // 获取下拉框的 DOM 元素 |
| | | $.post("/hxzkuwb/qiehuanditu_option.do",function (data){ |
| | |
| | | color: 'white' |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: '统计', |
| | | type: 'pie', |
| | | radius: ['20%', '40%'], |
| | | center: ['35%', '60%'], |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 10, |
| | | }, |
| | | series: [{ |
| | | name: '统计', |
| | | type: 'pie', |
| | | radius: ['20%', '40%'], |
| | | center: ['35%', '60%'], |
| | | avoidLabelOverlap: false, |
| | | itemStyle: { |
| | | borderRadius: 10, |
| | | }, |
| | | label: { |
| | | show: false, |
| | | position: 'center' |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: false, |
| | | position: 'center' |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: 20, |
| | | fontWeight: 'bold' |
| | | show: true, |
| | | fontSize: 20, |
| | | fontWeight: 'bold' |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | data: [ |
| | | { value: 0, name: '静止报警 0' }, |
| | | { value: 0, name: 'SOS报警 0' }, |
| | | { value: 0, name: '跌落报警 0' }, |
| | | { value: 0, name: '缺员报警 0' }, |
| | | { value: 0, name: '超员报警 0' }, |
| | | { value: 0, name: '聚集报警 0' }, |
| | | { value: 0, name: '越界报警 0' }, |
| | | { value: 0, name: '进入报警 0' }, |
| | | { value: 0, name: '低电报警 0' }, |
| | | { value: 0, name: '离线基站 0' }, |
| | | ] |
| | | }], |
| | | // 添加事件监听器 |
| | | graphic: [ |
| | | { |
| | | type: 'group', |
| | | left: 'center', |
| | | top: 'center', |
| | | children: [ |
| | | { |
| | | type: 'text', |
| | | z: 100, |
| | | left: 'center', |
| | | top: 'middle', |
| | | style: { |
| | | fill: '#fff', |
| | | text: '', |
| | | font: '14px Microsoft YaHei' |
| | | }, |
| | | // 设置鼠标悬停事件 |
| | | onmouseover: function (params) { |
| | | var dataIndex = params.dataIndex; |
| | | var name = option.series[0].data[dataIndex].name; |
| | | // 更新文字颜色 |
| | | this.setStyle('fill', '#46E9E8'); |
| | | console.log("Mouseover on:", name); |
| | | }, |
| | | // 设置鼠标移出事件 |
| | | onmouseout: function (params) { |
| | | // 恢复默认文字颜色 |
| | | this.setStyle('fill', '#fff'); |
| | | }, |
| | | onclick: function (params) { |
| | | var dataIndex = params.dataIndex; |
| | | var name = option.series[0].data[dataIndex].name; |
| | | console.log("Clicked on:", name); |
| | | } |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | data: [ |
| | | { value: 0, name: '静止报警 0' }, |
| | | { value: 0, name: 'SOS报警 0' }, |
| | | { value: 0, name: '跌落报警 0' }, |
| | | { value: 0, name: '缺员报警 0' }, |
| | | { value: 0, name: '超员报警 0' }, |
| | | { value: 0, name: '聚集报警 0' }, |
| | | { value: 0, name: '越界报警 0' }, |
| | | { value: 0, name: '进入报警 0' }, |
| | | { value: 0, name: '低电报警 0' }, |
| | | { value: 0, name: '离线基站 0' }, |
| | | |
| | | ] |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | |
| | | |
| | | |
| | | function tubiaotongji() { |
| | | var tu = []; |
| | | |
| | |
| | | window.location='../index.jsp' |
| | | } |
| | | },2000) |
| | | |
| | | |
| | | setInterval(function (){ |
| | | var SanWei = localStorage.getItem("SanWei_JianZhu") |
| | | if (SanWei != null){ |
| | | $("#JianZhuMsg").animate({right: '-1%'}, 500); |
| | | |
| | | }else{ |
| | | $("#JianZhuMsg").animate({right: '-25%'}, 500); |
| | | |
| | | } |
| | | if (localStorage.getItem("DiaoYong_SanWeiFlOoor")!= null){ |
| | | $("#JianZhuMsg").empty(); |
| | | SanWeiJianZhuXinXi(); |
| | | } |
| | | },1000) |
| | | |
| | | |
| | | function SanWeiJianZhuXinXi(){ |
| | | var FID= localStorage.getItem("SanWei_JianZhuFID"); |
| | | var Name= localStorage.getItem("SanWei_JianZhu"); |
| | | console.log(FID) |
| | | //根据FID查询他的楼层 |
| | | var data = "fid="+FID |
| | | var num = ""; |
| | | $.get("/hxzkuwb/FindTongJiAreaList",data,function (data){ |
| | | if (data.dangerlevel == 1){ |
| | | data.dangerlevel = "甲类" |
| | | } |
| | | if (data.dangerlevel == 2){ |
| | | data.dangerlevel = "乙类" |
| | | } |
| | | if (data.dangerlevel == 3){ |
| | | data.dangerlevel = "丙类" |
| | | } |
| | | if (data.dangerlevel == 4){ |
| | | data.dangerlevel = "丁类" |
| | | } |
| | | if (data.dangerlevel == 5){ |
| | | data.dangerlevel = "戊类" |
| | | } |
| | | $("#JianZhuMsg").append('<div style="margin-top: 15%;margin-bottom:5%;margin-left: 5%;width: 85%"><h2 style="margin-top: 0%;display: inline-block;;color: white;font-size: 14px" id="JzMc">'+Name+' 区域等级:'+data.dangerlevel+'</h2><h2 style="margin-top: 0%;display: inline-block;float: right;color: white;font-size: 14px">总人数:<span id="zongnumes"></span> <img onclick="GuanBiMsg()" src="../Home/HomeImg/clos.png" style="cursor:pointer;width: 20px;height: 20px;"></h2></div>') |
| | | for (var i = 1 ; i <= data.floornum; i++){ |
| | | $("#JianZhuMsg").append('' + |
| | | '<div id="LouCeng'+i+'" style="overflow-x: hidden;overflow-y: scroll;height: 85%;margin-top: 7%;margin-left: 5%;width: 94%">' + |
| | | '<h2 style="display: inline-block;font-weight: bold;color: black;font-size: 15px">当前楼层:'+i+'层</h2>' + |
| | | '<h2 style="margin-top: 0%;display: inline-block;font-weight: bold;color: black;font-size: 14px;margin-left: 30%">人数:<span id="numes'+i+'" style="display: inline-block;width: 10%">0</span></h2>' + |
| | | '<h2 style="display: inline-block;font-size: 14px;font-weight: bold;margin-left: 10%;cursor:pointer;" onclick="LouCeng('+i+')">展开/合并</h2><img style="width: 20px;height: 20px;" src="../Home/HomeImg/xiala.png"> ' + |
| | | '<div style="margin-top: 5%;margin-left: 1%;width: 90%;">' + |
| | | '<div class="layui-collapse" id="floor'+i+'"></div>') |
| | | } |
| | | num = data.floornum; |
| | | }) |
| | | var data ="baoliu39="+FID; |
| | | $.get("/hxzkuwb/findSanWeiFloorPerson",data,function (data){ |
| | | var floor1 = 0; |
| | | var floor2 = 0; |
| | | var floor3 = 0; |
| | | var floor4 = 0; |
| | | var floor5 = 0; |
| | | var floor6 = 0; |
| | | for (var i = 0; i < data.length;i++){ |
| | | if(data[i].pfloor == "0"){ |
| | | $("#floor1").append('<div onclick="personMsgtid('+data[i].ptagid+')" class="layui-colla-item" style="background-color: rgba(255, 255, 255, 0)"><h2 class="layui-colla-title" style="background-color: rgba(255, 255, 255, 0)"><img src="HomeImg/PersonShi.png" style="width: 25px;height: 25px"/><span style="display: inline-block;margin-left: 20px">姓名:'+data[i].pname+'</span><span style="display: inline-block;float: right">编号:'+data[i].ptagid+'</span></h2>') |
| | | floor1++; |
| | | $("#numes1").text(floor1) |
| | | } |
| | | if(data[i].pfloor == "1") { |
| | | $("#floor2").append('<div onclick="personMsgtid('+data[i].ptagid+')" class="layui-colla-item" style="background-color: rgba(255, 255, 255, 0)"><h2 class="layui-colla-title" style="background-color: rgba(255, 255, 255, 0)"><img src="HomeImg/PersonShi.png" style="width: 25px;height: 25px"/><span style="display: inline-block;margin-left: 20px">姓名:'+data[i].pname+'</span><span style="display: inline-block;float: right">编号:'+data[i].ptagid+'</span></h2>') |
| | | floor2++; |
| | | $("#numes2").text(floor2) |
| | | |
| | | } |
| | | if (data[i].pfloor == "2") { |
| | | $("#floor3").append('<div onclick="personMsgtid('+data[i].ptagid+')" class="layui-colla-item" style="background-color: rgba(255, 255, 255, 0)"><h2 class="layui-colla-title" style="background-color: rgba(255, 255, 255, 0)"><img src="HomeImg/PersonShi.png" style="width: 25px;height: 25px"/><span style="display: inline-block;margin-left: 20px">姓名:'+data[i].pname+'</span><span style="display: inline-block;float: right">编号:'+data[i].ptagid+'</span></h2>') |
| | | floor3++; |
| | | $("#numes3").text(floor3) |
| | | |
| | | } |
| | | if (data[i].pfloor == "3") { |
| | | $("#floor4").append('<div onclick="personMsgtid('+data[i].ptagid+')" class="layui-colla-item" style="background-color: rgba(255, 255, 255, 0)"><h2 class="layui-colla-title" style="background-color: rgba(255, 255, 255, 0)"><img src="HomeImg/PersonShi.png" style="width: 25px;height: 25px"/><span style="display: inline-block;margin-left: 20px">姓名:'+data[i].pname+'</span><span style="display: inline-block;float: right">编号:'+data[i].ptagid+'</span></h2>') |
| | | floor4++; |
| | | $("#numes4").text(floor4) |
| | | |
| | | } |
| | | if (data[i].pfloor == "4") { |
| | | $("#floor5").append('<div onclick="personMsgtid('+data[i].ptagid+')" class="layui-colla-item" style="background-color: rgba(255, 255, 255, 0)"><h2 class="layui-colla-title" style="background-color: rgba(255, 255, 255, 0)"><img src="HomeImg/PersonShi.png" style="width: 25px;height: 25px"/><span style="display: inline-block;margin-left: 20px">姓名:'+data[i].pname+'</span><span style="display: inline-block;float: right">编号:'+data[i].ptagid+'</span></h2>') |
| | | floor5++; |
| | | $("#numes5").text(floor5) |
| | | |
| | | } |
| | | if (data[i].pfloor == "5") { |
| | | $("#floor6").append('<div onclick="personMsgtid('+data[i].ptagid+')" class="layui-colla-item" style="background-color: rgba(255, 255, 255, 0)"><h2 class="layui-colla-title" style="background-color: rgba(255, 255, 255, 0)"><img src="HomeImg/PersonShi.png" style="width: 25px;height: 25px"/><span style="display: inline-block;margin-left: 20px">姓名:'+data[i].pname+'</span><span style="display: inline-block;float: right">编号:'+data[i].ptagid+'</span></h2>') |
| | | floor6++; |
| | | $("#numes6").text(floor6) |
| | | |
| | | } |
| | | } |
| | | var zong = floor1+floor2+floor3+floor4+floor5+floor6; |
| | | $("#zongnumes").text(zong+"人") |
| | | }) |
| | | localStorage.removeItem("DiaoYong_SanWeiFlOoor") |
| | | } |
| | | |
| | | function LouCeng(num){ |
| | | var elementWidth = $("#LouCeng" + num).height(); |
| | | var parentWidth = $("#JianZhuMsg").parent().height(); |
| | | var widthPercentage = (elementWidth / parentWidth) * 100; |
| | | console.log(widthPercentage); |
| | | if (widthPercentage>80){ |
| | | $("#LouCeng"+num).animate({"height":"5%"},1000) |
| | | }else{ |
| | | $("#LouCeng"+num).animate({"height":"85%"},1000) |
| | | |
| | | } |
| | | } |
| | | function GuanBiMsg(){ |
| | | localStorage.removeItem("SanWei_JianZhu") |
| | | } |
| | | |
| | | |
| | | |