平安校园
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
2ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
2ヶ月前
2ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
1ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
2ヶ月前
3ヶ月前
3ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
2ヶ月前
3ヶ月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. <template>
  2. <view class="warningDetail">
  3. <!-- <view style="height: 100vh;background: #fff;" v-if="showLoading">
  4. <u-loading-page :loading="true" bg-color="#e8e8e8" color="#ffffff"></u-loading-page>
  5. </view> -->
  6. <u-loading-page :loading="showLoading" bg-color="#e8e8e8" color="#ffffff"></u-loading-page>
  7. <!-- <u-loading-icon v-if="showLoading" text="加载中" textSize="18"></u-loading-icon> -->
  8. <view class="">
  9. <view class="title cli">
  10. {{detailData.alarmTypeDesc ? detailData.alarmTypeDesc + '-' + detailData.tick : ''}}
  11. </view>
  12. <image style="width: 100%;height:422rpx;" :src="detailData.snapshotUrl" mode="aspectFit"></image>
  13. <view class="cli">
  14. <view class="labelBox">
  15. 场景名称:
  16. </view>
  17. <view class="valueBox">
  18. {{ detailData.sceneName || "--" }}
  19. </view>
  20. </view>
  21. <view class="cli">
  22. <view class="labelBox">
  23. 班级:
  24. </view>
  25. <view class="valueBox">
  26. {{ detailData.personSetName || "--" }}
  27. </view>
  28. </view>
  29. <view class="cli">
  30. <view class="labelBox">
  31. 姓名:
  32. </view>
  33. <view class="valueBox">
  34. {{ detailData.personName || "--" }}
  35. </view>
  36. </view>
  37. <view class="cli">
  38. <view class="labelBox">
  39. 预警摄像头:
  40. </view>
  41. <view class="valueBox">
  42. {{ detailData.cameraName || "--" }}
  43. </view>
  44. </view>
  45. <view class="cli">
  46. <view class="labelBox">
  47. 预警类型:
  48. </view>
  49. <view class="valueBox">
  50. {{ detailData.alarmTypeDesc || "--" }}
  51. </view>
  52. </view>
  53. <view class="cli">
  54. <view class="labelBox">
  55. 预警时间:
  56. </view>
  57. <view class="valueBox">
  58. {{ detailData.tick || "--" }}
  59. </view>
  60. </view>
  61. <view class="cli">
  62. <view class="labelBox">
  63. 复核视频:
  64. </view>
  65. <view class="valueBox">
  66. <text v-if="detailData.videoUrl" style="color: #2388FF;"
  67. @click="seeVideo(detailData.videoUrl)">查看视频</text>
  68. <text v-else>--</text>
  69. </view>
  70. </view>
  71. <view class="cli">
  72. <view class="labelBox">
  73. 处理时间:
  74. </view>
  75. <view class="valueBox">
  76. {{ detailData.handTime || "--" }}
  77. </view>
  78. </view>
  79. <view class="cli2">
  80. <view class="labelBox">
  81. 备注信息:
  82. </view>
  83. <view class="valueBox">
  84. {{ detailData.extend || '--' }}
  85. </view>
  86. </view>
  87. <view class="cli2">
  88. <view class="labelBox">
  89. 处理意见:
  90. </view>
  91. <view class="valueBox">
  92. {{ detailData.remark || '--' }}
  93. </view>
  94. </view>
  95. </view>
  96. <u-popup :show="showVideo" :closeable="true" @close="close" @open="open" mode="center">
  97. <!-- <view class="">
  98. 视频
  99. </view> -->
  100. <view class="poupBox">
  101. <view style="width: 750rpx;height: 400rpx;">
  102. <DomVideoPlayer ref="domVideoPlayer" object-fit='contain' :controls="controls" :autoplay="autoplay"
  103. :loop="loop" :src="urlsrc" :playback-rate="playbackRate" :is-loading="isLoading" @play="onPlay"
  104. @pause="onPause" @ended="onEnded" @durationchange="onDurationChange" @timeupdate="onTimeUpdate"
  105. @ratechange="onRateChange" @fullscreenchange="onFullscreenChange" />
  106. </view>
  107. </view>
  108. </u-popup>
  109. </view>
  110. </template>
  111. <script>
  112. import DomVideoPlayer from '@/components/DomVideoPlayer/DomVideoPlayer.vue'
  113. import {
  114. detail, //详情
  115. warnType, //获取预警类型
  116. } from '@/api/warn/index.js'
  117. // 将xx秒转为 xx:xx 分秒格式
  118. const formatSec2Time = (time) => {
  119. const min = Math.floor(time / 60)
  120. const sec = Math.floor(time % 60)
  121. return `${min}:${sec < 10 ? '0' + sec : sec}`
  122. }
  123. export default {
  124. components: {
  125. DomVideoPlayer
  126. },
  127. data() {
  128. return {
  129. detailData: {},
  130. showVideo: false,
  131. // 视频参数
  132. urlsrc: '',
  133. // src: 'http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/acp/quanjiang/DEMO00001/20240708/video/wander/SXT001__quanjiang__DEMO00001_video_wm_1720400435638.mp4?Expires=1724745909&OSSAccessKeyId=STS.NV49VEGSbWMNi7Wp4e76VrWKk&Signature=wXTdiWQHGNp%2FtbtezUBmD%2Fziy1E%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5WBcuzxqoxD4I%2BlaxHmlDQwO7l6nZLgiTz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4zIJb0D10s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxKRpnrU0rgxd8uAx9DyyfH1x3TObqd7jjqzaKs3NYdtswV4BUlvK5CGWEjhzQEO8mJtNIDT39ax%2Bf3elrfsIeBqAAaamZEcVMZBN29tT2k9jMRQfJjNJzZRtx5Z4sYbOwDoRAq%2F4qEv07jBx5PUAAB3q9IqDapPoeUw8Yccvlo9q5VG8AsY%2BZkidTAw%2B7s7%2BTKuJC93tJfdSUYdycPZ%2BZneA%2BlZqpdvfhTtZCteGsdnoQU4H7x%2B9ph9K%2Bg3HGMQrtuFdIAA%3D',
  134. playing: false,
  135. loop: false,
  136. controls: true,
  137. autoplay: false,
  138. isLoading: true,
  139. playbackRate: 1,
  140. currentTime: 0,
  141. duration: 0,
  142. showLoading: false,
  143. }
  144. },
  145. computed: {
  146. // 播放进度
  147. // progress() {
  148. // const percent = this.currentTime / this.duration * 100
  149. // return percent.toFixed(2) + '%'
  150. // },
  151. // // 显示当前时间
  152. // showPlayTime() {
  153. // const curr = formatSec2Time(this.currentTime)
  154. // const dur = formatSec2Time(this.duration)
  155. // return `${curr} / ${dur}`
  156. // },
  157. },
  158. onLoad(options) {
  159. console.log(options)
  160. if (options.id) {
  161. this.id = options.id;
  162. }
  163. this.getInfo();
  164. },
  165. methods: {
  166. getInfo() {
  167. this.showLoading = true;
  168. detail({
  169. id: this.id
  170. }).then(res => {
  171. if (res.code == 200) {
  172. this.detailData = res.data;
  173. }
  174. this.showLoading = false;
  175. }).catch(err => {
  176. this.showLoading = false;
  177. })
  178. },
  179. seeVideo(url) {
  180. this.showVideo = true;
  181. this.urlsrc = url;
  182. },
  183. open() {
  184. // console.log('open');
  185. setTimeout(() => {
  186. this.src =
  187. 'http://deepvision.oss-cn-zhangjiakou.aliyuncs.com/acp/quanjiang/DEMO00001/20240708/video/wander/SXT001__quanjiang__DEMO00001_video_wm_1720400435638.mp4?Expires=1724748181&OSSAccessKeyId=STS.NTwCzwCtwDDYeE7RAhHue5mDb&Signature=qY%2F82lk1K9VJEX95ImeNH9wMHiw%3D&security-token=CAIS0wN1q6Ft5B2yfSjIr5fCCMDDrqtW84ayZ2OGtkE9RPpJ2qjvgDz2IHFMf3huCeodsv8%2BlGxS5%2FgelrpqVpZDR03Na8RHwrly1lv5O9KY4z1YIkL10s%2FLI3OaLjKm9hi7AYygPgK0GJqEb1TDiVUto9%2FTfimjWFqIKICAjYUdAP0cQgi%2Fa0gwZrJRPRAwh8IGEnHTOP2xUHvtmXGCNFd0nQB%2BhGhjk7TdpPeR8R3Dllb35%2FYIroDqWPieYtJrIY10XqWBvqx%2FfbGT1zVLuVoYtvV6gaFc5zbcv9abRFVf4hiCP6%2Ff6MBuNw5%2Fae94efZNp%2BOukuZj6K6B1db7xhtVI%2BBOUiPZA4mr2IzdBeqvNNcwc7m8F1no9YjXbsGs9EEGGStLaVgVI4F8dyAhWEd9FWjgR%2FX5qAyQUGCKULOY1aw6651xwmjz8MCCT1r1GOTBindGasVnMxh5Z0JMjDK9aNkKfgFUbVJ8BrGTCIh%2FYx0bsq7yowDIEyp71TRMo%2Bbu%2FDBhIifKpO4VN7AxMup1DPwu2wNCxKQmwS5Se2k%2BwM10kxsnMbhsSH5O0sXx5M%2B5TxBoZB5p9PtUj15fgYQDR12uT0nToulHQz7%2BX6zfLqvSrfsIeBqAAUdgBEBn%2BksEpfpynILn8V8z3O5GaZcm3NmplGe%2F2XtD9%2FbnSWWTEzR1JJ45DnANEEIGzfjd6UvxpIcrk5Ggr0I52UqVdGUhcovTegZXYeBMsXYze8OLsu0UOhtpHsy8nCCJzpNnrwUBZOfUdZtwsCYHC4Bs8BRQ9JORs4ECvUnyIAA%3D'
  188. }, 1000)
  189. },
  190. close() {
  191. this.showVideo = false;
  192. // console.log('close');
  193. },
  194. // 播放 - 事件
  195. onPlay() {
  196. console.log('onPlay')
  197. this.playing = true
  198. },
  199. // 暂停 - 事件
  200. onPause() {
  201. console.log('onPause')
  202. this.playing = false
  203. },
  204. // 播放完毕 - 事件
  205. onEnded() {
  206. console.log('onEnded')
  207. this.playing = false
  208. },
  209. // 总时长变化 - 事件
  210. onDurationChange(e) {
  211. console.log('onDurationChange', e)
  212. this.duration = e
  213. },
  214. // 播放时间更新 - 事件
  215. onTimeUpdate(e) {
  216. // console.log('onTimeUpdate', e)
  217. this.currentTime = e
  218. },
  219. // 倍速变化 - 事件
  220. onRateChange(e) {
  221. console.log('onRateChange', e)
  222. this.playbackRate = e
  223. },
  224. // 进入/退出全屏 - 事件
  225. onFullscreenChange(e) {
  226. console.log('onFullScreenChange', e)
  227. },
  228. // // 切换播放/暂停 - 函数
  229. // doPlaying() {
  230. // const domVideoPlayer = this.$refs.domVideoPlayer
  231. // if (domVideoPlayer.playing) {
  232. // this.doPause()
  233. // } else {
  234. // this.doPlay()
  235. // }
  236. // },
  237. // // 播放 - 函数
  238. // doPlay() {
  239. // const domVideoPlayer = this.$refs.domVideoPlayer
  240. // domVideoPlayer.play()
  241. // },
  242. // // 暂停 - 函数
  243. // doPause() {
  244. // const domVideoPlayer = this.$refs.domVideoPlayer
  245. // domVideoPlayer.pause()
  246. // },
  247. // // 快退/快进 - 函数
  248. // doSeek(time) {
  249. // const domVideoPlayer = this.$refs.domVideoPlayer
  250. // time += domVideoPlayer.currentTime
  251. // domVideoPlayer.toSeek(time)
  252. // },
  253. // // 全屏播放 - 函数
  254. // doFullScreen() {
  255. // const domVideoPlayer = this.$refs.domVideoPlayer
  256. // domVideoPlayer.fullScreen()
  257. // },
  258. // // 移除视频 - 函数
  259. // doRemove() {
  260. // this.src = ''
  261. // const domVideoPlayer = this.$refs.domVideoPlayer
  262. // domVideoPlayer.remove()
  263. // },
  264. // // 更换src - 函数
  265. // doUpdateSrc() {
  266. // this.src = 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/create-schema2code-video.mp4'
  267. // },
  268. // doUpdateSrcToSeek() {
  269. // // 切换视频
  270. // this.src = 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/create-schema2code-video.mp4'
  271. // setTimeout(() => {
  272. // const domVideoPlayer = this.$refs.domVideoPlayer
  273. // // 视频加载完后,延迟调用toSeek()方法,跳转到第60s位置
  274. // domVideoPlayer.toSeek(60, true)
  275. // }, 100)
  276. // },
  277. // // 切换倍速 - 函数
  278. // switchRate() {
  279. // this.playbackRate = this.playbackRate === 1 ? 2 : 1
  280. // },
  281. // // 切换视频控制栏 - 函数
  282. // switchControls() {
  283. // this.controls = !this.controls
  284. // },
  285. }
  286. }
  287. </script>
  288. <style lang="scss" scoped>
  289. .warningDetail {
  290. // height: 100%;
  291. background: #fff;
  292. .title {
  293. color: #2388FF;
  294. font-size: 30rpx;
  295. height: 88rpx;
  296. line-height: 88rpx;
  297. background: rgba(35, 136, 255, 0.06);
  298. }
  299. .cli {
  300. font-size: 30rpx;
  301. padding: 20rpx 30rpx;
  302. display: flex;
  303. justify-content: space-between;
  304. align-items: center;
  305. .labelBox {
  306. color: #333333;
  307. }
  308. .valueBox {
  309. color: #333333;
  310. font-weight: 700;
  311. }
  312. }
  313. .cli2 {
  314. font-size: 30rpx;
  315. padding: 20rpx 30rpx;
  316. .labelBox {
  317. color: #333333;
  318. }
  319. .valueBox {
  320. margin-top: 20rpx;
  321. color: #333333;
  322. font-weight: 700;
  323. min-height: 50rpx;
  324. word-break: break-all;
  325. }
  326. }
  327. .poupBox {
  328. width: 100%;
  329. padding: 80rpx 20rpx 20rpx 20rpx;
  330. box-sizing: border-box;
  331. }
  332. }
  333. </style>