$(".location").on("click", function() { // var trId = $(this).parent().attr("id"); // console.log(trId); alert(123); var position = _Cesium.Cartesian3.fromDegrees(111.67753371172782,40.808473904232045,15.51602961423858) var content = '图书馆一楼配电箱'; content += '
发生时间'; content += '2018/12/17 16:12:24
'; content += '
报警设备'; content += '电[4ADE3314127]
'; content += '
报警数值'; content += '温度过高(87°C)
'; content += '
报警原因'; content += '温度过高
'; content += '
报警状态'; content += '未处置
'; var obj = {position:position,content:content,type:0}; //增加气泡 addBubble(obj); //增加波纹效果 addWave(obj); //修改波纹颜色 $(".wave.ripple.danger").css("color","red"); $(".wave.ripple.danger").children(".circle").css("border-color","red"); $(".wave.ripple.warning").css("color","red"); $(".wave.ripple.warning").children(".circle").css("border-color","red"); }) /** * 设备列表 表格数据获取 * @param groupId 单位ID(session获取) * @param SYS_ID 设备类型(sys_id="":查询全部) * 消防用水监测系统 01 * 电气火灾监测系统 02 * 独立烟感系统 03 * 可燃气体报警系统 04 * 火灾自动联网报警系统 05 * 消防可视化监测系统 06 * 消防通道及防火排烟系统 07 * @param keywords 按内容检索 */ function getDvcList(sys_id,keywords){ $.ajax({ type: "post", url: "http://192.168.0.148:8097/WebHandle/Handler.ashx", data: { Action: "GetDVCList", UNIT_ID: groupId, SYS_ID: sys_id, keywords: keywords, limit: 20, page: 1 }, dataType: "json", success: function(data){ $("#gisDvc_dataTable").empty(); var dvcJson = data.data; $("#gisDvc_dataTable").append(""); $.each(dvcJson, function (index, item) { var DEVICE_SN="",DEVICE_TYPE_NAME="",DEVICE_ADDR=""; if(item.DEVICE_SN!=null){ DEVICE_SN = item.DEVICE_SN.length>4?item.DEVICE_SN.substring(0,4)+ '...':item.DEVICE_SN; } if(item.DEVICE_TYPE_NAME!=null){ DEVICE_TYPE_NAME = item.DEVICE_TYPE_NAME.length>5?item.DEVICE_TYPE_NAME.substring(0,5)+ '...':item.DEVICE_TYPE_NAME; } if(item.DEVICE_ADDR!=null){ DEVICE_ADDR = item.DEVICE_ADDR.length>6?item.DEVICE_ADDR.substring(0,6)+ '...':item.DEVICE_ADDR; } var trHtml = ""; trHtml += ""+DEVICE_SN+""; trHtml += ""+DEVICE_TYPE_NAME+""; trHtml += ""+DEVICE_ADDR+""; trHtml += ""; trHtml += ""; trHtml += ""; trHtml += ""; $("#gisDvc_dataTable").append(trHtml); }); }, error:function(XMLHttpRequest, textStatus, errorThrown){ console.log(errorThrown); } }); } /** * #gisDvc_dataSelect 设备列表_设备类型(下拉框) */ $("#gisDvc_dataSelect").change(function(){ var gisDvc_dataSelect_val=$("#gisDvc_dataSelect").val(); //三维可视化_设备列表 getDvcList(gisDvc_dataSelect_val); }); /** * 设备统计信息 设备数量获取 * @param groupId 单位ID(session获取) */ function getCountByStatusAll(){ $.ajax({ type: "post", url: "http://192.168.0.148:8097/WebHandle/Handler.ashx", data: { Action: "CountByStatusAll", UNIT_ID: groupId }, dataType: "json", success: function(data){ var DvcCountAll = data.data; var totalCount=0,electricCount=0,waterCount=0,smokeCount=0,otherCount=0; $.each(DvcCountAll, function (index, item) { if(item.DIC_VALUE == "01"){ waterCount += item.ZX+item.BJ+item.LX; }else if(item.DIC_VALUE == "02"){ electricCount += item.ZX+item.BJ+item.LX; }else if(item.DIC_VALUE == "03"){ smokeCount += item.ZX+item.BJ+item.LX; }else { otherCount += item.ZX+item.BJ+item.LX; } }); totalCount = waterCount+electricCount+smokeCount+otherCount; //设备安装总数_滚动效果 $("#gisTotalCount_dataDiv").rollNumDaq({ deVal: totalCount }); //电气设备数量 $("#gisElectricCount_dataDiv").html(electricCount); //消防水设备数量 $("#gisWaterCount_dataDiv").html(waterCount); //烟感设备数量 $("#gisSmokeCount_dataDiv").html(smokeCount); //其他设备数量 $("#gisOtherCount_dataDiv").html(otherCount); }, error:function(XMLHttpRequest, textStatus, errorThrown){ console.log(errorThrown); } }); } /** * 实时报警数据 列表数据获取 * @param groupId 单位ID(session获取) * @param SYS_ID 设备类型(sys_id="":查询全部) * 消防用水监测系统 01 * 电气火灾监测系统 02 * 独立烟感系统 03 * 可燃气体报警系统 04 * 火灾自动联网报警系统 05 * 消防可视化监测系统 06 * 消防通道及防火排烟系统 07 * @param keywords 按内容检索 */ function getAlarmList(sys_id,keywords){ $.ajax({ type: "post", url: "http://192.168.0.148:8097/WebHandle/Handler.ashx", data: { Action: "AlarmList", UNIT_ID: groupId, SYS_ID: sys_id, keywords: keywords, limit: 20, page: 1 }, dataType: "json", success: function(data){ $("#gisAlarm_dataUL").empty(); var AlarmListJson = data.data; $.each(AlarmListJson, function (index, item) { var liHtml = "
  • "; liHtml += "
    "; liHtml += "

    "+groupName+"

    "; liHtml += "
    "; liHtml += "报警设备:"+item.DEVICE_SN+""; liHtml += "设备名称:"+item.DEVICE_NAME+""; liHtml += "报警原因:"+item.ALARM_REASONNAME+""; liHtml += "报警位置:"+item.ADDR+""; liHtml += "时间:"+item.ALARM_TIME+""; liHtml += "
    "; liHtml += "
    "; liHtml += ""; liHtml += ""; liHtml += "
  • "; $("#gisAlarm_dataUL").append(liHtml); }); }, error:function(XMLHttpRequest, textStatus, errorThrown){ console.log(errorThrown); } }); } /** * 报警趋势 echarts折线图_数据获取 * @param groupId 单位ID(session获取) */ function getWeekAlarmAllType(){ $.ajax({ type: "post", url: "http://192.168.0.148:8097/WebHandle/Handler.ashx", data: { Action: "WeekAlarmAllType", UNIT_ID: groupId }, dataType: "json", success: function(data){ var weekAlarmAllJson = data.data; var RIQI = [],ANUM = []; $.each(weekAlarmAllJson, function (index, item) { RIQI.push(item.RIQI); ANUM.push(item.ANUM); }); jsjcEchartsFound(RIQI,ANUM); }, error:function(XMLHttpRequest, textStatus, errorThrown){ console.log(errorThrown); } }); } /** * 报警趋势 echarts折线图_渲染 * @param RIQI 日期(X轴[]) * @param ANUM 数据(X轴数据[]) */ function jsjcEchartsFound(RIQI,ANUM){ // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('jsjc')); // 指定图表的配置项和数据 var option = { tooltip: { trigger: 'axis', axisPointer: { lineStyle: { color: '#023c8d' } } }, grid: { left: '1%', right: '4%', bottom: '1%', top: '6%', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, axisLine: { lineStyle: { color: '#023c8d' } }, axisLabel: { margin: 10, textStyle: { fontSize: 14, color: '#b5e0ff' } }, data: RIQI }], yAxis: [{ type: 'value', axisTick: { show: false }, axisLine: { lineStyle: { color: '#023c8d' } }, axisLabel: { margin: 10, textStyle: { fontSize: 14, color: '#b5e0ff' } }, splitLine: { show: false } }], series: [{ name: '报警情况', type: 'line', symbolSize: 5, data: ANUM, areaStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(61, 205, 249, 0.9)' }, { offset: 0.8, color: 'rgba(61, 205, 249, 0.1)' }], false), shadowColor: 'rgba(0, 0, 0, 0.1)', shadowBlur: 10 } }, itemStyle: { normal: { color: 'rgb(61, 205, 249)', borderWidth: 1 } }, }] }; // 使用刚指定的配置项和数据显示图表。 myChart.setOption(option); } $("#gisToolsRoamStart_btn").on("click",function(){ GetRoamStart(); $("#gisToolsRoamStart_btn").hide(); $("#gisToolsRoamStop_btn").show(); }) $("#gisToolsRoamStop_btn").on("click",function(){ GetRoamStop(); $("#gisToolsRoamStop_btn").hide(); $("#gisToolsRoamStart_btn").show(); }) $("#gisToolsWorkHidden_btn").on("click",function(){ $(".gisDiv1").hide(500); $(".gisDiv2").hide(500); $(".gisDiv3").hide(500); $(".gisDiv4").hide(500); $(".gisDiv5").hide(500); $("#gisToolsWorkHidden_btn").hide(); $("#gisToolsWorkShow_btn").show(); }) $("#gisToolsWorkShow_btn").on("click",function(){ $(".gisDiv1").show(500); $(".gisDiv2").show(500); $(".gisDiv3").show(500); $(".gisDiv4").show(500); $(".gisDiv5").show(500); $("#gisToolsWorkShow_btn").hide(); $("#gisToolsWorkHidden_btn").show(); }) /** * 三维可视化_页面初始化加载 * getDvcList(""):设备列表 * getWeekAlarmAllType():报警趋势 * getCountByStatusAll():设备统计信息 * getAlarmList("",""):实时报警数据 */ $(function (){ //三维可视化_设备列表 getDvcList("",""); //三维可视化_报警趋势 getWeekAlarmAllType(); //三维可视化_设备统计信息 getCountByStatusAll(); //三维可视化_实时报警数据 getAlarmList("",""); })