NEZ-2836 fix: .range.text变量语法修改

This commit is contained in:
zyh
2024-04-24 11:42:48 +08:00
parent c8cd1bb1e6
commit a8771e1a81
2 changed files with 9 additions and 13 deletions

View File

@@ -120,17 +120,17 @@ export default {
if (parseInt(range) > 60) {
const second = parseInt(range) % 60
let min = parseInt(range / 60)
time = min + 'min' + second + 's'
time = min + 'm' + (second ? (second + 's') : '')
if (min > 60) {
if (min >= 60) {
min = parseInt(range / 60) % 60
let hour = parseInt(parseInt(range / 60) / 60)
time = hour + 'h' + min + 'min'
let hour = parseInt(range / 60 / 60)
time = hour + 'h' + (min ? (min + 'm') : '')
if (hour > 24) {
hour = parseInt(parseInt(range / 60) / 60) % 24
const day = parseInt(parseInt(parseInt(range / 60) / 60) / 24)
time = day + 'd' + hour + 'h'
if (hour >= 24) {
hour = parseInt(range / 60 / 60) % 24
const day = parseInt(range / 60 / 60 / 24)
time = day + 'd' + (hour ? (hour + 'h') : '')
}
}
}

View File

@@ -170,11 +170,7 @@ export default {
* search content filter
*/
if (this.search) {
list = list.filter(val => {
console.log(val[this.searchColumn])
console.log(this.searchColumn)
return new RegExp(this.search.toLowerCase()).test(val[this.searchColumn].toLowerCase())
})
list = list.filter(val => new RegExp(this.search.toLowerCase()).test(val[this.searchColumn].toLowerCase()))
}
this.totalRows = list.length