From 8d6b620123c29f543b5a5f64116f08215fb365a8 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 25 Jul 2024 16:09:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=BB=E8=A6=81=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=94=B5=E8=80=97=E5=92=8C=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_coal/report.vue | 24 ++++++++++++------------ src/views/enm_kiln/report.vue | 24 ++++++++++++------------ src/views/enm_mill/report.vue | 24 ++++++++++++------------ src/views/enm_pack/report.vue | 14 +++++++------- src/views/enm_rm/report.vue | 24 ++++++++++++------------ src/views/enm_slag/power.vue | 8 ++------ src/views/enm_slag/report.vue | 16 +++++++++------- 7 files changed, 66 insertions(+), 68 deletions(-) diff --git a/src/views/enm_coal/report.vue b/src/views/enm_coal/report.vue index d1bc32a6..87321185 100644 --- a/src/views/enm_coal/report.vue +++ b/src/views/enm_coal/report.vue @@ -628,9 +628,9 @@ export default { } }); }); - that.getHourData(); - that.getDayData(); - that.getMonthData(); + that.getHourData(year, month, days); + that.getDayData(year, month); + that.getMonthData(year); }); }, methods: { @@ -653,13 +653,13 @@ export default { } }, //获取小时数据 - getHourData() { + getHourData(year, month, days) { let that = this; let query = {}; query.page = 0; - query.year_s = that.year; - query.month_s = that.month; - query.day_s = that.days; + query.year_s = year; + query.month_s = month; + query.day_s = days; query.type = "hour_s"; query.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query).then((response) => { @@ -690,12 +690,12 @@ export default { }); }, //获取天数据 - getDayData() { + getDayData(year, month) { let that = this; let query1 = {}; query1.page = 0; - query1.year_s = that.year; - query1.month_s = that.month; + query1.year_s = year; + query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; this.$API.enm.enstat.req(query1).then((response) => { @@ -726,11 +726,11 @@ export default { }); }, //获取月数据 - getMonthData() { + getMonthData(year) { let that = this; let query2 = {}; query2.page = 0; - query2.year_s = that.year; + query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query2).then((response) => { diff --git a/src/views/enm_kiln/report.vue b/src/views/enm_kiln/report.vue index 937208b1..4b9ebbb2 100644 --- a/src/views/enm_kiln/report.vue +++ b/src/views/enm_kiln/report.vue @@ -892,9 +892,9 @@ export default { } }); }); - that.getHourData(); - that.getDayData(); - that.getMonthData(); + that.getHourData(year, month, days); + that.getDayData(year, month); + that.getMonthData(year); }); }, methods: { @@ -917,13 +917,13 @@ export default { } }, //获取小时数据 - getHourData() { + getHourData(year, month, days) { let that = this; let query = {}; query.page = 0; - query.year_s = that.year; - query.month_s = that.month; - query.day_s = that.days; + query.year_s = year; + query.month_s = month; + query.day_s = days; query.type = "hour_s"; query.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query).then((response) => { @@ -960,12 +960,12 @@ export default { }); }, //获取天数据 - getDayData() { + getDayData(year, month) { let that = this; let query1 = {}; query1.page = 0; - query1.year_s = that.year; - query1.month_s = that.month; + query1.year_s = year; + query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; this.$API.enm.enstat.req(query1).then((response) => { @@ -1002,11 +1002,11 @@ export default { }); }, //获取月数据 - getMonthData() { + getMonthData(year) { let that = this; let query2 = {}; query2.page = 0; - query2.year_s = that.year; + query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query2).then((response) => { diff --git a/src/views/enm_mill/report.vue b/src/views/enm_mill/report.vue index 409f087c..9d3c935f 100644 --- a/src/views/enm_mill/report.vue +++ b/src/views/enm_mill/report.vue @@ -803,9 +803,9 @@ export default { } }); }); - that.getHourData(); - that.getDayData(); - that.getMonthData(); + that.getHourData(year, month, days); + that.getDayData(year, month); + that.getMonthData(year); }); }, methods: { @@ -829,13 +829,13 @@ export default { this.searchDate; }, //获取小时数据 - getHourData() { + getHourData(year, month, days) { let that = this; let query = {}; query.page = 0; - query.year_s = that.year; - query.month_s = that.month; - query.day_s = that.days; + query.year_s = year; + query.month_s = month; + query.day_s = days; query.type = "hour_s"; query.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query).then((response) => { @@ -870,12 +870,12 @@ export default { }); }, //获取天数据 - getDayData() { + getDayData(year, month) { let that = this; let query1 = {}; query1.page = 0; - query1.year_s = that.year; - query1.month_s = that.month; + query1.year_s = year; + query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; this.$API.enm.enstat.req(query1).then((response) => { @@ -909,11 +909,11 @@ export default { }); }, //获取月数据 - getMonthData() { + getMonthData(year) { let that = this; let query2 = {}; query2.page = 0; - query2.year_s = that.year; + query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query2).then((response) => { diff --git a/src/views/enm_pack/report.vue b/src/views/enm_pack/report.vue index a882abc4..d47879ac 100644 --- a/src/views/enm_pack/report.vue +++ b/src/views/enm_pack/report.vue @@ -545,8 +545,8 @@ export default { } }); }); - that.getDayData(); - that.getMonthData(); + that.getDayData(year, month); + that.getMonthData(year); }); }, methods: { @@ -565,12 +565,12 @@ export default { this.searchDate; }, //获取天数据 - getDayData() { + getDayData(year, month) { let that = this; let query1 = {}; query1.page = 0; - query1.year_s = that.year; - query1.month_s = that.month; + query1.year_s = year; + query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; this.$API.enm.enstat.req(query1).then((response) => { @@ -596,11 +596,11 @@ export default { }); }, //获取月数据 - getMonthData() { + getMonthData(year) { let that = this; let query2 = {}; query2.page = 0; - query2.year_s = that.year; + query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query2).then((response) => { diff --git a/src/views/enm_rm/report.vue b/src/views/enm_rm/report.vue index b552bab2..6cad020f 100644 --- a/src/views/enm_rm/report.vue +++ b/src/views/enm_rm/report.vue @@ -999,9 +999,9 @@ export default { } }); }); - that.getHourData(); - that.getDayData(); - that.getMonthData(); + that.getHourData(year, month, days); + that.getDayData(year, month); + that.getMonthData(year); }); }); }, @@ -1025,13 +1025,13 @@ export default { } }, //获取小时数据 - getHourData() { + getHourData(year, month, days) { let that = this; let query = {}; query.page = 0; - query.year_s = that.year; - query.month_s = that.month; - query.day_s = that.days; + query.year_s = year; + query.month_s = month; + query.day_s = days; query.type = "hour_s"; query.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query).then((response) => { @@ -1066,12 +1066,12 @@ export default { }); }, //获取天数据 - getDayData() { + getDayData(year, month) { let that = this; let query1 = {}; query1.page = 0; - query1.year_s = that.year; - query1.month_s = that.month; + query1.year_s = year; + query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; this.$API.enm.enstat.req(query1).then((response) => { @@ -1105,11 +1105,11 @@ export default { }); }, //获取月数据 - getMonthData() { + getMonthData(year) { let that = this; let query2 = {}; query2.page = 0; - query2.year_s = that.year; + query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query2).then((response) => { diff --git a/src/views/enm_slag/power.vue b/src/views/enm_slag/power.vue index 56ced2de..e436c084 100644 --- a/src/views/enm_slag/power.vue +++ b/src/views/enm_slag/power.vue @@ -322,14 +322,10 @@ 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") { + 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); diff --git a/src/views/enm_slag/report.vue b/src/views/enm_slag/report.vue index ae043809..49efafce 100644 --- a/src/views/enm_slag/report.vue +++ b/src/views/enm_slag/report.vue @@ -563,8 +563,8 @@ export default { } }); }); - that.getDayData(); - that.getMonthData(); + that.getDayData(year, month); + that.getMonthData(year); }); }, methods: { @@ -572,22 +572,24 @@ 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]; + month = Number(month); this.getDayData(year, month); } else { this.getMonthData(val); } }, //获取天数据 - getDayData() { + getDayData(year, month) { let that = this; let query1 = {}; query1.page = 0; - query1.year_s = that.year; - query1.month_s = that.month; + query1.year_s = year; + query1.month_s = month; query1.type = "day_s"; query1.mgroup = this.query.mgroup; this.$API.enm.enstat.req(query1).then((response) => { @@ -615,11 +617,11 @@ export default { }); }, //获取月数据 - getMonthData() { + getMonthData(year) { let that = this; let query2 = {}; query2.page = 0; - query2.year_s = that.year; + query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; this.$API.enm.enstat.req(query2).then((response) => {