|
@@ -1,38 +1,54 @@
|
|
<template>
|
|
<template>
|
|
<div class="item SensorInfoStatistics">
|
|
<div class="item SensorInfoStatistics">
|
|
<div class="title">
|
|
<div class="title">
|
|
- <span class="name">传感器实时信息统计</span>
|
|
|
|
- <span class="number">{{total}}</span>
|
|
|
|
|
|
+ <span class="name">区域入侵预警<span class="number" style="padding-left:10px;">{{total}}</span></span>
|
|
|
|
+ <span class="detail" @click="linkTo">详情>></span>
|
|
</div>
|
|
</div>
|
|
<div class="container">
|
|
<div class="container">
|
|
<!-- <div id="sensor-info-chart" v-if="status"></div> -->
|
|
<!-- <div id="sensor-info-chart" v-if="status"></div> -->
|
|
- <div class="warn-item" @click="showWarnModel">
|
|
|
|
|
|
+ <!-- <div class="warn-item" @click="showWarnModel">
|
|
<div class="tag" v-if="warnInfo.goafName">{{NumConvertLM(warnInfo.goafOrebelt)}}-{{warnInfo.goafOrebody}}-{{warnInfo.goafOreheight}}-{{warnInfo.goafName}}</div>
|
|
<div class="tag" v-if="warnInfo.goafName">{{NumConvertLM(warnInfo.goafOrebelt)}}-{{warnInfo.goafOrebody}}-{{warnInfo.goafOreheight}}-{{warnInfo.goafName}}</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
|
|
+
|
|
|
|
+ <el-carousel trigger="click" height="120px" indicator-position="none" arrow="always" :autoplay="false" :loop="false">
|
|
|
|
+ <el-carousel-item v-for="(items,index) in warnList" :key="index" >
|
|
|
|
+ <div class="warn-item-box">
|
|
|
|
+ <div class="warn-item warning" @click="showWarnModel(item)" v-for="(item,_index) in items" :key="_index">
|
|
|
|
+ <div class="tag">{{NumConvertLM(item.goafOrebelt)}}-{{item.goafOrebody}}-{{item.goafOreheight}}-{{item.goafName}}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-carousel-item>
|
|
|
|
+ </el-carousel>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
<div class="video-dialog" v-if="videoDialogVisible">
|
|
<div class="video-dialog" v-if="videoDialogVisible">
|
|
- <div class="header">
|
|
|
|
- <div class="name"><span v-if="warnInfo.goafName">{{NumConvertLM(warnInfo.goafOrebelt)}}-{{warnInfo.goafOrebody}}-{{warnInfo.goafOreheight}}-</span>{{warnInfo.goafName}}报警监控</div>
|
|
|
|
- <div class="close" @click="videoDialogVisible=false"><el-icon><Close /></el-icon></div>
|
|
|
|
- </div>
|
|
|
|
- <!-- <video :src="video.src" id="video" controls></video> -->
|
|
|
|
- <div class="demo-image__preview" v-if="capturePhotos.length>0">
|
|
|
|
- <el-image
|
|
|
|
- style="width: 100px; height: 100px"
|
|
|
|
- :src="capturePhotos[0]"
|
|
|
|
- :zoom-rate="1.2"
|
|
|
|
- :preview-src-list="capturePhotos"
|
|
|
|
- :initial-index="4"
|
|
|
|
- fit="cover"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <HkwsVideo ref="HkwsVideo"></HkwsVideo>
|
|
|
|
|
|
+ <div class="video-dialog-container">
|
|
|
|
+ <div class="header">
|
|
|
|
+ <div class="name">
|
|
|
|
+ <!-- <span v-if="warnInfo.goafName">{{NumConvertLM(warnInfo.goafOrebelt)}}-{{warnInfo.goafOrebody}}-{{warnInfo.goafOreheight}}-{{warnInfo.goafName}}</span> -->
|
|
|
|
+ <span>区域入侵预警</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="close" @click="videoDialogVisible=false"><el-icon><Close /></el-icon></div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <video :src="video.src" id="video" controls></video> -->
|
|
|
|
+ <div class="demo-image__preview" v-if="capturePhotos.length>0">
|
|
|
|
+ <el-image
|
|
|
|
+ style="width: 100px; height: 100px"
|
|
|
|
+ :src="capturePhotos[0]"
|
|
|
|
+ :zoom-rate="1.2"
|
|
|
|
+ :preview-src-list="capturePhotos"
|
|
|
|
+ :initial-index="4"
|
|
|
|
+ fit="cover"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <HkwsVideo ref="HkwsVideo"></HkwsVideo>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import * as echarts from 'echarts';
|
|
import * as echarts from 'echarts';
|
|
- import { goafdevstatis} from '@/api/goaf/sensor'
|
|
|
|
|
|
+ import { goafdevstatis,goafCameraAlarmNumber,goafCameraAlarm} from '@/api/goaf/sensor'
|
|
import { NumConvertLM } from '@/utils'
|
|
import { NumConvertLM } from '@/utils'
|
|
import HkwsVideo from '@/components/HkwsVideo/iframe.vue'
|
|
import HkwsVideo from '@/components/HkwsVideo/iframe.vue'
|
|
export default {
|
|
export default {
|
|
@@ -46,6 +62,7 @@
|
|
warn_status:0,
|
|
warn_status:0,
|
|
total:0,
|
|
total:0,
|
|
videoDialogVisible:false,
|
|
videoDialogVisible:false,
|
|
|
|
+ warnList:[],
|
|
warnInfo:{
|
|
warnInfo:{
|
|
"goafOrebody": "",
|
|
"goafOrebody": "",
|
|
"goafOrebelt": "",
|
|
"goafOrebelt": "",
|
|
@@ -195,9 +212,9 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
- // this.$nextTick(()=>{
|
|
|
|
- // this.reload()
|
|
|
|
- // })
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.reload()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
NumConvertLM,
|
|
NumConvertLM,
|
|
@@ -217,34 +234,48 @@
|
|
}
|
|
}
|
|
,reload(){
|
|
,reload(){
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
- this.goafdevstatis()
|
|
|
|
|
|
+ this.goafCameraAlarmNumber()
|
|
|
|
+ this.goafCameraAlarm()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
warn(data){
|
|
warn(data){
|
|
- this.warnInfo=data
|
|
|
|
- $('.SensorInfoStatistics').find('.warn-item').addClass('warning')
|
|
|
|
|
|
+ // this.warnInfo=data
|
|
|
|
+ // $('.SensorInfoStatistics').find('.warn-item').addClass('warning')
|
|
|
|
+ this.goafCameraAlarm()
|
|
},
|
|
},
|
|
- showWarnModel(){
|
|
|
|
|
|
+ showWarnModel(item){
|
|
this.videoDialogVisible=true
|
|
this.videoDialogVisible=true
|
|
|
|
+ if(item){
|
|
|
|
+ let warn_info=JSON.parse(JSON.stringify(item))
|
|
|
|
+ this.warnInfo=warn_info
|
|
|
|
+ this.warnInfo.fileUrl=warn_info.goafSnapPicurl
|
|
|
|
+ }
|
|
this.capturePhotos=[this.warnInfo.fileUrl]
|
|
this.capturePhotos=[this.warnInfo.fileUrl]
|
|
- if(this.isNull(this.warnInfo.goafDevSocketAddr)){
|
|
|
|
|
|
+ let warnInfo=item?item:this.warnInfo
|
|
|
|
+ let state=true
|
|
|
|
+ if(this.isNull(warnInfo.goafDevSocketAddr)){
|
|
|
|
+ state="未配置推流地址"
|
|
console.error('未配置推流地址')
|
|
console.error('未配置推流地址')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if(this.isNull(this.warnInfo.goafDevIp)){
|
|
if(this.isNull(this.warnInfo.goafDevIp)){
|
|
- console.error('未配置设备IP')
|
|
|
|
|
|
+ state="未配置设备IP"
|
|
|
|
+ console.error(state)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if(this.isNull(this.warnInfo.goafDevPort)){
|
|
if(this.isNull(this.warnInfo.goafDevPort)){
|
|
- console.error('未配置设备端口')
|
|
|
|
|
|
+ state="未配置设备端口"
|
|
|
|
+ console.error(state)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if(this.isNull(this.warnInfo.goafDevAccount)){
|
|
if(this.isNull(this.warnInfo.goafDevAccount)){
|
|
- console.error('未配置设备账号')
|
|
|
|
|
|
+ state="未配置设备账号"
|
|
|
|
+ console.error(state)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if(this.isNull(this.warnInfo.goafDevPwd)){
|
|
if(this.isNull(this.warnInfo.goafDevPwd)){
|
|
- console.error('未配置设备密码')
|
|
|
|
|
|
+ state="未配置设备密码"
|
|
|
|
+ console.error(state)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
@@ -253,18 +284,58 @@
|
|
szIP: this.warnInfo.goafDevIp, // protocol ip
|
|
szIP: this.warnInfo.goafDevIp, // protocol ip
|
|
szPort: this.warnInfo.goafDevPort, // protocol port
|
|
szPort: this.warnInfo.goafDevPort, // protocol port
|
|
szUsername:this.warnInfo.goafDevAccount, // device username
|
|
szUsername:this.warnInfo.goafDevAccount, // device username
|
|
- szPassword: this.warnInfo.goafDevPwd, // device password
|
|
|
|
|
|
+ szPassword: this.warnInfo.goafDevPwd, // device password
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
+ // 获取所有采空区摄像头告警数量
|
|
|
|
+ goafCameraAlarmNumber(){
|
|
|
|
+ goafCameraAlarmNumber({
|
|
|
|
+ goafAlarmStatus:0
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ this.total=res.data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //获取所有采空区摄像头告警信息
|
|
|
|
+ goafCameraAlarm(){
|
|
|
|
+ goafCameraAlarm({
|
|
|
|
+ goafAlarmStatus:0
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ this.warnList=this.getDataSource(res.data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
goafdevstatis(){
|
|
goafdevstatis(){
|
|
let option =JSON.parse(JSON.stringify(this.option))
|
|
let option =JSON.parse(JSON.stringify(this.option))
|
|
goafdevstatis().then((res)=>{
|
|
goafdevstatis().then((res)=>{
|
|
this.total=res.data.goafDevTotalNum
|
|
this.total=res.data.goafDevTotalNum
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ linkTo(){
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/goafCameraAlarm'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getDataSource(dataList=[],n=4) {
|
|
|
|
+ let newDataList = []
|
|
|
|
+ let current = 0
|
|
|
|
+ if(dataList && dataList.length>0){
|
|
|
|
+ for(let i=0;i<=dataList.length-1;i++){
|
|
|
|
+ if(i%n !== 0 || i === 0 ){
|
|
|
|
+ if(!newDataList[current]){
|
|
|
|
+ newDataList.push([dataList[i]])
|
|
|
|
+ }else{
|
|
|
|
+ newDataList[current].push(dataList[i])
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ current++
|
|
|
|
+ newDataList.push([dataList[i]])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return [...newDataList]
|
|
|
|
+ },
|
|
isNull(val){
|
|
isNull(val){
|
|
- if(val===undefined||val==="undefined"&&val===null&&val===""){
|
|
|
|
|
|
+ if(val===undefined||val==="undefined"||val===null||val===""){
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
@@ -293,7 +364,14 @@
|
|
top: 0;
|
|
top: 0;
|
|
right: 10px;
|
|
right: 10px;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
- background-color: rgba(5, 25, 51, 0.98);
|
|
|
|
|
|
+ background-color: rgba(222, 229, 236, 0.45);
|
|
|
|
+ .video-dialog-container{
|
|
|
|
+ width: 654px;
|
|
|
|
+ height: 644px;
|
|
|
|
+ background-color: #051933;
|
|
|
|
+ border-radius: 20px;
|
|
|
|
+ margin: 20px auto;
|
|
|
|
+ }
|
|
.name{
|
|
.name{
|
|
color: #fff;
|
|
color: #fff;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
@@ -322,51 +400,57 @@
|
|
margin: 10px auto;
|
|
margin: 10px auto;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .warn-item{
|
|
|
|
- width: 100px;
|
|
|
|
- height: 100px;
|
|
|
|
- position: relative;
|
|
|
|
- margin-left: 10px;
|
|
|
|
- display: none;
|
|
|
|
- .tag{
|
|
|
|
- width: 120px;
|
|
|
|
- display: inline-block;
|
|
|
|
- background: #21649c;
|
|
|
|
- overflow:hidden;
|
|
|
|
- text-overflow:ellipsis;
|
|
|
|
- white-space:nowrap;
|
|
|
|
- color: #fff;
|
|
|
|
- text-align: center;
|
|
|
|
- z-index: 9;
|
|
|
|
- position: absolute;
|
|
|
|
- bottom: -6px;
|
|
|
|
- font-size: 12px;
|
|
|
|
- }
|
|
|
|
- &::after{
|
|
|
|
|
|
+ .warn-item-box{
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .warn-item{
|
|
|
|
+ width: 100px;
|
|
|
|
+ height: 100px;
|
|
|
|
+ position: relative;
|
|
|
|
+ margin-left: 15px;
|
|
|
|
+ display: none;
|
|
|
|
+ .tag{
|
|
|
|
+ width: 110px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ background: #21649c;
|
|
|
|
+ overflow:hidden;
|
|
|
|
+ text-overflow:ellipsis;
|
|
|
|
+ white-space:nowrap;
|
|
|
|
+ color: #fff;
|
|
|
|
+ text-align: center;
|
|
|
|
+ z-index: 9;
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: -4px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ line-height: 1;
|
|
|
|
+ padding: 2px 0;
|
|
|
|
+ }
|
|
|
|
+ &::after{
|
|
|
|
+ display: block;
|
|
|
|
+ content: "";
|
|
|
|
+ height: 60%;
|
|
|
|
+ width: 60%;
|
|
|
|
+ border-radius: 50% 50% 10% 10%;
|
|
|
|
+ position: absolute;
|
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
|
+ left: 50%;
|
|
|
|
+ top: 50%;
|
|
|
|
+ z-index: 9;
|
|
|
|
+ background-image: radial-gradient(#dee7f6, #797878);
|
|
|
|
+ box-shadow: 0 0 20px #fff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .warning {
|
|
display: block;
|
|
display: block;
|
|
- content: "";
|
|
|
|
- height: 60%;
|
|
|
|
- width: 60%;
|
|
|
|
- border-radius: 50% 50% 10% 10%;
|
|
|
|
- position: absolute;
|
|
|
|
- transform: translate(-50%,-50%);
|
|
|
|
- left: 50%;
|
|
|
|
- top: 50%;
|
|
|
|
- z-index: 9;
|
|
|
|
- background-image: radial-gradient(#dee7f6, #797878);
|
|
|
|
- box-shadow: 0 0 20px #fff;
|
|
|
|
- }
|
|
|
|
|
|
+ &::after{
|
|
|
|
+ background-image: radial-gradient(yellow,red);
|
|
|
|
+ animation: twinkle 0.5s infinite alternate;
|
|
|
|
+ box-shadow: 0 0 20px red;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/*动画*/
|
|
/*动画*/
|
|
-.warning {
|
|
|
|
- display: block;
|
|
|
|
- &::after{
|
|
|
|
- background-image: radial-gradient(yellow,red);
|
|
|
|
- animation: twinkle 0.5s infinite alternate;
|
|
|
|
- box-shadow: 0 0 20px red;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
|
|
@keyframes twinkle {
|
|
@keyframes twinkle {
|
|
0% {opacity: 0.9;}
|
|
0% {opacity: 0.9;}
|