邵佳豪 4 years ago
parent
commit
a4c7d29dbd
  1. 21
      src/app/app-routing.module.ts
  2. 2
      src/app/key-unit/edit-unit-info/edit-unit-info.component.html
  3. 4
      src/app/key-unit/key-unit.module.ts
  4. 25
      src/app/ui/home/home.component.html
  5. 44
      src/app/ui/home/home.component.scss
  6. 20
      src/app/ui/home/home.component.ts
  7. 3
      src/app/ui/router-gis/router-gis.component.html
  8. 11
      src/app/ui/router-gis/router-gis.component.scss
  9. 25
      src/app/ui/router-gis/router-gis.component.spec.ts
  10. 48
      src/app/ui/router-gis/router-gis.component.ts
  11. 8
      src/app/ui/training-recordinfo/training-recordinfo.component.html
  12. 17
      src/app/ui/training-recordinfo/training-recordinfo.component.scss
  13. 8
      src/app/ui/ui.module.ts

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

@ -2,29 +2,32 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component';
import { NavigationComponent } from './navigation/navigation.component';
import { HomeComponent } from './home/home.component'
import { HomeComponent } from './ui/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';
import { TrainingRecordinfoComponent } from './ui/training-recordinfo/training-recordinfo.component';
const routes: Routes = [
{path:'',redirectTo:'login',pathMatch:'full'},
// {
// path:'',
// component:NavigationComponent,
// canActivate: [AuthGuard],//守卫验证
// children:[
// {path:'ui',loadChildren:() => import('./ui/ui.module').then(m => m.UiModule)},
// {path:'keyUnit',loadChildren:() => import('./key-unit/key-unit.module').then(m => m.KeyUnitModule)},
// ]
// },
{path:'addsixfamiliar',
component:AddSixFamiliarComponent},
component:AddSixFamiliarComponent,canActivate: [AuthGuard],},
{path:'trainingrecordinfo',
component:TrainingRecordinfoComponent},
component:TrainingRecordinfoComponent,canActivate: [AuthGuard],},
{path:'login',
component:LoginComponent},
{path:'getNoMToken',
component:MTokenK1Component, canActivate: [AuthGuard],},
//K1秘钥验证失败是跳转页面
{path:'home', component:HomeComponent,canActivate: [AuthGuard],}//守卫验证
]

2
src/app/key-unit/edit-unit-info/edit-unit-info.component.html

@ -54,7 +54,7 @@
<mat-tab label="10.作战部署">
<ng-template matTabContent>
<!-- <iframe id="main" src="/unityApp2/index.html" name="unityApp" frameborder="0" width="100%" height="98%"></iframe> -->
<app-collection-tools></app-collection-tools>
<!-- <app-collection-tools></app-collection-tools> -->
</ng-template>
</mat-tab>
</mat-tab-group>

4
src/app/key-unit/key-unit.module.ts

@ -74,11 +74,10 @@ import { FireFightingDeviceLookComponent } from './fire-fighting-device-look/fir
import { ImagesData2, previewBigImg2 } from './fire-fighting-device-look/imagesdata.component';
import { ImgsDataDetail2 } from './fire-fighting-device-look/addGrouping.component';
import { LookMaster2 } from './basicinfo-look/lookmaster.component';
import { UiModule } from '../../app/ui/ui.module'
@NgModule({
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2],
exports:[ViewUnitDetailsPlanComponent,BasicinfoComponent],
exports:[ViewUnitDetailsPlanComponent,BasicinfoComponent,FireFightingDeviceComponent],
imports: [
CommonModule,
KeyUnitRoutingModule,
@ -127,7 +126,6 @@ import { UiModule } from '../../app/ui/ui.module'
FormsModule,
CountdownModule,
FileUploadModule,
UiModule
]
})
export class KeyUnitModule { }

25
src/app/ui/home/home.component.html

@ -16,15 +16,34 @@
<div class="centerHeader">
<div><input type="text" placeholder="请输入熟悉对象"></div>
<div>
<input placeholder="请选择时间" matInput [matDatepicker]="dp2" readonly [formControl]="enddate">
<input placeholder="请选择时间" readonly [matDatepicker]="dp2" [formControl]="enddate">
<mat-datepicker-toggle matSuffix [for]="dp2"></mat-datepicker-toggle>
<mat-datepicker #dp2 disabled="false"></mat-datepicker>
<mat-datepicker #dp2></mat-datepicker>
</div>
<div><button style="background: linear-gradient(337deg, #FC7045 0%, #FF4923 100%);" (click)='query()'>查询</button></div>
<div><button style="background: #4582FC;" (click)='add()'>新增</button></div>
</div>
<div class="centerTable">
<div class="table">
<table>
<tr>
<th class="firstContent"></th>
<th>熟悉对象</th>
<th>熟悉时间</th>
<th>带队领导</th>
<th>上传人员</th>
<th>操作</th>
</tr>
<tr *ngFor="let item of tableData">
<td class="firstContent"><mat-checkbox></mat-checkbox></td>
<td class="overflowText">{{item.target}}</td>
<td class="overflowText">{{item.time}}</td>
<td>{{item.leadTheTeam}}</td>
<td>{{item.updateStaff}}</td>
<td class="fontColor" (click)='viewDetails()'>查看详情</td>
</tr>
</table>
</div>
</div>
</div>

44
src/app/ui/home/home.component.scss

@ -12,7 +12,7 @@
line-height: 0.585938rem;
text-align: center;
position: relative;
label { font-weight: 550; }
label { font-weight: 550; font-size: 0.195313rem; }
.floatRight {
position: absolute;
top: 0.146484rem;
@ -61,12 +61,14 @@ button.mat-menu-item { text-align: center; }
align-items: center;
div { margin: 0 0.097656rem }
input {
width: 1.757813rem;
height: 0.292969rem;
line-height: 0.292969rem;
padding-left: 0.048828rem;
border-radius: 0.195313rem;
outline: none;
border: 0.009766rem solid #999;
font-size: 0.136719rem;
}
button {
width: 0.78125rem;
@ -78,7 +80,45 @@ button.mat-menu-item { text-align: center; }
color: #fff;
}
}
.mat-datepicker-toggle{ vertical-align: middle; }
.mat-datepicker-toggle{ vertical-align: middle; margin: 0 0; padding: 0 0; }
.centerTable {
flex: 1;
box-sizing: border-box;
padding: 0.097656rem;
overflow: hidden;
.table {
width: 100%;
max-height: 100%;
overflow-y: auto;
}
table {
width: 100%;
border-radius: 0.244141rem;
background: #FD5A31;
text-align: center;
border-collapse:collapse;
word-break:break-all;
word-wrap:break-all;
table-layout:fixed;
.firstContent { width: 0.488281rem; }
th {
height: 0.390625rem;
font-weight: normal;
font-size: 0.15625rem;
color: #fff;
// border-bottom: 1px solid rgb(211, 207, 207);
}
td {
height: 0.390625rem;
font-size: 0.136719rem;
background-color: #fff;
border-top: 1px solid rgb(211, 207, 207);
}
}
}
.fontColor { color: #FC7045; }
.overflowText {
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}

20
src/app/ui/home/home.component.ts

@ -22,6 +22,19 @@ export class HomeComponent implements OnInit {
}
enddate:any; //查询时间
tableData :any = [
{target: '梧州市金龙万豪酒店', time: '2020-10-29 07:19', leadTheTeam: '郑子墨', updateStaff: '赵竹林', },
{target: '众美光合原筑', time: '2020-11-02 07:19', leadTheTeam: '何先超', updateStaff: '何晨', },
{target: '凡尔赛公馆', time: '2020-11-02 11:19', leadTheTeam: '吴洁丽', updateStaff: '赵玉', },
{target: '西黄岛九号', time: '2020-11-03 07:19', leadTheTeam: '吴毅溪', updateStaff: '赵晓慧', },
{target: '首城双景', time: '2020-11-07 07:19', leadTheTeam: '周伟林', updateStaff: '李英顺', },
{target: '华贸国际公馆', time: '2020-11-11 07:19', leadTheTeam: '李林颖', updateStaff: '吴思怡', },
{target: '鸿威翡翠城', time: '2020-11-12 07:19', leadTheTeam: '李双杆', updateStaff: '钱浩宇', },
{target: '泽信公馆', time: '2020-11-14 11:19', leadTheTeam: '孙正荣', updateStaff: '孙正云', },
{target: '润泽御府', time: '2020-11-17 07:19', leadTheTeam: '赵虎林', updateStaff: '冯燕', },
{target: '万达广场', time: '2020-11-20 07:19', leadTheTeam: '周伟林', updateStaff: '李英顺', },
{target: '天悦', time: '2020-11-22 07:19', leadTheTeam: '冯燕', updateStaff: '冯靖宇', },
]
//退出系统
signOut () {
@ -42,12 +55,17 @@ export class HomeComponent implements OnInit {
//查询
query () {
console.log('查询')
}
//新增
add () {
this.router.navigate([`/addsixfamiliar`])
}
//查看详情
viewDetails () {
console.log('查看详情')
}

3
src/app/ui/router-gis/router-gis.component.html

@ -0,0 +1,3 @@
<div class="content">
<div class="center" id="center"></div>
</div>

11
src/app/ui/router-gis/router-gis.component.scss

@ -0,0 +1,11 @@
.content {
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 0.244141rem;
overflow: hidden;
.center {
width: 100%;
height: 100%;
}
}

25
src/app/ui/router-gis/router-gis.component.spec.ts

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

48
src/app/ui/router-gis/router-gis.component.ts

@ -0,0 +1,48 @@
import { Component, OnInit } from '@angular/core';
declare var AMap: any;
@Component({
selector: 'app-router-gis',
templateUrl: './router-gis.component.html',
styleUrls: ['./router-gis.component.scss']
})
export class RouterGISComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
ngAfterViewInit(): void {
window.setTimeout(()=>{
this.mapInit()
},0)
}
//地图初始化
mapInit () {
//创建地图
let map = new AMap.Map('center', {
resizeEnable: true,
cursor: 'default',
zooms:[6,18],
});
//构造路线导航类 实际路线
let driving = new AMap.Driving({
map: map,
showTraffic: true,
isOutline: true,
});
driving.search( [{keyword: '广西消防总队',city:'广西'},{keyword: '万科公园里',city:'广西'},{keyword: '南宁明安医院',city:'广西'}], );
//构造路线导航类 导航路线
let drivingTwo = new AMap.Driving({
map: map,
showTraffic: false,
});
drivingTwo.search( [{keyword: '广西消防总队',city:'广西'},{keyword: '南宁明安医院',city:'广西'}], );
//function (status,result) { console.log(status,result) } //地图路线 匹配起始点回调函数
//new AMap.LngLat(116.379028, 39.865042), new AMap.LngLat(116.427281, 39.903719) / [{keyword: '淄博站',city:'山东'},{keyword: '淄博北站',city:'山东'}], //路线可搜索, 可用坐标
}
}

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

@ -5,9 +5,9 @@
<div class="content">
<div class="cardbox">
<mat-tab-group>
<mat-tab-group style="height: 95%;">
<mat-tab label="行驶路线">
行驶路线
<app-router-gis></app-router-gis>
</mat-tab>
<mat-tab label="熟悉路线"> 熟悉路线 </mat-tab>
<mat-tab label="单位基本情况">
@ -15,7 +15,9 @@
</mat-tab>
<mat-tab label="平面图"> 平面图 </mat-tab>
<mat-tab label="安全疏散设施情况"> 安全疏散设施情况 </mat-tab>
<mat-tab label="消防设施情况"> 消防设施情况 </mat-tab>
<mat-tab label="消防设施情况">
<app-fire-fighting-device></app-fire-fighting-device>
</mat-tab>
<mat-tab label="水源道路情况"> 水源道路情况 </mat-tab>
<mat-tab label="重点部位情况"> 重点部位情况 </mat-tab>
<mat-tab label="发现问题"> 发现问题 </mat-tab>

17
src/app/ui/training-recordinfo/training-recordinfo.component.scss

@ -1,23 +1,26 @@
.bigbox{
width: 10rem;
width: 100%;
height: 100%;
background: #F4F5F9;
display: flex;
flex-direction: column;
overflow: hidden;
.title{
width: 10rem;
width: 100%;
height: 0.585938rem;
}
.content{
width: 10rem;
height: 6.71875rem;
flex: 1;
.cardbox{
margin: 0 auto;
margin-top:0.195313rem;
background-color: #fff;
border-radius: 0.048828rem;
width:9.570313rem;
height: 6.523438rem;
width:100%;
height: 100%;
}
}
}
.mat-tab-body-wrapper {
height: 100%;
}

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

@ -63,11 +63,10 @@ import { AddSixFamiliarComponent, SelectUnit } from './add-six-familiar/add-six-
import { TitleComponent } from './title/title.component'
import { HomeComponent } from './home/home.component';
import { TrainingRecordinfoComponent } from './training-recordinfo/training-recordinfo.component';
import { AddHouseInfo } from './basicinfo/addhouseinfo.component';
import { BasicinfoComponent } from './basicinfo/basicinfo.component';
import { LookMaster } from './basicinfo/lookmaster.component';
import { RouterGISComponent } from './router-gis/router-gis.component';
import { KeyUnitModule } from '../key-unit/key-unit.module';
@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,AddHouseInfo,BasicinfoComponent,LookMaster],
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],
imports: [
CommonModule,
@ -119,6 +118,7 @@ import { LookMaster } from './basicinfo/lookmaster.component';
FormsModule,
PaginatorModule,
FileUploadModule,
KeyUnitModule
],

Loading…
Cancel
Save