video1.html 7.9 KB

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