fix bugs
This commit is contained in:
@@ -36,10 +36,10 @@ export default {
|
||||
trigger: 'axis',
|
||||
},
|
||||
legend: {
|
||||
icon: 'roundRect',
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
},
|
||||
icon: 'roundRect',
|
||||
itemWidth: 12,
|
||||
itemHeight: 12,
|
||||
},
|
||||
grid: {
|
||||
top: '12%',
|
||||
left: '6%',
|
||||
@@ -63,8 +63,7 @@ export default {
|
||||
],
|
||||
},
|
||||
yAxis: {
|
||||
// todo
|
||||
name: '产线TT',
|
||||
name: ['设备CT', '设备TT', '产线CT', '产线TT'][this.activeIndex],
|
||||
nameLocation: 'end',
|
||||
nameGap: 28,
|
||||
nameTextStyle: {
|
||||
@@ -132,51 +131,71 @@ export default {
|
||||
const eqCt = this.tableData.map((row) => ({
|
||||
name: row.equName,
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.getListFromTableRow(row, '_eq_ct'),
|
||||
}));
|
||||
this.chart.setOption({ ...this.templateOption, series: eqCt });
|
||||
this.chart.setOption({
|
||||
...this.templateOption,
|
||||
yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
|
||||
series: eqCt,
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
const eqTt = this.tableData.map((row) => ({
|
||||
name: row.equName,
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.getListFromTableRow(row, '_eq_tt'),
|
||||
}));
|
||||
this.chart.setOption({ ...this.templateOption, series: eqTt });
|
||||
this.chart.setOption({
|
||||
...this.templateOption,
|
||||
yAxis: { ...this.templateOption.yAxis, name: '设备TT' },
|
||||
series: eqTt,
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
const plCt = this.tableData.map((row) => ({
|
||||
name: row.equName,
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.getListFromTableRow(row, '_pl_ct'),
|
||||
}));
|
||||
this.chart.setOption({ ...this.templateOption, series: plCt });
|
||||
this.chart.setOption({
|
||||
...this.templateOption,
|
||||
yAxis: { ...this.templateOption.yAxis, name: '产线CT' },
|
||||
series: plCt,
|
||||
});
|
||||
break;
|
||||
case 3:
|
||||
const plTt = this.tableData.map((row) => ({
|
||||
name: row.equName,
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.getListFromTableRow(row, '_pl_tt'),
|
||||
}));
|
||||
this.chart.setOption({ ...this.templateOption, series: plTt });
|
||||
this.chart.setOption({
|
||||
...this.templateOption,
|
||||
yAxis: { ...this.templateOption.yAxis, name: '产线TT' },
|
||||
series: plTt,
|
||||
});
|
||||
break;
|
||||
default:
|
||||
const eqCt2 = this.tableData.map((row) => ({
|
||||
name: row.equName,
|
||||
type: 'line',
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
symbol: 'circle',
|
||||
symbolSize: 8,
|
||||
data: this.getListFromTableRow(row, '_eq_ct'),
|
||||
}));
|
||||
this.chart.setOption({ ...this.templateOption, series: eqCt2 });
|
||||
this.chart.setOption({
|
||||
...this.templateOption,
|
||||
yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
|
||||
series: eqCt2,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user