You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

396 lines
11 KiB

$(".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 = '<span style="font-size:1.5em;display:block;color:red">图书馆一楼配电箱</span>';
content += '<div style="position: relative;float: left;display:inline;overflow-y: auto;height: 225px;"><div style="margin:10px 0px"><span style="font-size:1.0em;margin-right:12px">发生时间</span><span class="map_trackPopUpContent_list" style="color:red">';
content += '2018/12/17 16:12:24</span></div>';
content += '<div style="margin:10px 0px"><span style="font-size:1.0em;margin-right:12px">报警设备</span><span class="map_trackPopUpContent_list" style="color:red">';
content += '电[4ADE3314127]</span></div>';
content += '<div style="margin:10px 0px"><span style="font-size:1.0em;margin-right:12px">报警数值</span><span class="map_trackPopUpContent_list" style="color:red">';
content += '温度过高(87°C)</span></div>';
content += '<div style="margin:10px 0px"><span style="font-size:1.0em;margin-right:12px">报警原因</span><span class="map_trackPopUpContent_list" style="color:red">';
content += '温度过高</span></div>';
content += '<div style="margin:10px 0px"><span style="font-size:1.0em;margin-right:12px">报警状态</span><span class="map_trackPopUpContent_list" style="color:red">';
content += '未处置</span></div>';
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("<colgroup><col width='19%'><col width='23%'><col width='16%'><col width='16%'><col width='16%'><col width='10%'></colgroup>");
$.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 = "<tr>";
trHtml += "<td title='"+item.DEVICE_SN+"'>"+DEVICE_SN+"</td>";
trHtml += "<td title='"+item.DEVICE_TYPE_NAME+"'>"+DEVICE_TYPE_NAME+"</td>";
trHtml += "<td title='"+item.DEVICE_ADDR+"'>"+DEVICE_ADDR+"</td>";
trHtml += "<td><a href='#'><img src='"+ctx+"/style/cls1/img/sblist-icon1.png' onmouseover="+this.src+"='${ctx}/style/cls1/img/sblist-icon1h.png' onmouseout="+this.src+"='${ctx}/style/cls1/img/sblist-icon1.png'></a></td>";
trHtml += "<td><a href='#'><img src='"+ctx+"/style/cls1/img/sblist-icon2.png' onmouseover="+this.src+"='${ctx}/style/cls1/img/sblist-icon2h.png' onmouseout="+this.src+"='${ctx}/style/cls1/img/sblist-icon2.png'></a></td>";
trHtml += "<td><a class='location' href='#'><img src='"+ctx+"/style/cls1/img/sblist-icon3.png' onmouseover="+this.src+"='${ctx}/style/cls1/img/sblist-icon3h.png' onmouseout="+this.src+"='${ctx}/style/cls1/img/sblist-icon3.png'></a></td>";
trHtml += "</tr>";
$("#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 = "<li>";
liHtml += "<div class='dwsssj-xx fl'>";
liHtml += "<h4>"+groupName+"</h4>";
liHtml += "<div class='dwsssj-xx1'>";
liHtml += "报警设备:<span>"+item.DEVICE_SN+"</span>";
liHtml += "设备名称:<span>"+item.DEVICE_NAME+"</span>";
liHtml += "报警原因:<span>"+item.ALARM_REASONNAME+"</span>";
liHtml += "报警位置:<span>"+item.ADDR+"</span>";
liHtml += "时间:<span>"+item.ALARM_TIME+"</span>";
liHtml += "</div></div>";
liHtml += "<div class='dwss-button fr'>";
liHtml += "<a href='#'><img src='"+ctx+"/style/cls1/img/dw-diwei.png' class='mr-10'></a>";
liHtml += "<a href='#'><img src='"+ctx+"/style/cls1/img/dw-hujiao.png'></a>";
liHtml += "</div></li>";
$("#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("","");
})