fix bugs
This commit is contained in:
parent
6702521f31
commit
9ed4c944c5
@ -36,10 +36,10 @@ export default {
|
|||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
icon: 'roundRect',
|
icon: 'roundRect',
|
||||||
itemWidth: 12,
|
itemWidth: 12,
|
||||||
itemHeight: 12,
|
itemHeight: 12,
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '12%',
|
top: '12%',
|
||||||
left: '6%',
|
left: '6%',
|
||||||
@ -63,8 +63,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
// todo
|
name: ['设备CT', '设备TT', '产线CT', '产线TT'][this.activeIndex],
|
||||||
name: '产线TT',
|
|
||||||
nameLocation: 'end',
|
nameLocation: 'end',
|
||||||
nameGap: 28,
|
nameGap: 28,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
@ -132,51 +131,71 @@ export default {
|
|||||||
const eqCt = this.tableData.map((row) => ({
|
const eqCt = this.tableData.map((row) => ({
|
||||||
name: row.equName,
|
name: row.equName,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
symbolSize: 8,
|
symbolSize: 8,
|
||||||
data: this.getListFromTableRow(row, '_eq_ct'),
|
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;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
const eqTt = this.tableData.map((row) => ({
|
const eqTt = this.tableData.map((row) => ({
|
||||||
name: row.equName,
|
name: row.equName,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
symbolSize: 8,
|
symbolSize: 8,
|
||||||
data: this.getListFromTableRow(row, '_eq_tt'),
|
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;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
const plCt = this.tableData.map((row) => ({
|
const plCt = this.tableData.map((row) => ({
|
||||||
name: row.equName,
|
name: row.equName,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
symbolSize: 8,
|
symbolSize: 8,
|
||||||
data: this.getListFromTableRow(row, '_pl_ct'),
|
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;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
const plTt = this.tableData.map((row) => ({
|
const plTt = this.tableData.map((row) => ({
|
||||||
name: row.equName,
|
name: row.equName,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
symbolSize: 8,
|
symbolSize: 8,
|
||||||
data: this.getListFromTableRow(row, '_pl_tt'),
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
const eqCt2 = this.tableData.map((row) => ({
|
const eqCt2 = this.tableData.map((row) => ({
|
||||||
name: row.equName,
|
name: row.equName,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
symbolSize: 8,
|
symbolSize: 8,
|
||||||
data: this.getListFromTableRow(row, '_eq_ct'),
|
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,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -80,6 +80,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-if="open"
|
v-if="open"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
v-model="queryParams.equipmentId"
|
v-model="queryParams.equipmentId"
|
||||||
placeholder="请选择一个设备">
|
placeholder="请选择一个设备">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -115,12 +115,12 @@ export default {
|
|||||||
vm.$set(
|
vm.$set(
|
||||||
vm.searchBarFormConfig[0],
|
vm.searchBarFormConfig[0],
|
||||||
'defaultSelect',
|
'defaultSelect',
|
||||||
to.params.equipmentCode
|
to.params.equipmentName
|
||||||
);
|
);
|
||||||
vm.$set(
|
vm.$set(
|
||||||
vm.searchBarFormConfig[1],
|
vm.searchBarFormConfig[1],
|
||||||
'defaultSelect',
|
'defaultSelect',
|
||||||
to.params.equipmentName
|
to.params.equipmentCode
|
||||||
);
|
);
|
||||||
vm.handleQuery();
|
vm.handleQuery();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user