bodyCenterRight.vue
2.5 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
<template>
<div class="dv-content-body-center-list-right">
<dv-border-box-12>
<div class="div-center-d">
<div class="stuts-style" style="padding-top: 2px">
<span style="padding: 0" class="div-span-title">{{ $gl('running state of stacking machine') }} </span>
<div>
<div class="yuxing">
<div class="yuxing-style"></div>
</div>
<span>运行</span>
</div>
<div>
<div class="daiji">
<div class="daiji-style"></div>
</div>
<span>待机</span>
</div>
<div>
<div class="guzhang">
<div class="guzhang-style"></div>
</div>
<span>故障</span>
</div>
</div>
<div class="dv-content-body-center-list-barChart" id="warehouseHealth"></div>
</div>
</dv-border-box-12>
</div>
</template>
<script>
export default {
data() {
return {
sysData: {
getwarehouseHealth: null,
},
getwarehouseHealth: null,
warehouseHealthOption: window.warehouseHealthOption,
}
},
methods: {
// 中间柱状图
bingDataSource(data) {
let myChart = this.$echarts.init(document.getElementById('warehouseHealth'))
this.warehouseHealthOption.series[0].data = data.running
this.warehouseHealthOption.series[1].data = data.free
this.warehouseHealthOption.series[2].data = data.error
this.warehouseHealthOption.xAxis.data = data.xSeries
myChart.clear()
myChart.setOption(this.warehouseHealthOption)
// window.onresize = myChart.resize
window.addEventListener('resize', function() {
myChart.resize()
})
},
},
}
</script>
<style lang="less" scoped>
.dv-content-body-center-list-right {
width: 33vw;
height: 95%;
box-sizing: border-box;
.stuts-style {
display: flex;
height: 20%;
font-weight: 800;
font-size: 1.3vw;
color: aliceblue;
text-indent: 1vw;
box-sizing: border-box;
div {
display: flex;
margin-left: 1vw;
.yuxing {
position: relative;
}
.yuxing-style {
position: absolute;
left: -1.7vw;
top: 0.6vw;
width: 0.5vw;
height: 0.5vw;
background-color: #04efcd;
}
.daiji {
position: relative;
}
.daiji-style {
position: absolute;
left: -1.7vw;
top: 0.6vw;
width: 0.5vw;
height: 0.5vw;
background-color: #fdb300;
}
.guzhang {
position: relative;
}
.guzhang-style {
position: absolute;
left: -1.7vw;
top: 0.6vw;
width: 0.5vw;
height: 0.5vw;
background-color: #f43d33;
}
}
}
.dv-content-body-center-list-barChart {
width: 100%;
height: 23.5vh;
}
}
</style>