fix:日期查询的时候清空报错改正

This commit is contained in:
shijing 2024-07-30 14:46:52 +08:00
parent a0225cdc72
commit be2ba954ff
11 changed files with 210 additions and 98 deletions

View File

@ -638,7 +638,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -651,6 +653,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -661,7 +661,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -674,6 +676,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -816,7 +816,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -829,6 +831,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -902,7 +902,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -915,6 +917,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -873,7 +873,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -886,6 +888,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -649,7 +649,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "month") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -657,6 +659,13 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getDayData(year, month) {

View File

@ -813,7 +813,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -826,7 +828,15 @@ export default {
} else {
this.getMonthData(val);
}
this.searchDate;
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -554,7 +554,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "month") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -562,7 +564,13 @@ export default {
} else {
this.getMonthData(val);
}
this.searchDate;
} else {
if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getDayData(year, month) {

View File

@ -1010,7 +1010,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -1023,6 +1025,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -798,7 +798,9 @@ export default {
this.searchDate = "";
},
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "day") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -811,6 +813,15 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "day") {
that.getHourData(that.year, that.month, that.days);
} else if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getHourData(year, month, days) {

View File

@ -574,6 +574,7 @@ export default {
dateChange(val) {
let that = this;
console.log(val);
if (val !== null) {
if (this.typeRadio == "month") {
let year = val.split("-")[0];
let month = val.split("-")[1];
@ -582,6 +583,13 @@ export default {
} else {
this.getMonthData(val);
}
} else {
if (this.typeRadio == "month") {
this.getDayData(that.year, that.month);
} else {
this.getMonthData(that.year);
}
}
},
//
getDayData(year, month) {