index.vue
2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<template>
<div class="container">
<!-- 第一排 -->
<div class="electricity-box">
<!-- 今日用电 -->
<CardOne />
<!-- 用电总计 -->
<CardTwo />
</div>
<!-- 第二排 -->
<div class="history-battery-box">
<!-- 历史用电量详细 -->
<CardThree />
<!-- 用电能耗统计 -->
<CardFour />
</div>
<!-- 第三排 -->
<div class="home-statistics-box">
<!-- 峰谷平用电能耗统计 -->
<CardFive />
</div>
<!-- 第四排 -->
<a-row class="grid-box" :gutter="15">
<a-col :span="12">
<!-- 平均功率因素监控 -->
<CardSix />
</a-col>
<a-col :span="12">
<!-- 用户容量负荷需量监控 -->
<CardSeven />
</a-col>
</a-row>
<!-- 第四排 -->
<a-row class="grid-box" :gutter="15">
<a-col :span="12">
<!-- 有功功率监控 -->
<CardEight />
</a-col>
<a-col :span="12">
<!-- 分组能耗占比 -->
<CardNine />
</a-col>
</a-row>
</div>
</template>
<script setup lang="ts">
import { watchEffect } from 'vue'
import { useCompanyStore } from '@/store'
import { storeToRefs } from "pinia";
//今日用电
import CardOne from './components/card-one.vue';
//用电统计
import CardTwo from './components/card-two.vue';
//历史用电量详细
import CardThree from './components/card-three.vue';
//用电能耗统计
import CardFour from './components/card-four.vue';
//峰谷平用电能耗统计
import CardFive from './components/card-five.vue';
//平均功率因素监控
import CardSix from './components/card-six.vue';
//用电容量负荷需量监控
import CardSeven from './components/card-seven.vue';
//有功功率监控
import CardEight from './components/card-eight.vue';
//分组能耗占比
import CardNine from './components/card-nine.vue';
/*************************** 变量区域 begin ***************************/
// 全局下拉框
const store = useCompanyStore()
const { companyValue } = storeToRefs(store)
watchEffect(() => {
console.log(companyValue.value)
})
/*************************** 变量区域 end ***************************/
</script>
<style lang="less" scoped>
.container {
width: 100%;
height: 100%;
}
.electricity-box {
display: flex;
align-items: center;
justify-content: space-between;
color: #FFF;
height: 160px;
}
//历史用电量详细
.history-battery-box {
display: flex;
margin: 15px 0;
width: 100%;
height: 460px;
.calendar-box {
margin-right: 15px;
width: 52%;
min-width: 550px;
}
.energy-box {
flex: 1;
//width: 48%;
//min-width: 450px;
}
}
.grid-box {
margin-top: 15px;
}
.arco-card {
border-radius: 5px;
}
//设置card 高度(防止echarts 塌陷)
:deep(.history-battery-box) {
.arco-card-body {
width: 100%;
height: calc(100% - 46px);
}
}
</style>