|
|
@@ -56,8 +56,6 @@
|
|
|
<!--<span>实时监控画面</span>-->
|
|
|
<!--</div>-->
|
|
|
<H5PlayerVideo 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 v-if="videoData" style="display: inline-block" :videoProps="videoData"></mpegts-video>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -92,14 +90,9 @@
|
|
|
import H5PlayerVideo from '@/components/H5PlayerVideo/H5PlayerVideo.vue'
|
|
|
import fullH5PlayerVideo from '@/components/fullH5PlayerVideo/fullH5PlayerVideo.vue'
|
|
|
import { getVideoList,laboratoryPlanCloseRiskPlan } from '@/api'
|
|
|
-import mpegtsVideo from '@/components/mpegtsVideo/mpegtsVideo.vue'
|
|
|
export default {
|
|
|
name: 'AlertModal',
|
|
|
- components: {
|
|
|
- H5PlayerVideo,
|
|
|
- fullH5PlayerVideo,
|
|
|
- mpegtsVideo
|
|
|
- },
|
|
|
+ components: { H5PlayerVideo,fullH5PlayerVideo },
|
|
|
props: {
|
|
|
AlertModalData: {
|
|
|
type: Object,
|
|
|
@@ -164,28 +157,26 @@ export default {
|
|
|
this.$emit('close')
|
|
|
},
|
|
|
async getVideoList(data) {
|
|
|
- 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,
|
|
|
- });
|
|
|
+ try {
|
|
|
+ let obj = {
|
|
|
+ "subIds": [data.subId],
|
|
|
+ "streamType": 1,
|
|
|
+ "protocol": window.location.href.indexOf('https') !== -1 ? 'wss' : 'ws',
|
|
|
+ "source": 4,
|
|
|
+ "page": 1,
|
|
|
+ "pageSize": 10
|
|
|
+ }
|
|
|
+ const res = await getVideoList(obj)
|
|
|
+ if(res.data.records[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)
|
|
|
}
|
|
|
},
|
|
|
//全屏开启
|
|
|
@@ -397,7 +388,6 @@ export default {
|
|
|
overflow: hidden;
|
|
|
background: rgba(0, 0, 0, 0.3);
|
|
|
position: relative;
|
|
|
- height:210px;
|
|
|
}
|
|
|
|
|
|
.video-header {
|