设备故障排序

This commit is contained in:
2022-08-03 11:28:40 +08:00
parent 1dd58f69fa
commit 50754b55d4

View File

@@ -459,7 +459,10 @@ export default {
this.week = `${week}` this.week = `${week}`
}, },
setEchart08 () { setEchart08 () {
var dataLine = this.data06_d1.sort() function paixu (a, b) {
return a - b
}
var dataLine = this.data06_d1.sort(paixu)
let numMax = Math.max.apply(null, dataLine) let numMax = Math.max.apply(null, dataLine)
let manNum = numMax + 1 let manNum = numMax + 1
let positionLeft = 0.4 let positionLeft = 0.4
@@ -503,7 +506,7 @@ export default {
fontSize: '12' fontSize: '12'
} }
}, },
data: this.data06_d0.reverse() // 数组倒序排列 data: this.data06_d0.reverse(paixu) // 数组倒序排列
// data: ['设备01', '设备02', '设备03', '设备04', '设备05'] // data: ['设备01', '设备02', '设备03', '设备04', '设备05']
}, },
{ {