|
@@ -1,18 +1,29 @@
|
|
|
<template>
|
|
|
- <div id="devicePosition" style="width:100vw; height: 91vh">
|
|
|
- <el-container v-loading="loading" style="height: 91vh;" element-loading-text="拼命加载中">
|
|
|
- <el-aside width="300px" style="background-color: #ffffff">
|
|
|
+ <div id="devicePosition" :style="`width:100vw; height: ${isFullScreen?'100vh':'91vh'}`" ref="container">
|
|
|
+ <el-container v-loading="loading" style="height: 100%;" element-loading-text="拼命加载中" >
|
|
|
+ <el-aside width="300px" v-show="asideHide" :style="`background-color: ${isFullScreen?'#eee':'#ffffff'}`">
|
|
|
<DeviceTree :clickEvent="clickEvent" :contextMenuEvent="contextMenuEvent"></DeviceTree>
|
|
|
</el-aside>
|
|
|
<el-container>
|
|
|
- <el-header height="5vh" style="text-align: left;font-size: 17px;line-height:5vh">
|
|
|
- 分屏:
|
|
|
- <i class="el-icon-full-screen btn" :class="{active:spilt==1}" @click="spilt=1"/>
|
|
|
- <i class="el-icon-menu btn" :class="{active:spilt==4}" @click="spilt=4"/>
|
|
|
- <i class="el-icon-s-grid btn" :class="{active:spilt==9}" @click="spilt=9"/>
|
|
|
+ <el-header height="5vh"
|
|
|
+ :style="`text-align: left;font-size: 17px;line-height:5vh;
|
|
|
+ background-color:${isFullScreen?'#000':'#fff'};
|
|
|
+ color:${!isFullScreen?'#000':'#fff'}`
|
|
|
+">
|
|
|
+ <div class="b-left">
|
|
|
+ <el-button :icon="`el-icon-s-${asideHide?'fold':'unfold'}`" circle size="small" @click="asideHide=!asideHide" :type="isFullScreen?'goon':''"></el-button>
|
|
|
+ <el-button :icon="`el-icon-${isFullScreen?'files':'full-screen'}`" circle size="small" @click="switchFullScreenHandle" :type="isFullScreen?'goon':''"></el-button>
|
|
|
+ 分屏监控:
|
|
|
+ <i class="el-icon-full-screen btn" :class="{active:spilt==1}" @click="spilt=1"/>
|
|
|
+ <i class="el-icon-menu btn" :class="{active:spilt==4}" @click="spilt=4"/>
|
|
|
+ <i class="el-icon-s-grid btn" :class="{active:spilt==9}" @click="spilt=9"/>
|
|
|
+ </div>
|
|
|
+ <div class="b-right">
|
|
|
+ <el-button></el-button>
|
|
|
+ </div>
|
|
|
</el-header>
|
|
|
- <el-main style="padding: 0;">
|
|
|
- <div style="width: 99%;height: 85vh;display: flex;flex-wrap: wrap;background-color: #000;">
|
|
|
+ <el-main style="padding: 0;background-color: #000;">
|
|
|
+ <div :style="`width: 100%;height: ${isFullScreen?'94vh':'85vh'};display: flex;flex-wrap: wrap;background-color: #000;`">
|
|
|
<div v-for="i in spilt" :key="i" class="play-box"
|
|
|
:style="liveStyle" :class="{redborder:playerIdx == (i-1)}"
|
|
|
@click="playerIdx = (i-1)">
|
|
@@ -31,6 +42,8 @@
|
|
|
import uiHeader from "../layout/UiHeader.vue";
|
|
|
import player from './common/jessibuca.vue'
|
|
|
import DeviceTree from './common/DeviceTree.vue'
|
|
|
+import {exitFullscreen, launchIntoFullscreen} from "@/until/dom";
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
name: "live",
|
|
@@ -46,7 +59,8 @@ export default {
|
|
|
updateLooper: 0, //数据刷新轮训标志
|
|
|
count: 15,
|
|
|
total: 0,
|
|
|
-
|
|
|
+ asideHide: true,// 是否隐藏侧边栏
|
|
|
+ isFullScreen: false,// 是否全屏
|
|
|
//channel
|
|
|
loading: false
|
|
|
};
|
|
@@ -63,10 +77,10 @@ export default {
|
|
|
let style = {width: '100%', height: '100%'}
|
|
|
switch (this.spilt) {
|
|
|
case 4:
|
|
|
- style = {width: '49%', height: '49%'}
|
|
|
+ style = {width: '49%', height: '49%','margin-left':'0.5%'}
|
|
|
break
|
|
|
case 9:
|
|
|
- style = {width: '32%', height: '32%'}
|
|
|
+ style = {width: '32%', height: '32%','margin-left':'0.8%'}
|
|
|
break
|
|
|
}
|
|
|
this.$nextTick(() => {
|
|
@@ -129,6 +143,7 @@ export default {
|
|
|
let deviceId = itemData.deviceId;
|
|
|
// this.isLoging = true;
|
|
|
let channelId = itemData.channelId;
|
|
|
+ console.log(itemData);
|
|
|
console.log("通知设备推流1:" + deviceId + " : " + channelId);
|
|
|
let idxTmp = this.playerIdx
|
|
|
let that = this;
|
|
@@ -199,6 +214,17 @@ export default {
|
|
|
console.log(data);
|
|
|
window.localStorage.setItem('playData', JSON.stringify(data))
|
|
|
},
|
|
|
+ switchFullScreenHandle(){
|
|
|
+ if(this.isFullScreen){
|
|
|
+ // 退出全屏
|
|
|
+ exitFullscreen();
|
|
|
+ this.isFullScreen= false;
|
|
|
+ }else{
|
|
|
+ let el = this.$refs.container;
|
|
|
+ launchIntoFullscreen(el);
|
|
|
+ this.isFullScreen= true;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -302,4 +328,24 @@ export default {
|
|
|
.baidumap > .anchorBL {
|
|
|
display: none !important;
|
|
|
}
|
|
|
+
|
|
|
+.el-button--goon.is-active,
|
|
|
+.el-button--goon:active {
|
|
|
+ background: #20B2AA;
|
|
|
+ border-color: #20B2AA;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.el-button--goon:focus,
|
|
|
+.el-button--goon:hover {
|
|
|
+ background: #48D1CC;
|
|
|
+ border-color: #48D1CC;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.el-button--goon {
|
|
|
+ color: #FFF;
|
|
|
+ background-color: #292a2a;
|
|
|
+ border-color: #295656;
|
|
|
+}
|
|
|
</style>
|