代码提交
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 8.3 KiB |
|
@ -1,12 +1,21 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import {ref,onMounted} from "vue";
|
import {ref,shallowRef} from "vue";
|
||||||
|
import overview from '@/views/overview/index.vue' //总览
|
||||||
|
import energyEfficiency from '@/views/energyEfficiency/index.vue' //能效
|
||||||
|
import drainage from '@/views/drainage/index.vue' //排水
|
||||||
|
import airConditioning from '@/views/air-conditioning/index.vue' //空调
|
||||||
|
import lighting from '@/views/lighting/index.vue' //照明
|
||||||
|
import carbonEmission from '@/views/carbonEmission/index.vue' //碳排放
|
||||||
|
|
||||||
|
import screen from '@/views/screen/index.vue' //显示屏
|
||||||
|
import energyMonitoring from '@/views/energyMonitoring/index.vue'
|
||||||
const nowDate = ref('')
|
const nowDate = ref('')
|
||||||
const nowWeek = ref('')
|
const nowWeek = ref('')
|
||||||
const nowMin = ref('')
|
const nowMin = ref('')
|
||||||
|
|
||||||
const timer = ref('')
|
const timer = ref(0)
|
||||||
const getNowDate = (val) =>{
|
const getNowDate = () =>{
|
||||||
nowDate.value = moment().format('YYYY年MM月DD日')
|
nowDate.value = moment().format('YYYY年MM月DD日')
|
||||||
nowWeek.value = moment().format('dddd')
|
nowWeek.value = moment().format('dddd')
|
||||||
nowMin.value = moment().format('HH:mm:ss')
|
nowMin.value = moment().format('HH:mm:ss')
|
||||||
|
@ -15,6 +24,29 @@ getNowDate()
|
||||||
timer.value = setInterval(()=>{
|
timer.value = setInterval(()=>{
|
||||||
getNowDate()
|
getNowDate()
|
||||||
},1000)
|
},1000)
|
||||||
|
const menuList = ref([
|
||||||
|
{name:shallowRef(overview),default:'../../assets/images/menu/overview.png',select:'../../assets/images/menu/overview-select.png'},
|
||||||
|
{name:shallowRef(energyMonitoring),
|
||||||
|
default:'../../assets/images/menu/energy.png',select:'../../assets/images/menu/energy-select.png'},
|
||||||
|
{name:shallowRef(energyEfficiency),default:'../../assets/images/menu/energy-efficiency.png',select:'../../assets/images/menu/energy-efficiency-select.png'},
|
||||||
|
{name:shallowRef(drainage),default:'../../assets/images/menu/drainage.png',select:'../../assets/images/menu/drainage-select.png'},
|
||||||
|
{name:shallowRef(airConditioning),default:'../../assets/images/menu/air-conditioning.png',select:'../../assets/images/menu/air-conditioning-select.png'},
|
||||||
|
{name:shallowRef(lighting),default:'../../assets/images/menu/lighting.png',select:'../../assets/images/menu/lighting-select.png'},
|
||||||
|
{name:shallowRef(carbonEmission),default:'../../assets/images/menu/carbon.png',select:'../../assets/images/menu/carbon-select.png'},
|
||||||
|
{name:shallowRef(screen),default:'../../assets/images/menu/screen.png',select:'../../assets/images/menu/screen-select.png'}
|
||||||
|
])
|
||||||
|
const menuIndex = ref(0)
|
||||||
|
// 菜单切换方法
|
||||||
|
const toggleClick = (item,index) =>{
|
||||||
|
tabName.value = item?.name
|
||||||
|
menuIndex.value = index
|
||||||
|
|
||||||
|
}
|
||||||
|
const tabName = shallowRef(overview)
|
||||||
|
const getImageUrl=(name)=>{
|
||||||
|
return `url(${new URL(name, import.meta.url).href})`
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -42,7 +74,16 @@ timer.value = setInterval(()=>{
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<router-view />
|
<div class="menu">
|
||||||
|
<ul>
|
||||||
|
<li @click="toggleClick(item,index)" v-for="(item,index) in menuList" :style="'background-image:'+ getImageUrl(menuIndex==index?item.select:item.default)" :class="'menu-icon'+index"></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- <overview></overview>-->
|
||||||
|
<!-- <router-view />-->
|
||||||
|
<keep-alive>
|
||||||
|
<component :is="tabName"></component>
|
||||||
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -89,5 +130,26 @@ timer.value = setInterval(()=>{
|
||||||
.weaIcon{
|
.weaIcon{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.menu{
|
||||||
|
position: fixed;
|
||||||
|
bottom: vh(24);
|
||||||
|
z-index:999;
|
||||||
|
left:29.15%;
|
||||||
|
width: vw(800);
|
||||||
|
height: vh(100);
|
||||||
|
ul{
|
||||||
|
//width: 100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
li{
|
||||||
|
list-style: none;
|
||||||
|
cursor: pointer;
|
||||||
|
width:12.5%;
|
||||||
|
height: 100%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -6,7 +6,7 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
p{
|
p,ul,li{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
空调
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
碳排放
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
排水
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
能效
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
照明
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|
|
@ -156,7 +156,9 @@ const drawPowerEcharts = () =>{
|
||||||
<span>实时负荷</span>
|
<span>实时负荷</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="margin10 box-bg">
|
<div class="margin10 box-bg">
|
||||||
|
<div class="">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 气象站-->
|
<!-- 气象站-->
|
||||||
<div class="title margin10">
|
<div class="title margin10">
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
显示屏
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
</style>
|