Commit c5b7e788 authored by 史余彬's avatar 史余彬

环境监测大屏显示, 实时数据接口

parent 78c22011
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
var layer = '50'; var layer = '50';
var kqid = 1; var kqid = 1;
$.getJSON('http://192.168.1.3:8080/MineJSON/vzigbee.action?type=8&param=' $.getJSON('http://192.168.1.11:8080/MineJSON/vzigbee.action?type=8&param='
+ rowData.personcode+ '-' + rowData.personcode+ '-'
+ (Date.parse(new Date(starttime)) / 1000)+ '-' + (Date.parse(new Date(starttime)) / 1000)+ '-'
+ (Date.parse(new Date(endtime)) / 1000) + (Date.parse(new Date(endtime)) / 1000)
......
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/co2jiance.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/co2jiance.jsp"
</script> </script>
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
field : 'zduan', field : 'zduan',
width : 50, width : 50,
},{
title : '设备名称',
field : 'zkname',
width : 50,
}, { }, {
title : '站点编号', title : '站点编号',
field : 'sensorname', field : 'sensorname',
......
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/cojiance.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/cojiance.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/fengsu.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/fengsu.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengsu.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengsu.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/fengya.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/fengya.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/o2jiance.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/o2jiance.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/shidu.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/shidu.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp"
</script> </script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.location.href="http://192.168.1.3:8081/MineEM/tubiao/wendu.jsp" window.location.href="http://192.168.1.11:8081/MineEM/tubiao/wendu.jsp"
//window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp" //window.location.href="http://localhost:8080/MineTRS/tubiao/fengya.jsp"
</script> </script>
<!DOCTYPE html>
<html>
<title>环境监测大屏</title>
<head>
<%--<script>window.location.href='http://192.168.1.11:8080/MineTT/jinda/index.html';</script>--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/jslib/jquery-1.8.2.min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
window.open("http://192.168.1.11:8080/MineTT/jinda/disscreen.jsp",'top');
})
</script>
</head>
<body>
</body>
</html>
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<html> <html>
<title>三维动画</title> <title>三维动画</title>
<head> <head>
<%--<script>window.location.href='http://192.168.1.3:8080/MineTT/jinda/index.html';</script>--%> <%--<script>window.location.href='http://192.168.1.11:8080/MineTT/jinda/index.html';</script>--%>
<script type="text/javascript" src="${pageContext.request.contextPath}/jslib/jquery-1.8.2.min.js" charset="utf-8"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/jslib/jquery-1.8.2.min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { $(function() {
window.open("http://192.168.1.3:8080/MineTT/jinda/index.html",'top'); window.open("http://192.168.1.11:8080/MineTT/jinda/index.html",'top');
}) })
</script> </script>
......
.webgl-content * {border: 0; margin: 0; padding: 0} .webgl-content * {border: 0; margin: 0; padding: 0}
.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} .webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} .webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;} .webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;} .webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;} .webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;} .webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');} .webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');} .webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');} .webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;} .webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;}
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;} .webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;} .webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
.webgl-content .footer .title {margin-right: 10px; float: right;} .webgl-content .footer .title {margin-right: 10px; float: right;}
.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;} .webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}
\ No newline at end of file
<xml> <xml>
<InterLink ip="192.168.1.3:8080"> <InterLink ip="192.168.1.11:8080">
</InterLink> </InterLink>
<MachineList> <MachineList>
<machine id="572283213433474205D4FF37" zkname="定位" name="人员定位基站0-1" position="1.22,123.27,13.63" rotation="90,180,0" scale="10,10,10" type="Zigbee" layer="0"/> <machine id="572283213433474205D4FF37" zkname="定位" name="人员定位基站0-1" position="1.22,123.27,13.63" rotation="90,180,0" scale="10,10,10" type="Zigbee" layer="0"/>
<machine id="572267213433474205D4FF37" zkname="定位" name="人员定位基站2-1" position="50.94,-138.3,8.52" rotation="90,180,0" scale="10,10,10" type="Zigbee" layer="2"/> <machine id="572267213433474205D4FF37" zkname="定位" name="人员定位基站2-1" position="50.94,-138.3,8.52" rotation="90,180,0" scale="10,10,10" type="Zigbee" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="开停1" name="开停传感器2-1" position="-631.29,-138.4,1195.16" rotation="0,50,0" type="Onoff" scale="100,100,100" layer="2"/> <machine id="571368313137474205D7FF30" zkname="开停1" name="开停传感器2-1" position="-631.29,-138.4,1195.16" rotation="0,50,0" type="Onoff" scale="100,100,100" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="开停2" name="开停传感器2-2" position="-643.53,-138.4,1184.56" rotation="0,50,0" type="Onoff" scale="100,100,100" layer="2"/> <machine id="571368313137474205D7FF30" zkname="开停2" name="开停传感器2-2" position="-643.53,-138.4,1184.56" rotation="0,50,0" type="Onoff" scale="100,100,100" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="风速" name="风速传感器2-1" position="-753.2,-144.78,1230.19" rotation="0,0,0" type="Fengsu" scale="20,20,20" layer="2"/> <machine id="571368313137474205D7FF30" zkname="风速" name="风速传感器2-1" position="-753.2,-144.78,1230.19" rotation="0,0,0" type="Fengsu" scale="20,20,20" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="压力" name="负压传感器2-1" position="-770.43,-142.28,1225.95" rotation="90,158.4,0" type="Fuya" scale="100,100,100" layer="2"/> <machine id="571368313137474205D7FF30" zkname="压力" name="负压传感器2-1" position="-770.43,-142.28,1225.95" rotation="90,158.4,0" type="Fuya" scale="100,100,100" layer="2"/>
<machine id="571368313137474205D7FF30" zkname="压力" name="负压传感器2-1" position="-763.322,-141.8,1227.975" rotation="90,163.221,0" type="Fuya" scale="10,10,10" layer="2"/>
<machine id="572276213433474205D6FF37" zkname="定位" name="人员定位基站4-1" position="105.3,-366,-10.63" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="4"/> <machine id="571368313137474205D7FF30" zkname="co-2-1" name="一氧化碳传感器2-1" position="-627.345,-139.9625,1179.59" rotation="90,-42.78363,0" type="Fuya" scale="10,10,10" layer="2"/>
<machine id="571365313137474205D8FF30" zkname="co" name="一氧化碳传感器4-1" position="263.65,-366.06,-441.41" rotation="90,-79.6,0" type="Co" scale="10,10,10" layer="4"/>
<machine id="572276213433474205D6FF37" zkname="定位" name="人员定位基站4-1" position="105.3,-366,-10.63" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="4"/>
<machine id="572289203433474205D6FF37" zkname="定位" name="人员定位基站5-1" position="108.55,-633.9,-10.71" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="5"/> <machine id="571365313137474205D8FF30" zkname="co-4-1" name="一氧化碳传感器4-1" position="263.65,-366.06,-441.41" rotation="90,-79.6,0" type="Co" scale="10,10,10" layer="4"/>
<machine id="572253213433474205D5FF37" zkname="定位" name="人员定位基站5-2" position="181.46,-633.87,-804.65" rotation="90,180,0" type="Zigbee" scale="10,10,10" layer="5"/> <machine id="571365313137474205D8FF30" zkname="co-4-2" name="一氧化碳传感器4-2" position="260.471,-365.886,-501.9611" rotation="90,-98.6,0" type="Co" scale="10,10,10" layer="4"/>
<machine id="572268433137474205D9FF30" zkname="co" name="一氧化碳传感器5-1" position="281.85,-632.74,-385.03" rotation="90,-90,0" type="Co" scale="10,10,10" layer="5"/>
<machine id="572289203433474205D6FF37" zkname="定位" name="人员定位基站5-1" position="108.55,-633.9,-10.71" rotation="90,0,0" scale="10,10,10" type="Zigbee" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="风速" name="风速传感器5-1" position="197.45,-637.3,-902.05" rotation="0,107,0" type="Fengsu" scale="20,20,20" layer="5"/> <machine id="572253213433474205D5FF37" zkname="定位" name="人员定位基站5-2" position="181.46,-633.87,-804.65" rotation="90,180,0" type="Zigbee" scale="10,10,10" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="co" name="一氧化碳传感器5-2" position="186.04,-633.8,-805.03" rotation="90,-180,0" type="Co" scale="10,10,10" layer="5"/> <machine id="572268433137474205D9FF30" zkname="co-5-3" name="一氧化碳传感器5-3" position="281.85,-632.74,-385.03" rotation="90,-90,0" type="Co" scale="10,10,10" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="co2" name="二氧化碳传感器5-1" position="189.781,-633.32,-805.207" rotation="0,-159,0" type="Co2" scale="1,1,1" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="温度" name="温湿度传感器5-1" position="178.69,-633.6,-805" rotation="0,172.4,0" type="Wendu" scale="1,1,1" layer="5"/> <machine id="571364313137474205D7FF30" zkname="风速" name="风速传感器5-1" position="197.45,-637.3,-902.05" rotation="0,107,0" type="Fengsu" scale="20,20,20" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="湿度" name="温湿度传感器5-1" position="175.6,-633.6,-806.259" rotation="0,144.6,0" type="Shidu" scale="1,1,1" layer="5"/> <machine id="571364313137474205D7FF30" zkname="co-5-1" name="一氧化碳传感器5-1" position="186.04,-633.8,-805.03" rotation="90,-180,0" type="Co" scale="10,10,10" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="o2" name="氧气传感器5-1" position="173.84,-633.73,-809.05" rotation="-90,90,0" type="O2" scale="2,2,2" layer="5"/> <machine id="571364313137474205D7FF30" zkname="co2" name="二氧化碳传感器5-1" position="189.781,-633.32,-805.207" rotation="0,-159,0" type="Co2" scale="1,1,1" layer="5"/>
<machine id="571364313137474205D7FF30" zkname="压力" name="气压传感器5-1" position="191.88,-633.07,-808.52" rotation="90,-93.2,0" type="Qiya" scale="100,100,100" layer="5"/> <machine id="571364313137474205D7FF30" zkname="温度" name="温湿度传感器5-1" position="178.69,-633.6,-805" rotation="0,172.4,0" type="Wendu" scale="1,1,1" layer="5"/>
</MachineList> <machine id="571364313137474205D7FF30" zkname="湿度" name="温湿度传感器5-1" position="175.6,-633.6,-806.259" rotation="0,144.6,0" type="Shidu" scale="1,1,1" layer="5"/>
<BirthPos> <machine id="571364313137474205D7FF30" zkname="o2" name="氧气传感器5-1" position="173.84,-633.73,-809.05" rotation="-90,90,0" type="O2" scale="2,2,2" layer="5"/>
<pos id="1" machineid="572283213433474205D4FF37" name="地面井口" position="2.6,118.17,-3.5" layer="0"/> <machine id="571364313137474205D7FF30" zkname="压力" name="气压传感器5-1" position="191.88,-633.07,-808.52" rotation="90,-93.2,0" type="Qiya" scale="100,100,100" layer="5"/>
<pos id="2" machineid="572267213433474205D4FF37" name="2中井口" position="85.43,-144.36,0.43" layer="2"/> <machine id="571364313137474205D7FF30" zkname="co-5-2" name="一氧化碳传感器5-2" position="180.48,-633.8,-873.936" rotation="90,3.64,0" type="Co" scale="10,10,10" layer="5"/>
<pos id="3" machineid="572276213433474205D6FF37" name="4中井口" position="105.3,-372.34,0.4" layer="4"/> </MachineList>
<pos id="4" machineid="572253213433474205D5FF37" name="5中值班室" position="108.55,-637.35,-0.37" layer="5"/> <BirthPos>
<pos id="5" machineid="572289203433474205D6FF37" name="5中避灾硐室" position="181.46,-637.16,-810" layer="5"/> <pos id="1" machineid="572283213433474205D4FF37" name="地面井口" position="2.6,118.17,-3.5" layer="0"/>
</BirthPos> <pos id="2" machineid="572267213433474205D4FF37" name="2中井口" position="85.43,-144.36,0.43" layer="2"/>
<HuanjingList> <pos id="3" machineid="572276213433474205D6FF37" name="4中井口" position="105.3,-372.34,0.4" layer="4"/>
<huanjing id="571368313137474205D7FF30" position="-624.87,-139.37,1191.65"/> <pos id="4" machineid="572253213433474205D5FF37" name="5中值班室" position="108.55,-637.35,-0.37" layer="5"/>
<huanjing id="571368313137474205D7FF30" position="251.9,-376,-491.8"/> <pos id="5" machineid="572289203433474205D6FF37" name="5中避灾硐室" position="181.46,-637.16,-810" layer="5"/>
<huanjing id="572268433137474205D9FF30" position="279.2,-640.7,-317.9"/> </BirthPos>
<huanjing id="571364313137474205D7FF30" position="180.2,-640.7,-817.2"/> <HuanjingList>
</HuanjingList> <huanjing id="571368313137474205D7FF30" position="-624.87,-139.37,1191.65"/>
</xml> <huanjing id="571368313137474205D7FF30" position="251.9,-376,-491.8"/>
<huanjing id="572268433137474205D9FF30" position="279.2,-640.7,-317.9"/>
<huanjing id="571364313137474205D7FF30" position="180.2,-640.7,-817.2"/>
</HuanjingList>
</xml>
\ No newline at end of file
...@@ -5,18 +5,20 @@ ...@@ -5,18 +5,20 @@
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>大屏显示</title> <title>大屏显示</title>
<style type="text/css"> <style type="text/css">
</style> </style>
<link rel="stylesheet" type="text/css" href="../themes/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="../themes/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css"> <link rel="stylesheet" type="text/css" href="../themes/icon.css">
<script type="text/javascript" src="../js/jquery-1.7.1.js"></script> <script type="text/javascript" src="../js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.8.20.custom.min.js"></script> <script type="text/javascript" src="../js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="../js/highcharts.js"></script> <script type="text/javascript" src="../js/highcharts.js"></script>
<script type="text/javascript" src="../js/highcharts-more.js"></script>
<script type="text/javascript" src="../js/jquery.easyui.min.js"></script> <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
<script> <script>
/** /**
* 表格数据初始化 * 表格数据初始化
*/ */
function initpolygon1(polygon,title,value1,name) { function initpolygon1(polygon,title,value1,name,min, max) {
$('#'+polygon).highcharts({ $('#'+polygon).highcharts({
chart: { chart: {
type: 'gauge', type: 'gauge',
...@@ -34,7 +36,8 @@ ...@@ -34,7 +36,8 @@
}, },
title: { title: {
text: name+'号传感器实时温度图' text: name+'(传感器)',
style: { "color": "", "fontSize": "18px" }
}, },
pane: [{ pane: [{
...@@ -46,8 +49,8 @@ ...@@ -46,8 +49,8 @@
}], }],
yAxis: [{ yAxis: [{
min: 0, min: min,
max: 85, max: max,
minorTickPosition: 'outside', minorTickPosition: 'outside',
tickPosition: 'outside', tickPosition: 'outside',
labels: { labels: {
...@@ -60,14 +63,14 @@ ...@@ -60,14 +63,14 @@
}], }],
pane: 0, pane: 0,
title: { title: {
text: '<span style="font-size:8px">温度 '+value1.toFixed(2)+'</span><br/>℃', text: '<span style="font-size:8px">' + name + ":" + value1.toFixed(2)+'</span><br/>℃',
y: -40 y: -40
} }
}], }],
tooltip: { tooltip: {
enabled: true, enabled: true,
formatter: function () { formatter: function () {
return '温度' +value1.toFixed(2)+'' return name + '' +value1.toFixed(2)+''
} }
}, },
plotOptions: { plotOptions: {
...@@ -85,7 +88,6 @@ ...@@ -85,7 +88,6 @@
}] }]
}, },
function(chart) { function(chart) {
setInterval(function() { setInterval(function() {
var left = chart.series[0].points[0], var left = chart.series[0].points[0],
...@@ -106,44 +108,112 @@ ...@@ -106,44 +108,112 @@
// 页面加载初始化 // 页面加载初始化
$(function() { $(function() {
$.ajax({ $('#tt').tabs({
url: "/MineTT/online!EnvironmentRealTimeData.do?token=laowangzhuanyong", border: false,
type: "get", onSelect: function (title) {
success: function(data) { $.ajax({
console.log(data) url: "/MineTT/online!EnvironmentRealTimeData.do?token=laowangzhuanyong",
type: "get",
success: function(data) {
changeCharts(title, data)
}
})
} }
}) })
for (var i = 0 ; i < 10 ; i++) {
$("#wd").append("<div style='width: 400px; height: 200px; float: left;margin-top: 20px; margin-left: 20px; border:1px solid #5896f3'></div>")
}
}) })
/**
* 根据不同的传感器调整图表
*/
function changeCharts(sensorname, data) {
var deviceType = '';
var measureMax;
var measureMin;
if ("氧气" === sensorname) {
deviceType = 'yq';
measureMin = 0;
measureMax = 25;
} else if ("一氧化碳" === sensorname) {
deviceType = 'yyht';
measureMin = 0;
measureMax = 1000;
} else if ("二氧化碳" === sensorname) {
deviceType = 'eyht';
measureMin = 0;
measureMax = 0.5;
} else if ("温度" === sensorname) {
deviceType = 'wd';
measureMin = 0;
measureMax = 80;
} else if ("湿度" === sensorname) {
deviceType = 'sd';
measureMin = 0;
measureMax = 95;
} else if ("压力" === sensorname) {
deviceType = 'yl';
measureMin = 0;
measureMax = 5;
} else if ("风速" === sensorname) {
deviceType = 'fs';
measureMin = 0.4;
measureMax = 15;
}
$("#"+deviceType).empty()
const arrAll = JSON.parse(data);
$.each(arrAll, function(key, val) {
if (sensorname === key) {
$.each(val, function(index, val) {
var ifbj = '';
var color = '';
if (val.ifbj === '0') {
ifbj = '正常'
color = 'black'
} else {
ifbj = '报警'
color = 'red'
}
$("#"+deviceType).append("<div class='a' style='width: 430px ; height: 49%; float: left;margin-top: 20px; margin-left: 20px; border:1px solid #5896f3'>" +
"<div id='" + deviceType + index + "' style='width: 98%;height: 49%' class='chart1'>正在刷新 ,请稍后.." +
"<img alt='请稍候' src='../themes/azure/images/progressBar/progressBar_l.gif'>" +
"</div> </br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px'>设备号: " + val.sensorname +"</p></br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px'>中断: " + val.zduan +"</p></br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px'>时间: " + val.jctime +"</p></br>" +
"<p style='font-size: 15px; margin-left: 10px; margin-top: -10px';color: " + color + "'>报警: " + ifbj + "</p></br>" +
"</div>")
initpolygon1(deviceType+index, sensorname, val.value2, sensorname, measureMin, measureMax)
})
}
})
}
</script> </script>
</head> </head>
<body> <body>
<div id="tt" class="easyui-tabs" style="width:auto;height:auto;"> <div id="tt" class="easyui-tabs" style="width:auto;height:auto;">
<div id="wd" title="温度" style="padding:20px;"> <div id="yq" title="氧气" data-options="iconCls:'icon-reload',closable:true" style="padding:20px">
</div> </div>
<div title="湿度" data-options="closable:true" style="overflow:auto;padding:20px;display:none;"> <div id="yyht" title="一氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
湿度
</div> </div>
<div title="风速" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="eyht" title="二氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
风速
</div> </div>
<div title="压力" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="wd" title="温度" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
压力
</div> </div>
<div title="一氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="sd" title="湿度" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
一氧化碳
</div> </div>
<div title="二氧化碳" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="fs" title="风速" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
二氧化碳
</div> </div>
<div title="氧气" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;display:none;"> <div id="yl" title="压力" data-options="iconCls:'icon-reload',closable:true" style="padding:20px;">
氧气
</div> </div>
</div> </div>
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en-us"> <html lang="en-us">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | jinda</title> <title>Unity WebGL Player | jinda</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico"> <link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css"> <link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script> <script src="TemplateData/UnityProgress.js"></script>
<script src="Build/UnityLoader.js"></script> <script src="Build/UnityLoader.js"></script>
<script> <script>
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/jinda.json", {onProgress: UnityProgress}); var gameInstance = UnityLoader.instantiate("gameContainer", "Build/jinda.json", {onProgress: UnityProgress});
</script> </script>
</head> </head>
<body> <body>
<div class="webgl-content"> <div class="webgl-content">
<div id="gameContainer" style="width: 960px; height: 600px"></div> <div id="gameContainer" style="width: 960px; height: 600px"></div>
<div class="footer"> <div class="footer">
<div class="webgl-logo"></div> <div class="webgl-logo"></div>
<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div> <div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
<div class="title">jinda</div> <div class="title">jinda</div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment