This commit is contained in:
lb
2023-09-25 15:47:39 +08:00
parent 56f209a27e
commit bbbfa9644d
10 changed files with 296 additions and 43 deletions

View File

@@ -37,8 +37,14 @@ export default {
option() {
const opt = [];
this.list.map((eq) => {
/** [设备名, ok数量, 不ok数量] */
opt.push([eq.equipmentName, eq.okQuantity, eq.nokQuantity]);
/** [设备名, ok数量, 不ok数量, 加工数量, 合格率] */
opt.push([
eq.equipmentName,
eq.okQuantity,
eq.nokQuantity,
eq.totalQuantity,
eq.passRate.toFixed(2),
]);
});
return {
color: ['#288AFF', '#8EF0AB'],
@@ -51,7 +57,7 @@ export default {
legend: {
itemWidth: 12,
itemHeight: 12,
right: 0
right: 0,
},
grid: {
left: '1%',
@@ -104,6 +110,17 @@ export default {
stack: 's',
data: opt.map((item) => item[2]),
},
{
name: '加工数量',
type: 'bar',
barWidth: 20,
data: opt.map((item) => item[3]),
},
{
name: '合格率',
type: 'line',
data: opt.map((item) => item[4]),
},
],
};
},