This commit is contained in:
2023-12-12 10:56:25 +08:00
parent 8fdaa3e968
commit 1661615af4
13 changed files with 661 additions and 153 deletions

View File

@@ -221,18 +221,30 @@ export default {
timeSelect() {
switch (this.queryParams.timeDim) {
case '1':
if (!this.timeValue) {
this.$modal.msgError('时间范围不能为空')
return false
}
if (this.timeValue[1] - this.timeValue[0] > 7*24*3600000) {
this.$modal.msgError('最大时间范围为7天请重新选择')
this.timeValue = []
}
break
case '2':
if (!this.dateValue) {
this.$modal.msgError('时间范围不能为空')
return false
}
if (this.dateValue[1] - this.dateValue[0] > 29*24*3600000) {
this.$modal.msgError('最大时间范围为30天请重新选择') // 自动选择默认是0:00:00要求是23:59:59
this.dateValue = []
}
break
case '4':
if (!this.monthValue) {
this.$modal.msgError('时间范围不能为空')
return false
}
if (this.monthValue[1] - this.monthValue[0] > 729*24*3600000) {
this.$modal.msgError('最大时间范围为24个月请重新选择')// 同理上面
this.monthValue = []
@@ -338,7 +350,7 @@ export default {
}
switch (this.queryParams.timeDim) {
case '1':
if (this.timeValue.length > 0) {
if (this.timeValue && this.timeValue.length > 0) {
this.queryParams.startTime = this.timeValue[0]
this.queryParams.endTime = this.timeValue[1] // 不用转
} else {