From 66a1d0a88c64b91ec2165af8a96bc80f126f34bb Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Fri, 5 Feb 2021 09:49:06 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=BE=85=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E9=A1=B5=E9=9D=A2=E4=B8=89=E7=BB=B4=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/plan-audit/plan-audit.module.ts | 3 +- src/app/plan-audit/wait-examineer/show3D.html | 11 ++ .../wait-examineer.component.html | 23 ++- .../wait-examineer.component.scss | 12 ++ .../wait-examineer.component.ts | 153 ++++++++++++++---- 5 files changed, 165 insertions(+), 37 deletions(-) create mode 100644 src/app/plan-audit/wait-examineer/show3D.html diff --git a/src/app/plan-audit/plan-audit.module.ts b/src/app/plan-audit/plan-audit.module.ts index 8128f39..613158f 100644 --- a/src/app/plan-audit/plan-audit.module.ts +++ b/src/app/plan-audit/plan-audit.module.ts @@ -66,11 +66,12 @@ import { FunctionPartitionComponent } from './function-partition/function-partit import { CadDrawComponent } from './cad-draw/cad-draw.component' import { RealisticPictureLookComponent }from './realistic-picture-look/realistic-picture.component' import { previewImg3 } from './realistic-picture-look/realistic-picture.component' +import { show3D } from './wait-examineer/wait-examineer.component' @NgModule({ declarations: [DetachmentLevelComponent, PlanAuditComponent, PlanPassComponent,PlanOpen, PlanRecordComponent, BasicInfoComponent, WaitExamineerComponent,AllaroundComponent,ImgDetails,FireFacilitiesComponent,ImagesData2,previewBigImg2,PlanListComponent,OpenPlanToolDialog, - KeySiteLookComponent,KeySiteImgs2,FunctionPartitionComponent,CadDrawComponent,RealisticPictureLookComponent,previewImg3], + KeySiteLookComponent,KeySiteImgs2,FunctionPartitionComponent,CadDrawComponent,RealisticPictureLookComponent,previewImg3,show3D], imports: [ CommonModule, PlanAuditRoutingModule, diff --git a/src/app/plan-audit/wait-examineer/show3D.html b/src/app/plan-audit/wait-examineer/show3D.html new file mode 100644 index 0000000..df039d1 --- /dev/null +++ b/src/app/plan-audit/wait-examineer/show3D.html @@ -0,0 +1,11 @@ + +
+ +
\ No newline at end of file diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index abde6ee..ff04487 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -242,10 +242,31 @@ -
+
+
+
+ 单位名称: + {{compantData.name?compantData.name : '暂无数据'}} +
+
+ 消防救援站: + {{organizationName}} +
+
+ 单位类型: + {{compantData.buildingTypes.length?compantData.buildingTypes[0].name : '暂无数据'}} +
+
+ 单位地址: + {{compantData.address?compantData.address : '暂无数据'}} +
+
+ 查看详情 +
+
diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index db3f6a9..8655a59 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -200,6 +200,18 @@ th,td{ opacity: 1; } } +.twoD { + width: 100%; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: left; + .planBox { + margin: 30px 30px; + color: black; + :first-child {margin-right: 10px;} + } + } //滚动条样式 ::-webkit-scrollbar{ diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 68b06df..33ce947 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -4,11 +4,12 @@ * @Author: sueRimn * @Date: 2020-12-25 16:13:50 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-03 16:24:16 + * @LastEditTime: 2021-02-05 09:46:54 */ -import { Component, OnInit } from '@angular/core'; +import { Component, Inject, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; +import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; import { HttpClient } from '@angular/common/http' declare var CryptoJS import { DomSanitizer } from '@angular/platform-browser'; @@ -22,7 +23,7 @@ declare var echarts: any; }) export class WaitExamineerComponent implements OnInit { - constructor(private http:HttpClient,public snackBar: MatSnackBar,private sanitizer: DomSanitizer) { + constructor(private http:HttpClient,public snackBar: MatSnackBar,private sanitizer: DomSanitizer,public dialog: MatDialog) { } @@ -101,7 +102,14 @@ export class WaitExamineerComponent implements OnInit { chuorzhong//判断初审还是终审 radioid//选中的id shenheTable=[]//选中要审核的对象 - showtype=2//0:word,1:全景图,2:二维三维,3:重点单位 + showtype//0:word,1:全景图,2:二维三维,3:重点单位 + compantData={name:'',buildingTypes:[],address:''} + organizationName + planData + id + companyId + fetchUrl + companyName //获取表格数据 getAlltabledate(){ @@ -146,32 +154,65 @@ export class WaitExamineerComponent implements OnInit { radioClick(e,item){ //e.target.parentElement.bgColor='#2196F3' console.log(e,item) - let filename:string - let fetchUrl + this.id=item.id + this.fetchUrl='' + this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ + this.companyId=data.companyId + this.companyName=data.companyName if(data.planType!=2&&data.planType!=1){ - fetchUrl=data.attachmentUrls[0] - var index=fetchUrl.indexOf("\/") - if(fetchUrl.substr(0,index)=='psw'){ + this.fetchUrl=data.attachmentUrls[0] + var index=this.fetchUrl.indexOf("\/") + if(this.fetchUrl.substr(0,index)=='psw'){ this.showtype=1 window.setTimeout(()=>{ const viewer = new Viewer({ container: document.querySelector('#viewer'), - panorama:'/api/Objects/PlanPlatform/'+ fetchUrl, + panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, }); }) }else{ - this.showtype=0 - this.http.get(`/api/ObjectMetadata/PlanPlatform/${fetchUrl}`).subscribe((data:any)=>{ + this.lookWord() + } + }else{ + this.organizationName=item.organizationName + this.getPlanData() + //this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` + //this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) + } + + + }) + + if(e.checked){ + this.shenheTable.push(item) + } + else{ + for(var i=0;i{ filename=data.fileName let json={ doc: { - docId: item.id, + docId: this.id, title: filename, //title: filename, - fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl + fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+this.fetchUrl }, user: { uid: "test", @@ -189,29 +230,57 @@ export class WaitExamineerComponent implements OnInit { this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); //window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) }) - } - }else{ - this.showtype=2 - this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` - this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) - } - - - }) - - if(e.checked){ - this.shenheTable.push(item) + } + getPlanData () { + let header = { + CompanyName: this.companyName || '', + //AuditStatus: this.id || '', + PageSize: '100', } - else{ - for(var i=0;i{ + data.items.forEach(element => { + /* if (element.id===this.id) { + + } */ + this.planData = element + this.organizationName = element.committerOrganizationName + this.handleData() + return + }); + }) + } + + //查看二维三维预案 + thirdPartyURL + planType + handleData () { + this.planType = this.planData.planMode + let data = this.planData + console.log(this.planData) + if (this.planData.planMode==0) { //预案planMode=0时, 查看word + //this.lookWord() + } else if (this.planData.planMode==1) { //预案planMode=1时, 解析文档 + + } else if (this.planData.planMode==2) { //预案planMode=2时, 跳查看页面组件 + sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length? this.compantData.buildingTypes[0].id: undefined); + sessionStorage.setItem("companyId",this.companyId); + sessionStorage.setItem("planId",this.id); + sessionStorage.setItem("editable",'0'); + } else if (this.planData.planMode==3) { //预案planMode=3时, 第三方网址 + this.showtype=2 + this.http.get(`/api/Plans/${data.companyId}`).subscribe((data:any)=>{ + data && data.company? this.compantData = data.company : null + }) + //this.dialog.open(show3D,{width:'1350px',height:'700px',data:{url:data.url}}); //打开图片弹窗 + this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(data.url) } - /* this.chuorzhong=item.verifyState - this.radioid=item.itemId */ + + } + + //打开三维预案弹窗 + oopen3Dshow(){ + this.dialog.open(show3D,{width:'1550px',height:'850px',data:{url:this.thirdPartyURL}}); } //变更数据和全部数据切换按钮 buttonChange(){ @@ -439,3 +508,17 @@ export class WaitExamineerComponent implements OnInit { } } + +@Component({ + selector: 'app-wait-examineer-show3D', + templateUrl: './show3D.html', + styleUrls: ['./wait-examineer.component.scss'] +}) +export class show3D{ + constructor(private sanitizer: DomSanitizer,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public dialog: MatDialog) {} + ngOnInit(): void { + console.log(this.data.url.changingThisBreaksApplicationSecurity) + this.threedUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.data.url.changingThisBreaksApplicationSecurity) + } + threedUrl +} \ No newline at end of file From 8d34c05d170db099c32594acc23c53d30c5939d7 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 5 Feb 2021 10:22:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2=E6=B0=B4=E6=BA=90=E9=87=87?= =?UTF-8?q?=E9=9B=86=E5=92=8C=E6=B6=88=E9=98=B2=E5=8A=9B=E9=87=8F=E9=87=87?= =?UTF-8?q?=E9=9B=86=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-force/fire-force.component.ts | 8 +- .../linkage-forces.component.ts | 2 +- .../water-collection.component.scss | 2 +- .../water-collection.component.ts | 1 + .../basicinfo-look/basicinfo.component.html | 4 +- .../basicinfo/basicinfo.component.html | 4 +- .../fireforce-audit.component.html | 453 ++++++++++++++++++ .../fireforce-audit.component.scss | 265 ++++++++++ .../fireforce-audit.component.spec.ts | 25 + .../fireforce-audit.component.ts | 232 +++++++++ .../linkageforces-audit.component.html | 1 + .../linkageforces-audit.component.scss | 0 .../linkageforces-audit.component.spec.ts | 25 + .../linkageforces-audit.component.ts | 15 + src/app/plan-audit/plan-audit.module.ts | 7 +- .../wait-examineer.component.html | 257 +++++----- .../wait-examineer.component.scss | 18 +- .../wait-examineer.component.ts | 2 +- .../water-audit/water-audit.component.html | 359 ++++++++++++++ .../water-audit/water-audit.component.scss | 116 +++++ .../water-audit/water-audit.component.spec.ts | 25 + .../water-audit/water-audit.component.ts | 64 +++ .../collection-tools.component.html | 6 +- .../collection-tools.component.ts | 2 - .../collection-tools.component.html | 4 +- .../collection-tools.component.ts | 3 - .../collection-tools.component.html | 6 +- 27 files changed, 1752 insertions(+), 154 deletions(-) create mode 100644 src/app/plan-audit/fireforce-audit/fireforce-audit.component.html create mode 100644 src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss create mode 100644 src/app/plan-audit/fireforce-audit/fireforce-audit.component.spec.ts create mode 100644 src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts create mode 100644 src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html create mode 100644 src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss create mode 100644 src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.spec.ts create mode 100644 src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts create mode 100644 src/app/plan-audit/water-audit/water-audit.component.html create mode 100644 src/app/plan-audit/water-audit/water-audit.component.scss create mode 100644 src/app/plan-audit/water-audit/water-audit.component.spec.ts create mode 100644 src/app/plan-audit/water-audit/water-audit.component.ts diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index 02b6199..ba19d96 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -398,7 +398,7 @@ export class FireForceComponent implements OnInit { personCountData:[],//人员数量自定义 contactData:[],//联系方式自定义 dutyForceData:[],//执勤力量自定义 - RelevantInfomationData:[]//相关资料 + relevantInfomationData:[]//相关资料 } //总队支队人员数量 ZongpersonCountData:any=[ @@ -474,7 +474,7 @@ export class FireForceComponent implements OnInit { personCountData:[],//人员数量自定义 contactData:[],//联系方式自定义 dutyForceData:[],//执勤力量自定义 - RelevantInfomationData:[]//相关资料 + relevantInfomationData:[]//相关资料 } this.ZongpersonCountData = [ {PropertyName :'现役官兵人数',PropertyValue:''}, @@ -571,7 +571,8 @@ export class FireForceComponent implements OnInit { } this.FireForceDetailInfo.jurisdictionArea = Number(this.FireForceDetailInfo.jurisdictionArea) - this.FireForceDetailInfo.RelevantInfomationData = JSON.stringify(this.AttachmentArr) + this.FireForceDetailInfo.relevantInfomationData = JSON.stringify(this.AttachmentArr) + console.log(1111,this.FireForceDetailInfo) //如果是总支大中 this.FireForceDetailInfo.location = {x:'',y:''} if(this.atLastPositionLngLat.x){ @@ -598,6 +599,7 @@ export class FireForceComponent implements OnInit { this.FireForceDetailInfo.contactData = JSON.stringify(this.DaZhongcontactData) this.FireForceDetailInfo.dutyForceData = null } + console.log('body',body) this.http.put(`/api/FireForceDetail/0/${this.selectedFireForce.id}`,body).subscribe(data => { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 41b9dc8..22e7a19 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -404,7 +404,7 @@ export class LinkageForcesComponent implements OnInit { } this.LinkageForceDetailInfo.location = {x:'',y:''} - this.LinkageForceDetailInfo.RelevantInfomationData = JSON.stringify(this.AttachmentArr) + this.LinkageForceDetailInfo.relevantInfomationData = JSON.stringify(this.AttachmentArr) if(this.atLastPositionLngLat.x){ this.LinkageForceDetailInfo.location.x = this.atLastPositionLngLat.x this.LinkageForceDetailInfo.location.y = this.atLastPositionLngLat.y diff --git a/src/app/data-collection/water-collection/water-collection.component.scss b/src/app/data-collection/water-collection/water-collection.component.scss index be9e19f..774617c 100644 --- a/src/app/data-collection/water-collection/water-collection.component.scss +++ b/src/app/data-collection/water-collection/water-collection.component.scss @@ -129,7 +129,7 @@ height: 20px; cursor: pointer; font-size: 20px; - vertical-align: text-top; + vertical-align: middle; color: rgba(49, 46, 46, 0.144); } mat-icon:hover{ diff --git a/src/app/data-collection/water-collection/water-collection.component.ts b/src/app/data-collection/water-collection/water-collection.component.ts index 5ae2c34..7cdea43 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -407,6 +407,7 @@ export class WaterCollectionComponent implements OnInit { this.waterData.location.x = this.atLastPositionLngLat.x this.waterData.location.y = this.atLastPositionLngLat.y } + console.log(666,this.waterData) this.http.put(`/api/WaterSources/${this.waterData.id}`,this.waterData).subscribe(data => { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; diff --git a/src/app/key-unit/basicinfo-look/basicinfo.component.html b/src/app/key-unit/basicinfo-look/basicinfo.component.html index 2cd6ccb..92548a9 100644 --- a/src/app/key-unit/basicinfo-look/basicinfo.component.html +++ b/src/app/key-unit/basicinfo-look/basicinfo.component.html @@ -188,7 +188,7 @@ 1级 2级 3级 - 其他 + 其它 @@ -278,7 +278,7 @@ 1级 2级 3级 - 其他 + 其它 diff --git a/src/app/key-unit/basicinfo/basicinfo.component.html b/src/app/key-unit/basicinfo/basicinfo.component.html index 13d7609..85224ea 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.html +++ b/src/app/key-unit/basicinfo/basicinfo.component.html @@ -218,7 +218,7 @@ 1级 2级 3级 - 其他 + 其它 @@ -308,7 +308,7 @@ 1级 2级 3级 - 其他 + 其它 diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html new file mode 100644 index 0000000..070bd78 --- /dev/null +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.html @@ -0,0 +1,453 @@ + +
+
+
+ +
+
+ + 请等待... +
+
+ + 下载中...({{progressBarValue}}%) +
+
+
+
+ 详情 +
+ +
+ 相关资料 +
+
+
+ +
+ +
+

基本信息

+ + + + * + 队站名称: + + + + + + 联系电话: + + + + + + 传真: + + + + + + 辖区面积: + + + + + + 备注: + + + + +

位置信息

+ + + + 地址: + + + + + + 经度: + + + + 纬度: + + + + + +

人员数量

+ + + + 现役官兵人数: + + + + + + 政府专职消防员数: + + + + + + 消防文员数: + + + + +

联系方式

+ + + + 总队长名称: + + + + + + 总队长联系方式: + + + + + + 总队政委姓名: + + + + + + 总队政委联系方式: + + + + + + + + 支队长姓名: + + + + + + 支队长联系方式: + + + + + + 支队政委姓名: + + + + + + 支队政委联系方式: + + + + +
+ +
+

基本信息

+ + + + * + 队站名称: + + + + + + 值班电话: + + + + + + 辖区面积: + + + + + + 备注: + + + + +

位置信息

+ + + + 地址: + + + + + + 经度: + + + + 纬度: + + + + + +

人员数量

+ + + + 现役人数: + + + + + + 政府专职消防员数: + + + + + + 每日执勤人数: + + + + +

联系方式

+ + + + 站长姓名: + + + + + + 站长联系方式: + + + + + + 指导员姓名: + + + + + + 指导员联系方式: + + + + + + 副指导员姓名: + + + + + + 副指导员联系方式: + + + + + + 副站长一姓名: + + + + + + 副站长一联系方式: + + + + + + 副站长二姓名: + + + + + + 副站长二联系方式: + + + + + + 副站长三姓名: + + + + + + 副站长三联系方式: + + + + +
+ +
+

基本信息

+ + + + * + 队伍类型: + + + + + + * + 队伍名称: + + + + + + 管辖单位: + + + + + + 队长: + + + + + + + 值班电话: + + + + + + 传真: + + + + + + 备注: + + + + +

位置信息

+ + + + 地址: + + + + + + 经度: + + + + 纬度: + + + + + +

人员数量

+ + + + + 每日执勤人数: + + + + + + 消防队员总人数: + + + + + + 执勤车辆数: + +
+ + +
+
+ + + 灭火剂总量: + +
+ + +
+
+
+
+
+ + + +
+
+
+ + + + + +
+ {{item.fileName}} + + +
+
+
+
+
+ + \ No newline at end of file diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss new file mode 100644 index 0000000..e34a82a --- /dev/null +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.scss @@ -0,0 +1,265 @@ +.box{ + width: 100%; + height: 100%; + background-color: #F2F4F6; + display: flex; + box-sizing: border-box; + font-size: 16px; + font-weight: 400; + color: #000000; +} + +.mapbox{ + flex: 1; + background-color: #fff; + display: flex; + flex-direction: column; + #container{ + width: 100%; + height: 200px; + } + .detailsbox{ + width: 100%; + height:500px; + position: relative; + .tabsbox{ + width: 100%; + height: 40px; + overflow: hidden; + overflow-x: auto; + line-height: 40px; + display: flex; + justify-content: space-between; + font-size: 15px; + .tabs{ + div{ + float: left; + width: 120px; + text-align: center; + cursor: pointer; + color: #000000; + opacity: 0.4; + border-right: 1px solid #F2F4F6; + } + .selectedBtn{ + background-color: #2196F3; + color: #fff; + opacity: 1; + } + } + .btnbox{ + display: flex; + align-items: center; + .uploadAttachment{ + display: inline-block; + margin-right: 20px; + width: 120px; + text-align: center; + height: 28px; + line-height: 28px; + position: relative; + button{ + width: 100%; + height: 28px; + line-height: 28px; + mat-icon{ + transform: rotate(25deg); + font-size: 20px; + width: 20px; + height: 20px; + } + } + .a-upload{ + display: inline-block; + position: absolute; + left: 0; + top: 0; + display: inline-block; + width: 100%; + height: 100%; + opacity: 0; + input{ + width: 100%; + height: 100%; + cursor: pointer; + } + } + } + span{ + display: inline-block; + cursor: pointer; + color: #2196F3; + mat-icon{ + vertical-align: sub; + font-size: 20px; + width: 20px; + height: 20px; + } + } + span:hover{ + text-decoration: underline; + } + .submitAudit{ + margin: 0 30px; + } + .close{ + margin-right: 30px; + } + } + } + .contant{ + width: 100%; + height:460px; + overflow-y: auto; + p{ + color: #2196F3; + background-color: #F2F4F6; + height: 33px; + line-height: 33px; + box-sizing: border-box; + padding-left: 20px; + font-size: 15px; + } + span{ + font-size: 15px; + } + input,select{ + height: 30px; + line-height: 30px; + box-sizing: border-box; + padding: 0 12px; + width: 60%; + margin-left: 5px; + border: 1px solid #EBEBEB; + border-radius: 5px; + } + textarea{ + width: 89%; + margin-left: 5px; + height: 85%; + border: 1px solid #EBEBEB; + border-radius: 5px; + } + .longinput{ + width: 74%; + } + .unitDiv{ + width: 60%; + position: relative; + input,select{ + width: 100%; + box-sizing: border-box; + padding-right: 50px; + } + .unit{ + position: absolute; + right: 13px; + top: 4px; + color: #000000; + opacity: 0.4; + } + } + .smallwidth{ + width: 30%; + } + // 相关资料 + .fileDivBox{ + position: relative; + float: left; + border: 1px solid #EBEBEB; + width: 160px; + height: 162px; + box-sizing: border-box; + padding: 16px 16px 0; + display: flex; + flex-direction: column; + margin: 12px; + align-items: center; + cursor: pointer; + .imgbox{ + width: 134px; + height: 110px; + display: flex; + justify-content: center; + align-items: center; + .thumbnailImg{ + width: 134px; + height: 110px; + } + } + + span{ + width: 100%; + text-align: center; + margin-top: 5px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: gray; + font-size: 14px; + } + .deleteFile{ + position: absolute; + right: 0; + top: 0; + width: 18px; + height: 18px; + font-size: 18px; + display: none; + } + .btn{ + position: absolute; + height: 30px; + line-height: 30px; + font-size: 14px; + display: none; + } + .btn1{ + top: 37px; + } + .btn2{ + top: 78px; + } + } + .fileDivBox:hover{ + border: 1px solid #000; + .deleteFile{ + display: block; + + } + .deleteFile:hover{ + color: red; + } + .btn{ + display: block; + } + } + } + .masklayer{ + position: absolute; + left: 0; + top: 0; + z-index: 2000; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.2); + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + span{ + font-size: 14px; + margin-top: 5px; + } + .progressbar{ + width: 15%; + } + .cancelbtn{ + height: 32px; + line-height: 32px; + font-size: 14px; + margin-top: 12px; + } + } + } +} \ No newline at end of file diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.spec.ts b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.spec.ts new file mode 100644 index 0000000..2335a75 --- /dev/null +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FireforceAuditComponent } from './fireforce-audit.component'; + +describe('FireforceAuditComponent', () => { + let component: FireforceAuditComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ FireforceAuditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FireforceAuditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts new file mode 100644 index 0000000..756937d --- /dev/null +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts @@ -0,0 +1,232 @@ +import { HttpClient } from '@angular/common/http'; +import { Component, OnInit } from '@angular/core'; +import { MatSnackBar } from '@angular/material/snack-bar'; +import Viewer from 'viewerjs' +declare var CryptoJS +declare var AMap: any; +@Component({ + selector: 'app-fireforce-audit', + templateUrl: './fireforce-audit.component.html', + styleUrls: ['./fireforce-audit.component.scss'] +}) +export class FireforceAuditComponent implements OnInit { + + constructor(public snackBar: MatSnackBar,private http:HttpClient) { } + selectedFireForceLevel:any = 0 + + FireForceDetailInfo:any = { + id: "600144ffe7036e11b8121684", + stationName: "上海总队", + isIndependentAlarm: true, + phoneNumber: "13864340193", + faxNumber: "120", + jurisdictionArea: 999, + remark: "暂无备注", + address: "齐鲁树谷", + location: { + x:0, + y:0 + }, + personCountData: "[{\"PropertyName\":\"现役官兵人数\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"政府专职消防员数\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"消防文员数\",\"PropertyValue\":\"3\"}]", + personCountItems: null, + contactData: "[{\"PropertyName\":\"总队长名称\",\"PropertyValue\":\"4\"},{\"PropertyName\":\"总队长联系方式\",\"PropertyValue\":\"5\"},{\"PropertyName\":\"总队政委名称\",\"PropertyValue\":\"6\"},{\"PropertyName\":\"总队政委联系方式\",\"PropertyValue\":\"7\"}]", + contactItems: null, + dutyForceData: null, + dutyForceItems: null, + relevantInfomationData: null, + integrityScore: 0, + integrityTotalCount: 0, + integrityNotEmptyCount: 0, + RelevantInfomationData:"[{\"objectName\":\"FireForce/1/601b69697cea2c03587c4c6d.png\",\"fileName\":\"楼层区域.png\",\"fileLength\":4079},{\"objectName\":\"FireForce/1/601b696e7cea2c03587c4c6e.mp4\",\"fileName\":\"李志 《天空之城》.mp4\",\"fileLength\":56362628},{\"objectName\":\"FireForce/1/601b69867cea2c03587c4c6f.docx\",\"fileName\":\"完整度规划20200724.docx\",\"fileLength\":16480}]" + } + + ZongpersonCountData + ZongcontactData + ZhicontactData + DaZhongpersonCountData + DaZhongcontactData + othercontactData + otherpersonCountData + AttachmentArr + ngOnInit(): void { + this.ZongpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData) + this.ZongcontactData = JSON.parse(this.FireForceDetailInfo.contactData) + this.ZhicontactData = JSON.parse(this.FireForceDetailInfo.contactData) + this.DaZhongpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData) + this.DaZhongcontactData = JSON.parse(this.FireForceDetailInfo.contactData) + this.othercontactData = JSON.parse(this.FireForceDetailInfo.contactData) + this.otherpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData) + this.AttachmentArr = JSON.parse(this.FireForceDetailInfo.RelevantInfomationData) + + setTimeout(() => { + this.map = new AMap.Map('container', { + zoom:18 + }) + + if(this.FireForceDetailInfo.location && this.FireForceDetailInfo.location.x){ + this.map.setCenter([this.FireForceDetailInfo.location.x,this.FireForceDetailInfo.location.y]); + this.newPositionMarker = new AMap.Marker({ + position: [this.FireForceDetailInfo.location.x,this.FireForceDetailInfo.location.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-10, -12) + }) + // 将 markers 添加到地图 + this.map.add(this.newPositionMarker); + }else{ + this.map.setCity('上海市'); + } + + }, 0); + } + map:any + newPositionMarker:any + newPositionMarkerContent:any = + '
' + + ' ' + + '
' + //当前点击tab页面第几个 + tabIndex:any = 1 + selectedTab(index){ + this.tabIndex = index + } + + + //上传附件 + objectName:any + isMasklayer:boolean = false//圆圈遮罩层是否打开 + isMasklayerDownload:boolean = false//下载进度条遮罩层是否打开 + progressBarValue:any = 0//分块上传进度 + + //下载 + download (e) { + this.isMasklayerDownload = true //开启下载进度条 + let file = e //传递过来的文件元数据 + let fileSize = file.fileLength //下载文件的总大小 + let shardSize = 3 * 1024 * 1024 //文件大小是否大于10MB + if (file && fileSize<=shardSize) { //<=3MB时直接下载 + this.progressBarValue = 60 + this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`,{responseType: 'blob'},).subscribe(data=>{ + let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址 + let link = document.createElement("a"); + link.style.display = "none"; + link.href = url; + let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1] + link.setAttribute("download", fileName); + document.body.appendChild(link); + link.click(); + this.isMasklayerDownload = false //关闭下载进度条 + this.progressBarValue = 0 //初始化进度条 + }) + } else if (file && fileSize>shardSize) { //>3MB时分块下载 + this.blockingDownload(e) //分段下载 + } + + } + + //分段下载并合并 + async blockingDownload (e) { + let file = e //传递过来的文件元数据 + let fileSize = file.fileLength //下载文件的总大小 + let shardSize = 3 * 1024 * 1024 //3MB一个分片 + let allSlice = Math.ceil(fileSize / shardSize) //总文件/3MB===共分多少段 + let allFile:any = [] //所有的file分段 + + for (let i=0;i{ + this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`,{headers:{'range':`bytes= ${start}-${end}`},responseType:'blob'}).subscribe(data=>{ + result(data) }) + }) + allFile.push(result) + // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 //文件进度数 + this.progressBarValue = this.accMul(Number((i/allSlice).toFixed(2))*100,1,0) + if (allFile.length === allSlice) { //合并文件输出给浏览器 + let url = window.URL.createObjectURL(new Blob(allFile)); //createObjectURL创建一个下载Blob的url地址 + let link = document.createElement("a"); + link.style.display = "none"; + link.href = url; + let fileName = e.fileName ? e.fileName : e.objectName.split('/')[e.objectName.split('/').length-1] + link.setAttribute("download", fileName); + document.body.appendChild(link); + link.click(); + this.isMasklayerDownload = false //关闭下载进度条 + this.progressBarValue = 0 //初始化进度条 + } + + } //for循环结束 + + } + + + //点击文件 + clickFile(item){ + let suffix = item.fileName.split('.')[item.fileName.split('.').length-1] + if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){ + let dom = document.getElementById(`viewerjs`) + let pObjs = dom.childNodes; + let node = document.createElement("img") + node.style.display = "none"; + node.src = "/api/Objects/PlanPlatform/" + item.objectName; + node.id = 'img' + dom.appendChild(node) + setTimeout(() => { + let viewer = new Viewer(document.getElementById(`viewerjs`), { + hidden:()=>{ + dom.removeChild(pObjs[0]); + viewer.destroy(); + } + }); + node.click(); + }, 0); + } + if(suffix == 'docx' || suffix == 'doc' || suffix == 'pdf'){ + let fetchUrl = item.objectName + let json={ + doc: { + docId: new Date(), + title: item.fileName, + fetchUrl: `http://${location.host}/api/Objects/PlanPlatform/`+fetchUrl + }, + user: { + uid: "test", + nickName: "test", + avatar: "", + privilege: [ + 'FILE_READ','FILE_DOWNLOAD', 'FILE_PRINT' + ], + }, + } + var stringjson=JSON.stringify(json) + var wordArray = CryptoJS.enc.Utf8.parse(stringjson); + var base64 = CryptoJS.enc.Base64.stringify(wordArray); + window.open(`http://121.5.10.84/apps/editor/openPreview?data=${base64}`) + } + if(suffix == 'mp4'){ + // const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 + // data: {item:item,type:"video"}, + // id:'videodialog' + // }); + // dialogRef.afterClosed().subscribe(); + } + } + + //js乘法 + accMul(arg1,arg2,fix) { + if(!parseInt(fix)==fix) + { + return; + } + var m=0,s1=arg1.toString(),s2=arg2.toString(); + try{m+=s1.split(".")[1].length}catch(e){} + try{m+=s2.split(".")[1].length}catch(e){} + if(m>fix){ + return (Math.round(Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m-fix))/Math.pow(10,fix)); + }else if(m<=fix){ + return (Number(s1.replace(".",""))*Number(s2.replace(".",""))/Math.pow(10,m)).toFixed(fix); + }else{ + return (arg1*arg2).toFixed(fix).toString(); + } + } +} diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html new file mode 100644 index 0000000..8ca918c --- /dev/null +++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.spec.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.spec.ts new file mode 100644 index 0000000..09d1602 --- /dev/null +++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LinkageforcesAuditComponent } from './linkageforces-audit.component'; + +describe('LinkageforcesAuditComponent', () => { + let component: LinkageforcesAuditComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ LinkageforcesAuditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LinkageforcesAuditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts new file mode 100644 index 0000000..30643f6 --- /dev/null +++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-linkageforces-audit', + templateUrl: './linkageforces-audit.component.html', + styleUrls: ['./linkageforces-audit.component.scss'] +}) +export class LinkageforcesAuditComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/plan-audit/plan-audit.module.ts b/src/app/plan-audit/plan-audit.module.ts index 0ee43c1..9946473 100644 --- a/src/app/plan-audit/plan-audit.module.ts +++ b/src/app/plan-audit/plan-audit.module.ts @@ -51,10 +51,13 @@ import {ViewUnitDetailsPlanComponent} from '../key-unit/view-unit-details-plan/v import {KeyUnitModule} from '../key-unit/key-unit.module'; import { PlanRecordComponent } from './plan-record/plan-record.component'; import { BasicInfoComponent } from './basic-info/basic-info.component'; -import { WaitExamineerComponent } from './wait-examineer/wait-examineer.component' +import { WaitExamineerComponent } from './wait-examineer/wait-examineer.component'; +import { WaterAuditComponent } from './water-audit/water-audit.component'; +import { FireforceAuditComponent } from './fireforce-audit/fireforce-audit.component'; +import { LinkageforcesAuditComponent } from './linkageforces-audit/linkageforces-audit.component' @NgModule({ - declarations: [DetachmentLevelComponent, PlanAuditComponent, PlanPassComponent,PlanOpen, PlanRecordComponent, BasicInfoComponent, WaitExamineerComponent,], + declarations: [DetachmentLevelComponent, PlanAuditComponent, PlanPassComponent,PlanOpen, PlanRecordComponent, BasicInfoComponent, WaitExamineerComponent, WaterAuditComponent, FireforceAuditComponent, LinkageforcesAuditComponent,], imports: [ CommonModule, PlanAuditRoutingModule, diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index 25fc4c6..b85c3a1 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -89,135 +89,106 @@ - - - - - - - - - 平面图 - - - - - 四周毗邻 - - - - - 消防设施 - - - - - 重点部位 - - - - - 功能分区 - - - - - 实景图 - - - - - cad - - - - - -
- - - - - 基本信息 - - -
- - - - - 修改-沃尔玛(上海)职业发展有限公司 - - - - - - - - - - - - - - - -
单位地址 : 上海市上海市黄浦区武胜路333号变更为 - 上海市上海市黄浦区金陵西路28号
联系电话 :15069853369变更为 - 13869877764
始建于(年):1991变更为 - 2003
-
-
-
- - -
-
+ + + + + + + + + + 平面图 + + + + + 四周毗邻 + + + + + 消防设施 + + + + + 重点部位 + + + + + 功能分区 + + + + + 实景图 + + + + + cad + + + + + +
- - + + - 四周毗邻 + 基本信息
- + - 一号建筑 + 修改-沃尔玛(上海)职业发展有限公司 -
-
- 一号建筑: -
-
- - 变更为 -
-
+ + + + + + + + + + + + + +
单位地址 : 上海市上海市黄浦区武胜路333号变更为 + 上海市上海市黄浦区金陵西路28号
联系电话 :15069853369变更为 + 13869877764
始建于(年):1991变更为 + 2003
+
- 消防设施 + 四周毗邻
@@ -225,28 +196,70 @@ - 室内消火栓 + 一号建筑 - - - - - -
总数:5变更为 - 8
+
+
+ 一号建筑: +
+
+ + 变更为 +
+
-
-
- -
-
- + + + + + 消防设施 + + +
+ + + + + 室内消火栓 + + + + + + + +
总数:5变更为 + 8
+
+
+
+ +
+
+
+
+ +
+
+ + + + +
+ +
+ +
diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index db3f6a9..98b0e69 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -52,12 +52,9 @@ width: 100%; } table{ - //margin: 20px 20px; margin-left:10px; margin-right: 10px; width: 97.5%; - - //border: 1px solid #2196F3; thead{ height:48px; color: #FFFFFF; @@ -74,12 +71,16 @@ } .boxright{ height: 100%; - width: 55%; + flex: 1; background-color: #FFFFFF; margin-left: 10px; + display: flex; + flex-direction: column; .righthead{ width: 100%; display: flex; + height: 50px; + align-items: center; flex-direction: row-reverse; button{ margin-left: 10px; @@ -87,19 +88,16 @@ } .rightheadone{ width: 50%; - margin-top: 20px; margin-right: 7%; } .rightheadtwo{ width: 40%; - margin-top: 20px; margin-right: 2%; } } .word{ width: 100%; height: 100%; - //margin: 10px 10px 0 10px; iframe{ height: 91%; width: 97%; @@ -113,6 +111,12 @@ width: 97%; height: 91%; } + .waterAudit,.fireForceAudit,.LinkageForcesAudit{ + flex: 1; + width: 100%; + height: 100%; + box-sizing: border-box; + } } } th,td{ diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 2bbe878..e4f15f1 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -101,7 +101,7 @@ export class WaitExamineerComponent implements OnInit { chuorzhong//判断初审还是终审 radioid//选中的id shenheTable=[]//选中要审核的对象 - showtype=0//0:word,1:全景图,2:二维三维,3:重点单位 + showtype = null//0:word,1:全景图,2:二维三维,3:重点单位 //获取表格数据 getAlltabledate(){ diff --git a/src/app/plan-audit/water-audit/water-audit.component.html b/src/app/plan-audit/water-audit/water-audit.component.html new file mode 100644 index 0000000..3a3decd --- /dev/null +++ b/src/app/plan-audit/water-audit/water-audit.component.html @@ -0,0 +1,359 @@ +
+
+
+
+
+
+ 消火栓 +
+
+
+
+
+

基本信息

+ + + + * + 名称: + + + + + + 行政区: + + + + + + 水源归属: + + + + + + 所属单位(小区): + + + + +

位置信息

+ + + + 地址: + + + + + + 经度: + + + + 纬度: + + + + + +

详细信息

+ + + + + 可用状态: + + + + + + 放置形式: + + + + + + 管网形式: + + + + + + 管网直径: + +
+ + mm +
+
+ + + 管网压力类型: + + + + + + 管网压力范围: + +
+ + Mpa +
+
+ + + 接口形式: + + + + + + 接口口径: + +
+ + mm +
+ +
+ + + 最大流量: + +
+ + L/s +
+
+ + + 供水单位: + + + + + + 联系方式: + + + + + + 备注: + + + +
+ + + + + 可用状态: + + + + + + 储水量: + +
+ + +
+
+ + + 取水最大流量: + +
+ + L/s +
+
+ + + 进水流量: + +
+ + L/s +
+
+ + + 同时取水车辆数: + + + + + + 水源标高差: + +
+ + m +
+
+ + + 补水时间: + + + + + + 管网形式: + + + + + + 供水单位: + + + + + + 联系方式: + + + + + + 备注: + + + +
+ + + + + 可用状态: + + + + + + 天然水源类型: + + + + + + 有无消防码头: + + + + + + 水质: + + + + + + 同时取水车辆数: + + + + + + 水源标高差: + +
+ + m +
+
+ + + 有无枯水期: + + + + + + 枯水期时间: + + + + + + 供水单位: + + + + + + 联系方式: + + + + + + 备注: + + + +
+
+
+
+
\ No newline at end of file diff --git a/src/app/plan-audit/water-audit/water-audit.component.scss b/src/app/plan-audit/water-audit/water-audit.component.scss new file mode 100644 index 0000000..00f4d8c --- /dev/null +++ b/src/app/plan-audit/water-audit/water-audit.component.scss @@ -0,0 +1,116 @@ +.mapbox{ + flex: 1; + background-color: #fff; + display: flex; + flex-direction: column; + select:disabled { + color: black!important; + opacity: 1; + } + #container{ + width: 100%; + height: 200px; + } + .detailsbox{ + width: 100%; + height:500px; + .tabsbox{ + width: 100%; + height: 40px; + line-height: 40px; + display: flex; + justify-content: space-between; + font-size: 15px; + .tabs{ + div{ + float: left; + width: 120px; + text-align: center; + cursor: pointer; + color: #000000; + opacity: 0.4; + border-right: 1px solid #F2F4F6; + } + .selectedBtn{ + background-color: #2196F3; + color: #fff; + opacity: 1; + } + } + .btnbox{ + span{ + cursor: pointer; + color: #2196F3; + mat-icon{ + vertical-align: sub; + font-size: 20px; + width: 20px; + height: 20px; + } + } + span:hover{ + text-decoration: underline; + } + .submitAudit{ + margin: 0 30px; + } + .close{ + margin-right: 30px; + } + } + } + .contant{ + width: 100%; + height:480px; + overflow-y: auto; + p{ + color: #2196F3; + background-color: #F2F4F6; + height: 33px; + line-height: 33px; + box-sizing: border-box; + padding-left: 20px; + font-size: 15px; + } + span{ + font-size: 15px; + } + input,select{ + height: 30px; + line-height: 30px; + box-sizing: border-box; + padding: 0 12px; + width: 60%; + margin-left: 5px; + border: 1px solid #EBEBEB; + border-radius: 5px; + } + textarea{ + width: 89%; + margin-left: 5px; + height: 85%; + border: 1px solid #EBEBEB; + border-radius: 5px; + } + .longinput{ + width: 74%; + } + .unitDiv{ + width: 60%; + position: relative; + input,select{ + width: 100%; + box-sizing: border-box; + padding-right: 50px; + } + .unit{ + position: absolute; + right: 13px; + top: 4px; + color: #000000; + opacity: 0.4; + } + } + } + } +} \ No newline at end of file diff --git a/src/app/plan-audit/water-audit/water-audit.component.spec.ts b/src/app/plan-audit/water-audit/water-audit.component.spec.ts new file mode 100644 index 0000000..9db9215 --- /dev/null +++ b/src/app/plan-audit/water-audit/water-audit.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { WaterAuditComponent } from './water-audit.component'; + +describe('WaterAuditComponent', () => { + let component: WaterAuditComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ WaterAuditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(WaterAuditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/plan-audit/water-audit/water-audit.component.ts b/src/app/plan-audit/water-audit/water-audit.component.ts new file mode 100644 index 0000000..ed885ad --- /dev/null +++ b/src/app/plan-audit/water-audit/water-audit.component.ts @@ -0,0 +1,64 @@ +import { Component, OnInit } from '@angular/core'; +declare var AMap: any; +@Component({ + selector: 'app-water-audit', + templateUrl: './water-audit.component.html', + styleUrls: ['./water-audit.component.scss'] +}) +export class WaterAuditComponent implements OnInit { + + constructor() { } + map:any + newPositionMarker:any + newPositionMarkerContent:any = + '
' + + ' ' + + '
' + ngOnInit(): void { + this.waterData.detailData = JSON.parse(this.waterData.detailData) + this.fireCockData = this.waterData.detailData + console.log(789, this.fireCockData) + setTimeout(() => { + this.map = new AMap.Map('container', { + zoom:18 + }) + + if(this.waterData.location && this.waterData.location.x){ + this.map.setCenter([this.waterData.location.x,this.waterData.location.y]); + this.newPositionMarker = new AMap.Marker({ + position: [this.waterData.location.x,this.waterData.location.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-10, -12) + }) + // 将 markers 添加到地图 + this.map.add(this.newPositionMarker); + }else{ + this.map.setCity('上海市'); + } + + }, 0); + } + selectedWaterTypeIndex:number = 0//选择的水源类型 0消火栓 1水池 2天然水源 + fireCockData:any = []//消火栓详情 + poolData:any = []//水池详情 + naturalWaterData:any = []//天然水源详情 + waterData:any = { + id: "60125d31d31fab7de81c56b0", + name: "上海中心消火栓01", + administrativeRegion: "上海区", + governmentLevel: "1", + village: "小高社区", + address: "国际会议中心", + location: { + x: 121.496717, + y: 31.239452 + }, + detailData: "[{\"PropertyName\":\"可用状态\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"放置形式\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"管网形式\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"管网直径\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"管网压力类型\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"管网压力范围\",\"PropertyValue\":\"2222\"},{\"PropertyName\":\"接口形式\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"接口口径\",\"PropertyValue\":\"3\"},{\"PropertyName\":\"最大流量\",\"PropertyValue\":\"333\"},{\"PropertyName\":\"供水单位\",\"PropertyValue\":\"剃剃头\"},{\"PropertyName\":\"联系方式\",\"PropertyValue\":\"119\"},{\"PropertyName\":\"备注\",\"PropertyValue\":\"突突突突突突\"}]", + detailItems: null, + createTime: "2021-02-03T02:36:57.451Z", + creatorId: "5e8eced2aaca5f7c1025309b", + deleted: false, + waterSourceType: 0, + integrityScore: 0.21052632 + } +} diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index 99130e4..3a5f682 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -52,7 +52,7 @@ -
+
@@ -163,7 +163,7 @@
-
+
@@ -467,7 +467,7 @@
-
+
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index a0e3081..23660b4 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -628,10 +628,8 @@ export class CollectionToolsBuildingComponent implements OnInit { AxMessageSystem.addListener('selectionChanged', ()=>{ if(this.canvas.selection.size() == 1){//如果是单选 this.isMultipleAsset = false - // console.log('单选',this.canvas.selection.first().assetData) this.setAssetsProperty(this.canvas.selection.first().assetData) }else if(this.canvas.selection.size()){ - // console.log('多选') this.isShowProperty = true this.multipleAssetData = this.canvas.selection.all() this.firstMultipleAssetData = this.canvas.selection.first() diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html index 4d4abdd..4a12770 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -35,7 +35,7 @@ -
+
@@ -146,7 +146,7 @@
-
+
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index 0a7a1e4..0b522e8 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -633,7 +633,6 @@ export class CollectionToolsPlanComponent implements OnInit { // console.log('单选',this.canvas.selection.first().assetData) this.setAssetsProperty(this.canvas.selection.first().assetData) }else if(this.canvas.selection.size()){ - // console.log('多选') this.isShowProperty = true this.multipleAssetData = this.canvas.selection.all() this.firstMultipleAssetData = this.canvas.selection.first() @@ -810,8 +809,6 @@ export class CollectionToolsPlanComponent implements OnInit { }) } - - ngAfterViewInit(): void { //不是gis模块平面图 if(this.router.url.indexOf("gis") == -1) { diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 9b2328c..dac8a36 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -108,7 +108,7 @@
-
+
@@ -216,7 +216,7 @@
-
+
@@ -519,7 +519,7 @@
-
+
From 335e6fc7c05fdebb77ae359b77142a122836204f Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 5 Feb 2021 10:53:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=80=82=E5=BA=94=E7=BC=A9=E6=94=BE=E5=92=8C=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addDisposalNode.html | 24 -- .../collection-tools.component.html | 38 +-- .../collection-tools.component.scss | 9 + .../collection-tools.component.ts | 118 +------ .../editDisposalNode.html | 23 -- .../leftFunctionalDomain.ts | 52 --- src/app/ui/collection-tools-building/save.ts | 300 ------------------ .../ui/collection-tools-building/saveOne.html | 5 - .../ui/collection-tools-building/saveTwo.html | 53 ---- .../viewdetails.html | 24 -- .../addDisposalNode.html | 24 -- .../collection-tools.component.html | 38 +-- .../collection-tools.component.scss | 9 + .../collection-tools.component.ts | 118 +------ .../editDisposalNode.html | 23 -- .../leftFunctionalDomain.ts | 52 --- src/app/ui/collection-tools-plan/save.ts | 300 ------------------ src/app/ui/collection-tools-plan/saveOne.html | 5 - src/app/ui/collection-tools-plan/saveTwo.html | 53 ---- .../ui/collection-tools-plan/viewdetails.html | 24 -- .../collection-tools.component.html | 10 +- .../collection-tools.component.scss | 9 + .../collection-tools.component.ts | 9 +- src/app/ui/ui.module.ts | 12 +- .../working-area/working-area.component.ts | 2 +- src/assets/images/适应缩放.png | Bin 0 -> 268 bytes src/assets/images/重置缩放.png | Bin 0 -> 506 bytes 27 files changed, 84 insertions(+), 1250 deletions(-) delete mode 100644 src/app/ui/collection-tools-building/addDisposalNode.html delete mode 100644 src/app/ui/collection-tools-building/editDisposalNode.html delete mode 100644 src/app/ui/collection-tools-building/save.ts delete mode 100644 src/app/ui/collection-tools-building/saveOne.html delete mode 100644 src/app/ui/collection-tools-building/saveTwo.html delete mode 100644 src/app/ui/collection-tools-building/viewdetails.html delete mode 100644 src/app/ui/collection-tools-plan/addDisposalNode.html delete mode 100644 src/app/ui/collection-tools-plan/editDisposalNode.html delete mode 100644 src/app/ui/collection-tools-plan/save.ts delete mode 100644 src/app/ui/collection-tools-plan/saveOne.html delete mode 100644 src/app/ui/collection-tools-plan/saveTwo.html delete mode 100644 src/app/ui/collection-tools-plan/viewdetails.html create mode 100644 src/assets/images/适应缩放.png create mode 100644 src/assets/images/重置缩放.png diff --git a/src/app/ui/collection-tools-building/addDisposalNode.html b/src/app/ui/collection-tools-building/addDisposalNode.html deleted file mode 100644 index 27654e8..0000000 --- a/src/app/ui/collection-tools-building/addDisposalNode.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
- - -
- -
- -
- - - -
- -
- - -
- -
- -
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index 3a5f682..2a4a2b1 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -20,7 +20,14 @@ - + + + 适应缩放 + + + + 重置缩放 + @@ -131,35 +138,6 @@
- -
-
- keyboard_arrow_up - keyboard_arrow_down - - -
-
- - - -
- -
- edit - add - library_books - delete_forever -
-
-
- -
-
-
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.scss b/src/app/ui/collection-tools-building/collection-tools.component.scss index 02c4e97..2c39cc0 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.scss +++ b/src/app/ui/collection-tools-building/collection-tools.component.scss @@ -25,6 +25,15 @@ align-items:center; min-height: 40px; background-color: #fff; + .zoom{ + display: flex; + align-items: center; + margin-left: 15px; + cursor: pointer; + img{ + margin-right: 3px; + } + } .marginLeftRight { margin: 0 8px; font-size: 16px; diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index 23660b4..44c36d1 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -2,14 +2,13 @@ import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContaine import { HttpClient, HttpHeaders } from '@angular/common/http'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; -import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent} from './leftFunctionalDomain' +import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} from './leftFunctionalDomain' import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; import {FlatTreeControl} from '@angular/cdk/tree'; import {WorkingAreaComponent} from '../../working-area/working-area.component' import {CanvasShareDataService, DisposalNodeData} from '../../canvas-share-data.service' //引入服务 import Viewer from 'viewerjs'; import Swiper from 'swiper'; -import { saveOneDialogBuilding } from './save'; import { NzFormatBeforeDropEvent, NzFormatEmitEvent,NzTreeComponent } from 'ng-zorro-antd/tree'; import { Observable, of } from 'rxjs'; import { GameMode } from 'src/app/working-area/model/gameMode'; @@ -172,7 +171,14 @@ export class CollectionToolsBuildingComponent implements OnInit { this.getDisposalNode() } } - + //适应缩放 + adaptZoom(){ + this.canvas.zoomFit() + } + //重置缩放 + resetZoom(){ + this.canvas.resetCamera2D() + } //ngzorro tree 拖拽 nzEvent(event: NzFormatEmitEvent): void { if(this.isDrag){ @@ -457,14 +463,6 @@ export class CollectionToolsBuildingComponent implements OnInit { this.canvas.refreshIcon(this.canvasAssetObj.Id) } - //查看图片详情 - lookImg(){ - const dialogRef = this.dialog.open(ViewDetailsBuilding, {//调用open方法打开对话框并且携带参数过去 - data: {imagesArr:this.imagesArr,index:this.clickedIndex} - }); - dialogRef.afterClosed().subscribe(data=>{ }); - } - //上传素材图片 selectFile(e){ let imgFile = e.target.files[0] || null //上传的文件 @@ -1167,21 +1165,7 @@ export class CollectionToolsBuildingComponent implements OnInit { } } - }else{//如果是想定作业编辑模式 - const dialogRef = this.dialog.open(saveOneDialogBuilding, { - data: {allDisposalNode: this.canvasData.allDisposalNode, - selectedBuildingData:this.beforeOneCheckedBuilding, - selectedSiteData:this.selectingSitePlan, - siteOrbuilding:this.checkedBuildingIndex, - disasterId: this.allFirePlan[0].id || '' - } - }); - - dialogRef.afterClosed().subscribe(result => { - // console.log('The dialog was closed'); - }); } - } else { //if const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -2237,43 +2221,6 @@ export class CollectionToolsBuildingComponent implements OnInit { }) } - //新建 处置预案 节点 - addPanelPoint (e,item,treeData) { - e.stopPropagation() - let order - if (item) { - item.children.length? order = item.children[item.children.length-1].order+1 : order = 0 - } else { - treeData.length? order = treeData[treeData.length-1].order+1 : order = 0 - } - let data = { - name: '', - level: item? 1 : 0, - order: order, - description: '', - disasterId: this.allFirePlan[0].id || '', - parentId: item? item.id : null, - planComponentId: sessionStorage.getItem('planId') || '', - } - let dialogRef = this.dialog.open(addDisposalNodeBuildingComponent,{data}); - dialogRef.afterClosed().subscribe(data=>{ - if (data) { this.refurbishTreeData() } - }) - } - - //编辑 处置预案 节点 - editPanelPoint (e,item) { - e.stopPropagation() - let data = item.origin - let dialogRef = this.dialog.open(editDisposalNodeBuildingComponent,{data}); - dialogRef.afterClosed().subscribe(data=>{ - if (data) { - item.title = data - this.canvasData.allDisposalNode.forEach(element => { element.id === item.key? element.name=data : null }); - } - }) - } - //复制 处置预案 节点 copyPanelPoint (e,item,treeData) { e.stopPropagation() @@ -2489,50 +2436,3 @@ export class EditBuildingBuilding { } } -//查看图片大图 -@Component({ - selector: 'viewdetails-building', - templateUrl: './viewdetails.html', - styleUrls: ['./collection-tools.component.scss'] -}) -export class ViewDetailsBuilding { - // myControl = new FormControl(); - //注入MatDialogRef,可以用来关闭对话框 - //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌 - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private element: ElementRef) {} - imagesArr = this.data.imagesArr - onNoClick(): void { - this.dialogRef.close(); - } - ngOnInit(): void { - setTimeout(() => { - var mySwiper = new Swiper('.swiper-container',{ - loop: false, - initialSlide :this.data.index,//默认索引 - // 如果需要前进后退按钮 - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - } - //其他设置 - }); - }, 0); - } - closeDialog(){ - this.dialogRef.close(); - } - count = 10 - zoomimg(e) { - if(this.count != 1 || e.wheelDelta >= 120){ - if(e.wheelDelta >= 120){ - this.count++ - }else{ - this.count-- - } - } - e.srcElement.style.zoom = this.count + '0%' - e.srcElement.style.maxWidth = null - e.srcElement.style.maxHeight = null - } - -} diff --git a/src/app/ui/collection-tools-building/editDisposalNode.html b/src/app/ui/collection-tools-building/editDisposalNode.html deleted file mode 100644 index 40b2270..0000000 --- a/src/app/ui/collection-tools-building/editDisposalNode.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
- -
- -
- -
- - - -
- -
- - -
- -
- -
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/leftFunctionalDomain.ts b/src/app/ui/collection-tools-building/leftFunctionalDomain.ts index e60ca32..1190a74 100644 --- a/src/app/ui/collection-tools-building/leftFunctionalDomain.ts +++ b/src/app/ui/collection-tools-building/leftFunctionalDomain.ts @@ -126,55 +126,3 @@ export class editPlaneFigureBuildingComponent implements OnInit { } - - - -//创建 处置预案 节点 -@Component({ - selector: 'app-addDisposalNode-building', - templateUrl: './addDisposalNode.html', - styleUrls: ['./panel.scss'] -}) -export class addDisposalNodeBuildingComponent implements OnInit { - - constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } - - ngOnInit(): void { - } - - //提交表单 - onSubmit (e) { - this.data.name = e.name - this.http.post('/api/DisposalNodes',this.data).subscribe(data=>{ - this.dialogRef.close('success'); - }) - } - -} - - - -//编辑 处置预案 节点 -@Component({ - selector: 'app-editDisposalNode-building', - templateUrl: './editDisposalNode.html', - styleUrls: ['./panel.scss'] -}) -export class editDisposalNodeBuildingComponent implements OnInit { - - constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } - - ngOnInit(): void { - this.nodeName = JSON.parse(JSON.stringify( this.data.name || '' )) - } - nodeName:string; - - //提交表单 - onSubmit (e) { - this.data.name = e.name - this.http.put(`/api/DisposalNodes/${this.data.id}`,this.data).subscribe(data=>{ - this.dialogRef.close(e.name); - }) - } - -} \ No newline at end of file diff --git a/src/app/ui/collection-tools-building/save.ts b/src/app/ui/collection-tools-building/save.ts deleted file mode 100644 index 03b5abd..0000000 --- a/src/app/ui/collection-tools-building/save.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; -import {CanvasShareDataService,DisposalNodeData} from '../../canvas-share-data.service' //引入服务 -// 保存想定作业第一个弹窗 -@Component({ - selector: 'dialog-overview-example-dialog-building', - templateUrl: 'saveOne.html', - styleUrls: ['./collection-tools.component.scss'] -}) -export class saveOneDialogBuilding { - - constructor( - private http:HttpClient, - public dialog: MatDialog, - public snackBar: MatSnackBar, - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data) {} - - onNoClick(): void { - this.dialogRef.close() - } - allDisposalNode = this.data.allDisposalNode - - saveType(type){ - this.dialogRef.close() - const dialogRef = this.dialog.open(saveTwoDialogBuilding, { - data: {type: type, - allDisposalNode: this.data.allDisposalNode, - selectedBuildingData:this.data.selectedBuildingData, - selectedSiteData:this.data.selectedSiteData, - siteOrbuilding:this.data.siteOrbuilding, - disasterId:this.data.disasterId} - }); - dialogRef.afterClosed().subscribe(result => { - }); - } - -} - - // 保存想定作业第二个弹窗 -@Component({ - selector: 'dialog-overview-example-dialog-building', - templateUrl: 'saveTwo.html', - styleUrls: ['./collection-tools.component.scss'] -}) -export class saveTwoDialogBuilding { - - constructor( - private http:HttpClient, - public dialogRef: MatDialogRef, - public canvasData: CanvasShareDataService, - public snackBar: MatSnackBar, - @Inject(MAT_DIALOG_DATA) public data) {} - - type = this.data.type - allDisposalNode = this.data.allDisposalNode - allPlanDisposalNode = [] - allRootDisposalNode = [{name:"根节点",id:null}] - allDisposalNodeChild = [] - ngOnInit(): void { - //所有非数据节点 - this.allDisposalNode.forEach(item => { - if(!item.sitePlanId && !item.buildingAreaId){ - this.allPlanDisposalNode.push(item) - } - }) - - //所有一级节点 - this.allDisposalNode.forEach(item => { - if(!item.parentId){ - this.allRootDisposalNode.push(item) - } - }) - this.allDisposalNodeChild = JSON.parse(JSON.stringify(this.allDisposalNode)) - this.allDisposalNodeChild.forEach(item => { - item.children = [] - this.allDisposalNodeChild.forEach(i => { - if(i.parentId == item.id){ - item.children.push(i) - } - }) - }) - // console.log(this.nodeItem.id) - } - onNoClick(): void { - this.dialogRef.close(); - } - nodeItem - itemChildNum = 0 //点击处置节点子数据节点的数量 - clickNode(item){ - // console.log(item) - this.nodeItem = item - this.allDisposalNodeChild.forEach(item => { - if(item.id == this.nodeItem.id){ - this.itemChildNum = item.children.length - } - }) - } - - selectedBuildingData = this.data.selectedBuildingData - selectedSiteData = this.data.selectedSiteData - onSubmit(value,type){ - // console.log(type) - let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name - //如果保存到已有节点 - var postdata = { - id: "", - name: name, - level: 0, - order: this.itemChildNum, - description: "", - notes: "", - weather: null, - airTemperature: null, - windDirection: null, - windScale: null, - imageNames: null, - imageUrls: null, - parentId: this.nodeItem ? this.nodeItem.id : null, - disasterId: this.data.disasterId, - planComponentId: sessionStorage.getItem('planId') || '', - companyId: this.data.siteOrbuilding == -1 ? sessionStorage.getItem('companyId') : null, - sitePlanId: this.data.siteOrbuilding==-1 ? this.selectedSiteData.id : null, - buildingId: this.selectedBuildingData.id || null, - buildingAreaId: this.data.siteOrbuilding!=-1 ? this.selectedSiteData.id : null - } - if(type == 'old'){ - let istrue = this.canvasData.findDisposalNode(this.nodeItem.id,name) - let putdata = this.nodeItem - putdata.weather = this.canvasData.selectPanelPointBaseData.weather - putdata.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature) - putdata.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale) - putdata.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection) - putdata.description = this.canvasData.selectPanelPointBaseData.description - putdata.notes = this.canvasData.selectPanelPointBaseData.notes - - - if(istrue){//如果该处置节点下已有同名数据节点 则只修改 2个接口 - new Promise((resolve,reject)=>{ - this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => { - resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") - }) - }).then((values)=>{ - this.canvasData.sendMessage('send a message');//发布一条消息 - // 保存平面图数据到当前节点 - let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) - postdata.Data = JSON.stringify(postdata.Data) - this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - },err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage('send a message');//发布一条消息 - }) - - }else{//需要3个接口 - new Promise((resolve,reject)=>{ - this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => { - resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") - }) - }).then((values)=>{ - // console.log(values) - postdata.level = putdata.level + 1 - new Promise((resolve,reject) => { - this.http.post(`/api/DisposalNodes`,postdata).subscribe(data => { - resolve(data) - }) - }).then((data:any)=>{ - // console.log(7788,data) - let objData = { - id: "", - data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, - version: this.canvasData.selectPanelPoint.Version || "2.0", - disposalNodeId: data.id, - planComponentId: sessionStorage.getItem("planId"), - } - this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - },err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage('send a message');//发布一条消息 - }) - }) - } - - }else{//如果保存到新建节点 - let dispositionNodeData //处置节点data - let order - let oneLevelNum = [] - //将order赋值为所有一级节点最后一个+1 - this.allDisposalNode.forEach(item => { - if(!item.parentId){ - oneLevelNum.push(item) - } - }) - if(oneLevelNum.length == 0){ - order = 0 - }else{ - order = oneLevelNum[oneLevelNum.length - 1].order + 1 - } - - if(this.nodeItem){//如果点击了下拉选择框 - if(this.nodeItem.id != null){ - this.allDisposalNodeChild.forEach(item => { - if(item.id == this.nodeItem.id){ - order = item.children.length - } - }) - } - } - dispositionNodeData = { - id: "", - name: value.name, - level: this.nodeItem && this.nodeItem.id != null ? this.nodeItem.level + 1 : 0, - order: order, - description: "", - notes: "", - weather: null, - airTemperature: 0, - windDirection: 0, - windScale: 0, - imageNames: null, - imageUrls: null, - parentId: this.nodeItem ? this.nodeItem.id : null, - disasterId: this.data.disasterId, - planComponentId: sessionStorage.getItem('planId') || '', - companyId: null, - sitePlanId: null, - buildingId: null, - buildingAreaId: null - } - - dispositionNodeData.weather = this.canvasData.selectPanelPointBaseData.weather - dispositionNodeData.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature) - dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale) - dispositionNodeData.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection) - dispositionNodeData.description = this.canvasData.selectPanelPointBaseData.description - dispositionNodeData.notes = this.canvasData.selectPanelPointBaseData.notes - //1.先创建一个处置节点 然后 .then 2.创建数据节点到刚创建的处置节点 3.然后拿着创建好的数据节点的id 将平面图data保存 - new Promise((resolve,reject) => { - this.http.post("/api/DisposalNodes",dispositionNodeData).subscribe((data:any) => { - resolve(data.id) - }) - }).then((id) => { - let dataNodeData - new Promise((resolve,reject) => { - postdata.parentId = id - postdata.level = dispositionNodeData.level + 1 - this.http.post("/api/DisposalNodes",postdata).subscribe((data:any) => { - resolve(data) - }) - }).then((data:any) => { - // 保存平面图数据到当前节点 - // console.log(6666,data) - // let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) - // postdata.Data = JSON.stringify(postdata.Data) - let objData = { - id: "", - data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, - version: this.canvasData.selectPanelPoint.Version || "2.0", - disposalNodeId: data.id, - planComponentId: sessionStorage.getItem("planId"), - } - - this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - - },err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage("send a message") - }) - }) - } - } -} \ No newline at end of file diff --git a/src/app/ui/collection-tools-building/saveOne.html b/src/app/ui/collection-tools-building/saveOne.html deleted file mode 100644 index a6b0b32..0000000 --- a/src/app/ui/collection-tools-building/saveOne.html +++ /dev/null @@ -1,5 +0,0 @@ -
处置节点保存
-
- - -
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/saveTwo.html b/src/app/ui/collection-tools-building/saveTwo.html deleted file mode 100644 index fec97ff..0000000 --- a/src/app/ui/collection-tools-building/saveTwo.html +++ /dev/null @@ -1,53 +0,0 @@ -
-
新增节点
-
-
- -
- - - -
-
- - - - {{item.name}} - - - -
-
- - -
-
-
-
-
-
保存到已有节点
-
-
-
- - - - {{item.name}} - - - -
-
- - -
-
-
-
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/viewdetails.html b/src/app/ui/collection-tools-building/viewdetails.html deleted file mode 100644 index 76638c2..0000000 --- a/src/app/ui/collection-tools-building/viewdetails.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
- clear -
- -
-
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/addDisposalNode.html b/src/app/ui/collection-tools-plan/addDisposalNode.html deleted file mode 100644 index 27654e8..0000000 --- a/src/app/ui/collection-tools-plan/addDisposalNode.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
- - -
- -
- -
- - - -
- -
- - -
- -
- -
\ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html index 4a12770..c2c2e9f 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -20,7 +20,14 @@ - + + + 适应缩放 + + + + 重置缩放 + @@ -114,35 +121,6 @@
- -
-
- keyboard_arrow_up - keyboard_arrow_down - - -
-
- - - -
- -
- edit - add - library_books - delete_forever -
-
-
- -
-
-
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.scss b/src/app/ui/collection-tools-plan/collection-tools.component.scss index acae429..e99f1d4 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.scss +++ b/src/app/ui/collection-tools-plan/collection-tools.component.scss @@ -25,6 +25,15 @@ align-items:center; min-height: 40px; background-color: #fff; + .zoom{ + display: flex; + align-items: center; + margin-left: 15px; + cursor: pointer; + img{ + margin-right: 3px; + } + } .marginLeftRight { margin: 0 8px; font-size: 16px; diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts index 0b522e8..e23c11c 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -2,14 +2,13 @@ import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContaine import { HttpClient, HttpHeaders } from '@angular/common/http'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; -import {leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,editDisposalNodeComponentPlan,addDisposalNodeComponentPlan} from './leftFunctionalDomain' +import {leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan} from './leftFunctionalDomain' import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; import {FlatTreeControl} from '@angular/cdk/tree'; import {WorkingAreaComponent} from '../../working-area/working-area.component' import {CanvasShareDataService, DisposalNodeData} from '../../canvas-share-data.service' //引入服务 import Viewer from 'viewerjs'; import Swiper from 'swiper'; -import { saveOneDialogPlan } from './save'; import { NzFormatBeforeDropEvent, NzFormatEmitEvent,NzTreeComponent } from 'ng-zorro-antd/tree'; import { Observable, of } from 'rxjs'; import { GameMode } from 'src/app/working-area/model/gameMode'; @@ -173,6 +172,14 @@ export class CollectionToolsPlanComponent implements OnInit { } } + //适应缩放 + adaptZoom(){ + this.canvas.zoomFit() + } + //重置缩放 + resetZoom(){ + this.canvas.resetCamera2D() + } //ngzorro tree 拖拽 nzEvent(event: NzFormatEmitEvent): void { if(this.isDrag){ @@ -460,14 +467,6 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvas.refreshIcon(this.canvasAssetObj.Id) } - //查看图片详情 - lookImg(){ - const dialogRef = this.dialog.open(ViewDetailsPlan, {//调用open方法打开对话框并且携带参数过去 - data: {imagesArr:this.imagesArr,index:this.clickedIndex} - }); - dialogRef.afterClosed().subscribe(data=>{ }); - } - //上传素材图片 selectFile(e){ let imgFile = e.target.files[0] || null //上传的文件 @@ -1168,21 +1167,7 @@ export class CollectionToolsPlanComponent implements OnInit { } } - }else{//如果是想定作业编辑模式 - const dialogRef = this.dialog.open(saveOneDialogPlan, { - data: {allDisposalNode: this.canvasData.allDisposalNode, - selectedBuildingData:this.beforeOneCheckedBuilding, - selectedSiteData:this.selectingSitePlan, - siteOrbuilding:this.checkedBuildingIndex, - disasterId: this.allFirePlan[0].id || '' - } - }); - - dialogRef.afterClosed().subscribe(result => { - // console.log('The dialog was closed'); - }); } - } else { //if const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -2246,43 +2231,6 @@ export class CollectionToolsPlanComponent implements OnInit { }) } - //新建 处置预案 节点 - addPanelPoint (e,item,treeData) { - e.stopPropagation() - let order - if (item) { - item.children.length? order = item.children[item.children.length-1].order+1 : order = 0 - } else { - treeData.length? order = treeData[treeData.length-1].order+1 : order = 0 - } - let data = { - name: '', - level: item? 1 : 0, - order: order, - description: '', - disasterId: this.allFirePlan[0].id || '', - parentId: item? item.id : null, - planComponentId: sessionStorage.getItem('planId') || '', - } - let dialogRef = this.dialog.open(addDisposalNodeComponentPlan,{data}); - dialogRef.afterClosed().subscribe(data=>{ - if (data) { this.refurbishTreeData() } - }) - } - - //编辑 处置预案 节点 - editPanelPoint (e,item) { - e.stopPropagation() - let data = item.origin - let dialogRef = this.dialog.open(editDisposalNodeComponentPlan,{data}); - dialogRef.afterClosed().subscribe(data=>{ - if (data) { - item.title = data - this.canvasData.allDisposalNode.forEach(element => { element.id === item.key? element.name=data : null }); - } - }) - } - //复制 处置预案 节点 copyPanelPoint (e,item,treeData) { e.stopPropagation() @@ -2497,51 +2445,3 @@ export class EditBuildingPlan { }) } } - -//查看图片大图 -@Component({ - selector: 'viewdetails-plan', - templateUrl: './viewdetails.html', - styleUrls: ['./collection-tools.component.scss'] -}) -export class ViewDetailsPlan { - // myControl = new FormControl(); - //注入MatDialogRef,可以用来关闭对话框 - //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌 - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private element: ElementRef) {} - imagesArr = this.data.imagesArr - onNoClick(): void { - this.dialogRef.close(); - } - ngOnInit(): void { - setTimeout(() => { - var mySwiper = new Swiper('.swiper-container',{ - loop: false, - initialSlide :this.data.index,//默认索引 - // 如果需要前进后退按钮 - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - } - //其他设置 - }); - }, 0); - } - closeDialog(){ - this.dialogRef.close(); - } - count = 10 - zoomimg(e) { - if(this.count != 1 || e.wheelDelta >= 120){ - if(e.wheelDelta >= 120){ - this.count++ - }else{ - this.count-- - } - } - e.srcElement.style.zoom = this.count + '0%' - e.srcElement.style.maxWidth = null - e.srcElement.style.maxHeight = null - } - -} diff --git a/src/app/ui/collection-tools-plan/editDisposalNode.html b/src/app/ui/collection-tools-plan/editDisposalNode.html deleted file mode 100644 index 40b2270..0000000 --- a/src/app/ui/collection-tools-plan/editDisposalNode.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
- -
- -
- -
- - - -
- -
- - -
- -
- -
\ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts b/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts index 49b60b7..bce9606 100644 --- a/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts +++ b/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts @@ -164,55 +164,3 @@ export class editPlaneFigureComponentPlan implements OnInit { } - - - -//创建 处置预案 节点 -@Component({ - selector: 'app-addDisposalNode-plan', - templateUrl: './addDisposalNode.html', - styleUrls: ['./panel.scss'] -}) -export class addDisposalNodeComponentPlan implements OnInit { - - constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } - - ngOnInit(): void { - } - - //提交表单 - onSubmit (e) { - this.data.name = e.name - this.http.post('/api/DisposalNodes',this.data).subscribe(data=>{ - this.dialogRef.close('success'); - }) - } - -} - - - -//编辑 处置预案 节点 -@Component({ - selector: 'app-editDisposalNode-plan', - templateUrl: './editDisposalNode.html', - styleUrls: ['./panel.scss'] -}) -export class editDisposalNodeComponentPlan implements OnInit { - - constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } - - ngOnInit(): void { - this.nodeName = JSON.parse(JSON.stringify( this.data.name || '' )) - } - nodeName:string; - - //提交表单 - onSubmit (e) { - this.data.name = e.name - this.http.put(`/api/DisposalNodes/${this.data.id}`,this.data).subscribe(data=>{ - this.dialogRef.close(e.name); - }) - } - -} \ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/save.ts b/src/app/ui/collection-tools-plan/save.ts deleted file mode 100644 index df7489c..0000000 --- a/src/app/ui/collection-tools-plan/save.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { Component, OnInit, Inject } from '@angular/core'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; -import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; -import {CanvasShareDataService,DisposalNodeData} from '../../canvas-share-data.service' //引入服务 -// 保存想定作业第一个弹窗 -@Component({ - selector: 'dialog-overview-example-dialog', - templateUrl: 'saveOne.html', - styleUrls: ['./collection-tools.component.scss'] -}) -export class saveOneDialogPlan { - - constructor( - private http:HttpClient, - public dialog: MatDialog, - public snackBar: MatSnackBar, - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data) {} - - onNoClick(): void { - this.dialogRef.close() - } - allDisposalNode = this.data.allDisposalNode - - saveType(type){ - this.dialogRef.close() - const dialogRef = this.dialog.open(saveTwoDialogPlan, { - data: {type: type, - allDisposalNode: this.data.allDisposalNode, - selectedBuildingData:this.data.selectedBuildingData, - selectedSiteData:this.data.selectedSiteData, - siteOrbuilding:this.data.siteOrbuilding, - disasterId:this.data.disasterId} - }); - dialogRef.afterClosed().subscribe(result => { - }); - } - -} - - // 保存想定作业第二个弹窗 -@Component({ - selector: 'dialog-overview-example-dialog', - templateUrl: 'saveTwo.html', - styleUrls: ['./collection-tools.component.scss'] -}) -export class saveTwoDialogPlan { - - constructor( - private http:HttpClient, - public dialogRef: MatDialogRef, - public canvasData: CanvasShareDataService, - public snackBar: MatSnackBar, - @Inject(MAT_DIALOG_DATA) public data) {} - - type = this.data.type - allDisposalNode = this.data.allDisposalNode - allPlanDisposalNode = [] - allRootDisposalNode = [{name:"根节点",id:null}] - allDisposalNodeChild = [] - ngOnInit(): void { - //所有非数据节点 - this.allDisposalNode.forEach(item => { - if(!item.sitePlanId && !item.buildingAreaId){ - this.allPlanDisposalNode.push(item) - } - }) - - //所有一级节点 - this.allDisposalNode.forEach(item => { - if(!item.parentId){ - this.allRootDisposalNode.push(item) - } - }) - this.allDisposalNodeChild = JSON.parse(JSON.stringify(this.allDisposalNode)) - this.allDisposalNodeChild.forEach(item => { - item.children = [] - this.allDisposalNodeChild.forEach(i => { - if(i.parentId == item.id){ - item.children.push(i) - } - }) - }) - // console.log(this.nodeItem.id) - } - onNoClick(): void { - this.dialogRef.close(); - } - nodeItem - itemChildNum = 0 //点击处置节点子数据节点的数量 - clickNode(item){ - // console.log(item) - this.nodeItem = item - this.allDisposalNodeChild.forEach(item => { - if(item.id == this.nodeItem.id){ - this.itemChildNum = item.children.length - } - }) - } - - selectedBuildingData = this.data.selectedBuildingData - selectedSiteData = this.data.selectedSiteData - onSubmit(value,type){ - // console.log(type) - let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name - //如果保存到已有节点 - var postdata = { - id: "", - name: name, - level: 0, - order: this.itemChildNum, - description: "", - notes: "", - weather: null, - airTemperature: null, - windDirection: null, - windScale: null, - imageNames: null, - imageUrls: null, - parentId: this.nodeItem ? this.nodeItem.id : null, - disasterId: this.data.disasterId, - planComponentId: sessionStorage.getItem('planId') || '', - companyId: this.data.siteOrbuilding == -1 ? sessionStorage.getItem('companyId') : null, - sitePlanId: this.data.siteOrbuilding==-1 ? this.selectedSiteData.id : null, - buildingId: this.selectedBuildingData.id || null, - buildingAreaId: this.data.siteOrbuilding!=-1 ? this.selectedSiteData.id : null - } - if(type == 'old'){ - let istrue = this.canvasData.findDisposalNode(this.nodeItem.id,name) - let putdata = this.nodeItem - putdata.weather = this.canvasData.selectPanelPointBaseData.weather - putdata.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature) - putdata.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale) - putdata.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection) - putdata.description = this.canvasData.selectPanelPointBaseData.description - putdata.notes = this.canvasData.selectPanelPointBaseData.notes - - - if(istrue){//如果该处置节点下已有同名数据节点 则只修改 2个接口 - new Promise((resolve,reject)=>{ - this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => { - resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") - }) - }).then((values)=>{ - this.canvasData.sendMessage('send a message');//发布一条消息 - // 保存平面图数据到当前节点 - let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) - postdata.Data = JSON.stringify(postdata.Data) - this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - },err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage('send a message');//发布一条消息 - }) - - }else{//需要3个接口 - new Promise((resolve,reject)=>{ - this.http.put(`/api/DisposalNodes/${value.nodeId}`,putdata).subscribe(data => { - resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") - }) - }).then((values)=>{ - // console.log(values) - postdata.level = putdata.level + 1 - new Promise((resolve,reject) => { - this.http.post(`/api/DisposalNodes`,postdata).subscribe(data => { - resolve(data) - }) - }).then((data:any)=>{ - // console.log(7788,data) - let objData = { - id: "", - data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, - version: this.canvasData.selectPanelPoint.Version || "2.0", - disposalNodeId: data.id, - planComponentId: sessionStorage.getItem("planId"), - } - this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - },err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage('send a message');//发布一条消息 - }) - }) - } - - }else{//如果保存到新建节点 - let dispositionNodeData //处置节点data - let order - let oneLevelNum = [] - //将order赋值为所有一级节点最后一个+1 - this.allDisposalNode.forEach(item => { - if(!item.parentId){ - oneLevelNum.push(item) - } - }) - if(oneLevelNum.length == 0){ - order = 0 - }else{ - order = oneLevelNum[oneLevelNum.length - 1].order + 1 - } - - if(this.nodeItem){//如果点击了下拉选择框 - if(this.nodeItem.id != null){ - this.allDisposalNodeChild.forEach(item => { - if(item.id == this.nodeItem.id){ - order = item.children.length - } - }) - } - } - dispositionNodeData = { - id: "", - name: value.name, - level: this.nodeItem && this.nodeItem.id != null ? this.nodeItem.level + 1 : 0, - order: order, - description: "", - notes: "", - weather: null, - airTemperature: 0, - windDirection: 0, - windScale: 0, - imageNames: null, - imageUrls: null, - parentId: this.nodeItem ? this.nodeItem.id : null, - disasterId: this.data.disasterId, - planComponentId: sessionStorage.getItem('planId') || '', - companyId: null, - sitePlanId: null, - buildingId: null, - buildingAreaId: null - } - - dispositionNodeData.weather = this.canvasData.selectPanelPointBaseData.weather - dispositionNodeData.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature) - dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale) - dispositionNodeData.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection) - dispositionNodeData.description = this.canvasData.selectPanelPointBaseData.description - dispositionNodeData.notes = this.canvasData.selectPanelPointBaseData.notes - //1.先创建一个处置节点 然后 .then 2.创建数据节点到刚创建的处置节点 3.然后拿着创建好的数据节点的id 将平面图data保存 - new Promise((resolve,reject) => { - this.http.post("/api/DisposalNodes",dispositionNodeData).subscribe((data:any) => { - resolve(data.id) - }) - }).then((id) => { - let dataNodeData - new Promise((resolve,reject) => { - postdata.parentId = id - postdata.level = dispositionNodeData.level + 1 - this.http.post("/api/DisposalNodes",postdata).subscribe((data:any) => { - resolve(data) - }) - }).then((data:any) => { - // 保存平面图数据到当前节点 - // console.log(6666,data) - // let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) - // postdata.Data = JSON.stringify(postdata.Data) - let objData = { - id: "", - data: JSON.stringify(this.canvasData.selectPanelPoint.Data) || null, - version: this.canvasData.selectPanelPoint.Version || "2.0", - disposalNodeId: data.id, - planComponentId: sessionStorage.getItem("planId"), - } - - this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - - },err=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage("send a message") - }) - }) - } - } -} \ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/saveOne.html b/src/app/ui/collection-tools-plan/saveOne.html deleted file mode 100644 index a6b0b32..0000000 --- a/src/app/ui/collection-tools-plan/saveOne.html +++ /dev/null @@ -1,5 +0,0 @@ -
处置节点保存
-
- - -
\ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/saveTwo.html b/src/app/ui/collection-tools-plan/saveTwo.html deleted file mode 100644 index fec97ff..0000000 --- a/src/app/ui/collection-tools-plan/saveTwo.html +++ /dev/null @@ -1,53 +0,0 @@ -
-
新增节点
-
-
- -
- - - -
-
- - - - {{item.name}} - - - -
-
- - -
-
-
-
-
-
保存到已有节点
-
-
-
- - - - {{item.name}} - - - -
-
- - -
-
-
-
\ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/viewdetails.html b/src/app/ui/collection-tools-plan/viewdetails.html deleted file mode 100644 index 76638c2..0000000 --- a/src/app/ui/collection-tools-plan/viewdetails.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
- clear -
- -
-
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index dac8a36..27b1d13 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -27,7 +27,15 @@ - + + + + 适应缩放 + + + + 重置缩放 +
天气 diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 1d5a3de..c7c80a4 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -25,6 +25,15 @@ align-items:center; min-height: 40px; background-color: #fff; + .zoom{ + display: flex; + align-items: center; + margin-left: 15px; + cursor: pointer; + img{ + margin-right: 3px; + } + } .marginLeftRight { margin: 0 8px; font-size: 16px; diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 5fe1722..71adcb5 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -179,7 +179,14 @@ export class CollectionToolsComponent implements OnInit { this.getDisposalNode() } } - + //适应缩放 + adaptZoom(){ + this.canvas.zoomFit() + } + //重置缩放 + resetZoom(){ + this.canvas.resetCamera2D() + } //ngzorro tree 拖拽 nzEvent(event: NzFormatEmitEvent): void { if(this.isDrag){ diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index db5cace..c3c5fcd 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -80,14 +80,12 @@ import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } f import { WorkingAreaComponent } from '../working-area/working-area.component'; import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,addBGCDisposalNodeComponent} from './collection-tools/leftFunctionalDomain' import { saveOneDialog, saveTwoDialog } from './collection-tools/save'; -import { CollectionToolsPlanComponent, CreateBuildingPlan, EditBuildingPlan, ViewDetailsPlan } from './collection-tools-plan/collection-tools.component'; -import { addDisposalNodeComponentPlan, editDisposalNodeComponentPlan, editPlaneFigureComponentPlan, leftFunctionalDomainComponentPlan } from './collection-tools-plan/leftFunctionalDomain'; -import { saveOneDialogPlan, saveTwoDialogPlan } from './collection-tools-plan/save'; -import {CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,ViewDetailsBuilding} from './collection-tools-building/collection-tools.component' -import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent} from './collection-tools-building/leftFunctionalDomain' -import {saveOneDialogBuilding,saveTwoDialogBuilding} from './collection-tools-building/save' +import { CollectionToolsPlanComponent, CreateBuildingPlan, EditBuildingPlan } from './collection-tools-plan/collection-tools.component'; +import { editPlaneFigureComponentPlan, leftFunctionalDomainComponentPlan } from './collection-tools-plan/leftFunctionalDomain'; +import {CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding} from './collection-tools-building/collection-tools.component' +import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} from './collection-tools-building/leftFunctionalDomain' @NgModule({ - declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,ViewDetailsPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addDisposalNodeComponentPlan,editDisposalNodeComponentPlan,saveOneDialogPlan,saveTwoDialogPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,ViewDetailsBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent,saveOneDialogBuilding,saveTwoDialogBuilding], + declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent], imports: [ CommonModule, diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 0f47f43..20dfa38 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -458,7 +458,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV /** * 重置相机 */ - private resetCamera2D() { + public resetCamera2D() { this.camera2D.scale.set(1); this.camera2D.x = (this.app.view.width - this.backgroundImage.width) / 2; this.camera2D.y = (this.app.view.height - this.backgroundImage.height) / 2; diff --git a/src/assets/images/适应缩放.png b/src/assets/images/适应缩放.png new file mode 100644 index 0000000000000000000000000000000000000000..818de8929a87e35d230a0758af553502787ae15b GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co&H|6fVg?3oArNM~bhqvgP;j58 zi(`mI@7l>1c@G)zxSU_{zk^p|p|nZP0gj#vqBj~uB^r5e@g8F92~e|0IXUstq!qpo zRJX~*LR69nNcaG-0-#DW=1eh$gx20EfX_pX+GUEVkmF>J zl8sm+tW+u#1Oa^C*K4H|q9}rt(i~xP99tlBY?VA54lm<4re?F5mG5~TMNve(UXL8d zq4eW7mc(lScWbiw(0Dw)=ytoSUH1|MfhOk0&5?#F)(MqTFI)j{bUGa}!4>nG_nFZ5 z{XA)F8=-HKxRNAEv{e3plv0D=FWt-w1Me#`ee7+HbOlquIpwd zd7hX34#O~Wn9s~+Ge-y^Z2-8+yX=leBkntLT~|wHS6M2DshF>WQP|vEb{xkKMmFD_ zk)E2M_mom(jN5}Ra~IBhK7X`((15ER3&}cN? wtJUiBa=ARO*X#GCN6(6%*#qJ-|AheX4ee5k=_KO^qyPW_07*qoM6N<$g2Fr9J^%m! literal 0 HcmV?d00001