Browse Source

[完善]修改页面ui;[新增]新增查看模式

master
邵佳豪 4 years ago
parent
commit
3e9e47844c
  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/collection-tools.component.html
  9. 11
      src/app/ui/collection-tools/collection-tools.component.ts
  10. 2
      src/app/ui/home/home.component.ts
  11. 28
      src/app/ui/photoofthescene/photoofthescene.component.html
  12. 5
      src/app/ui/photoofthescene/photoofthescene.component.scss
  13. 30
      src/app/ui/photoofthescene/photoofthescene.component.ts
  14. 4
      src/app/ui/ui.module.ts
  15. 14
      src/app/ui/water-road/edittext.html
  16. 6
      src/app/ui/water-road/water-road.component.html
  17. 59
      src/app/ui/water-road/water-road.component.scss
  18. 50
      src/app/ui/water-road/water-road.component.ts

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/collection-tools.component.html

@ -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>

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/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/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>

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

@ -1,6 +1,6 @@
<div class="content">
<div class="center" id="map"></div>
<div class="textbox">
<!-- <div class="textbox">
<div class="btn">
<span>
<mat-icon (click)="save()">description</mat-icon>
@ -10,6 +10,10 @@
<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>

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

@ -18,4 +18,63 @@
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%);
}
}
}

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

@ -1,4 +1,5 @@
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';
@ -9,7 +10,7 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
})
export class WaterRoadComponent implements OnInit {
constructor(public snackBar: MatSnackBar) { }
constructor(public snackBar: MatSnackBar,public dialog: MatDialog) { }
isshow:boolean = true
textcontant:any = localStorage.getItem(sessionStorage.getItem("companyId") + "waterroad") || ""
clickicon(){
@ -78,5 +79,48 @@ export class WaterRoadComponent implements OnInit {
}
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();
}
}
Loading…
Cancel
Save