Browse Source

[完善]首页数据完善

beijing
邵佳豪 2 years ago
parent
commit
1359fad5f2
  1. 8
      src/app/pages/home-page/home-page.component.ts

8
src/app/pages/home-page/home-page.component.ts

@ -736,7 +736,7 @@ export class HomePageComponent implements OnInit {
this.warningechartpieOptionAll.series[0].data =
data.violationType.violationTypeAggAll;
this.warningechartpieOptionAll.series[0].label.normal.formatter =
"{total|" + violationTypeAggCountAll + "}" + "\n\r" + "{active|累计预警}";
"{total|" + data.recordCount + "}" + "\n\r" + "{active|累计预警}";
this.warningechartpieAll.setOption(this.warningechartpieOptionAll);
// 可调用clearLoop方法,清除定时器
@ -791,8 +791,8 @@ export class HomePageComponent implements OnInit {
//下面两个柱状图
isSpinOfEventWarning = false;
isSpinOfOilDischarge = false;
isSpinOfEventWarning = true;
isSpinOfOilDischarge = true;
get30daysViolate(type, data) {
//type = true 代表预警 false代表卸油
type
@ -828,6 +828,7 @@ export class HomePageComponent implements OnInit {
let violationTypeAggCount = 0;
let monthArr = [];
let valuedata = [];
data.forEach((element) => {
violationTypeAggCount += element.count;
monthArr.push(moment(element.key).format("MM.DD"));
@ -854,7 +855,6 @@ export class HomePageComponent implements OnInit {
};
}
this.warningechartbar.setOption(this.warningechartbarOption);
this.warningechartpieOption.series[0].label.normal.formatter =
"{total|" + violationTypeAggCount + "}" + "\n\r" + "{active|预警事件}";
this.warningechartpie.setOption(this.warningechartpieOption);

Loading…
Cancel
Save