fix:日期查询的时候清空报错改正
This commit is contained in:
parent
a0225cdc72
commit
be2ba954ff
|
@ -638,18 +638,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -661,18 +661,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -816,18 +816,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -902,18 +902,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -873,18 +873,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -649,13 +649,22 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
if (this.typeRadio == "month") {
|
||||
this.getDayData(that.year, that.month);
|
||||
} else {
|
||||
this.getMonthData(that.year);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取天数据
|
||||
|
|
|
@ -813,20 +813,30 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
this.searchDate;
|
||||
},
|
||||
//获取小时数据
|
||||
getHourData(year, month, days) {
|
||||
|
|
|
@ -554,15 +554,23 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
if (this.typeRadio == "month") {
|
||||
this.getDayData(that.year, that.month);
|
||||
} else {
|
||||
this.getMonthData(that.year);
|
||||
}
|
||||
}
|
||||
this.searchDate;
|
||||
},
|
||||
//获取天数据
|
||||
getDayData(year, month) {
|
||||
|
|
|
@ -1010,18 +1010,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -798,18 +798,29 @@ export default {
|
|||
this.searchDate = "";
|
||||
},
|
||||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "day") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
let days = val.split("-")[2];
|
||||
this.getHourData(year, month, days);
|
||||
} else if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
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);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取小时数据
|
||||
|
|
|
@ -574,13 +574,21 @@ export default {
|
|||
dateChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
month = Number(month);
|
||||
this.getDayData(year, month);
|
||||
if (val !== null) {
|
||||
if (this.typeRadio == "month") {
|
||||
let year = val.split("-")[0];
|
||||
let month = val.split("-")[1];
|
||||
month = Number(month);
|
||||
this.getDayData(year, month);
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
}
|
||||
} else {
|
||||
this.getMonthData(val);
|
||||
if (this.typeRadio == "month") {
|
||||
this.getDayData(that.year, that.month);
|
||||
} else {
|
||||
this.getMonthData(that.year);
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取天数据
|
||||
|
|
Loading…
Reference in New Issue