diff --git a/src/config/route.js b/src/config/route.js index a756b652..4f203d74 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -1150,6 +1150,16 @@ const routes = [ }, component: "enm_energy/energyPicture", }, + { + name: "carbon", + path: "/enm_energy/carbon", + meta: { + title: "碳排放", + // icon: "el-icon-grid", + perms: ["carbon_base"], + }, + component: "enm_energy/carbon", + }, ], }, //全厂报表 diff --git a/src/views/em/equipment.vue b/src/views/em/equipment.vue index b29d5203..f802771e 100644 --- a/src/views/em/equipment.vue +++ b/src/views/em/equipment.vue @@ -58,8 +58,8 @@ - - + @@ -95,7 +95,7 @@ - + {{ scope.row.place }} diff --git a/src/views/em/equipment_form.vue b/src/views/em/equipment_form.vue index 2a817c0e..36fb6379 100644 --- a/src/views/em/equipment_form.vue +++ b/src/views/em/equipment_form.vue @@ -152,8 +152,8 @@ - - + + diff --git a/src/views/em/equipmentjl.vue b/src/views/em/equipmentjl.vue index 8faf6841..16b5667c 100644 --- a/src/views/em/equipmentjl.vue +++ b/src/views/em/equipmentjl.vue @@ -55,7 +55,7 @@ - + @@ -98,7 +98,7 @@ - + {{ scope.row.description }} @@ -162,7 +162,7 @@ - + diff --git a/src/views/enm_coal/report.vue b/src/views/enm_coal/report.vue index 47d21143..92ebdfe5 100644 --- a/src/views/enm_coal/report.vue +++ b/src/views/enm_coal/report.vue @@ -92,7 +92,7 @@ v-model="typeRadio" @change="typeRadioChange" > - + 小时 按日 @@ -128,14 +128,14 @@ > - + 本月生产参数统计图 { let ind = item.hour; seriesData0[ind] = item.total_production; //总产量 - seriesData1[ind] = item.production_hour; //台时产量 - seriesData2[ind] = item.run_rate; //运转率 + // seriesData1[ind] = item.production_hour; //台时产量 + // seriesData2[ind] = item.run_rate; //运转率 seriesData3[ind] = item.elec_consume_unit; //分布电耗 }); let options = { ...that.option1 }; options.series[0].data = seriesData0; - options.series[1].data = seriesData1; - options.series[2].data = seriesData2; - options.series[3].data = seriesData3; + // options.series[1].data = seriesData1; + // options.series[2].data = seriesData2; + options.series[1].data = seriesData3; let hourXAxis = []; for (let i = 0; i < 24; i++) { let item = i + "时"; diff --git a/src/views/enm_coal/teamAnalysis.vue b/src/views/enm_coal/teamAnalysis.vue index ae828070..919f0f62 100644 --- a/src/views/enm_coal/teamAnalysis.vue +++ b/src/views/enm_coal/teamAnalysis.vue @@ -269,13 +269,13 @@ export default { const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue)); let elec_score = 0; if (index === 0){ - elec_score= 15; - } else if (index === 1) { - elec_score= 10; - } else if (index === 2) { - elec_score= 8; - } else if (index === 3) { elec_score= 5; + } else if (index === 1) { + elec_score= 8; + } else if (index === 2) { + elec_score= 10; + } else if (index === 3) { + elec_score= 15; } arr[15] += elec_score; diff --git a/src/views/enm_coal/workshopAnalysis.vue b/src/views/enm_coal/workshopAnalysis.vue index e4c94e45..5b7851ab 100644 --- a/src/views/enm_coal/workshopAnalysis.vue +++ b/src/views/enm_coal/workshopAnalysis.vue @@ -39,7 +39,7 @@ - 煤磨工序车间单位产品电耗月度分析表 + 粉磨分布电耗月度分析表 @@ -149,17 +149,18 @@ export default { ress.forEach((goal) => { monthGoal[0] = goal.goal_val; - monthGoal[1] = goal.goal_val_2; - monthGoal[2] = goal.goal_val_3; - monthGoal[3] = goal.goal_val_4; - monthGoal[4] = goal.goal_val_5; - monthGoal[5] = goal.goal_val_6; - monthGoal[6] = goal.goal_val_7; - monthGoal[7] = goal.goal_val_8; - monthGoal[8] = goal.goal_val_9; - monthGoal[9] = goal.goal_val_10; - monthGoal[10] = goal.goal_val_11; - monthGoal[11] = goal.goal_val_12; + monthGoal[1] = goal.goal_val_1; + monthGoal[2] = goal.goal_val_2; + monthGoal[3] = goal.goal_val_3; + monthGoal[4] = goal.goal_val_4; + monthGoal[5] = goal.goal_val_5; + monthGoal[6] = goal.goal_val_6; + monthGoal[7] = goal.goal_val_7; + monthGoal[8] = goal.goal_val_8; + monthGoal[9] = goal.goal_val_9; + monthGoal[10] = goal.goal_val_10; + monthGoal[11] = goal.goal_val_11; + monthGoal[12] = goal.goal_val_12; }); } this.getData(monthGoal); diff --git a/src/views/enm_energy/carbon.vue b/src/views/enm_energy/carbon.vue new file mode 100644 index 00000000..cf41996f --- /dev/null +++ b/src/views/enm_energy/carbon.vue @@ -0,0 +1,928 @@ + + + + + + + + + + + + + + + 导出xlsx + + 打印 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 本月生产参数统计图 + + + + 本年生产参数统计图 + + + + + + + + + + + + + + diff --git a/src/views/enm_kiln/handoverLog.vue b/src/views/enm_kiln/handoverLog.vue index 30483ca4..333b3187 100644 --- a/src/views/enm_kiln/handoverLog.vue +++ b/src/views/enm_kiln/handoverLog.vue @@ -225,7 +225,7 @@ class="numCell" v-if="reportItem.出窑熟料_立升重_rate_pass" > - {{reportItem.出窑熟料_立升重_rate_pass *100}} + {{(reportItem.出窑熟料_立升重_rate_pass *100).toFixed(2)}} 0 熟料f-CaO合格率(%) @@ -233,7 +233,7 @@ class="numCell" v-if="reportItem.出窑熟料_fCaO_rate_pass" > - {{reportItem.出窑熟料_fCaO_rate_pass*100}} + {{(reportItem.出窑熟料_fCaO_rate_pass*100).toFixed(2)}} 0 @@ -243,7 +243,7 @@ class="numCell" v-if="reportItem.入窑生料_CaO_rate_pass" > - {{reportItem.入窑生料_CaO_rate_pass * 100}} + {{(reportItem.入窑生料_CaO_rate_pass * 100).toFixed(2)}} 0 @@ -253,7 +253,7 @@ class="numCell" v-if="reportItem.入窑生料_Fe2O3_rate_pass" > - {{reportItem.入窑生料_Fe2O3_rate_pass *100}} + {{(reportItem.入窑生料_Fe2O3_rate_pass *100).toFixed(2)}} 0 diff --git a/src/views/enm_kiln/report.vue b/src/views/enm_kiln/report.vue index bbe60570..ead3fcd7 100644 --- a/src/views/enm_kiln/report.vue +++ b/src/views/enm_kiln/report.vue @@ -325,7 +325,7 @@ let legend = { } ], top: "2%", - width: "400px", + width: "500px", data: [ "回转窑总产量", "台时产量", @@ -493,7 +493,7 @@ export default { tooltip: tooltip, grid: grid, toolbox: toolbox, - legend: Object.assign(legend, {data: ["回转窑总产量", "台时产量","回转窑运转率", "熟料分布电耗", "熟料标煤耗", "熟料单位成本"]}), + legend: Object.assign(legend, {data: ["回转窑总产量", "熟料分布电耗", "熟料标煤耗", "熟料单位成本"]}), xAxis: { axisTick: { show: true, diff --git a/src/views/enm_kiln/teamAnalysis.vue b/src/views/enm_kiln/teamAnalysis.vue index 2bca5e2b..b54cce26 100644 --- a/src/views/enm_kiln/teamAnalysis.vue +++ b/src/views/enm_kiln/teamAnalysis.vue @@ -371,13 +371,13 @@ export default { const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue)); let elec_score = 0; if (index === 0){ - elec_score= 15; - } else if (index === 1) { - elec_score= 10; - } else if (index === 2) { - elec_score= 8; - } else if (index === 3) { elec_score= 5; + } else if (index === 1) { + elec_score= 8; + } else if (index === 2) { + elec_score= 10; + } else if (index === 3) { + elec_score= 15; } arr[29] += elec_score; diff --git a/src/views/enm_kiln/workshopAnalysis.vue b/src/views/enm_kiln/workshopAnalysis.vue index b643fe42..44569ab0 100644 --- a/src/views/enm_kiln/workshopAnalysis.vue +++ b/src/views/enm_kiln/workshopAnalysis.vue @@ -52,7 +52,7 @@ > - 车间单位产品电耗月度分析表 + 熟料分布电耗月度分析表 月份 @@ -117,7 +117,7 @@ - 车间单位产品综合电耗月度分析表 + 熟料单位产品综合电耗月度分析表 @@ -186,7 +186,7 @@ - 车间单位产品标煤耗月度分析表 + 熟料单位产品标煤耗月度分析表 @@ -255,7 +255,7 @@ - 车间单位产品综合能耗月度分析表 + 熟料单位产品综合能耗月度分析表 @@ -471,17 +471,17 @@ export default { goal.goal_cate_name == "单位产品分布电耗(kW·h/t)" ) { monthGoal[0] = goal.goal_val; - monthGoal[1] = goal.goal_val_2; - monthGoal[2] = goal.goal_val_3; - monthGoal[3] = goal.goal_val_4; - monthGoal[4] = goal.goal_val_5; - monthGoal[5] = goal.goal_val_6; - monthGoal[6] = goal.goal_val_7; - monthGoal[7] = goal.goal_val_8; - monthGoal[8] = goal.goal_val_9; - monthGoal[9] = goal.goal_val_10; - monthGoal[10] = goal.goal_val_11; - monthGoal[11] = goal.goal_val_12; + monthGoal[1] = goal.goal_val_1; + monthGoal[2] = goal.goal_val_2; + monthGoal[3] = goal.goal_val_3; + monthGoal[4] = goal.goal_val_4; + monthGoal[5] = goal.goal_val_5; + monthGoal[6] = goal.goal_val_6; + monthGoal[7] = goal.goal_val_7; + monthGoal[8] = goal.goal_val_8; + monthGoal[9] = goal.goal_val_9; + monthGoal[10] = goal.goal_val_10; + monthGoal[11] = goal.goal_val_11; monthGoal[12] = goal.goal_val_12; that.monthGoal = monthGoal; } @@ -489,33 +489,33 @@ export default { goal.goal_cate_name == "单位产品综合电耗(kW·h/t)" ) { monthGoal2[0] = goal.goal_val; - monthGoal2[1] = goal.goal_val_2; - monthGoal2[2] = goal.goal_val_3; - monthGoal2[3] = goal.goal_val_4; - monthGoal2[4] = goal.goal_val_5; - monthGoal2[5] = goal.goal_val_6; - monthGoal2[6] = goal.goal_val_7; - monthGoal2[7] = goal.goal_val_8; - monthGoal2[8] = goal.goal_val_9; - monthGoal2[9] = goal.goal_val_10; - monthGoal2[10] = goal.goal_val_11; - monthGoal2[11] = goal.goal_val_12; + monthGoal2[1] = goal.goal_val_1; + monthGoal2[2] = goal.goal_val_2; + monthGoal2[3] = goal.goal_val_3; + monthGoal2[4] = goal.goal_val_4; + monthGoal2[5] = goal.goal_val_5; + monthGoal2[6] = goal.goal_val_6; + monthGoal2[7] = goal.goal_val_7; + monthGoal2[8] = goal.goal_val_8; + monthGoal2[9] = goal.goal_val_9; + monthGoal2[10] = goal.goal_val_10; + monthGoal2[11] = goal.goal_val_11; monthGoal2[12] = goal.goal_val_12; that.monthGoal2 = monthGoal2; } if (goal.goal_cate_name == "单位产品标煤耗(kgce/t)") { monthGoal3[0] = goal.goal_val; - monthGoal3[1] = goal.goal_val_2; - monthGoal3[2] = goal.goal_val_3; - monthGoal3[3] = goal.goal_val_4; - monthGoal3[4] = goal.goal_val_5; - monthGoal3[5] = goal.goal_val_6; - monthGoal3[6] = goal.goal_val_7; - monthGoal3[7] = goal.goal_val_8; - monthGoal3[8] = goal.goal_val_9; - monthGoal3[9] = goal.goal_val_10; - monthGoal3[10] = goal.goal_val_11; - monthGoal3[11] = goal.goal_val_12; + monthGoal3[1] = goal.goal_val_1; + monthGoal3[2] = goal.goal_val_2; + monthGoal3[3] = goal.goal_val_3; + monthGoal3[4] = goal.goal_val_4; + monthGoal3[5] = goal.goal_val_5; + monthGoal3[6] = goal.goal_val_6; + monthGoal3[7] = goal.goal_val_7; + monthGoal3[8] = goal.goal_val_8; + monthGoal3[9] = goal.goal_val_9; + monthGoal3[10] = goal.goal_val_10; + monthGoal3[11] = goal.goal_val_11; monthGoal3[12] = goal.goal_val_12; that.monthGoal3 = monthGoal3; } diff --git a/src/views/enm_mill/report.vue b/src/views/enm_mill/report.vue index 225ebdb3..a2a01d9e 100644 --- a/src/views/enm_mill/report.vue +++ b/src/views/enm_mill/report.vue @@ -431,7 +431,7 @@ export default { tooltip: tooltip, grid: grid, toolbox: toolbox, - legend: Object.assign(legend, {data: ["水泥磨总产量", "分布电耗", "水泥单位成本","水泥磨台时产量","水泥磨运转率"]}), + legend: Object.assign(legend, {data: ["水泥磨总产量", "分布电耗", "水泥单位成本"]}), xAxis: { axisTick: { show: true, diff --git a/src/views/enm_mill/teamAnalysis.vue b/src/views/enm_mill/teamAnalysis.vue index 324370f9..4981d4b9 100644 --- a/src/views/enm_mill/teamAnalysis.vue +++ b/src/views/enm_mill/teamAnalysis.vue @@ -285,13 +285,13 @@ export default { const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue)); let elec_score = 0; if (index === 0){ - elec_score= 10; - } else if (index === 1) { - elec_score= 7; - } else if (index === 2) { - elec_score= 3; - } else if (index === 3) { elec_score= 0; + } else if (index === 1) { + elec_score= 3; + } else if (index === 2) { + elec_score= 7; + } else if (index === 3) { + elec_score= 10; } arr[18] += elec_score; diff --git a/src/views/enm_mill/workshopAnalysis.vue b/src/views/enm_mill/workshopAnalysis.vue index 811b7be2..82b8612c 100644 --- a/src/views/enm_mill/workshopAnalysis.vue +++ b/src/views/enm_mill/workshopAnalysis.vue @@ -52,7 +52,7 @@ - 水泥粉磨工序车间单位产品电耗月度分析表 + 水泥分布电耗月度分析表 diff --git a/src/views/enm_monthSet/feeset.vue b/src/views/enm_monthSet/feeset.vue index d2850967..661a07d6 100644 --- a/src/views/enm_monthSet/feeset.vue +++ b/src/views/enm_monthSet/feeset.vue @@ -50,14 +50,14 @@ @click="handleQuery" > - + @@ -210,7 +210,7 @@ export default { //删除 async table_del(row) { var id = row.id; - var res = await this.$API.mtm.mgroup.delete.req(id); + var res = await this.$API.fim.feeset.delete.req(id); if (res.err_msg) { this.$message.error(res.err_msg); } else { diff --git a/src/views/enm_pack/workshopAnalysis.vue b/src/views/enm_pack/workshopAnalysis.vue index d8c49bb5..178efa6b 100644 --- a/src/views/enm_pack/workshopAnalysis.vue +++ b/src/views/enm_pack/workshopAnalysis.vue @@ -39,7 +39,7 @@ - 水泥包装工序车间单位产品电耗月度分析表 + 包装工序分布电耗月度分析表 @@ -175,17 +175,17 @@ export default { goal.goal_cate_name == "单位产品分布电耗(kW·h/t)" ) { monthGoal[0] = goal.goal_val; - monthGoal[1] = goal.goal_val_2; - monthGoal[2] = goal.goal_val_3; - monthGoal[3] = goal.goal_val_4; - monthGoal[4] = goal.goal_val_5; - monthGoal[5] = goal.goal_val_6; - monthGoal[6] = goal.goal_val_7; - monthGoal[7] = goal.goal_val_8; - monthGoal[8] = goal.goal_val_9; - monthGoal[9] = goal.goal_val_10; - monthGoal[10] = goal.goal_val_11; - monthGoal[11] = goal.goal_val_12; + monthGoal[1] = goal.goal_val_1; + monthGoal[2] = goal.goal_val_2; + monthGoal[3] = goal.goal_val_3; + monthGoal[4] = goal.goal_val_4; + monthGoal[5] = goal.goal_val_5; + monthGoal[6] = goal.goal_val_6; + monthGoal[7] = goal.goal_val_7; + monthGoal[8] = goal.goal_val_8; + monthGoal[9] = goal.goal_val_9; + monthGoal[10] = goal.goal_val_10; + monthGoal[11] = goal.goal_val_11; monthGoal[12] = goal.goal_val_12; that.monthGoal = monthGoal; } diff --git a/src/views/enm_report/costing.vue b/src/views/enm_report/costing.vue index 06422c10..2853fa7e 100644 --- a/src/views/enm_report/costing.vue +++ b/src/views/enm_report/costing.vue @@ -49,19 +49,19 @@ 原材料 辅助材料 电/水 - 制造费用 + 制造费用 直接人工 {{ item }} - 无形资产摊销 + @@ -311,9 +311,9 @@ export default { } let otherdata = itemData.other_cost_data; for (let j = 0; j < otherdata.length; j++) { - if (otherdata[j].cate == '其他费用' ||otherdata[j].cate == '倒运费用') { - continue; - } + // if (otherdata[j].cate == '其他费用' ||otherdata[j].cate == '直接人工') { + // continue; + // } dataArr.push((otherdata[j].cost_unit).toFixed(2)) } that.tableData1.push(dataArr) diff --git a/src/views/enm_rm/report.vue b/src/views/enm_rm/report.vue index 260bd83a..ef1a9851 100644 --- a/src/views/enm_rm/report.vue +++ b/src/views/enm_rm/report.vue @@ -433,7 +433,7 @@ export default { tooltip: tooltip, grid: grid, toolbox: toolbox, - legend: Object.assign(legend, {data: ["立磨总产量", "立磨台时产量", "立磨运转率", "分布电耗"]}), + legend: Object.assign(legend, {data: ["立磨总产量", "分布电耗"]}), xAxis: { axisTick: { show: true, @@ -443,7 +443,40 @@ export default { }, data: [], }, - yAxis: yAxis, + yAxis: [ + { + type: "value", + name: "产量 (t)", + position: "left", + alignTicks: true, + axisLine: { + show: true, + lineStyle: { + color: colors[0], + }, + }, + axisLabel: { + formatter: "{value}", + }, + nameRotate: 50 + }, + { + type: "value", + name: "分布电耗(kW·h)", + position: "right", + alignTicks: true, + axisLine: { + show: true, + lineStyle: { + color: colors[3], + }, + }, + axisLabel: { + formatter: "{value}", + }, + nameRotate: 50 + }, + ], series: [ { name: "立磨总产量", @@ -451,22 +484,10 @@ export default { yAxisIndex: 0, data: [], }, - { - name: "立磨台时产量", - type: "bar", - yAxisIndex: 0, - data: [], - }, - { - name: "立磨运转率", - type: "line", - yAxisIndex: 1, - data: [], - }, { name: "分布电耗", type: "bar", - yAxisIndex: 2, + yAxisIndex: 0, data: [], }, ], @@ -1061,7 +1082,7 @@ export default { options.series[0].data = seriesData0; // options.series[1].data = seriesData1; // options.series[2].data = seriesData2; - options.series[3].data = seriesData3; + options.series[1].data = seriesData3; let hourXAxis = []; for (let i = 0; i < 24; i++) { let item = i + "时"; diff --git a/src/views/enm_rm/teamAnalysis.vue b/src/views/enm_rm/teamAnalysis.vue index a778789b..7b1c3d6f 100644 --- a/src/views/enm_rm/teamAnalysis.vue +++ b/src/views/enm_rm/teamAnalysis.vue @@ -277,13 +277,13 @@ export default { const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue)); let elec_score = 0; if (index === 0){ - elec_score= 15; - } else if (index === 1) { - elec_score= 10; - } else if (index === 2) { - elec_score= 8; - } else if (index === 3) { elec_score= 5; + } else if (index === 1) { + elec_score= 8; + } else if (index === 2) { + elec_score= 10; + } else if (index === 3) { + elec_score= 15; } arr[17] += elec_score; diff --git a/src/views/enm_rm/workshopAnalysis.vue b/src/views/enm_rm/workshopAnalysis.vue index 61093187..044237c7 100644 --- a/src/views/enm_rm/workshopAnalysis.vue +++ b/src/views/enm_rm/workshopAnalysis.vue @@ -39,7 +39,7 @@ - 生料辅料工序车间单位产品电耗月度分析表 + 辅料分布电耗月度分析表 @@ -176,17 +176,17 @@ export default { goal.goal_cate_name == "单位产品分布电耗(kW·h/t)" ) { monthGoal[0] = goal.goal_val; - monthGoal[1] = goal.goal_val_2; - monthGoal[2] = goal.goal_val_3; - monthGoal[3] = goal.goal_val_4; - monthGoal[4] = goal.goal_val_5; - monthGoal[5] = goal.goal_val_6; - monthGoal[6] = goal.goal_val_7; - monthGoal[7] = goal.goal_val_8; - monthGoal[8] = goal.goal_val_9; - monthGoal[9] = goal.goal_val_10; - monthGoal[10] = goal.goal_val_11; - monthGoal[11] = goal.goal_val_12; + monthGoal[1] = goal.goal_val_1; + monthGoal[2] = goal.goal_val_2; + monthGoal[3] = goal.goal_val_3; + monthGoal[4] = goal.goal_val_4; + monthGoal[5] = goal.goal_val_5; + monthGoal[6] = goal.goal_val_6; + monthGoal[7] = goal.goal_val_7; + monthGoal[8] = goal.goal_val_8; + monthGoal[9] = goal.goal_val_9; + monthGoal[10] = goal.goal_val_10; + monthGoal[11] = goal.goal_val_11; monthGoal[12] = goal.goal_val_12; that.monthGoal = monthGoal; } diff --git a/src/views/enm_rm_copy/teamAnalysis.vue b/src/views/enm_rm_copy/teamAnalysis.vue index e2dbf8f6..f109546a 100644 --- a/src/views/enm_rm_copy/teamAnalysis.vue +++ b/src/views/enm_rm_copy/teamAnalysis.vue @@ -281,13 +281,13 @@ export default { const index = sortedData.findIndex(obj => parseFloat(obj.elec) === parseFloat(itemValue)); let elec_score = 0; if (index === 0){ - elec_score= 15; - } else if (index === 1) { - elec_score= 10; - } else if (index === 2) { - elec_score= 8; - } else if (index === 3) { elec_score= 5; + } else if (index === 1) { + elec_score= 8; + } else if (index === 2) { + elec_score= 10; + } else if (index === 3) { + elec_score= 15; } arr[17] += elec_score; diff --git a/src/views/enm_rm_copy/workshopAnalysis.vue b/src/views/enm_rm_copy/workshopAnalysis.vue index 873d27b4..ea874ca3 100644 --- a/src/views/enm_rm_copy/workshopAnalysis.vue +++ b/src/views/enm_rm_copy/workshopAnalysis.vue @@ -39,7 +39,7 @@ - 生料工序车间单位产品电耗月度分析表 + 生料分布电耗月度分析表 @@ -175,17 +175,17 @@ export default { goal.goal_cate_name == "单位产品分布电耗(kW·h/t)" ) { monthGoal[0] = goal.goal_val; - monthGoal[1] = goal.goal_val_2; - monthGoal[2] = goal.goal_val_3; - monthGoal[3] = goal.goal_val_4; - monthGoal[4] = goal.goal_val_5; - monthGoal[5] = goal.goal_val_6; - monthGoal[6] = goal.goal_val_7; - monthGoal[7] = goal.goal_val_8; - monthGoal[8] = goal.goal_val_9; - monthGoal[9] = goal.goal_val_10; - monthGoal[10] = goal.goal_val_11; - monthGoal[11] = goal.goal_val_12; + monthGoal[1] = goal.goal_val_1; + monthGoal[2] = goal.goal_val_2; + monthGoal[3] = goal.goal_val_3; + monthGoal[4] = goal.goal_val_4; + monthGoal[5] = goal.goal_val_5; + monthGoal[6] = goal.goal_val_6; + monthGoal[7] = goal.goal_val_7; + monthGoal[8] = goal.goal_val_8; + monthGoal[9] = goal.goal_val_9; + monthGoal[10] = goal.goal_val_10; + monthGoal[11] = goal.goal_val_11; monthGoal[12] = goal.goal_val_12; that.monthGoal = monthGoal; } diff --git a/src/views/enm_slag/report.vue b/src/views/enm_slag/report.vue index adc06a88..ca388969 100644 --- a/src/views/enm_slag/report.vue +++ b/src/views/enm_slag/report.vue @@ -291,7 +291,7 @@ let legend = { width: "400px", x: 'center', y:'top', - data: ["电石渣干粉总产量", "电石渣干粉分布电耗", "电石渣工段总电量", "成本", "湿电石渣消耗", "湿电石渣进厂"], + data: ["电石渣干粉总产量", "电石渣干粉分布电耗", "电石渣工段总电量", "成本", "湿电石渣消耗", "湿电石渣进厂","分布电耗目标值"], }; let yAxis = [ { @@ -395,6 +395,24 @@ let yAxis = [ formatter: "{value}", }, }, + { + type: "value", + name: "分布电耗目标值", + position: "right", + alignTicks: true, + nameRotate: 50, + offset: 100, + axisLine: { + show: true, + lineStyle: { + color: colors[5], + }, + }, + axisLabel: { + formatter: "{value}", + }, + }, + ]; export default { components: { @@ -436,6 +454,7 @@ export default { showClose: true, echartType: "line", asynDialog: false, + goal_list :[], option1: { color: colors, tooltip: tooltip, @@ -542,6 +561,12 @@ export default { yAxisIndex: 5, data: [], }, + { + name: "分布电耗目标值", + type: "line", + yAxisIndex: 5, + data: [], + }, ], }, }; @@ -623,7 +648,6 @@ export default { params4.day_s = days; params4.type = "day_s"; params4.mgroup = this.query.mgroup; - console.log(params4,"params4"); this.$API.enm.enstat.req(params4).then((res4) => { if (res4.length > 0) { let data4 = res4[0]; @@ -668,6 +692,7 @@ export default { item5.goal_cate_name == "单位产品分布电耗(kW·h/t)" ) { + that.goal_list.push(item5); that.tableDatas[1][6] = item5[str]; that.tableDatas[1][8] = item5.goal_val; } else if ( @@ -811,7 +836,7 @@ export default { let month = val.split("-")[1]; month = Number(month); this.getDayData(year, month); - } else { + } else if (this.typeRadio == "year") { this.getMonthData(val); } } else { @@ -822,6 +847,33 @@ export default { } } }, + //获取年度目标值 + getGoalData(year) { + let params5 = {}; + let goal_list = []; + let that = this; + params5.page = 0; + params5.year = year; + params5.mgroup = that.query.mgroup; + this.$API.mtm.goal.list + .req(params5) + .then((res5) => { + if (res5.length > 0) { + let data5 = res5; + data5.forEach((item5) => { + if ( + item5.goal_cate_name == + "单位产品分布电耗(kW·h/t)" + ) { + goal_list.push(item5); + } + }); + + } + return res5; + }) + + }, //获取天数据 getDayData(year, month) { let that = this; @@ -874,25 +926,49 @@ export default { //获取月数据 getMonthData(year) { let that = this; - let query2 = {}; + let params5 = {}; + params5.page = 0; + params5.year = year; + params5.mgroup = that.query.mgroup; + this.$API.mtm.goal.list + .req(params5) + .then((res5) => { + if (res5.length > 0) { + let data5 = res5; + data5.forEach((item5) => { + if ( + item5.goal_cate_name == + "单位产品分布电耗(kW·h/t)" + ) { + that.goal_list.push(item5); + } + }); + + } + }).then(() => { + let query2 = {}; query2.page = 0; query2.year_s = year; query2.type = "month_s"; query2.mgroup = that.query.mgroup; + this.$API.enm.enstat.req(query2).then((response) => { let seriesData0 = [], seriesData1 = [], seriesData2 = [], seriesData3 = [], seriesData4 = [], - seriesData5 = []; + seriesData5 = [], + seriesData6 = []; let data = response; data.forEach((item) => { + let goal_index = 'goal_val_' + item.month_s; let ind = item.month_s - 1; seriesData0[ind] = item.total_production; seriesData1[ind] = item.production_cost_unit; seriesData2[ind] = item.elec_consume_unit; seriesData5[ind] = item.elec_consume; + seriesData6[ind] = that.goal_list[0][goal_index]; if (item.imaterial_data.length > 0) { item.imaterial_data.forEach((items_n) => { if (items_n.material_name == "湿电石渣消耗") { @@ -910,7 +986,11 @@ export default { options.series[3].data = seriesData1; options.series[4].data = seriesData3; options.series[5].data = seriesData4; + options.series[6].data = seriesData6; let monthXAxis = []; + if (year < that.year){ + that.month = 12; + } for (let i = 1; i <= that.month; i++) { let item = i + "月"; monthXAxis.push(item); @@ -918,12 +998,12 @@ export default { options.xAxis.data = monthXAxis; that.optionMonth = options; }); + }); + }, itemClick(type, item) { - console.log(item); this.type = type; this.cate = item[1]; - console.log(this.type); this.asynDialog = true; }, handlePrint() { diff --git a/src/views/enm_slag/teamAnalysis.vue b/src/views/enm_slag/teamAnalysis.vue index 146dbb18..2059be42 100644 --- a/src/views/enm_slag/teamAnalysis.vue +++ b/src/views/enm_slag/teamAnalysis.vue @@ -174,7 +174,7 @@ export default { arr.push(time); arr.push(item.team_name); arr.push(item.total_production); - arr.push(item.production_hour); + arr.push(item.production_cost_unit); arr[4] = item.elec_consume_unit; //当期值(KW·h/t) let keyVale = "goal_val_" + n; @@ -232,13 +232,13 @@ export default { const sortedData = monthData.sort((a, b) => parseFloat(b.value) - parseFloat(a.value)); const index = sortedData.findIndex(obj => parseFloat(obj.value) === parseFloat(itemValue)); if (index === 0){ - arr[11] = 20; - } else if (index === 1) { - arr[11] = 15; - } else if (index === 2) { - arr[11] = 10; - } else if (index === 3) { arr[11] = 5; + } else if (index === 1) { + arr[11] = 10; + } else if (index === 2) { + arr[11] = 15; + } else if (index === 3) { + arr[11] = 20; } const total_elec_consume = item.production_hour; const sortedTotalData = monthData.sort((a, b) => parseFloat(b.production_hour) - parseFloat(a.production_hour)); diff --git a/src/views/enm_slag/workshopAnalysis.vue b/src/views/enm_slag/workshopAnalysis.vue index 8eed804f..982d2885 100644 --- a/src/views/enm_slag/workshopAnalysis.vue +++ b/src/views/enm_slag/workshopAnalysis.vue @@ -38,7 +38,7 @@ > - 车间单位产品电耗月度分析表 + 电石渣干粉单位电耗月度分析表 月份 @@ -148,6 +148,7 @@ export default { let that = this; let paramsGoal = {}; paramsGoal.page = 0; + paramsGoal.year = that.query.year_s; paramsGoal.mgroup = that.query.mgroup; that.$API.mtm.goal.list.req(paramsGoal).then((ress) => { if (ress.length > 0) { @@ -157,17 +158,17 @@ export default { goal.goal_cate_name == "单位产品分布电耗(kW·h/t)" ) { monthGoal[0] = goal.goal_val; - monthGoal[1] = goal.goal_val_2; - monthGoal[2] = goal.goal_val_3; - monthGoal[3] = goal.goal_val_4; - monthGoal[4] = goal.goal_val_5; - monthGoal[5] = goal.goal_val_6; - monthGoal[6] = goal.goal_val_7; - monthGoal[7] = goal.goal_val_8; - monthGoal[8] = goal.goal_val_9; - monthGoal[9] = goal.goal_val_10; - monthGoal[10] = goal.goal_val_11; - monthGoal[11] = goal.goal_val_12; + monthGoal[1] = goal.goal_val_1; + monthGoal[2] = goal.goal_val_2; + monthGoal[3] = goal.goal_val_3; + monthGoal[4] = goal.goal_val_4; + monthGoal[5] = goal.goal_val_5; + monthGoal[6] = goal.goal_val_6; + monthGoal[7] = goal.goal_val_7; + monthGoal[8] = goal.goal_val_8; + monthGoal[9] = goal.goal_val_9; + monthGoal[10] = goal.goal_val_10; + monthGoal[11] = goal.goal_val_11; monthGoal[12] = goal.goal_val_12; that.monthGoal = monthGoal; }