|
|
|
@ -74,7 +74,6 @@ const computedColDefs = computed(() => { |
|
|
|
sortable: true, |
|
|
|
sortable: true, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Hex sorting for Point Address and Function Code |
|
|
|
|
|
|
|
if (header === '点位地址' || header === '功能码') { |
|
|
|
if (header === '点位地址' || header === '功能码') { |
|
|
|
def.comparator = (valueA: string, valueB: string) => { |
|
|
|
def.comparator = (valueA: string, valueB: string) => { |
|
|
|
const numA = parseInt(valueA, 16) || 0 |
|
|
|
const numA = parseInt(valueA, 16) || 0 |
|
|
|
@ -83,7 +82,6 @@ const computedColDefs = computed(() => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Numeric sorting for Count and Period |
|
|
|
|
|
|
|
if (header === '点数量' || header === '点读取周期ms') { |
|
|
|
if (header === '点数量' || header === '点读取周期ms') { |
|
|
|
def.comparator = (valueA: string, valueB: string) => { |
|
|
|
def.comparator = (valueA: string, valueB: string) => { |
|
|
|
const numA = parseFloat(valueA) || 0 |
|
|
|
const numA = parseFloat(valueA) || 0 |
|
|
|
@ -95,8 +93,6 @@ const computedColDefs = computed(() => { |
|
|
|
return def |
|
|
|
return def |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
console.log(colDefs) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return colDefs |
|
|
|
return colDefs |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|