diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index d3d64a8..883887d 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
+import { CacheTokenService } from './service/cache-token.service';
@Component({
selector: 'app-root',
@@ -6,5 +7,11 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.scss']
})
export class AppComponent {
-
+ constructor(public token: CacheTokenService) { }
+ ngOnInit() {
+ if (sessionStorage.getItem('token') && !this.token.timer) {
+ //调用服务中的function刷新token
+ this.token.startUp()
+ }
+ }
}
diff --git a/src/app/service/cache-token.service.ts b/src/app/service/cache-token.service.ts
index f910f6b..8e8d030 100644
--- a/src/app/service/cache-token.service.ts
+++ b/src/app/service/cache-token.service.ts
@@ -20,7 +20,8 @@ export class CacheTokenService {
token: token,
refreshToken: refreshToken
}).subscribe((data: any) => {
- console.log('定时刷新token成功')
+
+ console.log('定时刷新token成功',data)
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
})
diff --git a/src/app/system-management/config-form/config-form.component.html b/src/app/system-management/config-form/config-form.component.html
new file mode 100644
index 0000000..d6b596c
--- /dev/null
+++ b/src/app/system-management/config-form/config-form.component.html
@@ -0,0 +1,9 @@
+
+
+
+
+ Content of Tab Pane 1
+ Content of Tab Pane 2
+
+
+
diff --git a/src/app/system-management/config-form/config-form.component.scss b/src/app/system-management/config-form/config-form.component.scss
new file mode 100644
index 0000000..7dfefc3
--- /dev/null
+++ b/src/app/system-management/config-form/config-form.component.scss
@@ -0,0 +1,16 @@
+.box {
+ width: 100%;
+ height: 100%;
+ background: #fff;
+ font-size: 15px;
+ color: black;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ overflow-y: auto;
+}
+.content{
+ flex: 1;
+ box-sizing: border-box;
+ padding: 0 12px;
+}
\ No newline at end of file
diff --git a/src/app/system-management/config-form/config-form.component.ts b/src/app/system-management/config-form/config-form.component.ts
new file mode 100644
index 0000000..9794516
--- /dev/null
+++ b/src/app/system-management/config-form/config-form.component.ts
@@ -0,0 +1,17 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-config-form',
+ templateUrl: './config-form.component.html',
+ styleUrls: ['./config-form.component.scss']
+})
+export class ConfigFormComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+ goback() {
+ history.go(-1)
+ }
+}
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 61b577e..07a3547 100644
--- a/src/app/system-management/host-config/host-config.component.ts
+++ b/src/app/system-management/host-config/host-config.component.ts
@@ -147,7 +147,8 @@ export class HostConfigComponent implements OnInit {
}).subscribe({
next: (data) => {
console.log('连接状态', data)
- this.router.navigate(['/system/host/camera/imageList'])
+ // this.router.navigate(['/system/host/camera/imageList'])
+ this.router.navigate(['/system/host/camera/configForm'])
},
error: (err) => {
console.log('连接失败', err)
diff --git a/src/app/system-management/image-label2/image-label2.component.scss b/src/app/system-management/image-label2/image-label2.component.scss
index f963bf6..b49f52f 100644
--- a/src/app/system-management/image-label2/image-label2.component.scss
+++ b/src/app/system-management/image-label2/image-label2.component.scss
@@ -9,10 +9,18 @@
flex-direction: column;
overflow-y: auto;
}
-.btnbox{
+
+.btnbox {
display: flex;
margin-bottom: 8px;
- button{
+
+ button {
margin-right: 6px;
}
-}
\ No newline at end of file
+}
+
+.imgbox,
+.btnbox {
+ box-sizing: border-box;
+ padding: 0 12px;
+}
diff --git a/src/app/system-management/system-management-routing.module.ts b/src/app/system-management/system-management-routing.module.ts
index 0456bd3..87b88dd 100644
--- a/src/app/system-management/system-management-routing.module.ts
+++ b/src/app/system-management/system-management-routing.module.ts
@@ -6,6 +6,7 @@ import { HostConfigComponent } from './host-config/host-config.component';
import { ImageListComponent } from './image-list/image-list.component';
import { PlottingImageComponent } from './plotting-image/plotting-image.component';
import { ImageLabel2Component } from './image-label2/image-label2.component';
+import { ConfigFormComponent } from './config-form/config-form.component';
const routes: Routes = [
@@ -14,6 +15,7 @@ const routes: Routes = [
{ path: 'host/camera', component: HostConfigComponent },
{ path: 'host/camera/imageList', component: ImageListComponent },
{ path: 'host/camera/imageLabel', component: ImageLabel2Component },
+ { path: 'host/camera/configForm', component: ConfigFormComponent },
{ path: 'plottingImage', component: PlottingImageComponent },
];
diff --git a/src/app/system-management/system-management.module.ts b/src/app/system-management/system-management.module.ts
index 599a8f2..c1ab40d 100644
--- a/src/app/system-management/system-management.module.ts
+++ b/src/app/system-management/system-management.module.ts
@@ -33,9 +33,10 @@ import { cameraType } from '../pipe/cameraTypePipe';
import { ImageListComponent } from './image-list/image-list.component';
import { ImageLabelComponent } from './image-label/image-label.component';
import { ImageLabel2Component } from './image-label2/image-label2.component';
-
+import { ConfigFormComponent } from './config-form/config-form.component';
+import { NzTabsModule } from 'ng-zorro-antd/tabs';
@NgModule({
- declarations: [OrganizationComponent, NavigationComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, HostConfigComponent, ImageListComponent, ImageLabelComponent, PlottingImageComponent, cameraType, ImageLabel2Component],
+ declarations: [OrganizationComponent, NavigationComponent, AddorComponent, EditorComponent, AnalysisOfTheHostComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent, HostConfigComponent, ImageListComponent, ImageLabelComponent, PlottingImageComponent, cameraType, ImageLabel2Component, ConfigFormComponent],
imports: [
CommonModule,
SystemRoutingModule,
@@ -56,7 +57,8 @@ import { ImageLabel2Component } from './image-label2/image-label2.component';
NzSpinModule,
NzTreeSelectModule,
NzCheckboxModule,
- NzPageHeaderModule
+ NzPageHeaderModule,
+ NzTabsModule
],
entryComponents: [AddorComponent, EditorComponent, AddhostComponent, EdithostComponent, AddcameraComponent, EditcameraComponent]