fix:单位产品电耗日期查询清空时错误改正
This commit is contained in:
parent
09991ac6c9
commit
f40ef04e36
|
@ -388,19 +388,20 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -336,19 +336,20 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -503,19 +503,20 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -340,19 +340,20 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -460,19 +460,20 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -437,19 +437,20 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -331,17 +331,19 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "day") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "day") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
let days = val.split("-")[2];
|
let month = val.split("-")[1];
|
||||||
this.getHourData(year, month, days);
|
let days = val.split("-")[2];
|
||||||
} else if (this.typeRadio == "month") {
|
this.getHourData(year, month, days);
|
||||||
let year = val.split("-")[0];
|
} else if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
this.getDayData(year, month);
|
let month = val.split("-")[1];
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
|
|
|
@ -322,15 +322,16 @@ export default {
|
||||||
},
|
},
|
||||||
dateChange(val) {
|
dateChange(val) {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
if (this.typeRadio == "month") {
|
if (val !== null) {
|
||||||
let year = val.split("-")[0];
|
if (this.typeRadio == "month") {
|
||||||
let month = val.split("-")[1];
|
let year = val.split("-")[0];
|
||||||
month = Number(month);
|
let month = val.split("-")[1];
|
||||||
this.getDayData(year, month);
|
month = Number(month);
|
||||||
} else {
|
this.getDayData(year, month);
|
||||||
this.getMonthData(val);
|
} else {
|
||||||
|
this.getMonthData(val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.searchDate;
|
|
||||||
},
|
},
|
||||||
getTableHourData() {
|
getTableHourData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
Loading…
Reference in New Issue