From 811e9df3116438e441d5e7e66724f13859bf8af5 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 9 Nov 2020 15:10:53 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E=E6=BC=94?= =?UTF-8?q?=E7=BB=83=E8=AE=B0=E5=BD=95=E4=BF=A1=E6=81=AFtabs=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app-routing.module.ts | 3 + .../rehearsal-recordinfo.component.html | 62 +++++++++++++++++++ .../rehearsal-recordinfo.component.scss | 28 +++++++++ .../rehearsal-recordinfo.component.spec.ts | 25 ++++++++ .../rehearsal-recordinfo.component.ts | 23 +++++++ .../training-recordinfo.component.html | 8 --- src/app/ui/ui.module.ts | 3 +- 7 files changed, 143 insertions(+), 9 deletions(-) create mode 100644 src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.html create mode 100644 src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.scss create mode 100644 src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.spec.ts create mode 100644 src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 880bbaf..9f0eeb2 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -8,6 +8,7 @@ import { HomeComponent } from './ui/home/home.component' import { AuthGuard } from './auth.guard' import { AddSixFamiliarComponent } from './ui/add-six-familiar/add-six-familiar.component'; import { TrainingRecordinfoComponent } from './ui/training-recordinfo/training-recordinfo.component'; +import { RehearsalRecordinfoComponent } from './ui/rehearsal-recordinfo/rehearsal-recordinfo.component'; @@ -26,6 +27,8 @@ const routes: Routes = [ component:AddSixFamiliarComponent,canActivate: [AuthGuard],}, {path:'trainingrecordinfo', component:TrainingRecordinfoComponent,canActivate: [AuthGuard],}, + {path:'rehearsalrecordinfo', + component:RehearsalRecordinfoComponent,canActivate: [AuthGuard],}, {path:'login', component:LoginComponent}, {path:'home', component:HomeComponent,canActivate: [AuthGuard],},//守卫验证 diff --git a/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.html b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.html new file mode 100644 index 0000000..3625759 --- /dev/null +++ b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.html @@ -0,0 +1,62 @@ +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.scss b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.scss new file mode 100644 index 0000000..2fdf654 --- /dev/null +++ b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.scss @@ -0,0 +1,28 @@ +.bigbox{ + width: 100%; + height: 100%; + background: #F4F5F9; + display: flex; + flex-direction: column; + overflow: hidden; + .title{ + width: 100%; + height: 0.585938rem; + } + .content{ + flex: 1; + overflow: hidden; + .cardbox{ + margin: 0 auto; + margin-top:0.195313rem; + background-color: #fff; + border-radius: 0.048828rem; + width:100%; + height: 100%; + } + } +} +.mat-tab-body-wrapper { + height: 100%; + overflow: hidden; +} \ No newline at end of file diff --git a/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.spec.ts b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.spec.ts new file mode 100644 index 0000000..e57ecc8 --- /dev/null +++ b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RehearsalRecordinfoComponent } from './rehearsal-recordinfo.component'; + +describe('RehearsalRecordinfoComponent', () => { + let component: RehearsalRecordinfoComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RehearsalRecordinfoComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RehearsalRecordinfoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.ts b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.ts new file mode 100644 index 0000000..e3120d7 --- /dev/null +++ b/src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.ts @@ -0,0 +1,23 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-rehearsal-recordinfo', + templateUrl: './rehearsal-recordinfo.component.html', + styleUrls: ['./rehearsal-recordinfo.component.scss'] +}) +export class RehearsalRecordinfoComponent implements OnInit { + tabsSelectedIndex:any = 0//当前选项卡值 + title:any = "演练记录信息" + constructor() { } + + ngOnInit(): void { + } + onCustom($event){ + console.log($event);//data from child + this.tabsSelectedIndex = 1 + } + selectedtab(e){ + sessionStorage.setItem("tabsindex",e.index) + // console.log(e.index) + } +} diff --git a/src/app/ui/training-recordinfo/training-recordinfo.component.html b/src/app/ui/training-recordinfo/training-recordinfo.component.html index f032abf..a1a4f44 100644 --- a/src/app/ui/training-recordinfo/training-recordinfo.component.html +++ b/src/app/ui/training-recordinfo/training-recordinfo.component.html @@ -1,11 +1,3 @@ -
diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 97ed6d7..727400c 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -69,8 +69,9 @@ import { PhotoofthesceneComponent } from './photoofthescene/photoofthescene.comp import { EditText, WaterRoadComponent } from './water-road/water-road.component'; import { KnowRouteComponent } from './know-route/know-route.component'; import { FindProblemComponent } from './find-problem/find-problem.component'; +import { RehearsalRecordinfoComponent } from './rehearsal-recordinfo/rehearsal-recordinfo.component'; @NgModule({ - declarations: [UiComponent, FooterComponent, UserdataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,EditUser,CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,HomeComponent, AddSixFamiliarComponent, TitleComponent, SelectUnit, TrainingRecordinfoComponent,RouterGISComponent, PhotoofthesceneComponent, WaterRoadComponent,FindProblemComponent,KnowRouteComponent,EditText], + declarations: [UiComponent, FooterComponent, UserdataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,EditUser,CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,HomeComponent, AddSixFamiliarComponent, TitleComponent, SelectUnit, TrainingRecordinfoComponent,RouterGISComponent, PhotoofthesceneComponent, WaterRoadComponent,FindProblemComponent,KnowRouteComponent,EditText, RehearsalRecordinfoComponent], imports: [ CommonModule,