CN-906 fix: 修复一系列问题

This commit is contained in:
chenjinsong
2023-03-08 17:35:22 +08:00
parent 801858c07d
commit 43c79b94f1
3 changed files with 80 additions and 54 deletions

View File

@@ -55,23 +55,7 @@ export default {
})
},
tableDataSort (item) {
/*let orderBy = ''
if (item.order === 'ascending') {
if (item.prop === 'lastTime') {
orderBy = chartTableOrderOptionsMapping[item.prop]
} else {
orderBy = item.prop
}
orderBy = chartTableOrderOptionsMapping[item.prop] || item.prop
}
if (item.order === 'descending') {
if (item.prop === 'lastTime') {
orderBy = '-' + chartTableOrderOptionsMapping[item.prop]
} else {
orderBy = '-' + item.prop
}
}*/
const orderBy = (item.order === 'descending' ? '-' : '') + (chartTableOrderOptionsMapping[item.prop] || item.prop)
const orderBy = (item.order === 'descending' ? '-' : '') + (item.prop ? (chartTableOrderOptionsMapping[item.prop] || item.prop) : '')
this.$emit('orderBy', orderBy)
}
}