123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <title>实时监控查看</title>
- <link rel="StyleSheet" href="css/huimv.css" type="text/css" />
- <style type="text/css">
- .playMain {
- width: 520px;
- /* height: 440px; */
- float: left;
- }
- .realPlayX {
- width: 500px;
- height: 400px;
- border: solid 2px #468dcd;
- margin-left: 8px;
- margin-top: 2px;
- }
- .buttonGroup {
- width: 502px;
- height: 30px;
- margin-left: 8px;
- margin-top: 2px;
- }
- .btd1 {
- width: 52px;
- text-align: center;
- }
- .btd2 {
- width: 109px;
- text-align: center;
- }
- .btd3 {
- width: 42px;
- text-align: center;
- }
- .chartGroup {
- width: 250px;
- height: 440px;
- float: left;
- }
- .chart {
- width: 240px;
- height: 140px;
- margin-left: 20px;
- margin-bottom: 5px;
- }
- </style>
- <script type="text/javascript" src="views/sj/yzgk/ssjk/viewSsjk.js"></script>
- <script type="text/javascript">
- var axRealPlayX = document.getElementById('AV_RealPlayX');
- var bPlaying = false;
- var isExpanding = false;
- var WshShell;
- var safe = false;
- try {
- WshShell = new ActiveXObject("WScript.Shell");
- } catch (e) {
- safe = true;
- }
- if (safe)
- alert("使用IE浏览器,更改“Internet选项”->“安全”->“自定义级别”设置,启用:\n“对未标记为可安全执行脚本的ActiveX控件初始化并执行脚本”");
- if ($("#mark1").val() == "" || $("#mark1").val() == null
- || $("#mark1").val() == "null") {
- $("#mark1").css("display", "none");
- }
- if ($("#mark2").val() == "" || $("#mark2").val() == null
- || $("#mark2").val() == "null") {
- $("#mark2").css("display", "none");
- }
- if ($("#mark3").val() == "" || $("#mark3").val() == null
- || $("#mark3").val() == "null") {
- $("#mark3").css("display", "none");
- }
- if ($("#mark4").val() == "" || $("#mark4").val() == null
- || $("#mark4").val() == "null") {
- $("#mark4").css("display", "none");
- }
- function realPlay(channel) {
- var ip = $("#ip").val();
- var port = $("#port").val();
- var user = $("#user").val();
- var password = $("#password").val();
- axRealPlayX = document.getElementById("AV_RealPlayX");
- var bSuccess = axRealPlayX.SetDeviceInfo(ip, port, channel - 1, user,
- password);
- if (bSuccess) {
- bPlaying = axRealPlayX.StartPlay();
- }
- }
- function stopPlay() {
- document.all("AV_RealPlayX").StopPlay();
- bPlaying = false;
- }
-
- function ptzControl(cmd, stop) {
- if (bPlaying) {
- var speed = $("#speed").val();
- if (speed != null && speed != "") {
- axRealPlayX.PTZControl(cmd, stop, speed);
- } else {
- return;
- }
- } else {
- return;
- }
- }
-
- function ptzReset() {
- if (bPlaying) {
- axRealPlayX.PTZControl(10,0,1);
- } else {
- return;
- }
- }
-
- function showMore() {
- if (bPlaying) {
- if (!isExpanding) {
- $("#moreControl").css("display", "");
- $("#more").attr("src", "./images/close.png");
- isExpanding = true;
- } else {
- $("#moreControl").css("display", "none");
- $("#more").attr("src", "./images/open.png");
- isExpanding = false;
- }
- } else {
- return;
- }
- }
-
- function ptzShow(cc) {
- if (!bPlaying) return;
- if (cc == "1") {
- document.getElementById("more").disabled = false;
- $("#moreControl").css("display", "");
- $("#more").attr("src", "./images/close.png");
- isExpanding = true;
- } else {
- document.getElementById("more").disabled = true;
- $("#moreControl").css("display", "none");
- $("#more").attr("src", "./images/open.png");
- isExpanding = false;
- }
- }
- </script>
- <script type="text/javascript">
- // 温度
- $(function(){
- jQuery.ajax({
- type : "get",
- url : "getRealWdChart.htm",
- data : {"lqid" : $('#lqid').val()},
- dataType : "text",
- async : true,
- success : function(data) {
- var chart = new FusionCharts("flash/RealTimeLine.swf?ChartNoDataText=无数据显示&InvalidXMLText=请选择搜索项",
- "ChartID", "240", "140", "0", "0");
- chart.setDataXML(data);
- chart.render("chartWd");
- }
- });
- });
- // 湿度
- $(function(){
- jQuery.ajax({
- type : "get",
- url : "getRealSdChart.htm",
- data : {"lqid" : $('#lqid').val()},
- dataType : "text",
- async : true,
- success : function(data) {
- var chart = new FusionCharts("flash/RealTimeLine.swf?ChartNoDataText=无数据显示&InvalidXMLText=请选择搜索项",
- "ChartID", "240", "140", "0", "0");
- chart.setDataXML(data);
- chart.render("chartSd");
- }
- });
- });
- // 氨气
- $(function(){
- jQuery.ajax({
- type : "get",
- url : "getRealAqChart.htm",
- data : {"lqid" : $('#lqid').val()},
- dataType : "text",
- async : true,
- success : function(data) {
- var chart = new FusionCharts("flash/RealTimeLine.swf?ChartNoDataText=无数据显示&InvalidXMLText=请选择搜索项",
- "ChartID", "240", "140", "0", "0");
- chart.setDataXML(data);
- chart.render("chartAq");
- }
- });
- });
- </script>
- </head>
- <body onunload="stopPlay();">
- <input type="hidden" id="lqid" value="$!lqid"/>
- <input type="hidden" id="ip" value="$!ip"/>
- <input type="hidden" id="port" value="$!port"/>
- <input type="hidden" id="user" value="$!user"/>
- <input type="hidden" id="password" value="$!password"/>
- <div>
- <div class="playMain">
- <div class="realPlayX">
- <object id="AV_RealPlayX" style="width: 100%; height: 100%;"
- classid="CLSID:30209FBC-57EB-4F87-BF3E-740E3D8019D2"
- codebase="http://122.112.219.87/download/RealPlayX.cab#version=1,0,0,2">
- <param name="_Version" value="65536" />
- <param name="_ExtentX" value="22357" />
- <param name="_ExtentY" value="16589" />
- <param name="_StockProps" value="0" />
- </object>
- </div>
- <div class="buttonGroup">
- <input id="mark1" name="realPlay" type="button" style="cursor: pointer; width:115px; height:25px; display:inline;" value="$chan1name" onclick="realPlay($chan1); ptzShow($chan1control);"/>
- <input id="mark2" name="realPlay" type="button" style="cursor: pointer; width:115px; height:25px; display:inline;" value="$chan2name" onclick="realPlay($chan2); ptzShow($chan2control);"/>
- <input id="mark3" name="realPlay" type="button" style="cursor: pointer; width:115px; height:25px; display:inline;" value="$chan3name" onclick="realPlay($chan3); ptzShow($chan3control);"/>
- <input id="mark4" name="realPlay" type="button" style="cursor: pointer; width:115px; height:25px; display:inline;" value="$chan4name" onclick="realPlay($chan4); ptzShow($chan4control);"/>
- <input id="more" type="image" src="./images/open.png" alt="More" style="cursor: pointer; width:22px; height:22px; display:inline; float:right;" onclick="showMore();"/>
- </div>
- <div id="moreControl" style="display:none; width:500px; background: #80FFFF; border: solid 1px #468dcd; margin-left: 8px; margin-top: 2px;">
- <table width="99%" align="center" cellpadding="1px" cellspacing="0">
- <tr>
- <td class="btd1"></td>
- <td class="btd1">
- <input id="up" type="button" style="cursor: pointer; width:50px; height:25px;" value="上" onmousedown="ptzControl(0, 0);" onmouseup="ptzControl(0, 1);"/>
- </td>
- <td class="btd1"></td>
- <td class="btd2"></td>
- <td class="btd2"></td>
- <td class="btd3">
- <input id="zoomP" type="button" style="cursor: pointer; width:40px; height:25px;" value="+" onmousedown="ptzControl(4, 0);" onmouseup="ptzControl(4, 1);"/>
- </td>
- <td class="btd3">
- <input id="focusP" type="button" style="cursor: pointer; width:40px; height:25px;" value="+" onmousedown="ptzControl(6, 0);" onmouseup="ptzControl(6, 1);"/>
- </td>
- <td class="btd3">
- <input id="apertureP" type="button" style="cursor: pointer; width:40px; height:25px;" value="+" onmousedown="ptzControl(8, 0);" onmouseup="ptzControl(8, 1);"/>
- </td>
- </tr>
- <tr>
- <td class="btd1">
- <input id="left" type="button" style="cursor: pointer; width:50px; height:25px;" value="左" onmousedown="ptzControl(2, 0);" onmouseup="ptzControl(2, 1);"/>
- </td>
- <td class="btd1"></td>
- <td class="btd1">
- <input id="right" type="button" style="cursor: pointer; width:50px; height:25px;" value="右" onmousedown="ptzControl(3, 0);" onmouseup="ptzControl(3, 1);"/>
- </td>
- <td class="btd2"></td>
- <td class="btd2"></td>
- <td class="btd3">缩放</td>
- <td class="btd3">调焦</td>
- <td class="btd3">光圈</td>
- </tr>
- <tr>
- <td class="btd1"></td>
- <td class="btd1">
- <input id="down" type="button" style="cursor: pointer; width:50px; height:25px;" value="下" onmousedown="ptzControl(1, 0);" onmouseup="ptzControl(1, 1);"/>
- </td>
- <td class="btd1"></td>
- <td class="btd2">
- <span>速度:</span>
- <select id="speed">
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- <option value="4">4</option>
- <option value="5">5</option>
- <option value="6">6</option>
- <option value="7">7</option>
- <option value="8">8</option>
- </select>
- </td>
- <td >
- <input id="reset" type="button" style="cursor: pointer; width:70px; height:20px;" value="复位" onclick="ptzReset();"/>
- </td>
- <td class="btd3">
- <input id="zoomD" type="button" style="cursor: pointer; width:40px; height:25px;" value="-" onmousedown="ptzControl(5, 0);" onmouseup="ptzControl(5, 1);"/>
- </td>
- <td class="btd3">
- <input id="focusD" type="button" style="cursor: pointer; width:40px; height:25px;" value="-" onmousedown="ptzControl(7, 0);" onmouseup="ptzControl(7, 1);"/>
- </td>
- <td class="btd3">
- <input id="apertureD" type="button" style="cursor: pointer; width:40px; height:25px;" value="-" onmousedown="ptzControl(9, 0);" onmouseup="ptzControl(9, 1);"/>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="chartGroup">
- <div class="chart">
- <table width="100%" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <div id="chartWd"></div>
- </td>
- </tr>
- </table>
- </div>
- <div class="chart">
- <table width="100%" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <div id="chartSd"></div>
- </td>
- </tr>
- </table>
- </div>
- <div class="chart">
- <table width="100%" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <div id="chartAq"></div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </body>
- </html>
|