|
@@ -24,10 +24,7 @@
|
|
|
<div class="lf-container">
|
|
|
<div class="video-container">
|
|
|
<div class="item" v-for="(item,index) in dataList" :key="index" @click="showVideo(item)" :data="item">
|
|
|
- <!-- <video src="https://www.runoob.com/try/demo_source/movie.mp4" poster="./images/video.png">
|
|
|
- <source src="movie.mp4" type="video/mp4">
|
|
|
- </video> -->
|
|
|
- <HkwsVideo :ref="'HkwsVideo'+item.goafDevId"></HkwsVideo>
|
|
|
+ <img src="./images/video.png">
|
|
|
<p style="cursor:pointer;">{{NumConvertLM(item.goafOrebelt)}}-{{item.goafOrebody}}-{{item.goafOreheight}}-{{item.goafName}}</p>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -40,12 +37,13 @@
|
|
|
<div class="video-dialog" v-if="videoDialogVisible">
|
|
|
<div class="video-dialog-container">
|
|
|
<div class="header">
|
|
|
- <div class="name">{{ video.name }}</div>
|
|
|
+ <div class="name">{{ video.goafDevName }}</div>
|
|
|
<div class="close" @click="videoDialogVisible=false"><el-icon><Close /></el-icon></div>
|
|
|
</div>
|
|
|
- <HkwsVideo ref="HkwsVideo"></HkwsVideo>
|
|
|
+ <!-- <HkwsVideo ref="HkwsVideo"></HkwsVideo> -->
|
|
|
+ <iframe id="video" :src="video.src" frameborder="0" style="height: 80%;" />
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -53,6 +51,7 @@ import HkwsVideo from '@/components/HkwsVideo/iframe'
|
|
|
import { getGoafBaseInfo } from '@/api/goaf/info'
|
|
|
import { getSensor } from '@/api/goaf/sensor'
|
|
|
import { NumConvertLM } from '@/utils'
|
|
|
+import axios from 'axios'
|
|
|
export default {
|
|
|
name:"particulars_video",
|
|
|
components:{
|
|
@@ -154,7 +153,31 @@ import { NumConvertLM } from '@/utils'
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- showVideo(item){
|
|
|
+ showVideo(item) {
|
|
|
+ axios({
|
|
|
+ url: 'https://open.ys7.com/api/lapp/token/get',
|
|
|
+ method: 'POST',
|
|
|
+ params: {
|
|
|
+ appKey: item.appKey,
|
|
|
+ appSecret: item.appSecret
|
|
|
+ }
|
|
|
+ }).then((res) => {
|
|
|
+ const accessToken = res.data.data.accessToken
|
|
|
+ if (!accessToken) {
|
|
|
+ this.$message.error('获取监控token失败!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.videoDialogVisible = true
|
|
|
+ this.video = {
|
|
|
+ ...item,
|
|
|
+ src: `https://open.ys7.com/ezopen/h5/iframe?url=ezopen://open.ys7.com/${item.deviceSerial}/1.live&autoplay=1&accessToken=${accessToken}`
|
|
|
+ }
|
|
|
+ }).catch((res) => {
|
|
|
+ console.error(res)
|
|
|
+ this.$message.error('获取监控失败!')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showLocalVideo(item){
|
|
|
if(this.isNull(item.goafDevSocketAddr)){
|
|
|
console.error('未配置推流地址')
|
|
|
return
|