Browse Source

[新增]新增六熟悉页面布局

master
邵佳豪 4 years ago
parent
commit
34bf90a750
  1. 3
      src/app/app-routing.module.ts
  2. 2
      src/app/navigation/navigation.component.html
  3. 4
      src/app/pages/pages.module.ts
  4. 11
      src/app/ui/add-six-familiar/Select-unit-list.html
  5. 37
      src/app/ui/add-six-familiar/add-six-familiar.component.html
  6. 75
      src/app/ui/add-six-familiar/add-six-familiar.component.scss
  7. 25
      src/app/ui/add-six-familiar/add-six-familiar.component.spec.ts
  8. 42
      src/app/ui/add-six-familiar/add-six-familiar.component.ts
  9. 8
      src/app/ui/title/title.component.html
  10. 26
      src/app/ui/title/title.component.scss
  11. 25
      src/app/ui/title/title.component.spec.ts
  12. 21
      src/app/ui/title/title.component.ts
  13. 1
      src/app/ui/ui-routing.module.ts
  14. 8
      src/app/ui/ui.module.ts

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

@ -7,6 +7,7 @@ import {HomeComponent} from './home/home.component'
//路由守卫
import {AuthGuard} from './auth.guard'
import {MTokenK1Component} from './m-token-k1/m-token-k1.component' //K1秘钥
import { AddSixFamiliarComponent } from './ui/add-six-familiar/add-six-familiar.component';
@ -24,6 +25,8 @@ const routes: Routes = [
{path:'visualization',component: HomeComponent}
]
},
{path:'addsixfamiliar',
component:AddSixFamiliarComponent},
{path:'login',
component:LoginComponent},

2
src/app/navigation/navigation.component.html

@ -58,7 +58,7 @@
<div class="example-sidenav-content">
<app-tabbar (toggleDarkTheme)="switchTheme($event)" (defaulttheme)="defaulttheme()" (redtheme)="redtheme()"></app-tabbar>
<router-outlet></router-outlet>
<!-- <router-outlet></router-outlet> -->
</div>
</mat-sidenav-container>

4
src/app/pages/pages.module.ts

@ -53,10 +53,8 @@ import { HomeComponent } from './home/home.component';
@NgModule({
declarations: [PagesComponent, LoginComponent, RegisterComponent, HomeComponent],
imports: [
PagesRoutingModule,
CommonModule,
A11yModule,
CdkStepperModule,
CdkTableModule,
@ -99,11 +97,9 @@ import { HomeComponent } from './home/home.component';
MatTreeModule,
PortalModule,
ScrollingModule,
FormsModule,
ReactiveFormsModule,
RouterModule
// PagesRoutingModule,
]
})
export class PagesModule { }

11
src/app/ui/add-six-familiar/Select-unit-list.html

@ -0,0 +1,11 @@
<div class="dialogbox">
<div class="topbox">
<div>
<span>单位名称 : </span>
<input type="text" placeholder="请输入单位名称">
</div>
</div>
<div class="listbox">
</div>
</div>

37
src/app/ui/add-six-familiar/add-six-familiar.component.html

@ -0,0 +1,37 @@
<div class="bigbox">
<app-title [title]="title"></app-title>
<div class="content">
<mat-list class="list" role="list">
<mat-list-item role="listitem">
<span class="name">熟悉对象</span>
<input type="text" placeholder="请选择单位 >" (click)="openUnitList()">
</mat-list-item>
<mat-list-item role="listitem">
<span class="name">详细地址</span>
<input type="text" placeholder="请输入详细地址">
</mat-list-item>
<mat-list-item role="listitem">
<span class="name">联系人</span>
<input type="text" placeholder="请输入联系人姓名">
</mat-list-item>
<mat-list-item role="listitem">
<span class="name">联系人电话</span>
<input type="text" placeholder="请输入联系电话">
</mat-list-item>
<mat-list-item role="listitem">
<span class="name">熟悉人员数量</span>
<input type="text" placeholder="请输入人数">
</mat-list-item>
<mat-list-item role="listitem">
<span class="name">带队领导</span>
<input type="text" placeholder="请输入带队人姓名">
</mat-list-item>
</mat-list>
<div class="btnbox">
<button class="ok">确认</button>
<button class="cancel">取消</button>
</div>
</div>
</div>

75
src/app/ui/add-six-familiar/add-six-familiar.component.scss

@ -0,0 +1,75 @@
.bigbox{
width: 10rem;
height: 7.5rem;
position: relative;
background: #F4F5F9;
.content{
width: 10rem;
height: 6.71875rem;
.list{
margin-top: 0.117188rem;
mat-list-item{
background-color: #fff;
margin-bottom: 1px;
position: relative;
height: 0.46875rem;
line-height: 0.46875rem;
font-size: 0.15625rem;
.name{
margin-left: 0.175781rem;
}
input{
position: absolute;
right: 0;
text-align: right;
height: 0.46875rem;
line-height: 0.46875rem;
font-size: 0.15625rem;
border: none;
width: 8.300781rem;
padding-right: 0.292969rem;
}
}
}
}
.btnbox{
display: flex;
justify-content: center;
margin-top: 2.929688rem;
button{
width: 1.757813rem;
height: 0.46875rem;
line-height: 0.46875rem;
text-align: center;
border-radius: 0.292969rem;
border: none;
opacity: 1;
font-size: 16px;
}
.ok{
background: linear-gradient(337deg, #FC7045 0%, #FF4923 100%);
color: #fff;
margin-right: 0.097656rem;
}
.cancel{
background: #E9EAF3;
color: black;
margin-left: 0.097656rem;
}
}
}
.dialogbox{
width: 7.617188rem;
height: 5.859375rem;
.topbox{
span{
font-size: 0.15625rem;
}
input{
height: 20px;
line-height: 20px;
font-size: 0.15625rem;
}
}
}

25
src/app/ui/add-six-familiar/add-six-familiar.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddSixFamiliarComponent } from './add-six-familiar.component';
describe('AddSixFamiliarComponent', () => {
let component: AddSixFamiliarComponent;
let fixture: ComponentFixture<AddSixFamiliarComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddSixFamiliarComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddSixFamiliarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

42
src/app/ui/add-six-familiar/add-six-familiar.component.ts

@ -0,0 +1,42 @@
import { HttpClient } from '@angular/common/http';
import { Component, OnInit, Inject } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({
selector: 'app-add-six-familiar',
templateUrl: './add-six-familiar.component.html',
styleUrls: ['./add-six-familiar.component.scss']
})
export class AddSixFamiliarComponent implements OnInit {
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
title:String = "新增六熟悉记录"
ngOnInit(): void {
}
//选择单位
openUnitList(){
let dialogRef = this.dialog.open(SelectUnit);
dialogRef.afterClosed().subscribe(data=>{
});
}
}
//选择单位
@Component({
selector: 'app-editBuilding',
templateUrl: './Select-unit-list.html',
styleUrls: ['./add-six-familiar.component.scss']
})
export class SelectUnit {
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<SelectUnit>,@Inject(MAT_DIALOG_DATA) public data) { }
ngOnInit(): void {
}
}

8
src/app/ui/title/title.component.html

@ -0,0 +1,8 @@
<div class="tltleBox">
<button mat-icon-button class="icon" (click)="goBack()">
<mat-icon>keyboard_arrow_left</mat-icon>
</button>
<span class="text">
{{title}}
</span>
</div>

26
src/app/ui/title/title.component.scss

@ -0,0 +1,26 @@
.tltleBox{
text-align: center;
width: 10rem;
height: 0.585938rem;
line-height: 0.585938rem;
position: relative;
background: #FFFFFF;
top: 0;
.icon{
position: absolute;
left: 0.292969rem;
top: 50%;
transform: translateY(-50%);
mat-icon{
vertical-align: text-top;
width: 40px;
height: 40px;
font-size: 40px;
}
}
.text{
font-size: 0.195313rem;
font-family: Source Han Sans CN;
font-weight: 500;
}
}

25
src/app/ui/title/title.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TitleComponent } from './title.component';
describe('TitleComponent', () => {
let component: TitleComponent;
let fixture: ComponentFixture<TitleComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TitleComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TitleComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

21
src/app/ui/title/title.component.ts

@ -0,0 +1,21 @@
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-title',
templateUrl: './title.component.html',
styleUrls: ['./title.component.scss']
})
export class TitleComponent implements OnInit {
//传入标题名称
@Input() title
constructor() { }
ngOnInit(): void {
}
goBack(){
window.history.back();
}
}

1
src/app/ui/ui-routing.module.ts

@ -4,6 +4,7 @@ import { UiComponent } from './ui.component';
import { PaginatorComponent } from './paginator/paginator.component';
import { UserdataComponent } from './userdata/userdata.component';
import { CollectionToolsComponent } from './collection-tools/collection-tools.component';
import { AddSixFamiliarComponent } from './add-six-familiar/add-six-familiar.component';

8
src/app/ui/ui.module.ts

@ -59,10 +59,13 @@ import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } f
import { WorkingAreaComponent } from '../working-area/working-area.component';
import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent} from './collection-tools/leftFunctionalDomain'
import { saveOneDialog, saveTwoDialog } from './collection-tools/save';
import { AddSixFamiliarComponent, SelectUnit } from './add-six-familiar/add-six-familiar.component';
import { TitleComponent } from './title/title.component';
@NgModule({
declarations: [UiComponent, FooterComponent, UserdataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,EditUser,CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent],
declarations: [UiComponent, FooterComponent, UserdataComponent, ChangepasswordComponent,IsnoPipe,ConfirmpswDirective,TimePipe,EditUser,CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent, AddSixFamiliarComponent, TitleComponent, SelectUnit],
imports: [
CommonModule,
UiRoutingModule,
A11yModule,
@ -111,7 +114,8 @@ import { saveOneDialog, saveTwoDialog } from './collection-tools/save';
ReactiveFormsModule,
FormsModule,
PaginatorModule,
FileUploadModule
FileUploadModule,
],

Loading…
Cancel
Save