<template>
|
<div id="pageCont" class="dark-page">
|
<div class="btns">
|
<dv-decoration-11 :color="lineColor" @click="goBack()">
|
<div color-green font-600 bg="~ dark/0">
|
返回
|
</div>
|
</dv-decoration-11>
|
</div>
|
<acc-desc v-show="curChart===1"></acc-desc>
|
<train-desc v-show="curChart===2"></train-desc>
|
<risk-desc v-show="curChart===3"></risk-desc>
|
<spi-desc v-show="curChart===4"></spi-desc>
|
<edu-desc v-show="curChart===5"></edu-desc>
|
<dan-desc v-show="curChart===6"></dan-desc>
|
<pro-desc v-show="curChart===7"></pro-desc>
|
<msg-desc v-show="curChart===8" ref="msgRef"/>
|
<mon-desc v-show="curChart===9"></mon-desc>
|
<sto-desc v-show="curChart===10"></sto-desc>
|
</div>
|
</template>
|
|
<script lang="ts">
|
import screenfull from 'screenfull';
|
import {
|
toRefs,
|
reactive,
|
ref,
|
onMounted,
|
defineComponent,
|
defineAsyncComponent,
|
nextTick,
|
onUnmounted,
|
watchEffect
|
} from 'vue';
|
import { ElTable } from 'element-plus';
|
import { FormInstance, FormRules, ElMessage } from 'element-plus';
|
import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent/index.ts';
|
import {useRoute, useRouter} from 'vue-router';
|
import {hiddenReportApi} from "/@/api/doublePreventSystem/report";
|
import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice/index.ts';
|
import '/@/theme/bigScreen.css'
|
import {useScreenTheme} from "/@/stores/screenTheme"
|
import {storeToRefs} from "pinia";
|
import msgDesc from '/@/views/riskWarningSys/warningBigScreen/indexs/components/msg.vue'
|
|
// 定义接口来定义对象的类型
|
interface stateType {
|
isScreenfull: boolean;
|
curChart: number | null;
|
lineColor: Array<string>
|
}
|
export default defineComponent({
|
name: 'warningPage',
|
components: {
|
accDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/acc.vue')),
|
trainDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/train.vue')),
|
spiDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/spi.vue')),
|
riskDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/risk.vue')),
|
eduDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/edu.vue')),
|
danDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/dan.vue')),
|
proDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/pro.vue')),
|
msgDesc,
|
monDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/mon.vue')),
|
stoDesc: defineAsyncComponent(() => import('/@/views/riskWarningSys/warningBigScreen/indexs/components/sto.vue'))
|
},
|
setup() {
|
const msgRef = ref()
|
const screenThemes = useScreenTheme()
|
const { screenTheme } = storeToRefs(screenThemes);
|
const route = useRoute();
|
const router = useRouter();
|
const state = reactive<stateType>({
|
isScreenfull: false,
|
curChart: null,
|
lineColor: ['#11FEEE'],
|
});
|
|
// 页面载入时执行方法
|
onMounted(() => {
|
console.log(msgRef.value,'val')
|
if (route.query.num) {
|
state.curChart = Number(route.query.num)
|
|
if(route.query.num == '8'){
|
if(route.query.rowIndex){
|
msgRef.value.showDetails(route.query.rowIndex)
|
}else{
|
msgRef.value.showDetails(0)
|
}
|
}
|
}
|
getTheme()
|
});
|
|
watchEffect(() => {
|
|
})
|
|
// 全屏
|
const onScreenfullClick = () => {
|
if (!screenfull.isEnabled) {
|
ElMessage.warning('暂不不支持全屏');
|
return false
|
}
|
screenfull.toggle();
|
screenfull.on('change', () => {
|
if (screenfull.isFullscreen) {
|
state.isScreenfull = true
|
} else {
|
state.isScreenfull = false
|
}
|
});
|
};
|
const getTheme =()=>{
|
if(screenTheme.value.isDark){
|
window.document.getElementById('pageCont').setAttribute( "class", 'dark-page' )
|
state.lineColor = ['#11FEEE']
|
}else{
|
window.document.getElementById('pageCont').setAttribute( "class", 'light-page' )
|
state.lineColor = ['#333','#ccc']
|
}
|
}
|
watchEffect(() => {
|
|
})
|
// 返回上一页
|
const goBack = () => {
|
router.push({
|
name: "warningScreen"
|
});
|
};
|
|
|
return {
|
route,
|
msgRef,
|
onScreenfullClick,
|
goBack,
|
...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(100% - 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%;
|
|
.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: 0 2%;
|
overflow: auto;
|
color: #11FEEE;
|
|
&::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
|
&::scrollbar { width: 0; height: 0; color: transparent; }
|
|
&>div{
|
margin-bottom: 2rem;
|
&>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;
|
}
|
}
|
}
|
}
|
}
|
|
}
|
}
|
.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(100% - 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%;
|
|
.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: 0 2%;
|
overflow: auto;
|
color: #333;
|
|
&::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
|
|
&>div{
|
margin-bottom: 2rem;
|
&>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>
|