<template>
|
<div class="societyGovern">
|
<div class="topBtnRow">
|
<!-- <button class="buttonStyle" @click="chenge('OverviewScenicSpots')">景区概览</button>
|
<button class="buttonStyle" @click="chenge('MonitoringEarlyWarning')">监测预警</button>
|
<button class="buttonStyle" @click="chenge('VideoFusion')">视频融合</button>
|
<button class="buttonStyle" style="margin-right: 0px;" @click="chenge('PopularAttractions')">热门景点</button> -->
|
<!-- <div class="topBtn" :style="{ backgroundImage: 'url(' + (active == 1 ? coverImgUrl : uncoverImgUrl) + ')' }"
|
@click="chenge('OverviewScenicSpots', '1')">
|
景区概览</div>
|
<div class="topBtn" :style="{ backgroundImage: 'url(' + (active == 2 ? coverImgUrl : uncoverImgUrl) + ')' }"
|
@click="chenge('MonitoringEarlyWarning', '2')">
|
监测预警</div>
|
<div class="topBtn" :style="{ backgroundImage: 'url(' + (active == 3 ? coverImgUrl : uncoverImgUrl) + ')' }"
|
@click="chenge('VideoFusion', '3')">
|
视频融合</div>
|
<div class="topBtn" :style="{ backgroundImage: 'url(' + (active == 4 ? coverImgUrl : uncoverImgUrl) + ')' }"
|
@click="chenge('PopularAttractions', '4')">
|
热门景点</div> -->
|
</div>
|
<OverviewScenicSpots v-show="typeIdx == 1" class="subassembly"></OverviewScenicSpots>
|
<MonitoringEarlyWarning v-show="typeIdx == 2" class="subassembly"></MonitoringEarlyWarning>
|
<PopularAttractions v-show="typeIdx == 3" class="subassembly"></PopularAttractions>
|
<VideoFusion v-show="typeIdx == 4" class="subassembly"></VideoFusion>
|
</div>
|
</template>
|
|
<script>
|
import MonitoringEarlyWarning from "./subassembly/MonitoringEarlyWarning.vue";
|
import OverviewScenicSpots from "./subassembly/OverviewScenicSpots.vue";
|
import PopularAttractions from "./subassembly/PopularAttractions.vue";
|
import VideoFusion from "./subassembly/VideoFusion.vue";
|
|
import publicToilets from "./publicToilets.vue";
|
import manholeCoverMag from "./manholeCoverMag.vue";
|
import manholeCoverWarning from "./manholeCoverWarning.vue";
|
import videoSurveillance from "./videoSurveillance.vue";
|
import waterPointDetection from "./waterPointDetection.vue";
|
export default {
|
name: "societyGovern",
|
components: {
|
VideoFusion,
|
PopularAttractions,
|
OverviewScenicSpots,
|
MonitoringEarlyWarning,
|
publicToilets,
|
manholeCoverMag,
|
manholeCoverWarning,
|
videoSurveillance,
|
waterPointDetection
|
},
|
data() {
|
return {
|
echertGroup: {
|
OverviewScenicSpots: false,
|
PopularAttractions: false,
|
VideoFusion: false,
|
MonitoringEarlyWarning: false,
|
},
|
coverImgUrl: require('@/assets/img/park_btn_active.png'),
|
uncoverImgUrl: require('@/assets/img/park_btn.png'),
|
active: 0,
|
typeIdx: 1,
|
}
|
},
|
methods: {
|
chenge(str, index) {
|
if (this.active == index) {
|
this.active = 0
|
} else {
|
this.active = index
|
}
|
for (let key in this.echertGroup) this.echertGroup[key] = false
|
this.echertGroup[str] = true
|
this.$store.commit("changeEchartsUpdata", this.$store.state.echartsUpdata + 1);
|
}
|
},
|
watch: {
|
"$store.state.currentMenu": function (val) {
|
let index = 0
|
console.log("type",val)
|
switch (val) {
|
case '景区概览':
|
index = 1
|
break;
|
|
case '监测预警':
|
index = 2
|
break;
|
|
case '融合监控':
|
index = 3
|
break;
|
|
case '热门景点':
|
index = 4
|
break;
|
|
default:
|
index = 0
|
break;
|
}
|
if (this.typeIdx == index) {
|
// this.typeIdx = 0
|
} else {
|
this.typeIdx = index
|
}
|
console.log(this.typeIdx)
|
|
this.$nextTick(() => [
|
window.dispatchEvent(new Event('resize'))//初始化echarts
|
])
|
}
|
},
|
|
|
}
|
</script>
|
|
<style scoped lang="less">
|
.societyGovern {
|
height: 100%;
|
width: 100%;
|
position: absolute;
|
top: 0;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
pointer-events: none;
|
|
.topBtnRow {
|
position: absolute;
|
bottom: 140px;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
gap: 20px;
|
pointer-events: all;
|
display: flex;
|
flex-direction: row;
|
justify-content: center;
|
|
.topBtn {
|
width: 104.5px;
|
height: 38px;
|
display: flex;
|
flex-direction: row;
|
justify-content: center;
|
/*
|
//align-items: center;
|
*/
|
line-height: 3;
|
font-size: 11px;
|
color: #ffffff;
|
cursor: pointer;
|
|
background-image: url("~@/assets/img/topBtnBack.png");
|
background-repeat: no-repeat;
|
background-size: 100% 100%;
|
letter-spacing: 1.1px;
|
text-shadow: -0.87px 0.5px 4px 0px rgba(5, 27, 54, 0.42);
|
font-weight: 700;
|
}
|
}
|
|
.subassembly {
|
height: 100%;
|
width: 100%;
|
pointer-events: none;
|
}
|
|
.bottom {
|
position: absolute;
|
bottom: 150px;
|
width: 40%;
|
height: 40px;
|
left: 50%;
|
margin-left: -20%;
|
pointer-events: auto;
|
|
.buttonStyle {
|
width: 22%;
|
height: 100%;
|
color: #fff;
|
margin-right: 4%;
|
background-color: rgba(60, 60, 60, 0.5);
|
border: 1px solid #aaa;
|
}
|
|
.buttonStyle:hover {
|
background-color: rgba(90, 90, 90, 0.5);
|
cursor: pointer;
|
}
|
}
|
|
.aside {
|
width: 20%;
|
height: auto;
|
padding-top: 80px;
|
padding-bottom: 60px;
|
color: aliceblue;
|
|
.asideContent {
|
height: 952.5px;
|
background-color: rgba(24, 47, 78, 0.5);
|
border-radius: 10px;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
}
|
}
|
</style>
|