feat:余热发电生产报告添加参数&生产报告完成率小数点保留两位

This commit is contained in:
shijing 2024-05-11 10:34:56 +08:00
parent 610c4ae52c
commit 1a457fe49d
5 changed files with 79 additions and 45 deletions

View File

@ -398,8 +398,10 @@ export default {
mounted() {
function precen(a, b) {
if (b !== 0 && b !== null && a !== null) {
let precen = (a / b).toFixed(2);
return precen * 100 + "%";
let precen = (a / b) * 100;
let precenNum = precen.toFixed(2);
console.log(precenNum);
return precenNum + "%";
} else {
return "/";
}

View File

@ -45,18 +45,21 @@
>
<td
class="numCell"
v-if="index == 0 || index == 2"
rowspan="2"
v-if="index == 0"
rowspan="3"
>
{{ item[0] }}
</td>
<td
class="numCell"
v-else-if="index == 4"
rowspan="4"
v-if="index == 3"
rowspan="2"
>
{{ item[0] }}
</td>
<td class="numCell" v-else-if="index == 5">
{{ item[0] }}
</td>
<td class="numCell" v-else-if="index == 8">
{{ item[0] }}
</td>
@ -119,7 +122,7 @@
</div>
</div>
<sc-dialog v-model="chartShow" draggable title="回转窑工段">
<sc-dialog v-model="chartShow" draggable title="余热发电工段">
<div class="searchHead" v-if="type == 'hours'">
<el-date-picker
v-model="query.start_time"
@ -348,7 +351,8 @@ export default {
},
tableDatas: [
["产量", "总发电量KW·h", 0, 0, 0, 0, 0, 0, 0, 0],
["产量", "单位发电量KW·h/t", "/", 0, 0, 0, 0, 0, 0, 0],
["产量", "发电功率KW·h", "/", 0, 0, 0, 0, 0, 0, 0],
["产量", "吨熟料发电量KW·h/t", "/", 0, 0, 0, 0, 0, 0, 0],
["运转时间", "运转时间h", "/", 0, 0, 0, 0, 0, 0, 0],
["运转时间", "运转率(%", "/", 0, 0, 0, 0, 0, 0, 0],
["自用电量", "用电量KW·h", 0, 0, 0, 0, 0, 0, 0, 0],
@ -525,8 +529,10 @@ export default {
mounted() {
function precen(a, b) {
if (b !== 0 && b !== null && a !== null) {
let precen = (a / b).toFixed(2);
return precen * 100 + "%";
let precen = (a / b) * 100;
let precenNum = precen.toFixed(2);
console.log(precenNum);
return precenNum + "%";
} else {
return "/";
}
@ -576,10 +582,11 @@ export default {
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_coast;
that.tableDatas[1][3] = data3.production_hour; //
that.tableDatas[2][3] = data3.production_elec_unit; //
that.tableDatas[3][3] = data3.run_hour;
that.tableDatas[4][3] = data3.run_rate;
that.tableDatas[5][3] = data3.elec_consume;
}
});
//
@ -595,7 +602,11 @@ export default {
if (res4.length > 0) {
let data4 = res4[0];
that.tableDatas[0][2] = data4.total_production;
that.tableDatas[4][2] = data4.elec_coast;
that.tableDatas[1][2] = data4.production_hour; //
that.tableDatas[2][2] = data4.production_elec_unit; //
that.tableDatas[3][2] = "/";
that.tableDatas[4][2] = "/";
that.tableDatas[5][2] = data4.elec_consume;
}
});
let params5 = {};
@ -608,32 +619,35 @@ export default {
let data5 = res5;
data5.forEach((item5) => {
let str = "goal_val_" + that.month;
if (
item5.goal_cate_name == "总发电量KW·h/t"
) {
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 ==
"单位发电量KW·h/t"
item5.goal_cate_name == "发电功率KW·h"
) {
that.tableDatas[1][6] = item5[str];
that.tableDatas[1][8] = item5.goal_val;
} else if (
item5.goal_cate_name == "运转时间h"
item5.goal_cate_name ==
"吨熟料发电量KW·h/t"
) {
that.tableDatas[2][6] = item5[str];
that.tableDatas[2][8] = item5.goal_val;
} else if (
item5.goal_cate_name == "运转率(%"
item5.goal_cate_name == "运转时间h"
) {
that.tableDatas[3][6] = item5[str];
that.tableDatas[3][8] = item5.goal_val;
} else if (
item5.goal_cate_name == "用电量KW·h"
item5.goal_cate_name == "运转率(%"
) {
that.tableDatas[4][6] = item5[str];
that.tableDatas[4][8] = item5.goal_val;
} else if (
item5.goal_cate_name == "用电量KW·h"
) {
that.tableDatas[5][6] = item5[str];
that.tableDatas[5][8] = item5.goal_val;
}
});
}
@ -658,21 +672,27 @@ export default {
that.tableDatas[1][5],
that.tableDatas[1][8]
);
that.tableDatas[2][5] = data1.run_hour;
that.tableDatas[2][5] =
data1.production_elec_unit;
that.tableDatas[2][9] = precen(
that.tableDatas[2][5],
that.tableDatas[2][8]
);
that.tableDatas[3][5] = data1.run_rate;
that.tableDatas[3][5] = data1.run_hour;
that.tableDatas[3][9] = precen(
that.tableDatas[3][5],
that.tableDatas[3][8]
);
that.tableDatas[4][5] = data1.elec_coast;
that.tableDatas[4][5] = data1.run_rate;
that.tableDatas[4][9] = precen(
that.tableDatas[4][5],
that.tableDatas[4][8]
);
that.tableDatas[5][5] = data1.elec_consume;
that.tableDatas[5][9] = precen(
that.tableDatas[5][5],
that.tableDatas[5][8]
);
} else {
}
});
@ -696,21 +716,27 @@ export default {
that.tableDatas[1][4],
that.tableDatas[1][6]
);
that.tableDatas[2][4] = data2.run_hour;
that.tableDatas[2][4] =
data2.production_elec_unit;
that.tableDatas[2][7] = precen(
that.tableDatas[2][4],
that.tableDatas[2][6]
);
that.tableDatas[3][4] = data2.run_rate;
that.tableDatas[3][4] = data2.run_hour;
that.tableDatas[3][7] = precen(
that.tableDatas[3][4],
that.tableDatas[3][6]
);
that.tableDatas[4][4] = data2.elec_coast;
that.tableDatas[4][4] = data2.run_rate;
that.tableDatas[4][7] = precen(
that.tableDatas[4][4],
that.tableDatas[4][6]
);
that.tableDatas[5][4] = data2.elec_consume;
that.tableDatas[5][7] = precen(
that.tableDatas[5][4],
that.tableDatas[5][6]
);
}
});
});
@ -740,10 +766,10 @@ export default {
data.forEach((item) => {
let ind = item.hour - 1;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_hour;
seriesData2[ind] = item.run_rate;
seriesData3[ind] = item.elec_consume_unit;
seriesData4[ind] = item.coal_consume_unit;
seriesData1[ind] = item.production_hour; //
seriesData2[ind] = item.run_hour;
seriesData3[ind] = item.run_rate;
seriesData4[ind] = item.elec_consume;
});
let options = { ...that.option1 };
options.series[0].data = seriesData0;
@ -780,9 +806,9 @@ export default {
let ind = item.day_s - 1;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_hour;
seriesData2[ind] = item.run_rate;
seriesData3[ind] = item.elec_consume_unit;
seriesData4[ind] = item.coal_consume_unit;
seriesData2[ind] = item.run_hour;
seriesData3[ind] = item.run_rate;
seriesData4[ind] = item.elec_consume;
});
let options = { ...that.option2 };
options.series[0].data = seriesData0;
@ -818,9 +844,9 @@ export default {
let ind = item.month_s - 1;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.production_hour;
seriesData2[ind] = item.run_rate;
seriesData3[ind] = item.elec_consume_unit;
seriesData4[ind] = item.coal_consume_unit;
seriesData2[ind] = item.run_hour;
seriesData3[ind] = item.run_rate;
seriesData4[ind] = item.elec_consume;
});
let options = { ...that.option3 };
options.series[0].data = seriesData0;

View File

@ -537,8 +537,10 @@ export default {
mounted() {
function precen(a, b) {
if (b !== 0 && b !== null && a !== null) {
let precen = (a / b).toFixed(2);
return precen * 100 + "%";
let precen = (a / b)*100;
let precenNum = precen.toFixed(2);
console.log(precenNum)
return precenNum + "%";
} else {
return "/";
}

View File

@ -459,8 +459,10 @@ export default {
mounted() {
function precen(a, b) {
if (b !== 0 && b !== null && a !== null) {
let precen = (a / b).toFixed(2);
return precen * 100 + "%";
let precen = (a / b) * 100;
let precenNum = precen.toFixed(2);
console.log(precenNum);
return precenNum + "%";
} else {
return "/";
}

View File

@ -515,8 +515,10 @@ export default {
mounted() {
function precen(a, b) {
if (b !== 0 && b !== null && a !== null) {
let precen = (a / b).toFixed(2);
return precen * 100 + "%";
let precen = (a / b) * 100;
let precenNum = precen.toFixed(2);
console.log(precenNum);
return precenNum + "%";
} else {
return "/";
}