fix:石灰石破碎中生产报告不要小时;余热发电中生产报告的产量单位更正

This commit is contained in:
shijing 2024-04-30 16:16:25 +08:00
parent 8b8ff3b48b
commit 0135367fea
2 changed files with 61 additions and 62 deletions

View File

@ -347,7 +347,7 @@ export default {
mgroup: "3347217246321065984",
},
tableDatas: [
["产量", "总发电量KW·h/t", 0, 0, 0, 0, 0, 0, 0, 0],
["产量", "总发电量KW·h", 0, 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],

View File

@ -24,11 +24,10 @@
>
<thead class="myTableHead">
<tr>
<th colspan="10">石灰石破碎工段生产报告</th>
<th colspan="9">石灰石破碎工段生产报告</th>
</tr>
<tr>
<th colspan="2">参数</th>
<th>上个小时</th>
<th>昨日</th>
<th>本月</th>
<th>本年</th>
@ -54,12 +53,12 @@
{{ item[0] }}
</td>
<td class="numCell">{{ item[1] }}</td>
<td
<!-- <td
class="numCell hoursItem"
@click="itemClick('hour_s', item)"
>
{{ item[2] }}
</td>
</td> -->
<td
class="numCell daysItem"
@click="itemClick('day_s', item)"
@ -86,14 +85,14 @@
</tbody>
</table>
<!-- <div id="main" style="width:1200px;height:600px;"></div> -->
<div class="chartWrap">
<!-- <div class="chartWrap">
<div class="chartTitle">小时生产参数统计图</div>
<scEcharts
height="400px"
width="1033px"
:option="optionHour"
></scEcharts>
</div>
</div> -->
<div class="chartWrap">
<div class="chartTitle">本月生产参数统计图</div>
<scEcharts
@ -488,12 +487,12 @@ export default {
days_d = lastDate.getDate();
}
//
let hourTime = timeDate - 3600000;
let hourDate = new Date(hourTime);
let year_h = hourDate.getFullYear();
let month_h = hourDate.getMonth() + 1;
let days_h = hourDate.getDate();
let hours_h = hourDate.getHours();
// let hourTime = timeDate - 3600000;
// let hourDate = new Date(hourTime);
// let year_h = hourDate.getFullYear();
// let month_h = hourDate.getMonth() + 1;
// let days_h = hourDate.getDate();
// let hours_h = hourDate.getHours();
this.$API.mtm.mgroup.list
.req({ page: 0, search: "石灰石破碎" })
.then((res) => {
@ -514,22 +513,22 @@ export default {
that.tableDatas[1][3] = data3.elec_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 = 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[1][2] = data4.elec_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 = 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[1][2] = data4.elec_consume_unit;
// }
// });
//
let params5 = {};
params5.page = 0;
@ -612,45 +611,45 @@ export default {
}
});
});
that.getHourData();
// that.getHourData();
that.getDayData();
that.getMonthData();
});
});
},
methods: {
//
getHourData() {
let that = this;
let query = {};
query.page = 0;
query.year_s = that.year;
query.month_s = that.month;
query.day_s = that.days;
query.type = "hour_s";
query.mgroup = that.query.mgroup;
this.$API.enm.enstat.req(query).then((response) => {
let seriesData0 = [],
seriesData1 = [];
console.log("获取小时数据", response);
let data = response;
data.forEach((item) => {
let ind = item.hour - 1;
seriesData0[ind] = item.total_production;
seriesData1[ind] = item.elec_consume_unit;
});
let options = { ...that.option1 };
options.series[0].data = seriesData0;
options.series[1].data = seriesData1;
let hourXAxis = [];
for (let i = 1; i <= that.hours; i++) {
let item = i + "时";
hourXAxis.push(item);
}
options.xAxis.data = hourXAxis;
that.optionHour = options;
});
},
// //
// getHourData() {
// let that = this;
// let query = {};
// query.page = 0;
// query.year_s = that.year;
// query.month_s = that.month;
// query.day_s = that.days;
// query.type = "hour_s";
// query.mgroup = that.query.mgroup;
// this.$API.enm.enstat.req(query).then((response) => {
// let seriesData0 = [],
// seriesData1 = [];
// console.log("", response);
// let data = response;
// data.forEach((item) => {
// let ind = item.hour - 1;
// seriesData0[ind] = item.total_production;
// seriesData1[ind] = item.elec_consume_unit;
// });
// let options = { ...that.option1 };
// options.series[0].data = seriesData0;
// options.series[1].data = seriesData1;
// let hourXAxis = [];
// for (let i = 1; i <= that.hours; i++) {
// let item = i + "";
// hourXAxis.push(item);
// }
// options.xAxis.data = hourXAxis;
// that.optionHour = options;
// });
// },
//
getDayData() {
let that = this;