From 25e2a1e9d6f803ac83fc0ae3e0fe1db057e0f5a7 Mon Sep 17 00:00:00 2001 From: shijing Date: Mon, 29 Apr 2024 15:10:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:enm=5Fkiln=E5=9B=9E=E8=BD=AC=E7=AA=91mgroup?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=90=8D=E7=A7=B0=E8=8E=B7=E5=8F=96id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_kiln/handoverLog.vue | 692 ++++--- src/views/enm_kiln/power.vue | 1405 +++++++------- src/views/enm_kiln/report.vue | 1814 +++++++++++-------- src/views/enm_kiln/teamAnalysis.vue | 601 +++--- src/views/enm_kiln/workshopAnalysis.vue | 1652 +++++++++-------- src/views/enm_kilnbase/handoverLog.vue | 16 +- src/views/enm_kilnbase/power.vue | 199 +- src/views/enm_kilnbase/report.vue | 400 ++-- src/views/enm_kilnbase/teamAnalysis.vue | 31 +- src/views/enm_kilnbase/workshopAnalysis.vue | 1489 +++++++-------- 10 files changed, 4599 insertions(+), 3700 deletions(-) diff --git a/src/views/enm_kiln/handoverLog.vue b/src/views/enm_kiln/handoverLog.vue index c05840ce..29c1c9cd 100644 --- a/src/views/enm_kiln/handoverLog.vue +++ b/src/views/enm_kiln/handoverLog.vue @@ -1,282 +1,468 @@ - + - \ No newline at end of file diff --git a/src/views/enm_kiln/power.vue b/src/views/enm_kiln/power.vue index 7240fcee..28aa6a62 100644 --- a/src/views/enm_kiln/power.vue +++ b/src/views/enm_kiln/power.vue @@ -1,630 +1,785 @@ \ No newline at end of file +.printContainer { + padding-left: 20px; +} + diff --git a/src/views/enm_kiln/report.vue b/src/views/enm_kiln/report.vue index f82cb63f..4d69b8f7 100644 --- a/src/views/enm_kiln/report.vue +++ b/src/views/enm_kiln/report.vue @@ -1,808 +1,1016 @@ - \ No newline at end of file + diff --git a/src/views/enm_kiln/teamAnalysis.vue b/src/views/enm_kiln/teamAnalysis.vue index e4401707..863c7897 100644 --- a/src/views/enm_kiln/teamAnalysis.vue +++ b/src/views/enm_kiln/teamAnalysis.vue @@ -1,263 +1,348 @@ + 当期值(kgce/t)) + 目标值(kgce/t) + 当期与目标差值(kgce/t) + 环期值(kgce/t) + 当期与环期差值(kgce/t) + 环比增长率(%) + 同比增长率(%) + + 高温风机(kW·h/t) + 篦冷机一室风机(kW·h/t) + 篦冷机三室风机(kW·h/t) + 篦冷机二室风机(kW·h/t) + 窑头排风机(kW·h/t) + 当期值(kW·h/t) + 目标值(kW·h/t) + 当期与目标差值(kW·h/t) + 环期值(kW·h/t) + 当期与环期差值(kW·h/t) + 环比增长率(%) + 同比增长率(%) + + + + + {{ item0 }} + + + + + + + + \ No newline at end of file +.printWrap { + width: 100%; + overflow-x: scroll; +} +.numCell { + width: 100px !important; +} + diff --git a/src/views/enm_kiln/workshopAnalysis.vue b/src/views/enm_kiln/workshopAnalysis.vue index 3d2382b7..ce080efa 100644 --- a/src/views/enm_kiln/workshopAnalysis.vue +++ b/src/views/enm_kiln/workshopAnalysis.vue @@ -1,745 +1,927 @@ +
+ +
+ + + + + + 导出xlsx + + 打印 +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
车间单位产品电耗月度分析表
月份当期值(KW·h/t)目标值(KW·h/t)当期与目标差值(KW·h/t)环期值(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
+
+ + + + + {{ item1 }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ 车间单位产品综合电耗月度分析表 +
月份当期值(KW·h/t)目标值(KW·h/t)国家标准(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
1级2级3级
+
+ + + {{ item1 }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ 车间单位产品标煤耗月度分析表 +
月份当期值(KW·h/t)目标值(KW·h/t)国家标准(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
1级2级3级
+
+ + + {{ item1 }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ 车间单位产品综合能耗月度分析表 +
月份当期值(KW·h/t)目标值(KW·h/t)国家标准(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
1级2级3级
+
+ + + {{ item1 }} +
+
+
+
+
+
+ \ No newline at end of file +.printWrap { + width: 100%; + overflow-x: scroll; +} + diff --git a/src/views/enm_kilnbase/handoverLog.vue b/src/views/enm_kilnbase/handoverLog.vue index 2970b270..d40cfbc4 100644 --- a/src/views/enm_kilnbase/handoverLog.vue +++ b/src/views/enm_kilnbase/handoverLog.vue @@ -263,10 +263,10 @@ export default { team: "", end_time__lt: "", start_time__gte: "", - mgroup: "3347217246321065984", + mgroup: "", }, - deptId: "3347207082608115712", + deptId: "", sflogItem: {}, options: [], optionsShift: [], @@ -276,8 +276,16 @@ export default { }; }, mounted() { - this.getTeam(); - this.getShfit(); + this.$API.mtm.mgroup.list + .req({ page: 0, search: "回转窑" }) + .then((res) => { + console.log("回转窑", res); + this.query.mgroup = res[0].id; + this.apiObj = this.$API.wpm.sflog.list; + this.deptId = res[0].belong_dept; + this.getTeam(); + this.getShfit(); + }); }, methods: { getTeam() { diff --git a/src/views/enm_kilnbase/power.vue b/src/views/enm_kilnbase/power.vue index 6b16cbfe..c5fca9bb 100644 --- a/src/views/enm_kilnbase/power.vue +++ b/src/views/enm_kilnbase/power.vue @@ -177,8 +177,10 @@ export default { }, data() { return { + exportLoading: false, chartShow: false, myOption: null, + timeStamp: null, optionHour: {}, optionDay: {}, optionMonth: {}, @@ -187,7 +189,7 @@ export default { days: 1, hours: 1, query: { - mgroup: "3347217246321065984", + mgroup: "", }, tableName: "主要设备(100KW以上)单位产品电耗数据表", tableDatas: [ @@ -363,98 +365,115 @@ export default { let month_h = hourDate.getMonth() + 1; let days_h = hourDate.getDate(); let hours_h = hourDate.getHours(); - //本月 - let params2 = {}; - params2.page = 0; - params2.year_s = year; - params2.month_s = month; - params2.type = "month_s"; - params2.mgroup = this.query.mgroup; - - this.$API.enm.enstat - .req(params2) - .then((res2) => { - if (res2.length > 0) { - let allValMonth = (that.allValMonth = - res2[0].total_production); //当前条件下的总产量 - params2.mpoint__ep_monitored__power_kw__gte = 100; - this.$API.enm.mpoint.stat.req(params2).then((res) => { - let data2 = res; - for (let i = 0; i < data2.length; i++) { - that.tableDatas[i] = []; - that.tableDatas[i][0] = data2[i].ep_monitored_name; - that.tableDatas[i][1] = - data2[i].ep_monitored_number; - that.tableDatas[i][2] = "KW·h/t"; - let val = - allValMonth == 0 - ? "/" - : (data2[i].val / allValMonth).toFixed(2); - that.tableDatas[i][5] = val; + that.$API.mtm.mgroup.list + .req({ page: 0, search: "回转窑" }) + .then((res) => { + console.log("回转窑", res); + that.query.mgroup = res[0].id; + //本月 + let params2 = {}; + params2.page = 0; + params2.year_s = year; + params2.month_s = month; + params2.type = "month_s"; + params2.mgroup = this.query.mgroup; + this.$API.enm.enstat + .req(params2) + .then((res2) => { + if (res2.length > 0) { + let allValMonth = (that.allValMonth = + res2[0].total_production); //当前条件下的总产量 + params2.mpoint__ep_monitored__power_kw__gte = 100; + this.$API.enm.mpoint.stat + .req(params2) + .then((res) => { + let data2 = res; + for (let i = 0; i < data2.length; i++) { + that.tableDatas[i] = []; + that.tableDatas[i][0] = + data2[i].ep_monitored_name; + that.tableDatas[i][1] = + data2[i].ep_monitored_number; + that.tableDatas[i][2] = "KW·h/t"; + let val = + allValMonth == 0 + ? "/" + : ( + data2[i].val / + allValMonth + ).toFixed(2); + that.tableDatas[i][5] = val; + } + }); } + }) + .then((res2) => { + //昨日 + let params3 = {}; + params3.page = 0; + params3.year_s = year_d; + params3.month_s = month_d; + params3.day_s = days_d; + params3.type = "day_s"; + params3.mgroup = this.query.mgroup; + this.$API.enm.enstat.req(params3).then((res3) => { + if (res3.length > 0) { + let allValDays = (that.allValDays = + res3[0].total_production); + params3.mpoint__ep_monitored__power_kw__gte = 100; + this.$API.enm.mpoint.stat + .req(params3) + .then((res) => { + let data3 = res3; + for (let j = 0; j < data3.length; j++) { + let val = + allValDays == 0 + ? "/" + : ( + data3[j].val / + allValDays + ).toFixed(2); + that.tableDatas[j][4] = val; + } + }); + } + }); + //上小时 + let params4 = {}; + params4.page = 0; + params4.year = year_h; + params4.month = month_h; + params4.day = days_h; + params4.hour = hours_h; + params4.type = "hour_s"; + params4.mgroup = this.query.mgroup; + this.$API.enm.enstat.req(params4).then((res4) => { + if (res4.length > 0) { + let hourProduct = (that.allValHour = + res4[0].total_production); + params4.mpoint__ep_monitored__power_kw__gte = 100; + this.$API.enm.mpoint.stat + .req(params4) + .then((res) => { + let data4 = res4; + for (let k = 0; k < data4.length; k++) { + let val = + hourProduct == 0 + ? "/" + : ( + data4[k].val / + hourProduct + ).toFixed(2); + that.tableDatas[k][3] = val; + } + }); + } + }); }); - } - }) - .then((res2) => { - //昨日 - let params3 = {}; - params3.page = 0; - params3.year_s = year_d; - params3.month_s = month_d; - params3.day_s = days_d; - params3.type = "day_s"; - params3.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params3).then((res3) => { - if (res3.length > 0) { - let allValDays = (that.allValDays = - res3[0].total_production); - params3.mpoint__ep_monitored__power_kw__gte = 100; - this.$API.enm.mpoint.stat.req(params3).then((res) => { - let data3 = res3; - for (let j = 0; j < data3.length; j++) { - let val = - allValDays == 0 - ? "/" - : (data3[j].val / allValDays).toFixed( - 2 - ); - that.tableDatas[j][4] = val; - } - }); - } - }); - //上小时 - let params4 = {}; - params4.page = 0; - params4.year = year_h; - params4.month = month_h; - params4.day = days_h; - params4.hour = hours_h; - params4.type = "hour_s"; - params4.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params4).then((res4) => { - if (res4.length > 0) { - let hourProduct = (that.allValHour = - res4[0].total_production); - params4.mpoint__ep_monitored__power_kw__gte = 100; - this.$API.enm.mpoint.stat.req(params4).then((res) => { - let data4 = res4; - for (let k = 0; k < data4.length; k++) { - let val = - hourProduct == 0 - ? "/" - : (data4[k].val / hourProduct).toFixed( - 2 - ); - that.tableDatas[k][3] = val; - } - }); - } - }); + that.getHourData(); + that.getDayData(); + that.getMonthData(); }); - that.getHourData(); - that.getDayData(); - that.getMonthData(); }, methods: { //获取小时数据 diff --git a/src/views/enm_kilnbase/report.vue b/src/views/enm_kilnbase/report.vue index 0ed72a25..7bf79f6b 100644 --- a/src/views/enm_kilnbase/report.vue +++ b/src/views/enm_kilnbase/report.vue @@ -341,8 +341,10 @@ export default { }, data() { return { + exportLoading: false, chartShow: false, myOption: null, + timeStamp: null, optionHour: {}, optionDay: {}, optionMonth: {}, @@ -351,7 +353,7 @@ export default { days: 1, hours: 1, query: { - mgroup: "3347217246321065984", + mgroup: "", }, tableDatas: [ ["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0], @@ -568,201 +570,219 @@ export default { let month_h = hourDate.getMonth() + 1; let days_h = hourDate.getDate(); let hours_h = hourDate.getHours(); - //昨日 - let params3 = {}; - params3.page = 0; - params3.year_s = year_d; - params3.month_s = month_d; - params3.day_s = days_d; - params3.type = "day_s"; - params3.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params3).then((res3) => { - if (res3.length > 0) { - let data3 = res3[0]; - that.tableDatas[0][3] = data3.total_production; - that.tableDatas[1][3] = data3.production_hour; - that.tableDatas[2][3] = data3.run_hour; - that.tableDatas[3][3] = data3.run_rate; - that.tableDatas[4][3] = data3.elec_consume_unit; - that.tableDatas[5][3] = data3.celec_consume_unit; - that.tableDatas[6][3] = data3.coal_consume_unit; - that.tableDatas[7][3] = data3.cen_consume_unit; - } - }); - //上小时 - let params4 = {}; - params4.page = 0; - params4.year = year_h; - params4.month = month_h; - params4.day = days_h; - params4.hour = hours_h; - params4.type = "hour_st"; - params4.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params4).then((res4) => { - if (res4.length > 0) { - let data4 = res4[0]; - that.tableDatas[0][2] = data4.total_production; - that.tableDatas[4][2] = data4.elec_consume_unit; - that.tableDatas[5][2] = data4.celec_consume_unit; - that.tableDatas[6][2] = data4.coal_consume_unit; - that.tableDatas[7][2] = data4.cen_consume_unit; - } - }); - let params5 = {}; - params5.page = 0; - params5.mgroup = "3346520558031773696"; - this.$API.mtm.goal.list - .req(params5) - .then((res5) => { - if (res5.length > 0) { - let data5 = res5; - data5.forEach((item5) => { - let str = "goal_val_" + that.month; - if (item5.goal_cate_name == "总产量(t)") { - that.tableDatas[0][6] = item5[str]; - that.tableDatas[0][8] = item5.goal_val; - } else if (item5.goal_cate_name == "台时产量(t/h)") { - that.tableDatas[1][6] = item5[str]; - that.tableDatas[1][8] = item5.goal_val; - } else if (item5.goal_cate_name == "运转时间(h)") { - that.tableDatas[2][6] = item5[str]; - that.tableDatas[2][8] = item5.goal_val; - } else if (item5.goal_cate_name == "运转率(%)") { - that.tableDatas[3][6] = item5[str]; - that.tableDatas[3][8] = item5.goal_val; - } else if ( - item5.goal_cate_name == "单位产品分布电耗(KW·h/t)" - ) { - that.tableDatas[4][6] = item5[str]; - that.tableDatas[4][8] = item5.goal_val; - } else if ( - item5.goal_cate_name == "单位产品综合电耗(KW·h/t)" - ) { - that.tableDatas[5][6] = item5[str]; - that.tableDatas[5][8] = item5.goal_val; - } else if ( - item5.goal_cate_name == "单位产品标煤耗(kgce/t)" - ) { - that.tableDatas[6][6] = item5[str]; - that.tableDatas[6][8] = item5.goal_val; - } else if ( - item5.goal_cate_name == "单位产品综合能耗(kgce/t)" - ) { - that.tableDatas[7][6] = item5[str]; - that.tableDatas[7][8] = item5.goal_val; - } - }); - } - }) + that.$API.mtm.mgroup.list + .req({ page: 0, search: "回转窑" }) .then((res) => { - //年 - let params1 = {}; - params1.page = 0; - params1.year_s = year; - params1.type = "year_s"; - params1.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params1).then((res1) => { - if (res1.length > 0) { - let data1 = res1[0]; - that.tableDatas[0][5] = data1.total_production; - that.tableDatas[0][9] = precen( - that.tableDatas[0][5], - that.tableDatas[0][8] - ); - that.tableDatas[1][5] = data1.production_hour; - that.tableDatas[1][9] = precen( - that.tableDatas[1][5], - that.tableDatas[1][8] - ); - that.tableDatas[2][5] = data1.run_hour; - that.tableDatas[2][9] = precen( - that.tableDatas[2][5], - that.tableDatas[2][8] - ); - that.tableDatas[3][5] = data1.run_rate; - that.tableDatas[3][9] = precen( - that.tableDatas[3][5], - that.tableDatas[3][8] - ); - that.tableDatas[4][5] = data1.elec_consume_unit; - that.tableDatas[4][9] = precen( - that.tableDatas[4][5], - that.tableDatas[4][8] - ); - that.tableDatas[5][5] = data1.celec_consume_unit; - that.tableDatas[5][9] = precen( - that.tableDatas[5][5], - that.tableDatas[5][8] - ); - that.tableDatas[6][5] = data1.coal_consume_unit; - that.tableDatas[6][9] = precen( - that.tableDatas[6][5], - that.tableDatas[6][8] - ); - that.tableDatas[7][5] = data1.cen_consume_unit; - that.tableDatas[7][9] = precen( - that.tableDatas[7][5], - that.tableDatas[7][8] - ); - } else { + console.log("回转窑", res); + that.query.mgroup = res[0].id; + //昨日 + let params3 = {}; + params3.page = 0; + params3.year_s = year_d; + params3.month_s = month_d; + params3.day_s = days_d; + params3.type = "day_s"; + params3.mgroup = that.query.mgroup; + that.$API.enm.enstat.req(params3).then((res3) => { + if (res3.length > 0) { + let data3 = res3[0]; + that.tableDatas[0][3] = data3.total_production; + that.tableDatas[1][3] = data3.production_hour; + that.tableDatas[2][3] = data3.run_hour; + that.tableDatas[3][3] = data3.run_rate; + that.tableDatas[4][3] = data3.elec_consume_unit; + that.tableDatas[5][3] = data3.celec_consume_unit; + that.tableDatas[6][3] = data3.coal_consume_unit; + that.tableDatas[7][3] = data3.cen_consume_unit; } }); - //月 - let params2 = {}; - params2.page = 0; - params2.year_s = year; - params2.month_s = month; - params2.type = "month_s"; - params2.mgroup = this.query.mgroup; - this.$API.enm.enstat.req(params2).then((res2) => { - if (res2.length > 0) { - let data2 = res2[0]; - that.tableDatas[0][4] = data2.total_production; - that.tableDatas[0][7] = precen( - that.tableDatas[0][4], - that.tableDatas[0][6] - ); - that.tableDatas[1][4] = data2.production_hour; - that.tableDatas[1][7] = precen( - that.tableDatas[1][4], - that.tableDatas[1][6] - ); - that.tableDatas[2][4] = data2.run_hour; - that.tableDatas[2][7] = precen( - that.tableDatas[2][4], - that.tableDatas[2][6] - ); - that.tableDatas[3][4] = data2.run_rate; - that.tableDatas[3][7] = precen( - that.tableDatas[3][4], - that.tableDatas[3][6] - ); - that.tableDatas[4][4] = data2.elec_consume_unit; - that.tableDatas[4][7] = precen( - that.tableDatas[4][4], - that.tableDatas[4][6] - ); - that.tableDatas[5][4] = data2.celec_consume_unit; - that.tableDatas[5][7] = precen( - that.tableDatas[5][4], - that.tableDatas[5][6] - ); - that.tableDatas[6][4] = data2.coal_consume_unit; - that.tableDatas[6][7] = precen( - that.tableDatas[6][4], - that.tableDatas[6][6] - ); - that.tableDatas[7][4] = data2.cen_consume_unit; - that.tableDatas[7][7] = precen( - that.tableDatas[7][4], - that.tableDatas[7][6] - ); + //上小时 + let params4 = {}; + params4.page = 0; + params4.year = year_h; + params4.month = month_h; + params4.day = days_h; + params4.hour = hours_h; + params4.type = "hour_st"; + params4.mgroup = that.query.mgroup; + that.$API.enm.enstat.req(params4).then((res4) => { + if (res4.length > 0) { + let data4 = res4[0]; + that.tableDatas[0][2] = data4.total_production; + that.tableDatas[4][2] = data4.elec_consume_unit; + that.tableDatas[5][2] = data4.celec_consume_unit; + that.tableDatas[6][2] = data4.coal_consume_unit; + that.tableDatas[7][2] = data4.cen_consume_unit; } }); + let params5 = {}; + params5.page = 0; + params5.mgroup = that.query.mgroup; + that.$API.mtm.goal.list + .req(params5) + .then((res5) => { + if (res5.length > 0) { + let data5 = res5; + data5.forEach((item5) => { + let str = "goal_val_" + that.month; + if (item5.goal_cate_name == "总产量(t)") { + that.tableDatas[0][6] = item5[str]; + that.tableDatas[0][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == "台时产量(t/h)" + ) { + that.tableDatas[1][6] = item5[str]; + that.tableDatas[1][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == "运转时间(h)" + ) { + that.tableDatas[2][6] = item5[str]; + that.tableDatas[2][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == "运转率(%)" + ) { + that.tableDatas[3][6] = item5[str]; + that.tableDatas[3][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == + "单位产品分布电耗(KW·h/t)" + ) { + that.tableDatas[4][6] = item5[str]; + that.tableDatas[4][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == + "单位产品综合电耗(KW·h/t)" + ) { + that.tableDatas[5][6] = item5[str]; + that.tableDatas[5][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == + "单位产品标煤耗(kgce/t)" + ) { + that.tableDatas[6][6] = item5[str]; + that.tableDatas[6][8] = item5.goal_val; + } else if ( + item5.goal_cate_name == + "单位产品综合能耗(kgce/t)" + ) { + that.tableDatas[7][6] = item5[str]; + that.tableDatas[7][8] = item5.goal_val; + } + }); + } + }) + .then((res) => { + //年 + let params1 = {}; + params1.page = 0; + params1.year_s = year; + params1.type = "year_s"; + params1.mgroup = this.query.mgroup; + this.$API.enm.enstat.req(params1).then((res1) => { + if (res1.length > 0) { + let data1 = res1[0]; + that.tableDatas[0][5] = data1.total_production; + that.tableDatas[0][9] = precen( + that.tableDatas[0][5], + that.tableDatas[0][8] + ); + that.tableDatas[1][5] = data1.production_hour; + that.tableDatas[1][9] = precen( + that.tableDatas[1][5], + that.tableDatas[1][8] + ); + that.tableDatas[2][5] = data1.run_hour; + that.tableDatas[2][9] = precen( + that.tableDatas[2][5], + that.tableDatas[2][8] + ); + that.tableDatas[3][5] = data1.run_rate; + that.tableDatas[3][9] = precen( + that.tableDatas[3][5], + that.tableDatas[3][8] + ); + that.tableDatas[4][5] = data1.elec_consume_unit; + that.tableDatas[4][9] = precen( + that.tableDatas[4][5], + that.tableDatas[4][8] + ); + that.tableDatas[5][5] = + data1.celec_consume_unit; + that.tableDatas[5][9] = precen( + that.tableDatas[5][5], + that.tableDatas[5][8] + ); + that.tableDatas[6][5] = data1.coal_consume_unit; + that.tableDatas[6][9] = precen( + that.tableDatas[6][5], + that.tableDatas[6][8] + ); + that.tableDatas[7][5] = data1.cen_consume_unit; + that.tableDatas[7][9] = precen( + that.tableDatas[7][5], + that.tableDatas[7][8] + ); + } else { + } + }); + //月 + let params2 = {}; + params2.page = 0; + params2.year_s = year; + params2.month_s = month; + params2.type = "month_s"; + params2.mgroup = this.query.mgroup; + this.$API.enm.enstat.req(params2).then((res2) => { + if (res2.length > 0) { + let data2 = res2[0]; + that.tableDatas[0][4] = data2.total_production; + that.tableDatas[0][7] = precen( + that.tableDatas[0][4], + that.tableDatas[0][6] + ); + that.tableDatas[1][4] = data2.production_hour; + that.tableDatas[1][7] = precen( + that.tableDatas[1][4], + that.tableDatas[1][6] + ); + that.tableDatas[2][4] = data2.run_hour; + that.tableDatas[2][7] = precen( + that.tableDatas[2][4], + that.tableDatas[2][6] + ); + that.tableDatas[3][4] = data2.run_rate; + that.tableDatas[3][7] = precen( + that.tableDatas[3][4], + that.tableDatas[3][6] + ); + that.tableDatas[4][4] = data2.elec_consume_unit; + that.tableDatas[4][7] = precen( + that.tableDatas[4][4], + that.tableDatas[4][6] + ); + that.tableDatas[5][4] = + data2.celec_consume_unit; + that.tableDatas[5][7] = precen( + that.tableDatas[5][4], + that.tableDatas[5][6] + ); + that.tableDatas[6][4] = data2.coal_consume_unit; + that.tableDatas[6][7] = precen( + that.tableDatas[6][4], + that.tableDatas[6][6] + ); + that.tableDatas[7][4] = data2.cen_consume_unit; + that.tableDatas[7][7] = precen( + that.tableDatas[7][4], + that.tableDatas[7][6] + ); + } + }); + }); + that.getHourData(); + that.getDayData(); + that.getMonthData(); }); - that.getHourData(); - that.getDayData(); - that.getMonthData(); }, methods: { //获取小时数据 diff --git a/src/views/enm_kilnbase/teamAnalysis.vue b/src/views/enm_kilnbase/teamAnalysis.vue index 04cf8d7e..c67a57a9 100644 --- a/src/views/enm_kilnbase/teamAnalysis.vue +++ b/src/views/enm_kilnbase/teamAnalysis.vue @@ -93,26 +93,48 @@ export default { year_s: "", page: 0, type: "month_st", - mgroup: "3347217246321065984", + mgroup: "", }, tableDatas: [], + exportLoading: false, }; }, mounted() { let that = this; var myDate = new Date(); let year = myDate.getFullYear(); + this.timeStamp = myDate.getTime(); that.query.year_s = year; - this.getData(); + this.$API.mtm.mgroup.list + .req({ page: 0, search: "回转窑" }) + .then((res) => { + console.log("回转窑", res); + that.query.mgroup = res[0].id; + that.getGoalData(); + }); }, methods: { + getGoalData() { + let that = this; + let params = {}; + params.page = 0; + params.year = that.query.year_s; + params.mgroup = that.query.mgroup; + this.$API.mtm.goal.list.req(params).then((res) => { + let data = []; + if (res.length > 0) { + data = res[0]; + } + that.getData(data); + }); + }, getData() { let that = this; let query0 = {}; query0.page = 0; query0.type = "month_st"; query0.year_s = that.query.year_s - 1; - query0.mgroup = "3347217246321065984"; + query0.mgroup = that.query.mgroup; let wrapArr = [], wrapArr0 = [], wrapArrs = []; @@ -124,6 +146,7 @@ export default { //先按月份排序,再按班组排序 let n0 = item0.month_s; let ind0 = 0; + let team_name0 = item0.team_name; if (team_name0.indexOf("甲") > -1) { ind0 = (n0 - 1) * 3; } else if (team_name0.indexOf("乙") > -1) { @@ -133,8 +156,6 @@ export default { } wrapArr0[ind0] = item0; }); - debugger; - console.log(wrapArr0); } else { } this.$API.enm.enstat.req(that.query).then((res) => { diff --git a/src/views/enm_kilnbase/workshopAnalysis.vue b/src/views/enm_kilnbase/workshopAnalysis.vue index 3d2382b7..1ef48a4a 100644 --- a/src/views/enm_kilnbase/workshopAnalysis.vue +++ b/src/views/enm_kilnbase/workshopAnalysis.vue @@ -1,745 +1,760 @@ +
+ +
+ + + + + + 导出xlsx + + 打印 +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
车间单位产品电耗月度分析表
月份当期值(KW·h/t)目标值(KW·h/t)当期与目标差值(KW·h/t)环期值(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
+
+ + + + + {{ item1 }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ 车间单位产品综合电耗月度分析表 +
月份当期值(KW·h/t)目标值(KW·h/t)国家标准(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
1级2级3级
+
+ + + {{ item1 }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ 车间单位产品标煤耗月度分析表 +
月份当期值(KW·h/t)目标值(KW·h/t)国家标准(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
1级2级3级
+
+ + + {{ item1 }} +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ 车间单位产品综合能耗月度分析表 +
月份当期值(KW·h/t)目标值(KW·h/t)国家标准(KW·h/t)当期与环期差值(KW·h/t)环比增长率(%)同比增长率(%)
1级2级3级
+
+ + + {{ item1 }} +
+
+
+
+
+
+ \ No newline at end of file +.printWrap { + width: 100%; + overflow-x: scroll; +} +