feat: 修改大屏 本月能源消耗改为本日

This commit is contained in:
zty 2024-12-30 09:14:43 +08:00
parent e8eb624661
commit c9168a5b61
1 changed files with 13 additions and 25 deletions

View File

@ -1285,25 +1285,26 @@ export default {
let myChart = echarts.init(chartDom);
// series
let seriesData = new Array(12).fill(0);
let seriesData1 = new Array(12).fill(0);
let seriesData = new Array(31).fill(0);
let seriesData1 = new Array(31).fill(0);
//
function generateQuery(mgroupId) {
return {
page: 0,
//
start_time: that.currentYear + "-01-01 00:00:00",
end_time: that.currentYear + "-12-31 00:00:00",
type: "month_s",
year_s: that.currentYear,
month_s: that.currentMonth,
type: "day_s",
mgroup: mgroupId,
};
}
function generateQueryMpoint(mpointId) {
return {
page: 0,
type: "month",
year: that.currentYear,
type: "day_s",
year_s: that.currentYear,
month_s: that.currentMonth,
mpoint: mpointId,
};
}
@ -1312,18 +1313,18 @@ export default {
this.$API.enm.enstat.req(query1).then((response) => {
response.forEach((item) => {
if (item.qua_data.length > 0) {
let ind = item.month_s - 1;
let ind = item.day_s - 1;
seriesData[ind] = item.total_production || 0;
}
});
//
//
let query2 = generateQueryMpoint("3631880992400515072");
return this.$API.enm.mpointstat.list.req(query2);
}).then((response) => {
let maxId;
response.forEach((item) => {
let ind = item.month - 1;
maxId = 12;
let ind = item.day_s - 1;
maxId = 31;
seriesData1[ind] = item.val || 0;
});
//
@ -1389,20 +1390,7 @@ export default {
},
},
];
option5.xAxis.data = [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
];
option5.xAxis.data = that.datelist;
myChart.setOption(option5); //
let index3 = 0;
intervalId = setInterval(function () {