video1.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=0.5">
  6. <title>云看板</title>
  7. <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
  8. <link href="/css/dashboard.css" rel="stylesheet" />
  9. <script type="text/javascript" src="/js/service.js"></script>
  10. <script type="text/javascript" src="/js/session.js"></script>
  11. <script type="text/javascript" src="/js/getService.js"></script>
  12. <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
  13. <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
  14. </head>
  15. <body id="container" class="container-fluid">
  16. <style>
  17. body{
  18. overflow-y: hidden;
  19. overflow-x: hidden;
  20. }
  21. </style>
  22. <!-- <div class="row no-padding head-bar" style="height:81px"> -->
  23. <!-- <div class="col-lg-1 col-md-1">
  24. </div>
  25. <div class="col-lg-4 col-md-4 page-title">
  26. 云看板
  27. </div> -->
  28. <!-- <div class="col-lg-3 col-md-3 block-padding">
  29. <button type="button" class="btn btn-warning"
  30. onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
  31. <button type="button" class="btn btn-warning"
  32. onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
  33. <button type="button" class="btn btn-warning"
  34. onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
  35. <button type="button" class="btn btn-warning"
  36. onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
  37. </div> -->
  38. <!-- <div class="col-lg-4 col-md-4">
  39. </div>-->
  40. <!-- </div> -->
  41. <div class="my-container" id="div-main">
  42. <div id="two">
  43. <div style="width: 50%;height: 100%;float:left;margin-left: -25px;margin-right: 5px;" v-for="task in taskList">
  44. <video autoplay="true" loop="true" muted="muted" id="twoVideo2" v-if="!task.isImg" class="videoType" :src="'/upVedio/ABB/'+task.fileName" controls width="100%" height="100%" > </video>
  45. <img v-if="task.isImg" class="imgType" :src="'/upVedio/ABB/'+task.fileName" width="100%" />
  46. </div>
  47. <div style="width: 49%;height: 100%;float:left;">
  48. <video autoplay="true" loop="true" muted="muted" id="twoVideo" class="videoType" :src="'/upVedio/ABB/'+firstFile" controls width="106%" height="100%" > </video>
  49. <img id="twoImg" class="imgType" :src="'/upVedio/ABB/'+firstFile" width="100%" />
  50. </div>
  51. </div>
  52. <div class="row" v-for="task in taskList" id="one" style="margin-left: -25px">
  53. <video autoplay="true" loop="true" muted="muted" v-if="!task.isImg" id="oneVideo" class="videoType" :src="'/upVedio/AAA/'+task.fileName" controls width="100%" height="100%" > </video>
  54. <img v-if="task.isImg" class="imgType" :src="'/upVedio/AAA/'+task.fileName" width="101%" />
  55. </div>
  56. </div>
  57. <!-- <div class="my-container" id="div-main">
  58. <div id="two">
  59. <div style="width: 49%;height: 100%;float:left;margin-left: -20px;margin-right: 10px;">
  60. <video autoplay="true" loop="true" muted="muted" id="twoVideo" class="videoType" :src="'/upVedio/ABB/'+firstFile" controls width="100%" height="100%" > </video>
  61. <img id="twoImg" class="imgType" :src="'/upVedio/ABB/'+firstFile" width="100%" />
  62. </div>
  63. <div style="width: 50%;height: 100%;float:left;" v-for="task in taskList">
  64. <video autoplay="true" loop="true" muted="muted" id="twoVideo2" v-if="!task.isImg" class="videoType" :src="'/upVedio/ABB/'+task.fileName" controls width="100%" height="100%" > </video>
  65. <img v-if="task.isImg" class="imgType" :src="'/upVedio/ABB/'+task.fileName" width="106%" />
  66. </div>
  67. </div>
  68. <div class="row" v-for="task in taskList" id="one" style="margin-left: -25px">
  69. <video autoplay="true" loop="true" muted="muted" v-if="!task.isImg" id="oneVideo" class="videoType" :src="'/upVedio/AAA/'+task.fileName" controls width="100%" height="100%" > </video>
  70. <img v-if="task.isImg" class="imgType" :src="'/upVedio/AAA/'+task.fileName" width="101%" />
  71. </div>
  72. </div> -->
  73. <!-- jQuery -->
  74. <script src="/lib/jquery.min.js"></script>
  75. <script src="/lib/vue.min.js"></script>
  76. <script src="/lib/echarts/echarts.min.js"></script>
  77. <script src="/lib/echarts/theme/macarons.js"></script>
  78. <script src="/js/service/produce-task.js"></script>
  79. <script type="text/javascript">
  80. // $(".videoType").height($(window).height()-85);
  81. // $(".imgType").height($(window).height()-85);
  82. $(".videoType").height($(window).height());
  83. $(".imgType").height($(window).height());
  84. var vm = new Vue({
  85. el: '#div-main',
  86. data: {
  87. listInit: ServiceProduceTask.getVedioFileList(),
  88. taskList: [],
  89. timer: '',
  90. pageSize: 1,
  91. pageIndex: 0,
  92. timer: '',
  93. upVideo:'',
  94. firstFile:''
  95. },
  96. methods: {
  97. get() {
  98. this.upVideo = this.listInit[0].upVideo;
  99. this.firstFile = this.listInit[0].fileName;
  100. if(this.listInit[0].isImg){
  101. $("#twoVideo").hide();
  102. }else{
  103. $("#twoImg").hide();
  104. }
  105. if(this.upVideo == 'AAA'){
  106. $("#two").hide();
  107. }else{
  108. $("#one").hide();
  109. this.listInit.splice(0, 1);
  110. }
  111. },
  112. get2(){
  113. this.taskList = this.listInit.slice(this.pageIndex,this.pageSize);
  114. if(this.pageSize >= this.listInit.length){
  115. this.pageIndex = 0;
  116. this.pageSize = 1;
  117. }else{
  118. this.pageIndex = this.pageIndex + 1;
  119. this.pageSize = this.pageSize + 1;
  120. }
  121. // this.getVideo();
  122. },
  123. getVideo(){
  124. var _video1 = $('#twoVideo')[0];
  125. var _video2 = $('#twoVideo2')[0];
  126. var _video3 = $('#oneVideo')[0];
  127. if($('#twoVideo').is(':hidden') && _video1.paused){
  128. }else{
  129. _video1.play();
  130. }
  131. if($('#twoVideo2').is(':hidden') && _video2.paused){
  132. }else{
  133. _video1.play();
  134. }
  135. if($('#oneVideo').is(':hidden') && _video3.paused){
  136. }else{
  137. _video1.play();
  138. }
  139. }
  140. },
  141. mounted() {
  142. this.get();
  143. this.get2();
  144. this.timer = setInterval(this.get2, 7000);
  145. },
  146. beforeDestroy() {
  147. clearInterval(this.timer);
  148. }
  149. })
  150. // function getVideo(){
  151. // var _video1 = $('#twoVideo')[0];
  152. // var _video2 = $('#twoVideo2')[0];
  153. // var _video3 = $('#oneVideo')[0];
  154. // if($('#twoVideo').is(':hidden') && _video1.paused){
  155. // }else{
  156. // _video1.play();
  157. // }
  158. // if($('#twoVideo2').is(':hidden') && _video2.paused){
  159. // }else{
  160. // _video1.play();
  161. // }
  162. // if($('#oneVideo').is(':hidden') && _video3.paused){
  163. // }else{
  164. // _video1.play();
  165. // }
  166. // if(_video3.paused){
  167. // _video3.play();
  168. // //_video.pause();//暂停
  169. // }
  170. // }
  171. </script>
  172. </body>
  173. </html>