bodyCenterRight.vue
2.28 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
<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: 0.5vw">
<span style="padding: 0" class="div-span-title">机床运行效率</span>
</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) {
const newList = data.map((item) => {
return {
...item,
oee: item.oee.replace('%', ''),
utilization: item.utilization.replace('%', ''),
}
})
let oee = newList.map((item) => item.oee)
let utilization = newList.map((item) => item.utilization)
let nameArr = newList.map((item) => item.equipmentName)
let myChart = this.$echarts.init(document.getElementById('warehouseHealth'))
this.warehouseHealthOption.series[0].data = oee
this.warehouseHealthOption.series[1].data = utilization
this.warehouseHealthOption.xAxis.data = nameArr
myChart.clear()
myChart.setOption(this.warehouseHealthOption)
window.onresize = 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>