fix:日期查询的时候清空报错改正
This commit is contained in:
parent
a0225cdc72
commit
be2ba954ff
|
@ -638,7 +638,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -651,6 +653,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -661,7 +661,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -674,6 +676,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -816,7 +816,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -829,6 +831,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -902,7 +902,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -915,6 +917,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -873,7 +873,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -886,6 +888,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -649,7 +649,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "month") {
|
if (this.typeRadio == "month") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -657,6 +659,13 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
this.getMonthData(val);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (this.typeRadio == "month") {
|
||||||
|
this.getDayData(that.year, that.month);
|
||||||
|
} else {
|
||||||
|
this.getMonthData(that.year);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//获取天数据
|
//获取天数据
|
||||||
getDayData(year, month) {
|
getDayData(year, month) {
|
||||||
|
|
|
@ -813,7 +813,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -826,7 +828,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -554,7 +554,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "month") {
|
if (this.typeRadio == "month") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -562,7 +564,13 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
this.getMonthData(val);
|
||||||
}
|
}
|
||||||
this.searchDate;
|
} else {
|
||||||
|
if (this.typeRadio == "month") {
|
||||||
|
this.getDayData(that.year, that.month);
|
||||||
|
} else {
|
||||||
|
this.getMonthData(that.year);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//获取天数据
|
//获取天数据
|
||||||
getDayData(year, month) {
|
getDayData(year, month) {
|
||||||
|
|
|
@ -1010,7 +1010,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -1023,6 +1025,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -798,7 +798,9 @@ export default {
|
||||||
this.searchDate = "";
|
this.searchDate = "";
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "day") {
|
if (this.typeRadio == "day") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -811,6 +813,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
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) {
|
getHourData(year, month, days) {
|
||||||
|
|
|
@ -574,6 +574,7 @@ export default {
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
if (val !== null) {
|
||||||
if (this.typeRadio == "month") {
|
if (this.typeRadio == "month") {
|
||||||
let year = val.split("-")[0];
|
let year = val.split("-")[0];
|
||||||
let month = val.split("-")[1];
|
let month = val.split("-")[1];
|
||||||
|
@ -582,6 +583,13 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getMonthData(val);
|
this.getMonthData(val);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (this.typeRadio == "month") {
|
||||||
|
this.getDayData(that.year, that.month);
|
||||||
|
} else {
|
||||||
|
this.getMonthData(that.year);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//获取天数据
|
//获取天数据
|
||||||
getDayData(year, month) {
|
getDayData(year, month) {
|
||||||
|
|
Loading…
Reference in New Issue