Merge remote-tracking branch 'origin/hainan' into hainan
# Conflicts: # frontend/src/views/machine/freqConverter/components/freqConverterDipChart.vue
This commit is contained in:
@@ -125,23 +125,29 @@ const sortedChartPoints = computed(() => {
|
|||||||
|
|
||||||
const sortedCharacteristicCurveData = computed(() => {
|
const sortedCharacteristicCurveData = computed(() => {
|
||||||
return [...characteristicCurveData.value].sort((a, b) => {
|
return [...characteristicCurveData.value].sort((a, b) => {
|
||||||
if (a.timeMs !== null && b.timeMs !== null && a.timeMs !== b.timeMs) {
|
// 保留1位小数
|
||||||
return a.timeMs - b.timeMs
|
let aResidualVoltage = Math.floor(a.residualVoltage * 10) / 10
|
||||||
}
|
let bResidualVoltage = Math.floor(b.residualVoltage * 10) / 10
|
||||||
|
if (aResidualVoltage != bResidualVoltage) {
|
||||||
if (a.timeMs !== null && b.timeMs === null) {
|
return a.residualVoltage - b.residualVoltage;
|
||||||
return -1
|
} else {
|
||||||
}
|
let aDuration = a.duration * 1000 - a.duration * 1000 % 10
|
||||||
|
let bDuration = b.duration * 1000 - b.duration * 1000 % 10
|
||||||
if (a.timeMs === null && b.timeMs !== null) {
|
if (aDuration != bDuration) {
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.duration !== b.duration) {
|
|
||||||
return a.duration - b.duration
|
return a.duration - b.duration
|
||||||
|
} else if (a.timeMs !== null && b.timeMs !== null && a.timeMs !== b.timeMs) {
|
||||||
|
return a.timeMs - b.timeMs
|
||||||
|
} else {
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return a.residualVoltage - b.residualVoltage
|
// if (a.timeMs !== null && b.timeMs !== null && a.timeMs !== b.timeMs) {
|
||||||
|
// return a.timeMs - b.timeMs
|
||||||
|
// } else {
|
||||||
|
// return 0
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return a.residualVoltage - b.residualVoltage
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user