video1.html 7.4 KB

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