chenjingyu 4 years ago
parent
commit
5d7594f0ad
  1. 24
      src/app/key-unit/basicinfo/basicinfo.component.html
  2. 6
      src/app/key-unit/basicinfo/basicinfo.component.ts
  3. 10
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html
  4. 7
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts
  5. 20
      src/app/key-unit/key-site/key-site.component.html
  6. 7
      src/app/key-unit/key-site/key-site.component.ts
  7. 1
      src/app/ui/add-six-familiar/add-six-familiar.component.ts
  8. 2
      src/app/ui/collection-tools/addPlaneFigure.html
  9. 16
      src/app/ui/collection-tools/collection-tools.component.html
  10. 28
      src/app/ui/collection-tools/collection-tools.component.scss
  11. 11
      src/app/ui/collection-tools/collection-tools.component.ts
  12. 2
      src/app/ui/collection-tools/createBuilding.html
  13. 2
      src/app/ui/collection-tools/editBuilding.html
  14. 2
      src/app/ui/collection-tools/editPlaneFigure.html
  15. 4
      src/app/ui/collection-tools/panel.scss
  16. 2
      src/app/ui/home/home.component.ts
  17. 28
      src/app/ui/photoofthescene/photoofthescene.component.html
  18. 5
      src/app/ui/photoofthescene/photoofthescene.component.scss
  19. 30
      src/app/ui/photoofthescene/photoofthescene.component.ts
  20. 4
      src/app/ui/router-gis/router-gis.component.html
  21. 23
      src/app/ui/router-gis/router-gis.component.scss
  22. 17
      src/app/ui/router-gis/router-gis.component.ts
  23. 4
      src/app/ui/training-recordinfo/training-recordinfo.component.html
  24. 7
      src/app/ui/training-recordinfo/training-recordinfo.component.ts
  25. 4
      src/app/ui/ui.module.ts
  26. 14
      src/app/ui/water-road/edittext.html
  27. 15
      src/app/ui/water-road/water-road.component.html
  28. 69
      src/app/ui/water-road/water-road.component.scss
  29. 141
      src/app/ui/water-road/water-road.component.ts
  30. BIN
      src/assets/images/fireHydrant.png

24
src/app/key-unit/basicinfo/basicinfo.component.html

@ -113,10 +113,10 @@
<mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner>
</div>
<div class="image" (click)="closeorganizationbox()">
<input id="selectedfile" type="file" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
<input *ngIf="pattern" id="selectedfile" type="file" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div class="addbtn">
<button type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>
<button *ngIf="pattern" type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>
</div>
</div>
<!-- <div class="mainright" (click)="closeorganizationbox()"> -->
@ -132,7 +132,7 @@
<!-- body -->
<div class="bottombox" style="flex: 70%;overflow-y: auto;" >
<div class="houseinfobox" style="height: 100%; overflow-y: auto; box-sizing:border-box">
<button type="button" mat-icon-button (click)="addhouseinfo()" class="addhouseinfo"><mat-icon class="addicon">add_circle_outline</mat-icon></button>
<button *ngIf="pattern" type="button" mat-icon-button (click)="addhouseinfo()" class="addhouseinfo"><mat-icon class="addicon">add_circle_outline</mat-icon></button>
<mat-tab-group style="height: 100%;;" (focusChange)="selecttab($event)" >
<mat-tab [label]="item.username" *ngFor="let item of houses;let key = index">
<form style="height: 100%; overflow-y:auto; display: block;" (ngSubmit)="onSubmit2(form.value,item,key,form.invalid)" #form="ngForm" class="example-container">
@ -195,12 +195,12 @@
</div>
<div class="CustomData" style="width: 200px;">
<mat-checkbox (change)="checkCustomData($event)" name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox>
<mat-checkbox *ngIf="pattern" (change)="checkCustomData($event)" name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">自定义信息</h1>
</div>
<div *ngIf="item.isCustomData" style="position: relative;">
<button style="position: absolute;left: 0;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<button *ngIf="pattern" style="position: absolute;left: 0;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button *ngIf="pattern" style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<mat-form-field>
<input matInput type='text' name="{{key}}1CustomData"
@ -278,7 +278,7 @@
<div class="deviceinfo">
<div style="width: 200px;">
<mat-checkbox (change)="checkboxchange(item.buildingBasicGroups[1].submitted,$event)" name="item.buildingBasicGroups[1].name" *ngIf="item.buildingBasicGroups[1].isOptional" [(ngModel)]="item.buildingBasicGroups[1].submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<mat-checkbox (change)="checkboxchange(item.buildingBasicGroups[1].submitted,$event)" name="item.buildingBasicGroups[1].name" *ngIf="item.buildingBasicGroups[1].isOptional && pattern" [(ngModel)]="item.buildingBasicGroups[1].submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">{{item.buildingBasicGroups[1].name}}</h1>
</div>
@ -316,7 +316,7 @@
</div>
<div style="width: 200px;">
<mat-checkbox (change)="checkboxchange(item,$event)" *ngIf="item.buildingBasicGroups[2].isOptional" name="item.buildingBasicGroups[2].name" [(ngModel)]="item.buildingBasicGroups[2].submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<mat-checkbox (change)="checkboxchange(item,$event)" *ngIf="item.buildingBasicGroups[2].isOptional && pattern" name="item.buildingBasicGroups[2].name" [(ngModel)]="item.buildingBasicGroups[2].submitted" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">储罐信息</h1>
</div>
@ -480,12 +480,12 @@
<div class="CustomData" style="width: 200px;margin-top: 60px;">
<mat-checkbox (change)="checkCustomData($event)" name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox>
<mat-checkbox *ngIf="pattern" (change)="checkCustomData($event)" name="checkbuilding" [(ngModel)]="item.isCustomData" style="float: left;margin-right: 10px;"></mat-checkbox>
<h1 style="font-size: 22px;width: 200px;">自定义信息</h1>
</div>
<div *ngIf="item.isCustomData" style="position: relative;">
<button style="position: absolute;left: 0;font-size: 11px;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<button *ngIf="pattern" style="position: absolute;left: 0;font-size: 11px;" type="button" mat-icon-button (click)="addCustomData(item)" class="addCustomData"><mat-icon style="font-size: 38px;">add_circle_outline</mat-icon></button>
<button *ngIf="pattern" style="position: absolute;left:60px;" type="button" mat-icon-button (click)="deleteCustomData(item)" class="deleteCustomData"><mat-icon style="font-size: 38px;">remove_circle_outline</mat-icon></button>
<div class="houseinfoinput" style="float: left;margin-left: 250px;" *ngFor="let i of item.buildingCustomData.customProperties;let key = index">
<mat-form-field>
<input matInput type='text' name="{{key}}1CustomData"
@ -505,7 +505,7 @@
</div>
<div class="infobtnbox">
<div class="infobtnbox" *ngIf="pattern">
<button type="submit()" mat-button mat-raised-button color="primary" >保存</button>
<button type="button" mat-raised-button (click)="deletedbuilding(item)" color="warn">删除</button>
</div>

6
src/app/key-unit/basicinfo/basicinfo.component.ts

@ -86,9 +86,15 @@ export class BasicinfoComponent implements OnInit {
allorganizing:any = [] //所有组织机构
constructor(private router:Router,private route:ActivatedRoute,private http: HttpClient, private tree: TreeService, private sanitizer: DomSanitizer, public dialog: MatDialog,public snackBar: MatSnackBar) { }
pattern:any
unitId : any //当前单位id
ngOnInit(): void {
if(localStorage.getItem("pattern") == "edit"){
this.pattern = true
}else if(localStorage.getItem("pattern") == "look"){
this.pattern = false
}
this.getallunittype()
this.getorganization()
// this.getunitinfo()

10
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html

@ -3,10 +3,10 @@
<mat-tab label="单位消防设施">
<div class="contentBox">
<p style="width: 100%; margin: 30px auto; text-align: center;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p>
<p style="width: 100%; margin: 30px auto; text-align: center;font-size: 16px;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyBuiltInGrouping;let key = index">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;">
<div style="margin-bottom: 10px;" *ngIf="isEditPattern">
<mat-icon title="创建" (click)='addCompanyGrouping(item)'>add_circle_outline</mat-icon>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyGrouping(item)'>description</mat-icon>
<mat-icon title="删除" style="margin-left: 25px;" (click)='deleteCompanyGrouping(item)'>delete</mat-icon>
@ -74,7 +74,7 @@
<mat-expansion-panel>
<mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyOptional($event,item)'>description</mat-icon>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 25px;" (click)='editCompanyOptional($event,item)'>description</mat-icon>
</mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField">
<label>{{items.propertyName}}:</label>
@ -100,7 +100,7 @@
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of newItem.buildingFacilityGroups">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;">
<div style="margin-bottom: 10px;" *ngIf="isEditPattern">
<mat-icon title="创建" (click)='addBuildingGrouping(newItem,item)'>add_circle_outline</mat-icon>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editBuildingGrouping(newItem,item)'>description</mat-icon>
<mat-icon title="删除" style="margin-left: 25px;" (click)='deleteBuildingGrouping(newItem,item)'>delete</mat-icon>
@ -168,7 +168,7 @@
<mat-expansion-panel>
<mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editBuildingOptional($event,item)'>description</mat-icon>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 25px;" (click)='editBuildingOptional($event,item)'>description</mat-icon>
</mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField">
<label>{{items.propertyName}}:</label>

7
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts

@ -20,9 +20,16 @@ export class FireFightingDeviceComponent implements OnInit {
constructor(private router:Router,private route:ActivatedRoute,public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
isEditPattern = true
ngOnInit(): void {
this.getCompanyInformation()
this.getAllBuilding()
if(localStorage.getItem("pattern") == "edit"){
this.isEditPattern = true
}else if(localStorage.getItem("pattern") == "look"){
this.isEditPattern = false
}
}
//定义属性数据

20
src/app/key-unit/key-site/key-site.component.html

@ -4,7 +4,7 @@
<div class="contentBox">
<div style="margin-top: 25px;">
<h3 style="text-align: center;font-weight: 550;">重点部位情况</h3>
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点部位情况</h3>
<table mat-table [dataSource]="allCompanyPosition">
<ng-container matColumnDef="mainname">
<th mat-header-cell *matHeaderCellDef>重点部位名称</th>
@ -45,13 +45,13 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<p style="text-align: center;" *ngIf="!allCompanyPosition.length">暂无数据,请前往平面图进行相关数据录入</p>
<p style="text-align: center;font-size: 20px;" *ngIf="!allCompanyPosition.length">暂无数据,请前往平面图进行相关数据录入</p>
</div>
<div style="margin-top: 25px; text-align: left;">
<h3 style="text-align: center;font-weight: 550;">重点提示</h3>
<mat-icon title="保存" style="margin-left: 11%; cursor: pointer;" (click)='Preservation()'>description</mat-icon>
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点提示</h3>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 11%; cursor: pointer;" (click)='Preservation()'>description</mat-icon>
<p class="tips">
<textarea [(ngModel)]="companyInput" maxlength="5000"></textarea>
<textarea [disabled]="!isEditPattern" [(ngModel)]="companyInput" maxlength="5000"></textarea>
</p>
</div>
@ -62,7 +62,7 @@
<div class="contentBox">
<div style="margin-top: 25px;">
<h3 style="text-align: center;font-weight: 550;">重点部位情况</h3>
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点部位情况</h3>
<table mat-table [dataSource]="item.position">
<ng-container matColumnDef="mainname">
<th mat-header-cell *matHeaderCellDef>重点部位名称</th>
@ -103,13 +103,13 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<p style="text-align: center;" *ngIf="!item.position.length">暂无数据,请前往平面图进行相关数据录入</p>
<p style="text-align: center;font-size: 20px;" *ngIf="!item.position.length">暂无数据,请前往平面图进行相关数据录入</p>
</div>
<div style="margin-top: 25px; text-align: left;">
<h3 style="text-align: center;font-weight: 550;">重点提示</h3>
<mat-icon title="保存" style="margin-left: 11%;cursor: pointer;" (click)='PreservationBuilding(item)'>description</mat-icon>
<h3 style="text-align: center;font-weight: 550;font-size: 20px;">重点提示</h3>
<mat-icon *ngIf="isEditPattern" title="保存" style="margin-left: 11%;cursor: pointer;" (click)='PreservationBuilding(item)'>description</mat-icon>
<p class="tips">
<textarea [(ngModel)]="item.companyInput" maxlength="5000"></textarea>
<textarea [disabled]="!isEditPattern" [(ngModel)]="item.companyInput" maxlength="5000"></textarea>
</p>
</div>

7
src/app/key-unit/key-site/key-site.component.ts

@ -17,8 +17,15 @@ export class KeySiteComponent implements OnInit {
constructor(public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private route:ActivatedRoute,) { }
displayedColumns: string[] = ['mainname', 'position', 'construction', 'nature', 'danger', 'img'];
isEditPattern = true
ngOnInit(): void {
if(localStorage.getItem("pattern")=="edit"){
this.isEditPattern = true
}else if(localStorage.getItem("pattern") == "look"){
this.isEditPattern = false
}
this.getCompanyPostion()
this.getCompanyTips()
this.getAllBuilding()

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

@ -41,6 +41,7 @@ export class AddSixFamiliarComponent implements OnInit {
// ?id=${this.unitdata.id}
console.log(this.unitdata)
if(this.unitname && this.address && this.contactname && this.contactphone && this.peoplenum && this.leadname){
localStorage.setItem("pattern","edit")
this.router.navigate([`/trainingrecordinfo`],{queryParams:{'id':this.unitdata.id}})
}else{
const config = new MatSnackBarConfig();

2
src/app/ui/collection-tools/addPlaneFigure.html

@ -4,7 +4,7 @@
<label *ngIf="data.isBuilding">新建楼层/区域</label>
</div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container" style="font-size: 16px;">
<div class="keyMargin">
<mat-form-field>

16
src/app/ui/collection-tools/collection-tools.component.html

@ -7,8 +7,8 @@
<button mat-button (click)="toggle2()">
<mat-icon style="vertical-align: middle;">list</mat-icon>
</button>
<span style="color: gray;margin-right: 10px;margin-left: 10px;">图标大小</span>
<mat-form-field style="margin-top: 3px;">
<span style="color: gray;margin-right: 10px;margin-left: 10px;font-size: 16px;">图标大小</span>
<mat-form-field style="margin-top: 3px;font-size: 16px;">
<mat-select (selectionChange)='iconScale()' [(ngModel)]="selected">
<mat-option value="1">正常</mat-option>
<mat-option value="2">放大2倍</mat-option>
@ -23,7 +23,7 @@
<mat-icon style="padding-bottom: 7px;">screen_share</mat-icon>
</button>
<span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" style="margin-right:20px;user-select: none;margin-left: 22px;" class="nameShow" (click)="basicInfoClick()">
<span [ngClass]="{'icongray': !basicInfo}" title="基本信息名称显示/隐藏" style="margin-right:20px;user-select: none;margin-left: 22px;font-size: 16px;" class="nameShow" (click)="basicInfoClick()">
基本信息名称
<mat-icon>visibility</mat-icon>
</span>
@ -41,7 +41,7 @@
</div> -->
<span style="position: absolute;right: 60px;cursor: pointer;">
<mat-icon title="查看/编辑模式" (click)="lookpat()" *ngIf="isEditPattern">tv</mat-icon>
<mat-icon title="查看/编辑模式" (click)="editpat()" *ngIf="!isEditPattern">create</mat-icon>
<mat-icon title="查看/编辑模式" (click)="editpat()" *ngIf="!isEditPattern && isshow" >create</mat-icon>
<mat-icon *ngIf="isEditPattern " style="margin-left: 12px;" title="保存" (click)="saveSite()">description</mat-icon>
</span>
</div>
@ -50,7 +50,7 @@
<div class="headerOperate">
<button mat-button (click)="checkedBuilding({name:'总平面图'},-1)"
[ngClass]="{'buildingbtnchecked': checkedBuildingIndex==-1}">
<span>总平面图</span>
<span style="font-size: 16px;">总平面图</span>
<span *ngIf="isEditPattern && !pattern">
<img src="../../../assets/images/fire.png" *ngIf="sitePlanIcon.fire==2">
<img src="../../../assets/images/noFire.png" *ngIf="sitePlanIcon.fire==1">
@ -60,7 +60,7 @@
</button>
<button mat-button *ngFor="let item of allBuildings;let key = index" (click)="checkedBuilding(item,key)" class="bigeditdeletebtn"
[ngClass]="{'buildingbtnchecked': checkedBuildingIndex==key}">
<span>{{item.name}}</span>
<span style="font-size: 16px;">{{item.name}}</span>
<span *ngIf="isEditPattern && !pattern">
<img src="../../../assets/images/fire.png" *ngIf="item.fire && item.fire==2">
<img src="../../../assets/images/noFire.png" *ngIf="item.fire && item.fire==1">
@ -69,9 +69,9 @@
</span>
<span class="editdeletebtn" *ngIf="isEditPattern && pattern">
<mat-icon (click)="editBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;margin-left: 6px;color: rgb(26, 194, 26);">create</mat-icon>
style="font-size: 18px;vertical-align:sub;margin-left: 6px;color: rgb(26, 194, 26);">create</mat-icon>
<mat-icon (click)="deleteBuilding($event,item)"
style="font-size: 23px;vertical-align:sub;color: rgb(224, 51, 51);">delete</mat-icon>
style="font-size: 18px;vertical-align:sub;color: rgb(224, 51, 51);">delete</mat-icon>
</span>
</button>
<!-- <button (click)="yyy()">yyyyy</button> -->

28
src/app/ui/collection-tools/collection-tools.component.scss

@ -4,7 +4,7 @@
}
.content {
width: 100%;
height: 93%;
height:100%;
overflow: hidden;
box-sizing: border-box;
padding: 1px;
@ -20,11 +20,12 @@
//header头部
.header {
position: relative;
flex: 5%;
flex: 3%;
display: flex;
align-items:center;
min-height: 40px;
min-height: 30px;
background-color: #fff;
font-size: 16px;
.nameShow{
cursor: pointer;
user-select: none;
@ -37,7 +38,7 @@
}
font-size: 18px;
mat-icon{
font-size: 26px;
font-size: 22px;
vertical-align: text-top;
}
span{
@ -48,7 +49,7 @@
position: absolute;
right: 140px;
span{
font-size: 18px;
font-size: 16px;
cursor: pointer;
margin: 0 3px;
display: inline-block;
@ -74,16 +75,18 @@
span{
font-size: 18px;
}
flex: 5%;
flex: 3%;
display: flex;
align-items:center;
min-height: 40px;
min-height: 30px;
box-sizing: border-box;
margin: 3px 0;
background-color: white;
button{
border: 0.5px solid rgb(208, 211, 214);
margin: 0 2px;
height: 30px;
line-height: 30px;
}
.editdeletebtn{
display: none;
@ -109,7 +112,7 @@
top: 0;
}
.functionalDomain {
flex: 90%;
flex: 94%;
overflow: hidden;
.functionalDomainContent {
position: relative;
@ -122,9 +125,10 @@
flex-direction: column;
margin-left: 0px;
transition: margin-left 0.5s;
min-width: 235px;
width: 1.953125rem;
min-width: 1.953125rem;
border: 1px solid #E6EAEE;
width: 235px;
left: 0;
z-index: 111;
.leftDragDiv{
@ -141,7 +145,8 @@
margin-right: 0px;
transition: margin-right 0.5s;
border: 1px solid #464646;
width: 235px;
width: 1.953125rem;
min-width: 1.953125rem;
right: 0;
}
@ -303,6 +308,7 @@
}
//右侧消防要素
.firecategories{
background-color: #fff;
position: relative;
display: flex;
flex-flow: column;

11
src/app/ui/collection-tools/collection-tools.component.ts

@ -610,6 +610,8 @@ export class CollectionToolsComponent implements OnInit {
this.canvasData.isChange = true
}
isshow = true//切换模式是否显示
ngOnInit(): void {
this.getAllLibrary() //获取素材库
@ -630,6 +632,14 @@ export class CollectionToolsComponent implements OnInit {
this.refurbishTreeData()
}
})
if(localStorage.getItem("pattern")=="edit"){
this.isEditPattern = true
}else if(localStorage.getItem("pattern") == "look"){
this.isshow = false
this.isEditPattern = false
}
}
@ -2128,6 +2138,7 @@ export class CreateBuilding {
allBuildingType:any//所有的建筑类型
selected:any; //选中的建筑
ngOnInit(): void {
this.getAllBuildingType()
}

2
src/app/ui/collection-tools/createBuilding.html

@ -1,5 +1,5 @@
<div mat-dialog-title>新增建筑</div>
<div>
<div style="font-size: 16px;">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div mat-dialog-content>

2
src/app/ui/collection-tools/editBuilding.html

@ -1,6 +1,6 @@
<div mat-dialog-title>编辑建筑</div>
<div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container" style="font-size: 16px;">
<div mat-dialog-content>
<mat-form-field>
<input type="text" matInput [(ngModel)]="defaultName" required name="propertyName" placeholder="建筑名称" autocomplete="off">

2
src/app/ui/collection-tools/editPlaneFigure.html

@ -5,7 +5,7 @@
<label *ngIf="data.isBuilding">编辑楼层/区域</label>
</div>
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container" style="font-size: 16px;">
<div class="keyMargin">
<mat-form-field>

4
src/app/ui/collection-tools/panel.scss

@ -24,7 +24,7 @@
.hover {
width: 18px;
height: 18px;
margin-left: 90px;
margin-left: 40px;
border: 1px solid #999;
border-radius: 3px;
.mat-icon {font-size: 18px; color: #999;}
@ -215,7 +215,7 @@
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between; /* 水平居中 */
justify-content: space-around; /* 水平居中 */
.imgBox {
width: 70px;
height: 100px;

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

@ -65,6 +65,8 @@ export class HomeComponent implements OnInit {
//查看详情
viewDetails () {
localStorage.setItem("pattern","look")
this.router.navigate([`/trainingrecordinfo`],{queryParams:{'id':'5fa4d863f8eb762cb03c6a72'}})
console.log('查看详情')
}

28
src/app/ui/photoofthescene/photoofthescene.component.html

@ -11,12 +11,17 @@
<span>单位整体建筑或大门照片,要求照拍照时要求设置拍照日期</span>
</div>
</div>
<div class="input" *ngIf="!unitImg">
<div class="input" *ngIf="!unitImg && isEditPattern">
<input type="file" (change)="filechange1($event,'1')" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div *ngIf="unitImg" id="viewerjs1">
<img class="image" [src]="unitImg" alt="" [attr.data-original]="unitImg.split('?')[0]">
</div>
<div *ngIf="unitImg && isEditPattern" class="deleteicon">
<button mat-icon-button (click)="deleteimg('1')">
<mat-icon>delete</mat-icon>
</button>
</div>
</td>
<td>
<div class="noImg" *ngIf="!lingdaoImg">
@ -28,12 +33,17 @@
<span>人员现场熟悉照片,要求有带队领导及熟悉人员现场熟悉场景,拍照时要求设置拍照日期</span>
</div>
</div>
<div class="input" *ngIf="!lingdaoImg">
<div class="input" *ngIf="!lingdaoImg && isEditPattern">
<input type="file" (change)="filechange1($event,'2')" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div *ngIf="lingdaoImg" id="viewerjs2">
<img class="image" [src]="lingdaoImg" alt="" [attr.data-original]="lingdaoImg.split('?')[0]">
</div>
<div *ngIf="lingdaoImg && isEditPattern" class="deleteicon">
<button mat-icon-button (click)="deleteimg('2')">
<mat-icon>delete</mat-icon>
</button>
</div>
</td>
</tr>
<tr>
@ -47,12 +57,17 @@
<span>人员现场熟悉照片,要求有熟悉人员现场熟悉场景,拍照时要求设置拍照日期</span>
</div>
</div>
<div class="input" *ngIf="!peopleImg">
<div class="input" *ngIf="!peopleImg && isEditPattern">
<input type="file" (change)="filechange1($event,'3')" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div *ngIf="peopleImg" id="viewerjs3">
<img class="image" [src]="peopleImg" alt="" [attr.data-original]="peopleImg.split('?')[0]">
</div>
<div *ngIf="peopleImg && isEditPattern" class="deleteicon">
<button mat-icon-button (click)="deleteimg('3')">
<mat-icon>delete</mat-icon>
</button>
</div>
</td>
<td>
<div class="noImg" *ngIf="!keysiteImg">
@ -64,12 +79,17 @@
<span>重点部位照片,拍照时要求设置拍照日期</span>
</div>
</div>
<div class="input" *ngIf="!keysiteImg">
<div class="input" *ngIf="!keysiteImg && isEditPattern">
<input type="file" (change)="filechange1($event,'4')" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div *ngIf="keysiteImg" id="viewerjs4">
<img class="image" [src]="keysiteImg" alt="" [attr.data-original]="keysiteImg.split('?')[0]">
</div>
<div *ngIf="keysiteImg && isEditPattern" class="deleteicon">
<button mat-icon-button (click)="deleteimg('4')">
<mat-icon>delete</mat-icon>
</button>
</div>
</td>
</tr>
</table>

5
src/app/ui/photoofthescene/photoofthescene.component.scss

@ -29,6 +29,11 @@ table{
height: 100%;
width: 299px;
}
.deleteicon{
position: absolute;
right: 0.058594rem;
top: 0.058594rem;
}
}
}
table,table tr th, table tr td { border:1px solid black;text-align: center; }

30
src/app/ui/photoofthescene/photoofthescene.component.ts

@ -11,6 +11,7 @@ export class PhotoofthesceneComponent implements OnInit {
constructor(private http: HttpClient,public snackBar: MatSnackBar) { }
gallery//viewerJs实例
isEditPattern = true
ngOnInit(): void {
setTimeout(() => {
if(document.getElementById('viewerjs1')){
@ -35,7 +36,11 @@ export class PhotoofthesceneComponent implements OnInit {
}
}, 0);
console.log(555,this.unitImg.split("?")[0])
if(localStorage.getItem("pattern")=="edit"){
this.isEditPattern = true
}else if(localStorage.getItem("pattern") == "look"){
this.isEditPattern = false
}
}
unitImg:any = localStorage.getItem(sessionStorage.getItem("companyId") + "1") || ""
@ -43,7 +48,28 @@ export class PhotoofthesceneComponent implements OnInit {
peopleImg:any = localStorage.getItem(sessionStorage.getItem("companyId") + "3") || ""
keysiteImg:any = localStorage.getItem(sessionStorage.getItem("companyId") + "4") || ""
//删除照片
deleteimg(num){
var msg = "您真的确定要删除吗?";
if (confirm(msg)==true){
localStorage.removeItem(sessionStorage.getItem('companyId')+num)
if(num == "1"){
this.unitImg = ""
}
if(num == "2"){
this.lingdaoImg = ""
}
if(num == "3"){
this.peopleImg = ""
}
if(num == "4"){
this.keysiteImg = ""
}
}else{
return false;
}
}
//熟悉单位照片上传
file:any
filechange1(e,index){

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

@ -1,3 +1,7 @@
<div class="content">
<div class="center" id="center"></div>
<div class="btnbox">
<div class="btn" (click)="next()">已到达熟悉单位</div>
<div (click)="back()">取消本次任务</div>
</div>
</div>

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

@ -4,8 +4,31 @@
box-sizing: border-box;
padding: 0.244141rem;
overflow: hidden;
position: relative;
.center {
width: 100%;
height: 100%;
}
.btnbox{
position: absolute;
left: 50%;
bottom: 7%;;
transform: translateX(-50%);
display: flex;
div{
text-align: center;
width: 1.757813rem;
height: 0.46875rem;
line-height: 0.46875rem;
opacity: 1;
border-radius: 0.292969rem;
font-size: 0.15625rem;
margin: 0 12px;
background: #E9EAF3;
}
.btn{
background: linear-gradient(337deg, #FC7045 0%, #FF4923 100%);
color: #fff;
}
}
}

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

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
declare var AMap: any;
@Component({
@ -7,7 +7,7 @@ declare var AMap: any;
styleUrls: ['./router-gis.component.scss']
})
export class RouterGISComponent implements OnInit {
@Output() onCustomEvent: EventEmitter<any> = new EventEmitter();//创建实力
constructor() { }
ngOnInit(): void {
@ -15,7 +15,7 @@ export class RouterGISComponent implements OnInit {
this.mapInit()
},0)
}
ngAfterViewInit(): void {
}
@ -45,4 +45,15 @@ export class RouterGISComponent implements OnInit {
//new AMap.LngLat(116.379028, 39.865042), new AMap.LngLat(116.427281, 39.903719) / [{keyword: '淄博站',city:'山东'},{keyword: '淄博北站',city:'山东'}], //路线可搜索, 可用坐标
}
//下一步
next(){
this.emitEvent()
}
private emitEvent(){
this.onCustomEvent.emit('data from child');//通过emit可将需要传递的数据发送给父组件
}
//取消
back(){
window.history.back();
}
}

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

@ -13,11 +13,11 @@
<div class="content">
<div class="cardbox">
<mat-tab-group style="height: 95%;">
<mat-tab-group style="height: 97%;" [selectedIndex]="tabsSelectedIndex">
<mat-tab label="行驶路线">
<ng-template matTabContent>
<app-router-gis></app-router-gis>
<app-router-gis (onCustomEvent)="onCustom($event)"></app-router-gis>
</ng-template>
</mat-tab>

7
src/app/ui/training-recordinfo/training-recordinfo.component.ts

@ -6,10 +6,13 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./training-recordinfo.component.scss']
})
export class TrainingRecordinfoComponent implements OnInit {
tabsSelectedIndex:any = 0//当前选项卡值
constructor() { }
title:any = "训练记录信息"
ngOnInit(): void {
}
onCustom($event){
console.log($event);//data from child
this.tabsSelectedIndex = 1
}
}

4
src/app/ui/ui.module.ts

@ -66,11 +66,11 @@ import { TrainingRecordinfoComponent } from './training-recordinfo/training-reco
import { RouterGISComponent } from './router-gis/router-gis.component';
import { KeyUnitModule } from '../key-unit/key-unit.module';
import { PhotoofthesceneComponent } from './photoofthescene/photoofthescene.component';
import { 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 { FindProblemComponent } from './find-problem/find-problem.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],
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],
imports: [
CommonModule,

14
src/app/ui/water-road/edittext.html

@ -0,0 +1,14 @@
<div class="dialogbox">
<div class="title">
<span style="color: #FC7045;">说明:</span>
<span>水源情况主要包括消火栓位置、管径、外观完好情况、停车取水位置试水情况,消防水池位置、容量、停车取水位置、取水测试情况,取消码头位置、水位、停车取水位置等;道路情况主要包括道路长度、宽度、起始点、沿线重点单位、立交、桥梁、涵洞及其通车能力。</span>
<span style="color: #FC7045;">【该项主要在道路水源熟悉时填写】</span>
</div>
<div class="text">
<textarea [disabled]="!isEditPattern" name="" id="" cols="30" rows="10" placeholder="请输入水源情况" [(ngModel)]="textcontant"></textarea>
</div>
<div class="btnbox">
<div *ngIf="isEditPattern" (click)="ok()">确认</div>
<div (click)="cancel()">取消</div>
</div>
</div>

15
src/app/ui/water-road/water-road.component.html

@ -1,4 +1,19 @@
<div class="content">
<div class="center" id="map"></div>
<!-- <div class="textbox">
<div class="btn">
<span>
<mat-icon (click)="save()">description</mat-icon>
<mat-icon (click)="clickicon()">create</mat-icon>
</span>
</div>
<div class="text" [hidden]="!isshow">
<textarea [(ngModel)]="textcontant" name="" id="" cols="28" rows="18" placeholder="水源情况主要包括消火栓位置、管径、外观完好情况、停车取水位置试水情况,消防水池位置、容量、停车取水位置、取水测试情况,取消码头位置、水位、停车取水位置等;道路情况主要包括道路长度、宽度、起始点、沿线重点单位、立交、桥梁、涵洞及其通车能力。【该项主要在道路水源熟悉时填写】"></textarea>
</div>
</div> -->
<div class="editbtn" (click)="opendialog()">
<p style="margin-top: 20px;"><mat-icon>create</mat-icon></p>
<p style="font-size: 16px;color: #fff;">编辑</p>
</div>
</div>

69
src/app/ui/water-road/water-road.component.scss

@ -4,8 +4,77 @@
box-sizing: border-box;
padding: 0.244141rem;
overflow: hidden;
position: relative;
.center {
width: 100%;
height: 100%;
}
.textbox{
position: absolute;
z-index: 999;
right: 0.244141rem;
top:0.244141rem;
.btn{
text-align: right;
}
}
.editbtn{
text-align: center;
position: absolute;
right: 0.507813rem;
bottom: 0.439453rem;
width: 0.976563rem;
height: 0.976563rem;
// line-height: 0.976563rem;
background: linear-gradient(360deg, #FC7045 0%, #FF4923 100%);
box-shadow: 0px 2px 10px #D8A798;
border-radius: 50%;
opacity: 1;
p{
color: #fff;
}
}
}
.dialogbox{
width: 7.441406rem;
height: 5.761719rem;
.title{
span{
font-size: 16px;
}
}
.text{
width: 97%;
height: 3.554688rem;
margin-top: 0.351563rem;
background: #F4F5F9;
border-radius: 10px;
textarea{
width: 100%;
height: 100%;
}
}
.btnbox{
display: flex;
margin-top: 0.351563rem;
justify-content: center;
div{
font-size: 0.15625rem;
width: 1.757813rem;
height: 0.46875rem;
line-height: 0.46875rem;
text-align: center;
background: #E9EAF3;
opacity: 1;
border-radius: 30px;
margin: 0 10px;
}
div:nth-child(1){
color: #fff;
background: linear-gradient(337deg, #FC7045 0%, #FF4923 100%);
}
}
}

141
src/app/ui/water-road/water-road.component.ts

@ -1,5 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
declare var AMap: any;
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
@Component({
selector: 'app-water-road',
@ -8,40 +10,117 @@ declare var AMap: any;
})
export class WaterRoadComponent implements OnInit {
constructor() { }
ngOnInit(): void {
constructor(public snackBar: MatSnackBar,public dialog: MatDialog) { }
isshow:boolean = true
textcontant:any = localStorage.getItem(sessionStorage.getItem("companyId") + "waterroad") || ""
clickicon(){
this.isshow = !this.isshow
}
ngAfterViewInit(): void {
window.setTimeout(()=>{
this.mapInit()
},0)
save(){
localStorage.setItem(sessionStorage.getItem("companyId") + "waterroad",this.textcontant)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
}
map:any //地图
ngOnInit(): void {
setTimeout(() => {
this.creatMap()
}, 0);
}
//地图初始化
mapInit () {
//创建地图
let map = new AMap.Map('map', {
resizeEnable: true,
cursor: 'default',
zooms:[6,18],
creatMap(){
var satellite = new AMap.TileLayer.Satellite();
var roadNet = new AMap.TileLayer.RoadNet();
// 创建一个 icon
var startIcon = new AMap.Icon({
image: '../../../assets/images/fireHydrant.png',
// // 图标所用图片大小
imageSize: new AMap.Size(20, 20),
// // 图标取图偏移量
// imageOffset: new AMap.Pixel(-9, -3)
});
// //构造路线导航类 实际路线
// 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:'山东'}], //路线可搜索, 可用坐标
}
let arr = [{lng:108.299405,lat: 22.894884},
{lng:108.597409,lat: 22.80883},
{lng:108.689419,lat: 23.061775},
{lng:107.971188,lat: 22.950537},
{lng:107.847592,lat: 23.090833},
{lng:108.176374,lat: 22.790585},
{lng:108.407087,lat: 22.671522},
{lng:108.158521,lat: 22.61322},
{lng:107.925062,lat: 22.565038},
{lng:108.180494,lat: 22.501616},
{lng:107.743222,lat: 22.535121}]
let Arr = []
arr.forEach(item=>{
let viaMarker = new AMap.Marker({
position: new AMap.LngLat(item.lng, item.lat),
icon: startIcon,
offset: new AMap.Pixel(-10, -10)
})
Arr.push(viaMarker)
})
this.map = new AMap.Map('map',{
zoom: 16
});
this.map.on('click', (e) => {
console.log(e.lnglat.getLng() + ',' + e.lnglat.getLat())
});
this.map.setCity('南宁市')
this.map.add(Arr);//火源标点
}
opendialog(){
let dialogRef = this.dialog.open(EditText);
dialogRef.afterClosed().subscribe(data=>{
if(data){
}
});
}
}
//编辑水源道路情况
@Component({
selector: 'app-editBuilding',
templateUrl: './edittext.html',
styleUrls: ['./water-road.component.scss']
})
export class EditText {
constructor(public snackBar: MatSnackBar,public dialog: MatDialog,public dialogRef: MatDialogRef<EditText>,@Inject(MAT_DIALOG_DATA) public data) { }
textcontant:any = localStorage.getItem(sessionStorage.getItem("companyId") + "waterroad") || ""//输入内容
isEditPattern = true
ngOnInit(): void {
if(localStorage.getItem("pattern")=="edit"){
this.isEditPattern = true
}else if(localStorage.getItem("pattern") == "look"){
this.isEditPattern = false
}
}
//确定
ok(){
localStorage.setItem(sessionStorage.getItem("companyId") + "waterroad",this.textcontant)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
this.dialogRef.close();
}
//取消
cancel(){
this.dialogRef.close();
}
}

BIN
src/assets/images/fireHydrant.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Loading…
Cancel
Save