From 8f35a7f6b5900f70506bbaec58703cf1dcbd9a30 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 6 Dec 2024 15:34:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:coding#674=E9=A1=B5=E9=9D=A2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_report/reportFactory.vue | 64 +++++++++++++++++--------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/src/views/enm_report/reportFactory.vue b/src/views/enm_report/reportFactory.vue index 56c9e9ae..0fff0f31 100644 --- a/src/views/enm_report/reportFactory.vue +++ b/src/views/enm_report/reportFactory.vue @@ -68,7 +68,7 @@ - + @@ -77,13 +77,13 @@ - - - - - - - + + + + + + +
绿色建材生产质量消耗报表绿色建材生产质量消耗报表
{{item}}
{{item[0]}} {{item[1]}}{{item[2]}}{{item[3]}}{{item[4]}}{{item[5]}}{{item[6]}}{{item[7]}}{{item[8]}}{{item[2]}}{{item[2]}}{{item[3]}}{{item[4]}}{{item[5]}}{{item[6]}}{{item[7]}}
@@ -108,7 +108,7 @@ {id:2,name:'年统计'}, ], mgroups:['电石渣','原料磨','煤磨','回转窑','水泥磨','水泥包装'], - headers:['','时间','电石渣','原料磨','生料工段','煤磨','熟料工段','水泥粉磨','水泥包装'], + headers:['','时间','电石渣','原料磨','煤磨','熟料工段','水泥粉磨','水泥包装'], tableDatas:[ ['产量(t)'], ['台产(t/h)'], @@ -124,16 +124,16 @@ ['水泥压缩空气流量(m³/h)'], ['产生蒸汽量(t)'], ['成本(元/t)'], - ['生产动态'] ], }; }, mounted() { var myDate = new Date(); - // this.query.searchDay =this.currentDay = this.$TOOL.dateFormat2(myDate); - this.query.searchDay =this.currentDay = '2024-10-04'; - this.query.searchDay ='2024-10-04'; + this.query.searchDay =this.currentDay = this.$TOOL.dateFormat2(myDate); + // this.query.searchDay =this.currentDay = '2024-10-04'; + // this.query.searchDay ='2024-10-04'; this.getData(); + }, methods: { typeCange(value){ @@ -176,6 +176,7 @@ search_time = that.query.searchYear; params.year_s = Number(that.query.searchYear); } + that.getWaterData(params); that.tableDatas.forEach((item) => { item[1] = search_time; }) @@ -186,6 +187,7 @@ } res.forEach(item => { let index = that.mgroups.indexOf(item.mgroup_name); + console.log(item.mgroup_name,index) if(index>-1){ index = index+2; that.tableDatas[0][index] = item.total_production; @@ -195,26 +197,44 @@ str = str+item.testitem_name+":"+(item.rate_pass).toFixed(2)+"%\n"; }) that.tableDatas[2][index] = str;//质量 - that.tableDatas[3][index] = item.yield;//煤耗 + that.tableDatas[3][index] = item.pcoal_consume;//煤耗 that.tableDatas[4][index] = item.elec_consume;//电耗 that.tableDatas[5][index] = item.imaterial_data_dict?item.imaterial_data_dict.柴油?(item.imaterial_data_dict.柴油.cost).toFixed(2):'':'';//柴油 - that.tableDatas[6][index] = item.yield;//绿化水 - that.tableDatas[7][index] = item.yield;//生活水 - that.tableDatas[8][index] = item.imaterial_data_dict?item.imaterial_data_dict.工业水?(item.imaterial_data_dict.工业水.cost).toFixed(2) :'':''; //工业水 - - that.tableDatas[12][index] = item.imaterial_data_dict?item.imaterial_data_dict.蒸汽?(item.imaterial_data_dict.蒸汽.cost).toFixed(2):'':'';//蒸汽 - that.tableDatas[13][index] = item.yield;//成本 + that.tableDatas[12][index] = item.out_steam;//蒸汽 + that.tableDatas[13][index] = item.production_cost_unit;//成本 } if(item.mgroup_name=='原料压缩空气'){ that.tableDatas[9][3] = item.cair_consume; - }else if(item.mgroup_name=='水泥压缩空气'){ - that.tableDatas[10][7] = item.cair_consume; }else if(item.mgroup_name=='烧成压缩空气'){ + that.tableDatas[10][5] = item.cair_consume; + }else if(item.mgroup_name=='水泥压缩空气'){ that.tableDatas[11][6] = item.cair_consume; } }); }) }, + getWaterData(par){ + let obj = {page:0}; + obj.type = par.type.split("_")[0]; + obj.year = par.year_s; + obj.month = par.month_s; + obj.day = par.day_s; + obj.mpoint__in = "3631858394648182784,3631858982832218112,3631858687335112704"; + let that = this; + this.$API.enm.mpointstat.list.req(obj).then(res=>{ + if(res.length>0){ + res.forEach((item)=>{ + if(item.mpoint_nickname=='绿化水'){ + that.tableDatas[6][2] = item.val; + }else if(item.mpoint_nickname=='生活水'){ + that.tableDatas[7][2] = item.val; + }else if(item.mpoint_nickname=='工业水'){ + that.tableDatas[8][2] = item.val; + } + }) + } + }) + }, getTableData(){ this.getData(); },