Browse Source

[完善]安信坐标显示

beijing
邵佳豪 2 years ago
parent
commit
4e79fdc69f
  1. 8
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss
  2. 12
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts

8
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss

@ -93,8 +93,9 @@
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.imgbox {
flex: 1;
box-sizing: border-box;
padding: 0 12px;
width: 100%;
@ -104,7 +105,10 @@
justify-content: center;
position: relative;
// margin-bottom: 12px;
flex-direction: column;
iframe{
flex: 1;
}
#canvas {
position: absolute;
left: 50%;

12
src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts

@ -68,6 +68,7 @@ export class GetOutOfLineDetailsComponent implements OnInit {
userName; //登录账号的用户名
isShowAxOtherRegion; //控制哪些用户可以看到ax全部
ngOnInit(): void {
// 安信框选
this.userName = JSON.parse(sessionStorage.getItem("userdata")).userName;
if (this.userName === "admin" || this.userName === "superadmin") {
@ -75,9 +76,14 @@ export class GetOutOfLineDetailsComponent implements OnInit {
} else {
this.isShowAxOtherRegion = false;
}
if (this.data.violatedItemSnapshot) {
if (
this.data.violatedItemSnapshot &&
this.data.violation.eventSystemName.indexOf("证照") == -1 &&
this.data.violation.eventSystemName.indexOf("设备") == -1
) {
this.isAnxin = true;
}
if (this.isAnxin) {
let dataArr = [];
for (const key in JSON.parse(this.data.violatedItemSnapshot)) {
const element = JSON.parse(this.data.violatedItemSnapshot)[key];
@ -97,10 +103,10 @@ export class GetOutOfLineDetailsComponent implements OnInit {
this.legendList.push(checkboxArr[i]);
}
setTimeout(() => {
if (this.isAnxin == true) {
this.canvasLabel();
}
}, 0);
}
// 安信框选
console.log("预警信息", this.data);

Loading…
Cancel
Save