<template>
|
<div>
|
<div class="tit">
|
<div class="title">特殊作业实时监控</div>
|
</div>
|
<div class="chart-cont">
|
<div class="chart">
|
<monitor :size="2.5" ref="monRef" @getData="getData"></monitor>
|
</div>
|
<div class="chart-right">
|
<dv-decoration-10 :color="lineColor" style="width:100%;height:5%;" />
|
<div class="charts-des">
|
<div id="descCont" class="dark-desc">
|
<div class="des-tit">
|
<div>监控列表</div>
|
<dv-decoration8 :color="lineColor" :reverse="true" style="width:100%;" />
|
</div>
|
<div class="des-main">
|
<div>
|
<h4>请选择所要查看的监控:</h4>
|
<div class="videoList" v-if="descContent && descContent.length>0">
|
<div style="cursor: pointer;padding: 10px" v-for="(item,index) in descContent" :key="index" @click="openVideo(item,index)" :class="index == activeIndex?'active':''">
|
{{item.name}}
|
</div>
|
</div>
|
<div v-else>
|
监控系统待接入...
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<dv-decoration-10 :color="lineColor" style="width:100%;height:5%;"/>
|
</div>
|
</div>
|
</div>
|
</template>
|
<script lang="ts">
|
import screenfull from 'screenfull';
|
import {
|
toRefs,
|
reactive,
|
ref,
|
onMounted,
|
defineComponent,
|
defineAsyncComponent,
|
nextTick,
|
onUnmounted,
|
watchEffect
|
} from 'vue';
|
import '/@/theme/bigScreen.css'
|
import {useScreenTheme} from "/@/stores/screenTheme"
|
import {storeToRefs} from "pinia";
|
|
// 定义接口来定义对象的类型
|
interface stateType {
|
descContent: Object;
|
activeIndex: number
|
lineColor: Array<string>;
|
}
|
export default defineComponent({
|
name: 'monDesc',
|
components: {
|
monitor: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/components/monitor.vue')),
|
},
|
props:{
|
content: Object || null
|
},
|
setup(props) {
|
const screenThemes = useScreenTheme()
|
const { screenTheme } = storeToRefs(screenThemes);
|
const monRef = ref()
|
const state = reactive<stateType>({
|
descContent: {},
|
activeIndex: 0,
|
lineColor: ['#11FEEE'],
|
});
|
|
const getTheme =()=>{
|
if(screenTheme.value.isDark){
|
window.document.getElementById('descCont').setAttribute( "class", 'dark-desc' );
|
state.lineColor = ['#11FEEE']
|
}else{
|
window.document.getElementById('descCont').setAttribute( "class", 'light-desc' );
|
state.lineColor = ['#333','#ccc']
|
}
|
}
|
|
watchEffect(() => {
|
// if(props.content){
|
// state.descContent = props.content
|
// }
|
})
|
const openVideo=(item,index)=>{
|
state.activeIndex = index
|
monRef.value.changeVideo(item.deviceNo)
|
}
|
const getData = (data:Array)=>{
|
state.descContent = data
|
}
|
|
// 页面载入时执行方法
|
onMounted(() => {
|
getTheme();
|
|
});
|
return {
|
monRef,
|
getData,
|
openVideo,
|
...toRefs(state)
|
};
|
}
|
});
|
</script>
|
|
<style scoped lang="scss">
|
.dark-page{
|
width: 100%;
|
height: 100%;
|
border:1px #5a5959 solid;
|
background: url('../../../../../assets/warningScreen/body-bg.jpg');
|
padding: 4%;
|
.btns{
|
position: fixed;
|
width: 8%;
|
height: 6%;
|
right: 5%;
|
top: 1.25rem;
|
font-size: 1.125rem;
|
color: rgb(17, 254, 238);
|
cursor: pointer;
|
}
|
.tit{
|
width: 100%;
|
height: 122px;
|
background: url("../../../../../assets/warningScreen/pagebg-t.png") no-repeat center;
|
background-size: 100% 100%;
|
|
|
.title{
|
width: 100%;
|
height: 122px;
|
line-height: 112px;
|
border-radius: 8px;
|
margin-bottom: 20px;
|
font-size: 2.8rem;
|
color: #11feee;
|
font-weight: bolder;
|
text-align: center;
|
letter-spacing: 5px;
|
}
|
}
|
|
.chart-cont{
|
width: 100%;
|
padding: 20px;
|
height: calc(92vh - 122px);
|
display: flex;
|
align-items: flex-start;
|
justify-content: space-between;
|
|
.chart{
|
width: calc((100% - 20px) * 0.63);
|
height: 100%;
|
padding: 3%;
|
background: url("../../../../../assets/warningScreen/pagebg-l.png") no-repeat center;
|
background-size: 100% 100%;
|
position: relative;
|
.selector-2{
|
position: absolute;
|
top: 5%;
|
right: 10%;
|
width: 20%;
|
font-size: 1.25rem;
|
color: #fff;
|
}
|
.main-chart{
|
width: 100%;
|
height: 100%;
|
}
|
}
|
.chart-right{
|
width: calc((100% - 20px) * 0.37);
|
height: 100%;
|
.charts-des{
|
height: 90%;
|
padding: 4%;
|
background: url("../../../../../assets/warningScreen/pagebg-r.png") no-repeat center;
|
background-size: 100% 100%;
|
|
.dark-desc{
|
width: 100%;
|
height: 100%;
|
|
.des-tit{
|
width: 100%;
|
&>div{
|
font-size: 1.5rem;
|
height: 2.2rem;
|
line-height: 2.2rem;
|
text-align: center;
|
font-weight: bolder;
|
color: #11FEEE;
|
}
|
}
|
.des-main{
|
width: 100%;
|
height: calc(96% - 2.2rem);
|
padding: 1rem;
|
overflow: auto;
|
color: #11FEEE;
|
|
&::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
|
&::scrollbar { width: 0; height: 0; color: transparent; }
|
|
&>div{
|
margin-bottom: 1rem;
|
&>h4{
|
font-size: 1.25rem;
|
display: flex;
|
align-items: center;
|
|
span{
|
margin-right: 10px;
|
}
|
&:first-of-type{
|
margin-bottom: 10px;
|
}
|
}
|
&>p{
|
font-size: 1rem;
|
margin-top: 10px;
|
}
|
.active{
|
background: rgba(255,255,255,.2);
|
}
|
}
|
}
|
}
|
}
|
}
|
|
}
|
}
|
.light-page{
|
width: 100%;
|
height: 100%;
|
border:1px #5a5959 solid;
|
background: #F0F0F0;
|
padding: 4%;
|
.btns{
|
position: fixed;
|
width: 8%;
|
height: 6%;
|
right: 5%;
|
top: 1.25rem;
|
font-size: 1.125rem;
|
color: #333;
|
cursor: pointer;
|
}
|
.tit{
|
width: 100%;
|
height: 122px;
|
background: url("../../../../../assets/warningScreen/pagebg-t-light.png") no-repeat center;
|
background-size: 100% 100%;
|
|
|
.title{
|
width: 100%;
|
height: 122px;
|
line-height: 112px;
|
border-radius: 8px;
|
margin-bottom: 20px;
|
font-size: 2.8rem;
|
color: #333;
|
font-weight: bolder;
|
text-align: center;
|
letter-spacing: 5px;
|
}
|
}
|
|
.chart-cont{
|
width: 100%;
|
padding: 20px;
|
height: calc(92vh - 122px);
|
display: flex;
|
align-items: flex-start;
|
justify-content: space-between;
|
|
.chart{
|
width: calc((100% - 20px) * 0.63);
|
height: 100%;
|
padding: 3%;
|
background: url("../../../../../assets/warningScreen/pagebg-l-light.png") no-repeat center;
|
background-size: 100% 100%;
|
position: relative;
|
.selector-2{
|
position: absolute;
|
top: 5%;
|
right: 10%;
|
width: 20%;
|
font-size: 1.25rem;
|
color: #fff;
|
}
|
.main-chart{
|
width: 100%;
|
height: 100%;
|
}
|
}
|
.chart-right{
|
width: calc((100% - 20px) * 0.37);
|
height: 100%;
|
|
.charts-des{
|
height: 90%;
|
padding: 4%;
|
background: url("../../../../../assets/warningScreen/pagebg-r-light.png") no-repeat center;
|
background-size: 100% 100%;
|
|
.light-desc{
|
width: 100%;
|
height: 100%;
|
|
.des-tit{
|
width: 100%;
|
&>div{
|
font-size: 1.5rem;
|
height: 2.2rem;
|
line-height: 2.2rem;
|
text-align: center;
|
font-weight: bolder;
|
color: #333;
|
}
|
}
|
.des-main{
|
width: 100%;
|
height: calc(96% - 2.2rem);
|
padding: 1rem;
|
overflow: auto;
|
color: #333;
|
|
&::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
|
&::scrollbar { width: 0; height: 0; color: transparent; }
|
|
&>div{
|
margin-bottom: 1rem;
|
&>h4{
|
font-size: 1.25rem;
|
display: flex;
|
align-items: center;
|
|
span{
|
margin-right: 10px;
|
}
|
&:first-of-type{
|
margin-bottom: 10px;
|
}
|
}
|
|
&>p{
|
font-size: 1rem;
|
margin-top: 10px;
|
}
|
}
|
}
|
}
|
}
|
}
|
|
}
|
}
|
</style>
|