This commit is contained in:
parent
c6e9d286dc
commit
8ac830e90a
|
|
@ -148,7 +148,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '维修状态',
|
label: '维修状态',
|
||||||
prop: 'repairStatus',
|
prop: 'statusName',
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -224,6 +224,10 @@ export default {
|
||||||
if (key === 'num2' && data[key]) pieData.push({ value: data[key], name: '维修合格' })
|
if (key === 'num2' && data[key]) pieData.push({ value: data[key], name: '维修合格' })
|
||||||
if (key === 'num3' && 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 => {
|
data.accessVoList.forEach(item => {
|
||||||
if (item.partName && item.partNum) {
|
if (item.partName && item.partNum) {
|
||||||
barData.yAxisData.push(item.partName)
|
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.yAxisData.length > 5) barData.yAxisData = barData.yAxisData.slice(0, 5)
|
||||||
if (barData.seriesData.length > 5) barData.seriesData = barData.seriesData.slice(0, 5)
|
if (barData.seriesData.length > 5) barData.seriesData = barData.seriesData.slice(0, 5)
|
||||||
console.log('🚀 ~ getChart ~ barData:', barData);
|
|
||||||
this.myPieChart(pieData)
|
this.myPieChart(pieData)
|
||||||
this.myBarChart(barData)
|
this.myBarChart(barData)
|
||||||
},
|
},
|
||||||
|
|
@ -366,9 +369,6 @@ export default {
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 0 10px;
|
background-position: 0 10px;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
.el-form--inline .el-form-item__label {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
.chart {
|
.chart {
|
||||||
width: 39vw;
|
width: 39vw;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
|
|
@ -378,7 +378,4 @@ export default {
|
||||||
margin-left: 60px;
|
margin-left: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-form-item__label {
|
|
||||||
font-size: large !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue