spjk.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>视频监控</title>
  6. <link href="css/common.css" rel="stylesheet">
  7. <link href="css/spjk.css" rel="stylesheet">
  8. <script type="text/javascript" src="js/jquery-2.2.4.min.js"></script>
  9. <script type="text/javascript" src="js/api.js"></script>
  10. <script type="text/javascript" src="js/jsmpeg.min.js"></script>
  11. </head>
  12. <body>
  13. <div class="header-wrapper">
  14. <div class="title">
  15. 智能化综合管理平台
  16. <svg version="1.1" width="900" height='100'>
  17. <polygon points="0,0 75,100 114,100 135,82 765,82 786,100 825,100 900,0" style="fill:transparent;stroke:#69F8FE;stroke-width:2"/>
  18. </svg>
  19. </div>
  20. <div class="nav-bar">
  21. <a class="item " href="index.html">首页</a>
  22. <a class="item " href="fzfx.html">生产管理</a>
  23. <a class="item" href="swfk.html">生物防控</a>
  24. <a class="item active" href="spjk.html">视频监控</a>
  25. <a class="item" href="hbjc.html">环保监测</a>
  26. </div>
  27. </div>
  28. <div class='video-content'>
  29. <div class='tab-list'>
  30. <div class="select dowebok">
  31. <span class="placeholder">请选择分区</span>
  32. <ul id="areaList">
  33. </ul>
  34. </div>
  35. <div class="select dowebok">
  36. <span class="placeholder">请选择栋舍</span>
  37. <ul id="deviceList">
  38. </ul>
  39. </div>
  40. </div>
  41. <div class='video-box'>
  42. <div class='video-wrapper'>
  43. <div class='video-wrapper-head'>请选择栋舍</div>
  44. <div class='video-windows'>
  45. <div class='video-play1'>
  46. <div class='video-play1-container'>
  47. <div class="tab"><span class="tab-title">通道一</span></div>
  48. <div class='video'>
  49. <svg version="1.1" width="37" height="25" class="wide-border-line1">
  50. <g transform="translate(0.5 0.5)">
  51. <polyline points="0,24.5 0,0 37,23.5 " style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
  52. </g>
  53. </svg>
  54. <svg version="1.1" width="160" height="25" class="wide-border-line2">
  55. <g transform="translate(0.5 0.5)">
  56. <polyline points="160,25 135,0 25,0 -1,23.5" style="fill:#0E1E51;stroke:#53BAFD;stroke-width:1"/>
  57. </g>
  58. </svg>
  59. <div id="play-box" class="playerbox">
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <script type="text/javascript" src="js/spjk.js"></script>
  69. <script>
  70. $(".video-windows").on('dblclick',".playerbox",function(){
  71. console.log("全屏")
  72. if($(this).attr("opening") == undefined || $(this).attr("opening")==0){
  73. $(this).attr("opening",1);
  74. $(this).css("position",'fixed')
  75. $(this).css("width","100%")
  76. $(this).css("height","100%")
  77. $(this).css("left","0")
  78. $(this).css("top","0")
  79. $(this).css("z-index","99999")
  80. }else{
  81. $(this).attr("opening",0);
  82. $(this).css("position",'relative')
  83. $(this).css("width","885px")
  84. $(this).css("height","498px")
  85. $(this).css("left","0")
  86. $(this).css("top","0")
  87. $(this).css("z-index","1")
  88. }
  89. })
  90. //ESC 关闭弹窗
  91. $(window).keyup(function (e) {
  92. if (e.keyCode == 27) {
  93. if($(".playerbox").attr("opening") == 1){
  94. $(".playerbox").attr("opening",0);
  95. $(".playerbox").css("position",'relative')
  96. $(".playerbox").css("width","885px")
  97. $(".playerbox").css("height","498px")
  98. $(".playerbox").css("left","0")
  99. $(".playerbox").css("top","0")
  100. $(".playerbox").css("z-index","1")
  101. }
  102. }
  103. });
  104. $('.select').on('click', '.placeholder', function(e) {
  105. var parent = $(this).closest('.select');
  106. if (!parent.hasClass('is-open')) {
  107. parent.addClass('is-open');
  108. $('.select.is-open').not(parent).removeClass('is-open');
  109. } else {
  110. parent.removeClass('is-open');
  111. }
  112. e.stopPropagation();
  113. }).on('click', 'ul>li', function() {
  114. var parent = $(this).closest('.select');
  115. parent.removeClass('is-open').find('.placeholder').text($(this).text());
  116. if($(this).parent().attr("id")=="areaList"){
  117. //切换牧区
  118. var node = $(this).attr("node-id");
  119. getBuild(node)
  120. }else if($(this).parent().attr("id")=="deviceList"){
  121. var pl = players.length;
  122. for(var i=0;i<pl;++i){
  123. if(players[i]!=null){
  124. ///console.log(player)
  125. players[i].stop();
  126. players[i].destroy();
  127. players.splice(i, 1);
  128. }
  129. }
  130. console.log(players)
  131. var node = $(this).attr("node-id");
  132. $(".video-wrapper-head").text($(this).text());
  133. getDevice(node)
  134. }
  135. });
  136. $('body').on('click', function() {
  137. $('.select.is-open').removeClass('is-open');
  138. });
  139. </script>
  140. </body>
  141. </html>