|
@@ -4,32 +4,38 @@
|
|
|
<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">
|
|
|
|
|
+ <p :class="checkButton == 1 ? 'checkButton':'noCheckButton'" @click="buttonClick(1)">默认</p>
|
|
|
|
|
+ <p :class="checkButton == 2 ? 'checkButton':'noCheckButton'" @click="buttonClick(2)">全部</p>
|
|
|
|
|
+ </div>
|
|
|
<div class="monitor-status">
|
|
<div class="monitor-status">
|
|
|
<div class="status-dot green"></div>
|
|
<div class="status-dot green"></div>
|
|
|
<span class="monitor-status-text">信号正常</span>
|
|
<span class="monitor-status-text">信号正常</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </div>
|
|
|
<!-- Monitor Inner: 2-column grid -->
|
|
<!-- Monitor Inner: 2-column grid -->
|
|
|
- <div class="monitor-inner">
|
|
|
|
|
|
|
+ <div class="monitor-inner" v-if="checkButton == 2">
|
|
|
<!-- Left Column: Search + Filter + Tree -->
|
|
<!-- Left Column: Search + Filter + Tree -->
|
|
|
<div class="monitor-left">
|
|
<div class="monitor-left">
|
|
|
<div class="search-box">
|
|
<div class="search-box">
|
|
|
<span class="search-icon">🔍</span>
|
|
<span class="search-icon">🔍</span>
|
|
|
- <el-input class="video-select"
|
|
|
|
|
|
|
+ <el-input class="video-select"
|
|
|
@keyup.enter.native="handleEnter"
|
|
@keyup.enter.native="handleEnter"
|
|
|
@clear="handleEnter"
|
|
@clear="handleEnter"
|
|
|
clearable
|
|
clearable
|
|
|
- v-model="queryParams.searchValue"
|
|
|
|
|
|
|
+ v-model="queryParams.searchValue"
|
|
|
type="text" placeholder="搜索楼栋/楼层...." >
|
|
type="text" placeholder="搜索楼栋/楼层...." >
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <el-select class="filter-select"
|
|
|
|
|
|
|
+ <el-select class="filter-select"
|
|
|
@change="handleEnter"
|
|
@change="handleEnter"
|
|
|
@clear="handleEnter"
|
|
@clear="handleEnter"
|
|
|
clearable
|
|
clearable
|
|
|
- v-model="queryParams.deptId"
|
|
|
|
|
|
|
+ v-model="queryParams.deptId"
|
|
|
placeholder="请选择二级单位">
|
|
placeholder="请选择二级单位">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in options"
|
|
v-for="item in options"
|
|
@@ -222,7 +228,7 @@ export default {
|
|
|
searchValue: "",
|
|
searchValue: "",
|
|
|
deptId: '',
|
|
deptId: '',
|
|
|
},
|
|
},
|
|
|
- deptOptions: [],
|
|
|
|
|
|
|
+ deptOptions: [],
|
|
|
options:[],
|
|
options:[],
|
|
|
treeId:null,
|
|
treeId:null,
|
|
|
defaultKey:null,
|
|
defaultKey:null,
|
|
@@ -241,17 +247,31 @@ export default {
|
|
|
//全屏视频参数
|
|
//全屏视频参数
|
|
|
fullVideoProps:{},
|
|
fullVideoProps:{},
|
|
|
fullVideoType:false,
|
|
fullVideoType:false,
|
|
|
|
|
+ //切换
|
|
|
|
|
+ checkButton:1,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
// this.fetchCameras()
|
|
// this.fetchCameras()
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.getMonitorTree();
|
|
|
|
|
- this.getDeptDropList();
|
|
|
|
|
|
|
+ if(this.checkButton == 1){
|
|
|
|
|
+ this.getVideoDataOne()
|
|
|
|
|
+ }else if(this.checkButton == 2){
|
|
|
|
|
+ this.getMonitorTree();
|
|
|
|
|
+ this.getDeptDropList();
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
-
|
|
|
|
|
|
|
+ buttonClick(val){
|
|
|
|
|
+ this.$set(this,'checkButton',val);
|
|
|
|
|
+ if(val == 1){
|
|
|
|
|
+ this.getVideoDataOne()
|
|
|
|
|
+ }else if(val == 2){
|
|
|
|
|
+ this.getMonitorTree();
|
|
|
|
|
+ this.getDeptDropList();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
handleEnter(){
|
|
handleEnter(){
|
|
|
this.getMonitorTree();
|
|
this.getMonitorTree();
|
|
|
},
|
|
},
|
|
@@ -301,8 +321,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
nodeClickButton(e,data){
|
|
nodeClickButton(e,data){
|
|
|
- console.log('e===>',e);
|
|
|
|
|
- console.log('data===>',data);
|
|
|
|
|
let self = this;
|
|
let self = this;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
if (!e.level||e.level == 2||e.level == 3) {
|
|
if (!e.level||e.level == 2||e.level == 3) {
|
|
@@ -470,18 +488,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(
|
|
|
{
|
|
{
|
|
@@ -503,6 +521,65 @@ export default {
|
|
|
console.error('VideoGrid:', e)
|
|
console.error('VideoGrid:', e)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ //指定视频
|
|
|
|
|
+ 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', []);
|
|
|
|
|
+ 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'},
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ 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) {
|
|
|
|
|
+ console.error('VideoGrid:', e)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
//全屏开启-关闭轮播
|
|
//全屏开启-关闭轮播
|
|
|
stopTime(cameraIndexCode){
|
|
stopTime(cameraIndexCode){
|
|
|
this.$set(this,'fullVideoProps',{cameraIndexCode:cameraIndexCode});
|
|
this.$set(this,'fullVideoProps',{cameraIndexCode:cameraIndexCode});
|
|
@@ -611,7 +688,30 @@ export default {
|
|
|
color: $text-dim;
|
|
color: $text-dim;
|
|
|
margin-left: 10px;
|
|
margin-left: 10px;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+.monitor-button{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top:15px;
|
|
|
|
|
+ right:240px;
|
|
|
|
|
+ p{
|
|
|
|
|
+ width:160px;
|
|
|
|
|
+ height:50px;
|
|
|
|
|
+ line-height:48px;
|
|
|
|
|
+ font-size:28px;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ margin-right:20px;
|
|
|
|
|
+ border-radius:10px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ .checkButton{
|
|
|
|
|
+ border:1px solid #00D8FF;
|
|
|
|
|
+ color:#00D8FF;
|
|
|
|
|
+ }
|
|
|
|
|
+ .noCheckButton{
|
|
|
|
|
+ border:1px solid #3D6187;
|
|
|
|
|
+ color:#3D6187;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
.monitor-status {
|
|
.monitor-status {
|
|
|
margin-left: auto;
|
|
margin-left: auto;
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -623,7 +723,14 @@ export default {
|
|
|
font-size: 28px;
|
|
font-size: 28px;
|
|
|
color: $text-dim;
|
|
color: $text-dim;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+.monitor-play-box{
|
|
|
|
|
+ .for-play-box{
|
|
|
|
|
+ display:inline-block;
|
|
|
|
|
+ width:1398px;
|
|
|
|
|
+ height:810px;
|
|
|
|
|
+ margin:20px 0 0 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
// ========== Monitor Inner (2-column grid) ==========
|
|
// ========== Monitor Inner (2-column grid) ==========
|
|
|
.monitor-inner {
|
|
.monitor-inner {
|
|
|
flex: 1;
|
|
flex: 1;
|