Browse Source

[新增]新增演练记录信息tabs页面

master
邵佳豪 4 years ago
parent
commit
811e9df311
  1. 3
      src/app/app-routing.module.ts
  2. 62
      src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.html
  3. 28
      src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.scss
  4. 25
      src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.spec.ts
  5. 23
      src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.ts
  6. 8
      src/app/ui/training-recordinfo/training-recordinfo.component.html
  7. 3
      src/app/ui/ui.module.ts

3
src/app/app-routing.module.ts

@ -8,6 +8,7 @@ import { HomeComponent } from './ui/home/home.component'
import { AuthGuard } from './auth.guard' import { AuthGuard } from './auth.guard'
import { AddSixFamiliarComponent } from './ui/add-six-familiar/add-six-familiar.component'; import { AddSixFamiliarComponent } from './ui/add-six-familiar/add-six-familiar.component';
import { TrainingRecordinfoComponent } from './ui/training-recordinfo/training-recordinfo.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],}, component:AddSixFamiliarComponent,canActivate: [AuthGuard],},
{path:'trainingrecordinfo', {path:'trainingrecordinfo',
component:TrainingRecordinfoComponent,canActivate: [AuthGuard],}, component:TrainingRecordinfoComponent,canActivate: [AuthGuard],},
{path:'rehearsalrecordinfo',
component:RehearsalRecordinfoComponent,canActivate: [AuthGuard],},
{path:'login', {path:'login',
component:LoginComponent}, component:LoginComponent},
{path:'home', component:HomeComponent,canActivate: [AuthGuard],},//守卫验证 {path:'home', component:HomeComponent,canActivate: [AuthGuard],},//守卫验证

62
src/app/ui/rehearsal-recordinfo/rehearsal-recordinfo.component.html

@ -0,0 +1,62 @@
<div class="bigbox">
<div class="title">
<app-title [title]="title"></app-title>
</div>
<div class="content">
<div class="cardbox">
<mat-tab-group style="height: 97%;" [selectedIndex]="tabsSelectedIndex" (selectedTabChange)="selectedtab($event)">
<mat-tab label="演练信息">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="灾情设定">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="组织指挥情况">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="作战行动情况">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="单位内部消防设施使用情况">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="好的方面">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="存在问题及改进措施">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="备注">
<ng-template matTabContent>
</ng-template>
</mat-tab>
<mat-tab label="现场照片">
<ng-template matTabContent>
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
</div>
</div>

28
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;
}

25
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<RehearsalRecordinfoComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RehearsalRecordinfoComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RehearsalRecordinfoComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

23
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)
}
}

8
src/app/ui/training-recordinfo/training-recordinfo.component.html

@ -1,11 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-11-06 10:44:49
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-06 17:07:16
-->
<div class="bigbox"> <div class="bigbox">
<div class="title"> <div class="title">
<app-title [title]="title"></app-title> <app-title [title]="title"></app-title>

3
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 { EditText, WaterRoadComponent } from './water-road/water-road.component';
import { KnowRouteComponent } from './know-route/know-route.component'; import { KnowRouteComponent } from './know-route/know-route.component';
import { FindProblemComponent } from './find-problem/find-problem.component'; import { FindProblemComponent } from './find-problem/find-problem.component';
import { RehearsalRecordinfoComponent } from './rehearsal-recordinfo/rehearsal-recordinfo.component';
@NgModule({ @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: [ imports: [
CommonModule, CommonModule,

Loading…
Cancel
Save