videoDetail.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view>
  3. <view class="timeBox flex justify-between align-center padding-lr-sm">
  4. <view class="time">火点侦测摄像机</view>
  5. </view>
  6. <view class="basic-info">
  7. <view class="info-tit margin-left-xs">
  8. <text class="cuIcon-titles margin-right-xs"></text>
  9. 基本信息
  10. </view>
  11. <view class="info-content">
  12. <view class="info-one-info ">
  13. <text>设备名称:</text>
  14. <text>{{videoDetail.deviceName}}</text>
  15. </view>
  16. <view>
  17. <text>设备编号:</text>
  18. <text>{{videoDetail.deviceCode}}</text>
  19. </view>
  20. <view>
  21. <text style="width:auto!important">物联网卡号:</text>
  22. <text>{{videoDetail.sim}}</text>
  23. </view>
  24. <view>
  25. <text>安装位置:</text>
  26. <text>{{videoDetail.deviceInstallationPosition}}</text>
  27. </view>
  28. <view>
  29. <text>添加时间:</text>
  30. <text>{{videoDetail.addTime}}</text>
  31. </view>
  32. <view>
  33. <text>设备地址:</text>
  34. <text>{{videoDetail.address}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 处理状态start -->
  39. <view class="processStatus">
  40. <view class="info-tit margin-left-xs">
  41. <text class="cuIcon-titles margin-right-xs"></text>
  42. 视频
  43. </view>
  44. <view class="padding-lr padding-bottom-lg">
  45. <view class="video-js" ref="video">
  46. </view>
  47. <br><br>
  48. </view>
  49. </view>
  50. <!-- 处理状态end -->
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. videoDetail: '',
  58. deviceCode: ''
  59. }
  60. },
  61. onReady() {
  62. },
  63. onLoad: function(option) {
  64. this.getVideo()
  65. console.log(111)
  66. console.log(option.deviceCode)
  67. this.companyCode = option.companyCode
  68. this.deviceType = option.deviceType
  69. this.deviceCode = option.deviceCode
  70. this.getDeviceDetail({
  71. "companyCode": option.companyCode,
  72. "deviceType": option.deviceType,
  73. "deviceCode": option.deviceCode
  74. })
  75. },
  76. methods: {
  77. getVideo() {
  78. },
  79. async getDeviceDetail(ming = {}) {
  80. const res = await this.$myRequest({
  81. url: 'OperationMonitoring/getMonitoringScreen',
  82. data: ming
  83. })
  84. console.log(res.data.data[0])
  85. this.videoDetail = res.data.data[0]
  86. // this.powerDeviceCount= res.data.data[0].powerDeviceCount
  87. // this.videoDeviceCount= res.data.data[0].videoDeviceCount
  88. },
  89. }
  90. }
  91. </script>
  92. <link href="https://unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet">
  93. <script src="https://unpkg.com/video.js/dist/video.min.js"></script>
  94. <script>
  95. // #ifdef H5
  96. var video = document.createElement('video')
  97. video.id = 'video'
  98. video.style = 'width: 300px;height: 150px;'
  99. video.controls = true
  100. var source = document.createElement('source')
  101. source.src =
  102. 'http://yf.ugc.v.cztv.com/cztv/ugcvod/2018/04/14/A98CD7B26B06D94A5CEA56AA7D723572/h264_800k_mp4.mp4_playlist.m3u8'
  103. video.appendChild(source)
  104. this.$refs.video.$el.appendChild(video)
  105. videojs('video')
  106. // #endif
  107. </script>
  108. <style lang="scss">
  109. </style>