|
@@ -1,6 +1,8 @@
|
|
|
<template>
|
|
|
<div class="video-page">
|
|
|
- <header></header>
|
|
|
+ <header>
|
|
|
+ <div :class="activeId===item.id?'active item':'item'" v-for="item in items" :key="item.id" @click="changeHead(item)">{{ item.name }}</div>
|
|
|
+ </header>
|
|
|
<div class="tab">
|
|
|
<el-select v-model="conditions.goafOrebelt" placeholder="矿带" @change="changeArea(1)" style="width:120px" clearable>
|
|
|
<el-option v-for="(item,index) in goafOrebelts" :key="index" :value="item" :label="item" />
|
|
@@ -59,8 +61,15 @@ import axios from 'axios'
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
- activeId:'1',
|
|
|
+ activeId:'5',
|
|
|
activetab:'1',
|
|
|
+ items:[
|
|
|
+ {name:"首页",id:"1",path:"/particulars/sensor"},
|
|
|
+ {name:"压力传感器",id:"2",path:"/particulars/check"},
|
|
|
+ {name:"位移传感器",id:"3",path:"/particulars/goaf-info"},
|
|
|
+ {name:"有害气体传感器",id:"4",path:"/particulars/goaf-info"},
|
|
|
+ {name:"视频监控",id:"5",path:"/particulars/goaf-info"},
|
|
|
+ ],
|
|
|
video:{
|
|
|
src:"",
|
|
|
name:""
|
|
@@ -104,6 +113,11 @@ import axios from 'axios'
|
|
|
},
|
|
|
changeHead(item){
|
|
|
this.activeId=item.id
|
|
|
+ if(item.id!=='5'){
|
|
|
+ this.$router.push(`/particulars/sensor?id=${item.id}`)
|
|
|
+ }else{
|
|
|
+ this.init()
|
|
|
+ }
|
|
|
},
|
|
|
searchSubmit(){
|
|
|
this.conditions.page=1
|
|
@@ -141,14 +155,16 @@ import axios from 'axios'
|
|
|
this.total = dataList.length
|
|
|
this.$nextTick(()=>{
|
|
|
this.dataList.forEach((item)=>{
|
|
|
- this.$refs['HkwsVideo'+item.goafDevId][0].loadData({
|
|
|
- streamServeUrl:item.goafDevSocketAddr,
|
|
|
- szIP: item.goafDevIp, // protocol ip
|
|
|
- szPort: item.goafDevPort, // protocol port
|
|
|
- szUsername:item.goafDevAccount, // device username
|
|
|
- szPassword: item.goafDevPwd, // device password
|
|
|
- state:false
|
|
|
- })
|
|
|
+ if(this.$refs['HkwsVideo'+item.goafDevId]){
|
|
|
+ this.$refs['HkwsVideo'+item.goafDevId][0].loadData({
|
|
|
+ streamServeUrl:item.goafDevSocketAddr,
|
|
|
+ szIP: item.goafDevIp, // protocol ip
|
|
|
+ szPort: item.goafDevPort, // protocol port
|
|
|
+ szUsername:item.goafDevAccount, // device username
|
|
|
+ szPassword: item.goafDevPwd, // device password
|
|
|
+ state:false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
})
|
|
@@ -226,7 +242,7 @@ import axios from 'axios'
|
|
|
this.conditions.goafId = ''
|
|
|
} else if (type === 2) {
|
|
|
goafOreheights = goafs.filter(item => (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
|
|
|
- goafOreheights = this.unique(goafOrebodys, 'goafOreheight')
|
|
|
+ goafOreheights = this.unique(goafOreheights, 'goafOreheight')
|
|
|
this.goafOreheights = goafOreheights
|
|
|
this.goafNames = []
|
|
|
this.conditions.goafOreheight = ''
|
|
@@ -340,7 +356,23 @@ import axios from 'axios'
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
padding-top: 0.5vh;
|
|
|
- padding-top:36px;
|
|
|
+ .item{
|
|
|
+ width: 188px;
|
|
|
+ height: 36px;
|
|
|
+ line-height: 36px;
|
|
|
+ text-align: center;
|
|
|
+ background-image: url(@/assets/sensor/head.png);
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ margin-right: 12px;
|
|
|
+ max-width: 20%;
|
|
|
+ color: #7FCFF4;
|
|
|
+ cursor: pointer;
|
|
|
+ &.active{
|
|
|
+ background-image: url(@/assets/sensor/head_active.png);
|
|
|
+ color: #2AFFFF;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.tab{
|
|
|
padding-top: 1.5vh;
|