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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
| <template>
| <div class="zykTest">
| <div class="chartCon">
| <layout-box title="放电和充电电流">
| <lattice-bar id="latticeBar" ref="latticeBar"></lattice-bar>
| </layout-box>
| </div>
| <div class="chartCon">
| <layout-box title="整流器">
| <img-pie-chart id="ImgPieChart" ref="ImgPieChart"></img-pie-chart>
| </layout-box>
| </div>
| <div class="chartCon">
| <layout-box title="电池组">
| <triangle-bar-chart id="TriangleBarChart" ref="TriangleBarChart"></triangle-bar-chart>
| </layout-box>
| </div>
| <div class="chartCon">
| <layout-box title="电池状态">
| <div class="flexCon">
| <div class="con">
| <abeam-pro-chart id="AbeamProChart" ref="AbeamProChart"></abeam-pro-chart>
| </div>
| </div>
| </layout-box>
| </div>
| <div class="chartCon">
| <layout-box title="电源状态">
| <div class="chartItem">
| <pross-pie-chart id="ProssPieChart1" ref="ProssPieChart1"></pross-pie-chart>
| </div>
| <div class="chartItem">
| <pross-pie-chart id="ProssPieChart2" ref="ProssPieChart2"></pross-pie-chart>
| </div>
| <div class="chartItem">
| <pross-pie-chart id="ProssPieChart3" ref="ProssPieChart3"></pross-pie-chart>
| </div>
| <div class="chartItem">
| <pross-pie-chart id="ProssPieChart4" ref="ProssPieChart4"></pross-pie-chart>
| </div>
| </layout-box>
| </div>
| </div>
| </template>
|
| <script>
| import latticeBar from '../components/charts/latticeBar.vue'
| import LayoutBox from "@/components/LayoutBox";
| import ImgPieChart from '../components/charts/imgPieChart.vue';
| import TriangleBarChart from '../components/charts/triangleBarChart.vue';
| import AbeamProChart from '../components/charts/abeamProChart.vue';
| import ProssPieChart from '../components/charts/prossPieChart.vue';
| export default {
| components: {
| latticeBar,
| LayoutBox,
| ImgPieChart,
| TriangleBarChart,
| AbeamProChart,
| ProssPieChart
| },
| data() {
| return {
|
| }
| },
| mounted() {
| this.$refs.latticeBar.setData({
| xData: ['高告警数量', '告警总数', '告警总数比例', '告警机房总数', '告警机房数比例'],
| series: [{
| name: '放电',
| data: [120, 220, 150, 80, 70],
| color: '#90ec7d'
| }, {
| name: '充电',
| data: [80, 160, 120, 310, 50],
| color: '#ff6b6b'
| }]
| });
| this.$refs.ImgPieChart.setData([{
| value: 30,
| name: '整流器交流异常'
| },
| {
| value: 22,
| name: '整流器过流'
| },
| {
| value: 120,
| name: '总故障'
| },
| {
| value: 50,
| name: '整流器欠压'
| },
| ]);
| this.$refs.TriangleBarChart.setData({
| xData: ['熔断', '电压低', '下电', '充电过流'],
| data: [35, 72, 55, 45]
| });
| this.$refs.AbeamProChart.setData({
| yData: ['浮充数量', '放电数量', '充电数量'],
| color: ['#f58881', '#b4d465', '#ffcb29'],
| bgColor: ['rgba(245,136,129,0.35)', 'rgba(255,255,255,0.35)', 'rgba(255,203,41,0.35)'],
| data: [32, 15, 20]
| });
| this.$refs.ProssPieChart1.setData({
| title: '交流停电数量',
| data: 56,
| color: '#37a9b3'
| });
| this.$refs.ProssPieChart2.setData({
| title: '机房告警数',
| data: 12,
| color: '#f3535f'
| });
| this.$refs.ProssPieChart3.setData({
| title: '直流电压超限数',
| data: 21,
| unit: '%',
| color: '#ff8b00'
| });
| this.$refs.ProssPieChart4.setData({
| title: '负载熔断数量',
| data: 8,
| color: '#757ffb'
| });
| },
| }
| </script>
|
| <style scoped>
| .zykTest {
| width: 100%;
| height: 100%;
| }
|
| .chartCon {
| width: 33.33%;
| height: 50%;
| padding: 10px;
| float: left;
| box-sizing: border-box;
| }
|
| .flexCon {
| width: 100%;
| height: 100%;
| display: flex;
| justify-content: center;
| align-items: center;
| }
|
| .flexCon .con {
| width: 100%;
| height: 60%;
| }
|
| .chartCon .chartItem {
| width: 50%;
| height: 48%;
| float: left;
| margin-bottom: 2%;
| }
| </style>
|
|