diff --git a/src/app/key-unit/basicinfo/basicinfo.component.html b/src/app/key-unit/basicinfo/basicinfo.component.html index 543286a..2cf3c2a 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.html +++ b/src/app/key-unit/basicinfo/basicinfo.component.html @@ -113,10 +113,10 @@
- +
- +
@@ -132,7 +132,7 @@
- +
@@ -195,12 +195,12 @@
- +

自定义信息

- - + +
- +

{{item.buildingBasicGroups[1].name}}

@@ -316,7 +316,7 @@
- +

储罐信息

@@ -480,12 +480,12 @@
- +

自定义信息

- - + +
-
+
diff --git a/src/app/key-unit/basicinfo/basicinfo.component.ts b/src/app/key-unit/basicinfo/basicinfo.component.ts index 5ec1e1f..33e0f92 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.ts +++ b/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() diff --git a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html index 1bf4c41..7de851e 100644 --- a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html +++ b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html @@ -3,10 +3,10 @@
-

暂无数据,请完善单位基本信息

+

暂无数据,请完善单位基本信息

{{item.name}}

-
+
add_circle_outline description delete @@ -74,7 +74,7 @@

{{item.name}}

- description + description
@@ -100,7 +100,7 @@

{{item.name}}

-
+
add_circle_outline description delete @@ -168,7 +168,7 @@

{{item.name}}

- description + description
diff --git a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts index 8338a2a..0f6af69 100644 --- a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts +++ b/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 + } } //定义属性数据 diff --git a/src/app/key-unit/key-site/key-site.component.html b/src/app/key-unit/key-site/key-site.component.html index 4adf51d..df62c75 100644 --- a/src/app/key-unit/key-site/key-site.component.html +++ b/src/app/key-unit/key-site/key-site.component.html @@ -4,7 +4,7 @@
-

重点部位情况

+

重点部位情况

@@ -45,13 +45,13 @@
重点部位名称
-

暂无数据,请前往平面图进行相关数据录入

+

暂无数据,请前往平面图进行相关数据录入

-

重点提示

- description +

重点提示

+ description

- +

@@ -62,7 +62,7 @@
-

重点部位情况

+

重点部位情况

@@ -103,13 +103,13 @@
重点部位名称
-

暂无数据,请前往平面图进行相关数据录入

+

暂无数据,请前往平面图进行相关数据录入

-

重点提示

- description +

重点提示

+ description

- +

diff --git a/src/app/key-unit/key-site/key-site.component.ts b/src/app/key-unit/key-site/key-site.component.ts index c760b23..4fc4efc 100644 --- a/src/app/key-unit/key-site/key-site.component.ts +++ b/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() diff --git a/src/app/ui/add-six-familiar/add-six-familiar.component.ts b/src/app/ui/add-six-familiar/add-six-familiar.component.ts index a922967..e9cb2ba 100644 --- a/src/app/ui/add-six-familiar/add-six-familiar.component.ts +++ b/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(); diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index a993fc9..903c4ec 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -41,7 +41,7 @@
--> tv - create + create description
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 3b87b9d..4c47b66 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/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() } diff --git a/src/app/ui/home/home.component.ts b/src/app/ui/home/home.component.ts index 9024e44..0296260 100644 --- a/src/app/ui/home/home.component.ts +++ b/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('查看详情') } diff --git a/src/app/ui/photoofthescene/photoofthescene.component.html b/src/app/ui/photoofthescene/photoofthescene.component.html index c9dcfc0..43fa83c 100644 --- a/src/app/ui/photoofthescene/photoofthescene.component.html +++ b/src/app/ui/photoofthescene/photoofthescene.component.html @@ -11,12 +11,17 @@ 单位整体建筑或大门照片,要求照拍照时要求设置拍照日期
-
+
+
+ +
@@ -28,12 +33,17 @@ 人员现场熟悉照片,要求有带队领导及熟悉人员现场熟悉场景,拍照时要求设置拍照日期
-
+
+
+ +
@@ -47,12 +57,17 @@ 人员现场熟悉照片,要求有熟悉人员现场熟悉场景,拍照时要求设置拍照日期
-
+
+
+ +
@@ -64,12 +79,17 @@ 重点部位照片,拍照时要求设置拍照日期
-
+
+
+ +
\ No newline at end of file diff --git a/src/app/ui/photoofthescene/photoofthescene.component.scss b/src/app/ui/photoofthescene/photoofthescene.component.scss index bdf85d9..75329d2 100644 --- a/src/app/ui/photoofthescene/photoofthescene.component.scss +++ b/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; } \ No newline at end of file diff --git a/src/app/ui/photoofthescene/photoofthescene.component.ts b/src/app/ui/photoofthescene/photoofthescene.component.ts index 312dd2c..6c1120b 100644 --- a/src/app/ui/photoofthescene/photoofthescene.component.ts +++ b/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){ diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 888f4b7..97ed6d7 100644 --- a/src/app/ui/ui.module.ts +++ b/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, diff --git a/src/app/ui/water-road/edittext.html b/src/app/ui/water-road/edittext.html new file mode 100644 index 0000000..f7a270f --- /dev/null +++ b/src/app/ui/water-road/edittext.html @@ -0,0 +1,14 @@ +
+
+ 说明: + 水源情况主要包括消火栓位置、管径、外观完好情况、停车取水位置试水情况,消防水池位置、容量、停车取水位置、取水测试情况,取消码头位置、水位、停车取水位置等;道路情况主要包括道路长度、宽度、起始点、沿线重点单位、立交、桥梁、涵洞及其通车能力。 + 【该项主要在道路水源熟悉时填写】 +
+
+ +
+
+
确认
+
取消
+
+
\ No newline at end of file diff --git a/src/app/ui/water-road/water-road.component.html b/src/app/ui/water-road/water-road.component.html index c9f52dd..9487820 100644 --- a/src/app/ui/water-road/water-road.component.html +++ b/src/app/ui/water-road/water-road.component.html @@ -1,6 +1,6 @@
-
+ +
+

create

+

编辑

\ No newline at end of file diff --git a/src/app/ui/water-road/water-road.component.scss b/src/app/ui/water-road/water-road.component.scss index f97ce36..7386cb6 100644 --- a/src/app/ui/water-road/water-road.component.scss +++ b/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%); + } + } } \ No newline at end of file diff --git a/src/app/ui/water-road/water-road.component.ts b/src/app/ui/water-road/water-road.component.ts index e35b75d..256b84d 100644 --- a/src/app/ui/water-road/water-road.component.ts +++ b/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,@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(); + } +} \ No newline at end of file