This commit is contained in:
binbin_pan 2024-04-28 15:43:19 +08:00
parent c6e9d286dc
commit 8ac830e90a
1 changed files with 5 additions and 8 deletions

View File

@ -148,7 +148,7 @@ export default {
},
{
label: '维修状态',
prop: 'repairStatus',
prop: 'statusName',
align: 'center'
}
],
@ -224,6 +224,10 @@ export default {
if (key === 'num2' && data[key]) pieData.push({ value: data[key], name: '维修合格' })
if (key === 'num3' && data[key]) pieData.push({ value: data[key], name: '维修报废' })
}
pieData.sort((a, b) => {
const order = ['待维修', '维修合格', '维修报废'];
return order.indexOf(a.name) - order.indexOf(b.name);
});
data.accessVoList.forEach(item => {
if (item.partName && item.partNum) {
barData.yAxisData.push(item.partName)
@ -233,7 +237,6 @@ export default {
if (barData.yAxisData.length > 5) barData.yAxisData = barData.yAxisData.slice(0, 5)
if (barData.seriesData.length > 5) barData.seriesData = barData.seriesData.slice(0, 5)
console.log('🚀 ~ getChart ~ barData:', barData);
this.myPieChart(pieData)
this.myBarChart(barData)
},
@ -366,9 +369,6 @@ export default {
background-repeat: no-repeat;
background-position: 0 10px;
padding-left: 10px;
.el-form--inline .el-form-item__label {
color: red;
}
.chart {
width: 39vw;
height: 400px;
@ -378,7 +378,4 @@ export default {
margin-left: 60px;
}
}
.el-form-item__label {
font-size: large !important;
}
</style>