Browse Source

[新增]安信预警框增加延长工装id17

beijing
邵佳豪 2 years ago
parent
commit
a6e78f17da
  1. 46
      src/app/app.component.ts
  2. 5
      src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts

46
src/app/app.component.ts

@ -1,29 +1,39 @@
import { Component, TemplateRef, ViewChild } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { Router, ActivatedRoute } from '@angular/router'
import { CacheTokenService } from './service/cache-token.service'//引入服务
import { Component, TemplateRef, ViewChild } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { Router, ActivatedRoute } from "@angular/router";
import { CacheTokenService } from "./service/cache-token.service"; //引入服务
import "reflect-metadata";
import { NzNotificationService } from 'ng-zorro-antd/notification';
import { NzNotificationService } from "ng-zorro-antd/notification";
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.scss"],
})
export class AppComponent {
@ViewChild(TemplateRef, { static: false }) template?: TemplateRef<{}>;
constructor(private http: HttpClient, private router: Router, public token: CacheTokenService, private notificationService: NzNotificationService) { }
constructor(
private http: HttpClient,
private router: Router,
public token: CacheTokenService,
private notificationService: NzNotificationService
) {}
VERSION = 20230712;
ngOnInit(): void {
this.sayHello();
}
ngAfterViewInit(): void {
sayHello() {
let _a;
if (navigator.userAgent.toLowerCase().indexOf("chrome") > -1) {
const args = [
"\n %c 版本号 - " + this.VERSION + "\n",
"color: #ff66a5; background: #000000; padding:5px 0;",
];
(_a = window.console).log.apply(_a, args);
} else if (window.console) {
window.console.log("\n %c 版本号 - " + this.VERSION + "\n");
}
}
ngAfterViewInit(): void {}
}

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

@ -66,6 +66,7 @@ export class GetOutOfLineDetailsComponent implements OnInit {
{ id: 14, name: "断开的卸油管", color: "blue" },
{ id: 15, name: "烟雾预警", color: "#B4C3FF" },
{ id: 16, name: "火灾报警", color: "red" },
{ id: 17, name: "延长工装", color: "blue" },
];
userName; //登录账号的用户名
isShowAxOtherRegion; //控制哪些用户可以看到ax全部
@ -217,8 +218,8 @@ export class GetOutOfLineDetailsComponent implements OnInit {
var img = new Image();
img.src = url;
img.onload = () => {
this.canvasWidth = img.width;
this.canvasHeight = img.height;
// this.canvasWidth = img.width;
// this.canvasHeight = img.height;
window.setTimeout(() => {
// 加载图片
this.ctx.drawImage(img, 0, 0, this.canvasWidth, this.canvasHeight);

Loading…
Cancel
Save