|
@@ -4,7 +4,7 @@
|
|
|
<div class="monitor-header">
|
|
<div class="monitor-header">
|
|
|
<span class="monitor-title-cn">📹 实时监控</span>
|
|
<span class="monitor-title-cn">📹 实时监控</span>
|
|
|
<span class="monitor-title-en">CCTV Live Feed</span>
|
|
<span class="monitor-title-en">CCTV Live Feed</span>
|
|
|
- <div class="monitor-button">
|
|
|
|
|
|
|
+ <div class="monitor-button" v-if="effective">
|
|
|
<p :class="checkButton == 1 ? 'checkButton':'noCheckButton'" @click="buttonClick(1)">默认</p>
|
|
<p :class="checkButton == 1 ? 'checkButton':'noCheckButton'" @click="buttonClick(1)">默认</p>
|
|
|
<p :class="checkButton == 2 ? 'checkButton':'noCheckButton'" @click="buttonClick(2)">全部</p>
|
|
<p :class="checkButton == 2 ? 'checkButton':'noCheckButton'" @click="buttonClick(2)">全部</p>
|
|
|
</div>
|
|
</div>
|
|
@@ -14,7 +14,10 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="checkButton == 1" class="monitor-play-box">
|
|
<div v-if="checkButton == 1" class="monitor-play-box">
|
|
|
- <H5PlayerVideo class="for-play-box" v-for="(item,index) in videoList" :key="index" :videoProps="item"></H5PlayerVideo>
|
|
|
|
|
|
|
+ <videoForMod
|
|
|
|
|
+ v-for="(item,index) in modList" :key="index"
|
|
|
|
|
+ :deviceNo="item.deviceNo"
|
|
|
|
|
+ ></videoForMod>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- Monitor Inner: 2-column grid -->
|
|
<!-- Monitor Inner: 2-column grid -->
|
|
|
<div class="monitor-inner" v-if="checkButton == 2">
|
|
<div class="monitor-inner" v-if="checkButton == 2">
|
|
@@ -107,9 +110,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getCameraList,getMonitorTree,getRooms,getDeptDropList,getCameraStream } from '@/api/screen'
|
|
|
|
|
|
|
+import { getCameraList,getMonitorTree,getRooms,getDeptDropList,
|
|
|
|
|
+ getCameraStream,laboratoryLabScreenScreenConfigGet } from '@/api/screen'
|
|
|
|
|
|
|
|
import H5PlayerVideo from '@/components/H5PlayerVideo/H5PlayerVideo.vue'
|
|
import H5PlayerVideo from '@/components/H5PlayerVideo/H5PlayerVideo.vue'
|
|
|
|
|
+import videoForMod from '@/components/videoForMod/videoForMod.vue'
|
|
|
import fullH5PlayerVideo from '@/components/fullH5PlayerVideo/fullH5PlayerVideo.vue'
|
|
import fullH5PlayerVideo from '@/components/fullH5PlayerVideo/fullH5PlayerVideo.vue'
|
|
|
const TreeNode = {
|
|
const TreeNode = {
|
|
|
name: 'TreeNode',
|
|
name: 'TreeNode',
|
|
@@ -180,7 +185,10 @@ const TreeNode = {
|
|
|
export default {
|
|
export default {
|
|
|
name: 'SecurityMonitor',
|
|
name: 'SecurityMonitor',
|
|
|
components: {
|
|
components: {
|
|
|
- TreeNode,H5PlayerVideo,fullH5PlayerVideo
|
|
|
|
|
|
|
+ TreeNode,
|
|
|
|
|
+ H5PlayerVideo,
|
|
|
|
|
+ fullH5PlayerVideo,
|
|
|
|
|
+ videoForMod,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -248,15 +256,18 @@ export default {
|
|
|
fullVideoProps:{},
|
|
fullVideoProps:{},
|
|
|
fullVideoType:false,
|
|
fullVideoType:false,
|
|
|
//切换
|
|
//切换
|
|
|
- checkButton:1,
|
|
|
|
|
|
|
+ checkButton:2,
|
|
|
|
|
+ effective:false,
|
|
|
|
|
+ modList:[],
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// this.fetchCameras()
|
|
// this.fetchCameras()
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
+ this.laboratoryLabScreenScreenConfigGet();
|
|
|
if(this.checkButton == 1){
|
|
if(this.checkButton == 1){
|
|
|
- this.getVideoDataOne()
|
|
|
|
|
|
|
+ this.demo()
|
|
|
}else if(this.checkButton == 2){
|
|
}else if(this.checkButton == 2){
|
|
|
this.getMonitorTree();
|
|
this.getMonitorTree();
|
|
|
this.getDeptDropList();
|
|
this.getDeptDropList();
|
|
@@ -266,7 +277,7 @@ export default {
|
|
|
buttonClick(val){
|
|
buttonClick(val){
|
|
|
this.$set(this,'checkButton',val);
|
|
this.$set(this,'checkButton',val);
|
|
|
if(val == 1){
|
|
if(val == 1){
|
|
|
- this.getVideoDataOne()
|
|
|
|
|
|
|
+ this.demo()
|
|
|
}else if(val == 2){
|
|
}else if(val == 2){
|
|
|
this.getMonitorTree();
|
|
this.getMonitorTree();
|
|
|
this.getDeptDropList();
|
|
this.getDeptDropList();
|
|
@@ -488,18 +499,18 @@ export default {
|
|
|
try {
|
|
try {
|
|
|
const res = await getCameraStream(this.videoQueryParams)
|
|
const res = await getCameraStream(this.videoQueryParams)
|
|
|
let list = [];
|
|
let list = [];
|
|
|
- res.data.total = 100;
|
|
|
|
|
- res.data.records = [
|
|
|
|
|
- {streamUrl:'1', deviceNo:'1'},
|
|
|
|
|
- {streamUrl:'2', deviceNo:'2'},
|
|
|
|
|
- {streamUrl:'3', deviceNo:'3'},
|
|
|
|
|
- {streamUrl:'4', deviceNo:'4'},
|
|
|
|
|
- {streamUrl:'5', deviceNo:'5'},
|
|
|
|
|
- {streamUrl:'6', deviceNo:'6'},
|
|
|
|
|
- {streamUrl:'7', deviceNo:'7'},
|
|
|
|
|
- {streamUrl:'8', deviceNo:'8'},
|
|
|
|
|
- {streamUrl:'9', deviceNo:'9'},
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ // res.data.total = 100;
|
|
|
|
|
+ // res.data.records = [
|
|
|
|
|
+ // {streamUrl:'1', deviceNo:'1'},
|
|
|
|
|
+ // {streamUrl:'2', deviceNo:'2'},
|
|
|
|
|
+ // {streamUrl:'3', deviceNo:'3'},
|
|
|
|
|
+ // {streamUrl:'4', deviceNo:'4'},
|
|
|
|
|
+ // {streamUrl:'5', deviceNo:'5'},
|
|
|
|
|
+ // {streamUrl:'6', deviceNo:'6'},
|
|
|
|
|
+ // {streamUrl:'7', deviceNo:'7'},
|
|
|
|
|
+ // {streamUrl:'8', deviceNo:'8'},
|
|
|
|
|
+ // {streamUrl:'9', deviceNo:'9'},
|
|
|
|
|
+ // ];
|
|
|
for(let i=0;i<res.data.records.length;i++){
|
|
for(let i=0;i<res.data.records.length;i++){
|
|
|
list.push(
|
|
list.push(
|
|
|
{
|
|
{
|
|
@@ -522,62 +533,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//指定视频
|
|
//指定视频
|
|
|
- getVideoDataOne(data){
|
|
|
|
|
- let obj = {
|
|
|
|
|
- page:1,
|
|
|
|
|
- pageSize:9,
|
|
|
|
|
- passageway:'',
|
|
|
|
|
- protocol:window.location.href.indexOf('https') !== -1?'wss':'ws',
|
|
|
|
|
- streamType:1,
|
|
|
|
|
- source:4,
|
|
|
|
|
- subIds:data,
|
|
|
|
|
- };
|
|
|
|
|
- this.$nextTick(()=>{
|
|
|
|
|
- this.videoInitializeOne(obj)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- async videoInitializeOne(obj) {
|
|
|
|
|
- let self = this;
|
|
|
|
|
- self.$set(self, 'videoType', false);
|
|
|
|
|
- self.$set(self, 'videoList', []);
|
|
|
|
|
|
|
+ async laboratoryLabScreenScreenConfigGet(){
|
|
|
try {
|
|
try {
|
|
|
- // const res = await getCameraStream(obj)
|
|
|
|
|
- let list = [];
|
|
|
|
|
- let res = {
|
|
|
|
|
- data:{
|
|
|
|
|
- total:100,
|
|
|
|
|
- records:[
|
|
|
|
|
- {streamUrl:'1', deviceNo:'1'},
|
|
|
|
|
- {streamUrl:'2', deviceNo:'2'},
|
|
|
|
|
- {streamUrl:'3', deviceNo:'3'},
|
|
|
|
|
- {streamUrl:'4', deviceNo:'4'},
|
|
|
|
|
- {streamUrl:'5', deviceNo:'5'},
|
|
|
|
|
- {streamUrl:'6', deviceNo:'6'},
|
|
|
|
|
- {streamUrl:'7', deviceNo:'7'},
|
|
|
|
|
- {streamUrl:'8', deviceNo:'8'},
|
|
|
|
|
- {streamUrl:'9', deviceNo:'9'},
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ const res = await laboratoryLabScreenScreenConfigGet({ screenType: 1 })
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.$set(this,'effective',res.data.effective);
|
|
|
|
|
+ this.$set(this,'modList',res.data.items);
|
|
|
|
|
+ if(res.data.effective){
|
|
|
|
|
+ this.$set(this,'checkButton',1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- for(let i=0;i<res.data.records.length;i++){
|
|
|
|
|
- list.push(
|
|
|
|
|
- {
|
|
|
|
|
- width: 1396, //(宽度:非必传-默认600)
|
|
|
|
|
- height: 810, //(高度:非必传-默认338)
|
|
|
|
|
- url: res.data.records[i].streamUrl,
|
|
|
|
|
- cameraIndexCode: res.data.records[i].deviceNo,
|
|
|
|
|
- }
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
- this.$set(this,'videoList',list)
|
|
|
|
|
- this.$set(this,'videoTotal',res.data.total);
|
|
|
|
|
- this.$nextTick(()=>{
|
|
|
|
|
- setTimeout(function(){
|
|
|
|
|
- self.$set(self, 'videoType', true);
|
|
|
|
|
- },1000);
|
|
|
|
|
- })
|
|
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
- console.error('VideoGrid:', e)
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//全屏开启-关闭轮播
|
|
//全屏开启-关闭轮播
|