IonicHelp.vue
3.8 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<template>
<div class="kanban-body">
<el-container>
<el-main>
<div style="margin-top:15px;margin-left:52px; margin-right:51px;">
<div style="height:350px;background:#2c2c2c ;">
</div>
<div style="display:flex; margin-top:20px;" >
<div style="width:275px;height:250px;background:#2c2c2c ;">
</div>
<div style="width:275px;height:250px;background:#2c2c2c ;margin-left:28px;">
</div>
<div style="height: 250px;
width: 220px;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;">
<img style="height:30px;width:30px;" src="../assets/img/print.png" alt="">
<div style="margin-top:15px;font-size:13px;">打印</div>
</div>
</div>
</div>
</el-main>
</el-container>
</div>
</template>
<script>
import echarts from 'echarts'
export default {
name: 'Kanban',
data() {
return {
tabs:[{name:''},{}],
num:0,
activeIndex: '1',
timer:'',
date:new Date()
}
},
components: {
},
computed:{
},
created(){
this.$store.dispatch('showAside');
},
methods:{
tabChange(i){
this.num=i;
},
handleSelect(key, keyPath) {
console.log(key, keyPath);
},
getChart(){
let myChart = echarts.init(this.$refs.chart);
var option = {
legend: {
x:'right',
textStyle:{color:'#FFFF',}
},
dataset: {
source: [
['product', '未开机', '正常', '异常'],
['5', 43.3, 85.8, 93.7],
['10', 43.3, 85.8, 93.7],
['15', 83.1, 73.4, 55.1],
['20', 86.4, 65.2, 82.5],
['25', 72.4, 53.9, 39.1],
['30', 72.4, 53.9, 39.1],
['35', 72.4, 53.9, 39.1],
['40', 72.4, 53.9, 39.1],
['45', 72.4, 53.9, 39.1],
['50', 72.4, 53.9, 39.1],
['55', 72.4, 53.9, 39.1],
['60', 72.4, 53.9, 39.1]
]
},
xAxis: {
type: 'category',
axisLine:{
lineStyle:{
color: '#555556',
}
}
},
yAxis: {
axisLine:{
lineStyle:{
color: '#555556',
}
},
splitLine: {
show: true,
lineStyle: {
color: ['#555556'],
width: 1,
type: 'solid',
},
}
},
series: [
{
type: 'bar',
itemStyle: {
color: '#676867',
},
},
{
type: 'bar',
itemStyle: {
color: '#30ab6f',
},
},
{
type: 'bar',
itemStyle: {
color: '#cc3d1a',
},
}
]
};
// 使用刚指定的配置项和数据显示图表。
// this.myChart.setOption(option);
myChart.setOption(option);
window.onresize = function () {
console.log('reset')
myChart.resize();
}
window.addEventListener("load", myChart.resize());
}
},
mounted() {
// this.getChart();
}
}
</script>
<style scoped lang="less">
</style>