From f7cd002c5ce669ffe103117119f53d06a19cc4fb Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Tue, 8 Aug 2023 17:09:17 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=AE=89=E4=BF=A1=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8F=82=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../host-config/host-config.component.ts | 1 +
.../iframe/iframe.component.html | 2 ++
.../iframe/iframe.component.scss | 0
.../iframe/iframe.component.spec.ts | 25 ++++++++++++++++
.../iframe/iframe.component.ts | 27 ++++++++++++++++++
.../image-label-anxin.component.ts | 5 +++-
.../system-management-routing.module.ts | 4 ++-
.../system-management.module.ts | 2 ++
src/assets/images/noImg.png | Bin 0 -> 2404 bytes
src/index.html | 10 ++++++-
10 files changed, 73 insertions(+), 3 deletions(-)
create mode 100644 src/app/system-management/iframe/iframe.component.html
create mode 100644 src/app/system-management/iframe/iframe.component.scss
create mode 100644 src/app/system-management/iframe/iframe.component.spec.ts
create mode 100644 src/app/system-management/iframe/iframe.component.ts
create mode 100644 src/assets/images/noImg.png
diff --git a/src/app/system-management/host-config/host-config.component.ts b/src/app/system-management/host-config/host-config.component.ts
index 4b7da66..be31c5f 100644
--- a/src/app/system-management/host-config/host-config.component.ts
+++ b/src/app/system-management/host-config/host-config.component.ts
@@ -1594,6 +1594,7 @@ rule_threshold:
smog_continue_s: 3,
fire_sleep_m: 5,
fire_continue_s: 3,
+ lossScore: 40, //没检测到物体的惩罚分数
},
};
console.log(this.hostData);
diff --git a/src/app/system-management/iframe/iframe.component.html b/src/app/system-management/iframe/iframe.component.html
new file mode 100644
index 0000000..5f860de
--- /dev/null
+++ b/src/app/system-management/iframe/iframe.component.html
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/src/app/system-management/iframe/iframe.component.scss b/src/app/system-management/iframe/iframe.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/system-management/iframe/iframe.component.spec.ts b/src/app/system-management/iframe/iframe.component.spec.ts
new file mode 100644
index 0000000..9f9139d
--- /dev/null
+++ b/src/app/system-management/iframe/iframe.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { IframeComponent } from './iframe.component';
+
+describe('IframeComponent', () => {
+ let component: IframeComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ IframeComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(IframeComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/system-management/iframe/iframe.component.ts b/src/app/system-management/iframe/iframe.component.ts
new file mode 100644
index 0000000..6e0ec69
--- /dev/null
+++ b/src/app/system-management/iframe/iframe.component.ts
@@ -0,0 +1,27 @@
+import { Component, OnInit } from '@angular/core';
+import { Renderer2} from '@angular/core';
+@Component({
+ selector: 'app-iframe',
+ templateUrl: './iframe.component.html',
+ styleUrls: ['./iframe.component.scss']
+})
+export class IframeComponent implements OnInit {
+
+ constructor( private render2: Renderer2) { }
+
+ ngOnInit(): void {
+ }
+ xxx(){
+ this.handleToIframe()
+ }
+ handleToIframe() {
+ const child = this.render2.selectRootElement("#iframe");
+ console.log(child);
+ let data = {
+ from: 'parent page',
+ code: 200,
+ data: '来自父页面的数据!!!'
+ };
+ child.contentWindow.postMessage(data, '*');
+ }
+}
diff --git a/src/app/system-management/image-label-anxin/image-label-anxin.component.ts b/src/app/system-management/image-label-anxin/image-label-anxin.component.ts
index 566003c..0ea95f7 100644
--- a/src/app/system-management/image-label-anxin/image-label-anxin.component.ts
+++ b/src/app/system-management/image-label-anxin/image-label-anxin.component.ts
@@ -84,6 +84,9 @@ export class ImageLabelAnxinComponent implements OnInit {
})
.catch((err) => {
this.message.create('error', '获取图片失败!');
+ window.setTimeout(() => {
+ this.initBackgroundImg();
+ }, 0);
});
}
@@ -106,7 +109,7 @@ export class ImageLabelAnxinComponent implements OnInit {
}
// 图片加载完后,将其显示在canvas中
var img = new Image();
- img.src = this.imgItem ? this.imgItem : '../../../assets/images/bgImg.png';
+ img.src = this.imgItem ? this.imgItem : '../../../assets/images/noImg.png';
console.log('img', img);
diff --git a/src/app/system-management/system-management-routing.module.ts b/src/app/system-management/system-management-routing.module.ts
index 8c21d2c..90c0597 100644
--- a/src/app/system-management/system-management-routing.module.ts
+++ b/src/app/system-management/system-management-routing.module.ts
@@ -11,6 +11,7 @@ import { ConditionMonitoringComponent } from './condition-monitoring/condition-m
import { KafkaComponent } from './kafka/kafka.component';
import { StatusMonitoringComponent } from './status-monitoring/status-monitoring.component';
import { VideoStreamingComponent } from './video-streaming/video-streaming.component';
+import { IframeComponent } from './iframe/iframe.component';
const routes: Routes = [
@@ -24,7 +25,8 @@ const routes: Routes = [
{ path: 'conditionMonitoring', component: ConditionMonitoringComponent },
{ path: 'statusMonitoring', component: StatusMonitoringComponent },
{ path: 'kafka', component: KafkaComponent },
- { path: 'videoStreaming', component: VideoStreamingComponent }
+ { path: 'videoStreaming', component: VideoStreamingComponent },
+ { path: 'iframe', component: IframeComponent }
];
@NgModule({
diff --git a/src/app/system-management/system-management.module.ts b/src/app/system-management/system-management.module.ts
index 6ef326c..eb0bd52 100644
--- a/src/app/system-management/system-management.module.ts
+++ b/src/app/system-management/system-management.module.ts
@@ -50,6 +50,7 @@ import { HuangHaiConfigComponent } from './host-config/huang-hai-config/huang-ha
import { ImageLabelAnxinComponent } from './image-label-anxin/image-label-anxin.component';
import { AnxinConfigComponent } from './host-config/anxin-config/anxin-config.component';
import { DragDropModule } from '@angular/cdk/drag-drop';
+import { IframeComponent } from './iframe/iframe.component';
@NgModule({
declarations: [
OrganizationComponent,
@@ -80,6 +81,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
HuangHaiConfigComponent,
ImageLabelAnxinComponent,
AnxinConfigComponent,
+ IframeComponent,
],
imports: [
CommonModule,
diff --git a/src/assets/images/noImg.png b/src/assets/images/noImg.png
new file mode 100644
index 0000000000000000000000000000000000000000..d3cbad03790c43025419fb22c239616d2ff66d1c
GIT binary patch
literal 2404
zcmeHI>s!)i82`xEwI*FN0$b6?MMzaQTFd9UkD4-TRl
z8Cn_w0ANJhNeR)_79FHWeI3giyRHBLxINC#FPP@%hY9AekH)cL0KhgUn#nYwIoh^G
zMKPIeoep+}oWu~ZI5UJPXlZ_cX~A@0nw#_UA|r>*QN!@PEkMzp2et95GBNX2&TZx6
zpSsGp8&(}~`G&6aB1RPIg%S;ichQ`J^q&YIFQ>bb5|L1d*K6DF>|zI0ZiQGmSV<8y
zz6HbkO4JC-f>M6XhW-#Cw!jBGA(rrUCPiYA=>oB?TU%?m)*gKf)Nn$=lx7c-@TI4F
zqSbKZ6Cc{~?JLB*E|(I=j(~34J*N<6)eF+;-mo>P36<4ug(>#8
zcIugNxm=oAsl4Zn>Bq`heePa)Pfw4J-o7U`W@hJiyC11a&yIdvm9vG^IgUy$C(Ue8
zD;?T9IO>s+kprJ9!Z*ad5$2)!n@+J}k?Gf0~m0=xf??Es&jCI
z0ElG)RrG)x0Q%+-j#{T%_A}r}eV#XnEx$#rudk;MR{h2@0EcjygT)swUYwZwGoa{y?#)RTbF)d=U5}z9G
zpN}P;n>@0=J>JxcEJClttHU=wU5QI!NNC|tl6vn>(;K^f
zE)>Dgb&M7l=RVzTt%?5Ptah2dHZj|=*JgP7y|^)5-gJIuVsdqlG|kwhcAJ_TC!;I+
zE+NFfVw=OuT8p)%Zsf?wRzcax*nZ79l?Pb7qxOe@k?)mC<;3gPKWDH@oW?ejMN@8!
zBx5R-dbMf4g`01(#c2Q76XaEf5b2MLP#f;P;jJnlp6A{9E)UIUy1<`GB$cND=zi%G
zr|fY-zs$224s)=!0y@rT!SZ*V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