Browse Source

[完善]综合统计页面

master
邵佳豪 5 months ago
parent
commit
6d868d46d8
  1. BIN
      dist.zip
  2. 5
      src/app/pages/home-page-comprehensive/home-page-comprehensive.component.ts
  3. 8
      src/app/pages/home/home.component.html
  4. 7
      src/app/pages/home/home.component.ts
  5. 1
      src/app/pages/singlelogin/singlelogin.component.ts

BIN
dist.zip

Binary file not shown.

5
src/app/pages/home-page-comprehensive/home-page-comprehensive.component.ts

@ -1231,15 +1231,16 @@ export class HomePageComprehensiveComponent implements OnInit {
});
}
getHomeAggregation_YK() {
let user = JSON.parse(localStorage.getItem("userdata"));
let body = {
organizationUnitId: this.organizationUnitId,
organizationUnitId: 1,
isContainsChildren: true,
sinochemUserId: user?.sinochemUserId || user?.SinochemUserId,
};
this.isSpin_YK = true;
this.http
.post("/youku/api/services/app/Home/HomeAggregation", body)
.subscribe((data: any) => {
console.log("data.result", data.result);
data.result.violationNameAgg = data.result.violationNameAgg.filter(
(v, i) => i < 5
);

8
src/app/pages/home/home.component.html

@ -4,24 +4,24 @@
<img *ngIf="isProd" src="../../../assets/images/logo2.png" alt="">
</div>
<div class="libox" *ngIf="!isGasStationNav && isComprehensive == 'true'">
<div class="libox" *ngIf="!isGasStationNav && isComprehensive">
<li class="router-link-active">
AI视频预警统计
</li>
</div>
<div class="libox" *ngIf="!isGasStationNav && isComprehensive == 'false'">
<div class="libox" *ngIf="!isGasStationNav && !isComprehensive">
<li *ngFor="let item of menuList1" (click)="routerChange(item)"
[ngClass]="{'router-link-active': item.name == selectedItem}">
{{item.name}}
</li>
</div>
<div class="libox" *ngIf="isGasStationNav && isComprehensive == 'true'">
<div class="libox" *ngIf="isGasStationNav && isComprehensive">
<li class="router-link-active">
AI视频预警统计
</li>
</div>
<div class="libox" *ngIf="isGasStationNav && isComprehensive == 'false'">
<div class="libox" *ngIf="isGasStationNav && !isComprehensive">
<ng-container *ngIf="isGasStationBack; else elseTemplate">
<li [routerLink]="['/plan/petrolStation']" routerLinkActive="router-link-active">
数字油站

7
src/app/pages/home/home.component.ts

@ -102,7 +102,7 @@ export class HomeComponent implements OnInit {
selectedItem;
isZT = sessionStorage.getItem("isZT") || "false";
isComprehensive = sessionStorage.getItem("isComprehensive") || "false";
isComprehensive = false;
routerChange(item) {
if (
JSON.parse(sessionStorage.getItem("isGasStation")) &&
@ -202,6 +202,11 @@ export class HomeComponent implements OnInit {
this.isGasStationNav = true;
this.isGasStationBack = false;
}
//油站人员进入油站
if (event.url.indexOf("comprehensive") != -1) {
//控制返回按钮显示
this.isComprehensive = true;
}
});
setInterval(() => {

1
src/app/pages/singlelogin/singlelogin.component.ts

@ -290,7 +290,6 @@ export class SingleloginComponent implements OnInit {
JSON.stringify(data.result.user)
);
sessionStorage.setItem("isZT", "true");
sessionStorage.setItem("isComprehensive", "true");
//跳转页面
sessionStorage.setItem("isGasStation", "false");
this.router.navigate(["/comprehensive"]);

Loading…
Cancel
Save