Merge branch 'dev-3.8' of git.mesalab.cn:nezha/nezha-fronted into dev-3.8
This commit is contained in:
@@ -1113,6 +1113,9 @@ export default {
|
||||
if (this.targetTab) {
|
||||
switch (this.targetTab) {
|
||||
case 'alertMessageTab':
|
||||
case 'moduleAlertMessage':
|
||||
case 'endpointAlertMessage':
|
||||
case 'alertRuleAlertMessage':
|
||||
return 'alertmessage'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,10 +381,14 @@ export default {
|
||||
this.oldSearchTime[1] = bus.timeFormate(this.oldSearchTime[1])
|
||||
}
|
||||
}
|
||||
if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && !moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1])) {
|
||||
let isBefore = true
|
||||
if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid()) {
|
||||
isBefore = this.momentStrToTimestamp(this.oldSearchTime[0]) < this.momentStrToTimestamp(this.oldSearchTime[1])
|
||||
}
|
||||
if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && !isBefore) {
|
||||
this.oldSearchTimeError[0] = true
|
||||
this.inputError = this.$t('date.fromGreaterTo')
|
||||
} else if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && moment(this.oldSearchTime[0]).isBefore(this.oldSearchTime[1])) {
|
||||
} else if (moment(this.oldSearchTime[0], timeFormatMain).isValid() && moment(this.oldSearchTime[1], timeFormatMain).isValid() && isBefore) {
|
||||
this.oldSearchTimeError[0] = false
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user