|
|
@@ -57,7 +57,7 @@
|
|
|
<!--</div>-->
|
|
|
<!--<H5PlayerVideo style="margin:10px 0 0 12px;" v-if="videoData" :videoProps="videoData"></H5PlayerVideo>-->
|
|
|
<p v-if="!videoData" style="line-height:210px;text-align: center;color:#fff;font-size:16px;">该实验室无监控</p>
|
|
|
- <mpegts-video style="display: inline-block" :videoProps="videoData"></mpegts-video>
|
|
|
+ <mpegts-video v-if="videoData" style="display: inline-block" :videoProps="videoData"></mpegts-video>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -164,29 +164,28 @@ export default {
|
|
|
this.$emit('close')
|
|
|
},
|
|
|
async getVideoList(data) {
|
|
|
- try {
|
|
|
- let obj = {
|
|
|
- page:'1',
|
|
|
- pageSize:'1',
|
|
|
- buildId:'',
|
|
|
- floorId:'',
|
|
|
- passageway:'',
|
|
|
- subIds:[data.subId],
|
|
|
- protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
|
|
|
- streamType:1,
|
|
|
- source:1,
|
|
|
- }
|
|
|
- const res = await getVideoList(obj)
|
|
|
- if(res.data.list[0]){
|
|
|
- this.$set(this,'videoData',{
|
|
|
- width: 400, //(宽度:非必传-默认600)
|
|
|
- height: 210, //(高度:非必传-默认338)
|
|
|
- url: res.data.records[0].streamUrl,
|
|
|
- cameraIndexCode: res.data.records[0].deviceNo,
|
|
|
- });
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.error('AlertModal:', e)
|
|
|
+ console.log('data',data);
|
|
|
+ let self = this;
|
|
|
+ let obj = {
|
|
|
+ page:'1',
|
|
|
+ pageSize:'1',
|
|
|
+ buildId:'',
|
|
|
+ floorId:'',
|
|
|
+ passageway:'',
|
|
|
+ subIds:[data.subId],
|
|
|
+ protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
|
|
|
+ streamType:1,
|
|
|
+ source:1,
|
|
|
+ }
|
|
|
+ const res = await getVideoList(obj)
|
|
|
+ if(res.data.records[0]){
|
|
|
+ console.log('res',res);
|
|
|
+ self.$set(self,'videoData',{
|
|
|
+ width: 400, //(宽度:非必传-默认600)
|
|
|
+ height: 210, //(高度:非必传-默认338)
|
|
|
+ url: res.data.records[0].streamUrl,
|
|
|
+ cameraIndexCode: res.data.records[0].deviceNo,
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
//全屏开启
|