diff --git a/src/views/enm_coal/power.vue b/src/views/enm_coal/power.vue index 2dbd55ce..7cf412a7 100644 --- a/src/views/enm_coal/power.vue +++ b/src/views/enm_coal/power.vue @@ -388,19 +388,20 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this; diff --git a/src/views/enm_coalbase/power.vue b/src/views/enm_coalbase/power.vue index b06655a8..e3459391 100644 --- a/src/views/enm_coalbase/power.vue +++ b/src/views/enm_coalbase/power.vue @@ -336,19 +336,20 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this; diff --git a/src/views/enm_kiln/power.vue b/src/views/enm_kiln/power.vue index 4f0e48e2..d0345584 100644 --- a/src/views/enm_kiln/power.vue +++ b/src/views/enm_kiln/power.vue @@ -503,19 +503,20 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this; diff --git a/src/views/enm_kilnbase/power.vue b/src/views/enm_kilnbase/power.vue index 0b1b1833..f41ac3c4 100644 --- a/src/views/enm_kilnbase/power.vue +++ b/src/views/enm_kilnbase/power.vue @@ -340,19 +340,20 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this; diff --git a/src/views/enm_mill/power.vue b/src/views/enm_mill/power.vue index 732f4eca..3e7ac7e0 100644 --- a/src/views/enm_mill/power.vue +++ b/src/views/enm_mill/power.vue @@ -460,19 +460,20 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this; diff --git a/src/views/enm_rm/power.vue b/src/views/enm_rm/power.vue index 858c6b61..59535506 100644 --- a/src/views/enm_rm/power.vue +++ b/src/views/enm_rm/power.vue @@ -437,19 +437,20 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this; diff --git a/src/views/enm_rmbase/power.vue b/src/views/enm_rmbase/power.vue index 7a2440f7..90bf3def 100644 --- a/src/views/enm_rmbase/power.vue +++ b/src/views/enm_rmbase/power.vue @@ -331,17 +331,19 @@ export default { }, dateChange(val) { 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); - } else { - this.getMonthData(val); + 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); + } } }, getTableHourData() { diff --git a/src/views/enm_slag/power.vue b/src/views/enm_slag/power.vue index e436c084..89be1dd6 100644 --- a/src/views/enm_slag/power.vue +++ b/src/views/enm_slag/power.vue @@ -322,15 +322,16 @@ export default { }, dateChange(val) { console.log(val); - 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); + 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); + } } - this.searchDate; }, getTableHourData() { let that = this;