video.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. <div class="row no-padding head-bar" style="height:81px">
  17. <!-- <div class="col-lg-1 col-md-1">
  18. </div> -->
  19. <!-- <div class="col-lg-4 col-md-4 page-title">
  20. E-SOP看板
  21. </div> -->
  22. <!-- <div class="col-lg-3 col-md-3 block-padding">
  23. <button type="button" class="btn btn-warning"
  24. onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
  25. <button type="button" class="btn btn-warning"
  26. onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
  27. <button type="button" class="btn btn-warning"
  28. onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
  29. <button type="button" class="btn btn-warning"
  30. onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
  31. </div> -->
  32. <!-- <div class="col-lg-4 col-md-4">
  33. </div> -->
  34. </div>
  35. <div class="my-container" id="div-main">
  36. <div class="row block-padding">
  37. <video id="videoType" src="" controls width="100%" height="100%" > </video>
  38. <img id="imgType" src="" width="100%" />
  39. </div>
  40. </div>
  41. <!-- jQuery -->
  42. <script src="/lib/jquery.min.js"></script>
  43. <script src="/lib/vue.min.js"></script>
  44. <script src="/lib/echarts/echarts.min.js"></script>
  45. <script src="/lib/echarts/theme/macarons.js"></script>
  46. <script src="/js/service/produce-task.js"></script>
  47. <script type="text/javascript">
  48. $("#videoType").height($(window).height()-110);
  49. $("#imgType").height($(window).height()-110);
  50. const taskList = ServiceProduceTask.getVedioFileList();
  51. $(function () {
  52. if(taskList != null){
  53. var file = taskList[0].fileType;
  54. if (file=='jpg' || file=='jpeg' || file=='png'){
  55. $("#videoType").hide();
  56. $("#imgType").attr('src',"/upVedio/"+taskList[0].fileName);
  57. }else{
  58. $("#imgType").hide();
  59. $("#videoType").attr('src',"/upVedio/"+taskList[0].fileName);
  60. setInterval(function () { getVideo(); }, 3000);
  61. }
  62. }
  63. })
  64. function getVideo(){
  65. var _video = $('#videoType')[0];
  66. if(_video.paused){
  67. _video.play();
  68. //_video.pause();//暂停
  69. }
  70. }
  71. </script>
  72. </body>
  73. </html>