video1.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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>
  53. <!-- <div class="my-container" id="div-main">
  54. <div id="two">
  55. <div style="width: 49%;height: 100%;float:left;margin-left: -20px;margin-right: 10px;">
  56. <video autoplay="true" loop="true" muted="muted" id="twoVideo" class="videoType" :src="'/upVedio/ABB/'+firstFile" controls width="100%" height="100%" > </video>
  57. <img id="twoImg" class="imgType" :src="'/upVedio/ABB/'+firstFile" width="100%" />
  58. </div>
  59. <div style="width: 50%;height: 100%;float:left;" v-for="task in taskList">
  60. <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>
  61. <img v-if="task.isImg" class="imgType" :src="'/upVedio/ABB/'+task.fileName" width="106%" />
  62. </div>
  63. </div>
  64. <div class="row" v-for="task in taskList" id="one" style="margin-left: -25px">
  65. <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>
  66. <img v-if="task.isImg" class="imgType" :src="'/upVedio/AAA/'+task.fileName" width="101%" />
  67. </div>
  68. </div> -->
  69. <!-- jQuery -->
  70. <script src="/lib/jquery.min.js"></script>
  71. <script src="/lib/vue.min.js"></script>
  72. <script src="/lib/echarts/echarts.min.js"></script>
  73. <script src="/lib/echarts/theme/macarons.js"></script>
  74. <script src="/js/service/produce-task.js"></script>
  75. <script type="text/javascript">
  76. // $(".videoType").height($(window).height()-85);
  77. // $(".imgType").height($(window).height()-85);
  78. $(".videoType").height($(window).height());
  79. $(".imgType").height($(window).height());
  80. var vm = new Vue({
  81. el: '#div-main',
  82. data: {
  83. listInit: ServiceProduceTask.getVedioFileList(),
  84. taskList: [],
  85. timer: '',
  86. pageSize: 1,
  87. pageIndex: 0,
  88. timer: '',
  89. upVideo:'',
  90. firstFile:''
  91. },
  92. methods: {
  93. get() {
  94. this.upVideo = this.listInit[0].upVideo;
  95. this.firstFile = this.listInit[0].fileName;
  96. if(this.listInit[0].isImg){
  97. $("#twoVideo").hide();
  98. }else{
  99. $("#twoImg").hide();
  100. }
  101. if(this.upVideo == 'AAA'){
  102. $("#two").hide();
  103. }else{
  104. $("#one").hide();
  105. this.listInit.splice(0, 1);
  106. }
  107. },
  108. get2(){
  109. this.taskList = this.listInit.slice(this.pageIndex,this.pageSize);
  110. if(this.pageSize >= this.listInit.length){
  111. this.pageIndex = 0;
  112. this.pageSize = 1;
  113. }else{
  114. this.pageIndex = this.pageIndex + 1;
  115. this.pageSize = this.pageSize + 1;
  116. }
  117. // this.getVideo();
  118. },
  119. getVideo(){
  120. var _video1 = $('#twoVideo')[0];
  121. var _video2 = $('#twoVideo2')[0];
  122. var _video3 = $('#oneVideo')[0];
  123. if($('#twoVideo').is(':hidden') && _video1.paused){
  124. }else{
  125. _video1.play();
  126. }
  127. if($('#twoVideo2').is(':hidden') && _video2.paused){
  128. }else{
  129. _video1.play();
  130. }
  131. if($('#oneVideo').is(':hidden') && _video3.paused){
  132. }else{
  133. _video1.play();
  134. }
  135. }
  136. },
  137. mounted() {
  138. this.get();
  139. this.get2();
  140. this.timer = setInterval(this.get2, 7000);
  141. },
  142. beforeDestroy() {
  143. clearInterval(this.timer);
  144. }
  145. })
  146. // function getVideo(){
  147. // var _video1 = $('#twoVideo')[0];
  148. // var _video2 = $('#twoVideo2')[0];
  149. // var _video3 = $('#oneVideo')[0];
  150. // if($('#twoVideo').is(':hidden') && _video1.paused){
  151. // }else{
  152. // _video1.play();
  153. // }
  154. // if($('#twoVideo2').is(':hidden') && _video2.paused){
  155. // }else{
  156. // _video1.play();
  157. // }
  158. // if($('#oneVideo').is(':hidden') && _video3.paused){
  159. // }else{
  160. // _video1.play();
  161. // }
  162. // if(_video3.paused){
  163. // _video3.play();
  164. // //_video.pause();//暂停
  165. // }
  166. // }
  167. </script>
  168. </body>
  169. </html>