From 389227474a7b48f63e668ac851bea474dfda29e1 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 22 Jan 2021 10:30:41 +0800 Subject: [PATCH 01/11] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E7=BC=96=E5=88=B6?= =?UTF-8?q?=E5=B7=A5=E5=85=B7UI=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/canvas-share-data.service.ts | 24 ++- .../collection-tools.component.html | 27 ++- .../collection-tools.component.scss | 16 +- .../collection-tools/addBGCDisposalNode.html | 24 +++ .../collection-tools.component.html | 163 ++++++++++-------- .../collection-tools.component.scss | 61 +++++-- .../collection-tools.component.ts | 19 +- .../collection-tools/leftFunctionalDomain.ts | 45 +++++ src/app/ui/collection-tools/panel.scss | 42 ++++- src/app/ui/ui.module.ts | 6 +- .../working-area/working-area.component.ts | 5 +- 11 files changed, 304 insertions(+), 128 deletions(-) create mode 100644 src/app/ui/collection-tools/addBGCDisposalNode.html diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index adf46a6..3b57938 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; import {ReplaySubject} from 'rxjs'; import { Observable } from 'rxjs'; import { GameMode } from './working-area/model/gameMode'; + @Injectable({ providedIn: 'root' }) @@ -10,33 +11,30 @@ export class CanvasShareDataService { private _sendMessage: ReplaySubject = new ReplaySubject(1); examDisposalNodesData; // 考生进入时获取当前试卷的处置节点 - examFacilityAssetsData; // 考生进入时获取当前试卷要考察的消防设施 + examFacilityAssetsData; // 考生进入时获取当前试卷要考察的消防设施 + examOriginaleveryStoreyData: any; // 考生答卷 总平面图/楼层/区域 楼层数据 + hiddenBasicInfoFacilities: any = []; // 考生答卷 当前楼层需要隐藏的基本信息素材 + - isChange = false; // 数据 是否改动 - selectTemplateData: any; // 选择当前 模板数据 + isChange:boolean = false; // 数据 是否改动 + + selectTemplateData:any; // 选择当前 模板数据 // 总平面图/建筑 楼层 selectStorey: any = {area: '', details: ''}; // 选择当前 楼层 数据 - originalcompanyBuildingData: any; // 单位/建筑 数据 - originaleveryStoreyData: any; // 总平面图/楼层/区域 楼层数据 - - - examOriginaleveryStoreyData: any; // 考生答卷 总平面图/楼层/区域 楼层数据 - - hiddenBasicInfoFacilities: any = []; // 考生答卷 当前楼层需要隐藏的基本信息素材 // 总平面图/建筑 楼层 // 处置 节点 allDisposalNode: any = []; // 所有 处置节点 allNodeMarkers: any; // 灾情 标签信息 - - selectPanelPoint: DisposalNodeData = new DisposalNodeData(); - + selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点 selectPanelPointBaseData: any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 所对应的 天气,详情 数据节点 + customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称 // 处置 节点 + /** * 游戏模式 */ 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 e461b35..b2bdb47 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -7,27 +7,20 @@ - - - - + 基本信息名称 visibility - - 想定作业名称 - visibility - -
- - 基本信息编辑 - -
+ + + + + tv create 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 1ec5d7d..985cf7e 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.scss +++ b/src/app/ui/collection-tools-plan/collection-tools.component.scss @@ -25,21 +25,19 @@ align-items:center; min-height: 40px; background-color: #fff; - .nameShow{ - cursor: pointer; + .marginLeftRight { + margin: 0 8px; + font-size: 16px; user-select: none; + cursor: pointer; + .mat-icon { vertical-align: middle; font-size: 24px; } } .copytobutn{ - width: 33px; - min-width: 33px; + width: 60px; + min-width: 60px; display: flex; justify-content: center; } - font-size: 18px; - mat-icon{ - font-size: 26px; - vertical-align: text-top; - } span{ height: 24px; line-height: 24px; diff --git a/src/app/ui/collection-tools/addBGCDisposalNode.html b/src/app/ui/collection-tools/addBGCDisposalNode.html new file mode 100644 index 0000000..f9f91af --- /dev/null +++ b/src/app/ui/collection-tools/addBGCDisposalNode.html @@ -0,0 +1,24 @@ +
+
+ +
+ +
+ +
+ + + +
+ + +
+ +
+ +
\ 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 3575416..701098a 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -7,22 +7,27 @@ - - - - 基本信息名称 - visibility - - - 想定作业名称 - visibility -
基本信息编辑 @@ -40,32 +45,18 @@
- - + @@ -112,10 +103,79 @@ + +
+
+
+ open_with + + + + + + + +
+
+ {{item.name}} + + + + + + +
+
+
+
+
总平面图
+
+ {{item.name}} +
+
+
+ +
+ +
+
+ keyboard_arrow_up + keyboard_arrow_down + + +
+
+ + + +
+ +
+ edit + add + library_books + delete_forever +
+
+
+ +
+
+ + -
+
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 19402a6..f01a7b7 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -25,21 +25,19 @@ align-items:center; min-height: 40px; background-color: #fff; - .nameShow{ - cursor: pointer; + .marginLeftRight { + margin: 0 8px; + font-size: 16px; user-select: none; + cursor: pointer; + .mat-icon { vertical-align: middle; font-size: 24px; } } .copytobutn{ - width: 33px; - min-width: 33px; + width: 60px; + min-width: 60px; display: flex; justify-content: center; } - font-size: 18px; - mat-icon{ - font-size: 26px; - vertical-align: text-top; - } span{ height: 24px; line-height: 24px; @@ -116,6 +114,14 @@ width: 100%; height: 100%; } + .centerBuildingDiv { + position: absolute; + max-width: 400px; + top: 40px; + left: 240px; + z-index: 150; + display: flex; + } .functionalDomainLeft { background-color: #fff; display: flex; @@ -137,7 +143,7 @@ } } .functionalDomainRight { - z-index: 1001; + z-index: 111; margin-right: 0px; transition: margin-right 0.5s; border: 1px solid #464646; @@ -158,6 +164,41 @@ } +//中间建筑/楼层 +.centerTotal { + width: 197px; + background-color: #fff; + box-shadow: 0px 0px 5px 3px rgb(165, 163, 163); + border-radius: 5px; + box-sizing: border-box; + padding: 5px 0; + .centerTotalHeader { + height: 30px; + line-height: 30px; + box-sizing: border-box; + padding-right: 5px; + font-size: 14px; + .centerTotalTitle { >label{ display: inline-block; vertical-align: middle; max-width: 90px; } } + .move{margin: 0 5px;} + .move:hover {cursor: move;} + .mat-icon { + font-size: 24px; + color: rgb(175, 164, 164); + } + } + .everyTotal { + width: 100%; + height: 30px; + line-height: 30px; + box-sizing: border-box; + padding: 0 5px; + margin: 3px 0; + cursor:pointer; + font-size: 16px; + } +} +//中间建筑/楼层 + //右边操作栏 .title{ width: 100%; diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index b101e13..c9da111 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -2,7 +2,7 @@ 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 {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeComponent,addDisposalNodeComponent} from './leftFunctionalDomain' +import {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeComponent,addDisposalNodeComponent, addBGCDisposalNodeComponent} from './leftFunctionalDomain' import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; import {FlatTreeControl} from '@angular/cdk/tree'; import {WorkingAreaComponent} from '../../working-area/working-area.component' @@ -1379,6 +1379,7 @@ export class CollectionToolsComponent implements OnInit { isRefresh? this.isShowProperty = true : null isRefresh? this.isShowAttribute = true : null !this.pattern? this.mateFireForce() : null //刷新 建筑楼层 火源/力量图标 + this.beforeOneCheckedBuildingIsShow = false let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据 @@ -1423,6 +1424,9 @@ export class CollectionToolsComponent implements OnInit { togglePlane:boolean = true; //可展开面板平面图 显隐 toggleMaterialBank:boolean = false; //可展开面板素材库 显隐 toggleHandlePlans:boolean = true; //可展开面板处置预案 显隐 + + beforeOneCheckedBuildingIsShow:boolean = false; //想定作业下 建筑是否显示 + togglebeforeOneCheckedBuilding () { this.beforeOneCheckedBuildingIsShow = !this.beforeOneCheckedBuildingIsShow } //可展开面板展开或关闭 toggle () { this.toggleExpandPanel = !this.toggleExpandPanel @@ -2126,6 +2130,19 @@ export class CollectionToolsComponent implements OnInit { }) } + //新建 底图数据节点 + addBGCPanelPoint (e) { + e.stopPropagation() + let dialogRef = this.dialog.open(addBGCDisposalNodeComponent); + dialogRef.afterClosed().subscribe(data=>{ + if (data) { + this.canvasData.customizeDisposalNode = data + let imgURL = window.URL.createObjectURL(data.file) //将图片生成 url地址 + console.log(imgURL,this.canvasData.customizeDisposalNode) + } + }) + } + //新建 处置预案 节点 addPanelPoint (e,item,treeData) { e.stopPropagation() diff --git a/src/app/ui/collection-tools/leftFunctionalDomain.ts b/src/app/ui/collection-tools/leftFunctionalDomain.ts index 519653d..3deb432 100644 --- a/src/app/ui/collection-tools/leftFunctionalDomain.ts +++ b/src/app/ui/collection-tools/leftFunctionalDomain.ts @@ -129,6 +129,51 @@ export class editPlaneFigureComponent implements OnInit { +//新建 底图数据节点 +@Component({ + selector: 'app-addBGCDisposalNode', + templateUrl: './addBGCDisposalNode.html', + styleUrls: ['./panel.scss'] +}) +export class addBGCDisposalNodeComponent implements OnInit { + + constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + + ngOnInit(): void { } + + file:any = null; //文件 + //上传图片 + selectFile (e) { + if (e.target.files.length ) { + let maxSize = 5*1024*1024 + if (e.target.files[0].size <= maxSize) { + this.file = e.target.files[0] + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传图片需小于5MB','确定',config); + } + } + } + + //提交表单 + onSubmit (e) { + if (e.name && this.file) { + e.file = this.file + this.dialogRef.close(e); + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请上传图片','确定',config); + } + } + +} + + + //创建 处置预案 节点 @Component({ selector: 'app-addDisposalNode', diff --git a/src/app/ui/collection-tools/panel.scss b/src/app/ui/collection-tools/panel.scss index f0ae073..a127a5b 100644 --- a/src/app/ui/collection-tools/panel.scss +++ b/src/app/ui/collection-tools/panel.scss @@ -50,8 +50,8 @@ //火源/力量 图标 .fireForce { display: block; + margin-top: 5px; float: right; - margin: 8px 5px 0 0; width: 40px; height: 20px; line-height: 20px; @@ -261,6 +261,10 @@ .selectanelPoint { background-color: #F4C235; } +//选中 数据节点时 +.selectanelPointData { + background-color: #f8da88; +} @@ -289,3 +293,39 @@ resize:none; } } + +.leftAddBGC { + div{ text-align: center; } + input { + width: 190px; + height: 30px; + padding-left: 5px; + outline: none; + border: none; + border-radius: 5px; + background: #EEF1F5; + } +} +//上传CAD弹窗 inputfile +.uploadFile { + padding: 3px 10px; + height: 20px; + line-height: 20px; + position: relative; + cursor: pointer; + color: #0080FF; + font-size: 14px; + background: #fafafa; + border: 1px solid #0080FF; + border-radius: 3px; + overflow: hidden; + display: inline-block; + input { + position: absolute; + width: 100%; + right: 0; + top: 0; + opacity: 0; + cursor: pointer + } +} diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index eb9a555..d1129ac 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -67,7 +67,6 @@ import { UnittypeComponent,DialogOverviewExampleDialog,editorialUnit } from './u import { AuthorityComponent, CreateAuthority } from './authority/authority.component'; import { RoleComponent, CreateRole, EditRole } from './role/role.component'; import { UsermanagementComponent,CreateNewUser,EditNewUser,allRoles,seeInformation } from './usermanagement/usermanagement.component'; - import { IsnoPipe } from '../pipes/boolean.pipe'; import {ConfirmpswDirective} from './changepassword/equal-validator.directive' import { TimePipe } from '../pipes/time.pipe'; @@ -90,16 +89,15 @@ import { EditGroup } from './unit-information/editgroup.component'; import { EnterpriseuserComponent,seeenterpriseuser,editenterpriseuser } from './enterpriseuser/enterpriseuser.component'; import { AddEnterpriserUser } from './enterpriseuser/addenterpriseuser.component'; import { FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component'; - import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } from './collection-tools/collection-tools.component'; import { WorkingAreaComponent } from '../working-area/working-area.component'; -import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent} from './collection-tools/leftFunctionalDomain' +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'; @NgModule({ - declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, 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], + declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, 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], imports: [ CommonModule, diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 04d2c17..add640d 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -276,7 +276,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV icon.assetData.Type === 3 || icon.assetData.Type === 4 )) { - console.log(this.backgroundImage.position); this.backgroundImage.pivot.set(icon.x, icon.y); this.backgroundImage.position.set(771, 404); clearTimeout(this.animationTime); @@ -315,7 +314,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.app.stage.addChild(this.grid); this.grid.drawGrid(); this.grid.onMousemove = (evt, gridCoord) => { - console.log(gridCoord); + }; this.createBackgroundImage(); @@ -504,7 +503,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public setIconScale(value: number): void { this.backgroundImage.children.forEach(item => { if (item instanceof AxImageShape) { - console.log(item.image.scale); item.image.scale.set(value); } else if (item instanceof MultipointIcon) { @@ -630,7 +628,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.backgroundImage .on('pointerdown', event => { if (event.data.button !== 0) { return; } - console.log(this.backgroundImage.toLocal(this.mousePosition)); if (!event.currentTarget.dragging && this.selection.isMultiselection === false) { this.selection.deselectAll(); event.currentTarget.data = event.data; From 82a7aa33408f75d9c9aa626091649dbbfbc3aee7 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Sat, 23 Jan 2021 17:25:25 +0800 Subject: [PATCH 02/11] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=B6=88=E9=98=B2=E5=8A=9B=E9=87=8F=E9=87=87=E9=9B=86=20?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=81=94=E5=8A=A8=E5=8A=9B=E9=87=8F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=87=87=E9=9B=86=E5=8A=9F=E8=83=BD=20=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=BC=96=E7=BB=87=E5=B7=A5=E5=8F=8A=E6=B6=88=E9=98=B2?= =?UTF-8?q?=E8=A6=81=E7=B4=A0icon=E7=82=B9=E5=87=BBbug=20=E5=AE=8C?= =?UTF-8?q?=E5=96=84gis=E7=AE=A1=E7=90=86=E6=B0=B4=E6=BA=90=E5=92=8C?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E6=A0=87=E7=82=B9=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data-collection/data-collection.module.ts | 4 +- .../linkage-forces/addLinkageForce.html | 15 + .../linkage-forces.component.html | 258 +++++- .../linkage-forces.component.scss | 518 ++++++++++++ .../linkage-forces.component.ts | 760 +++++++++++++++++- .../linkage-forces/viewdetails.html | 1 + .../water-collection.component.html | 2 +- .../water-collection.component.ts | 2 +- .../gis-labeling/gis-labeling.component.html | 2 + .../gis-labeling/gis-labeling.component.ts | 504 ++++++------ .../collection-tools.component.html | 44 +- .../collection-tools.component.ts | 2 + .../collection-tools.component.html | 44 +- .../collection-tools.component.scss | 1 + .../collection-tools.component.ts | 13 +- src/app/ui/collection-tools/save.ts | 16 +- src/app/ui/collection-tools/saveTwo.html | 2 +- .../working-area/working-area.component.ts | 2 +- src/assets/images/其他.png | Bin 791 -> 2280 bytes src/assets/images/古建筑.png | Bin 904 -> 2298 bytes src/assets/images/轨道交通.png | Bin 1161 -> 2610 bytes src/assets/linkageForces/交通.png | Bin 0 -> 737 bytes src/assets/linkageForces/住建.png | Bin 0 -> 786 bytes src/assets/linkageForces/公安.png | Bin 0 -> 943 bytes src/assets/linkageForces/医疗.png | Bin 0 -> 839 bytes src/assets/linkageForces/安监.png | Bin 0 -> 916 bytes src/assets/linkageForces/市政.png | Bin 0 -> 789 bytes src/assets/linkageForces/应急管理.png | Bin 0 -> 901 bytes src/assets/linkageForces/民政.png | Bin 0 -> 827 bytes src/assets/linkageForces/气象局.png | Bin 0 -> 901 bytes src/assets/linkageForces/水利.png | Bin 0 -> 788 bytes src/assets/linkageForces/海事.png | Bin 0 -> 960 bytes src/assets/linkageForces/燃气局.png | Bin 0 -> 862 bytes src/assets/linkageForces/环保局.png | Bin 0 -> 1068 bytes src/assets/linkageForces/电力局.png | Bin 0 -> 920 bytes src/assets/linkageForces/通信.png | Bin 0 -> 561 bytes src/styles.scss | 12 +- 37 files changed, 1907 insertions(+), 295 deletions(-) create mode 100644 src/app/data-collection/linkage-forces/addLinkageForce.html create mode 100644 src/app/data-collection/linkage-forces/viewdetails.html create mode 100644 src/assets/linkageForces/交通.png create mode 100644 src/assets/linkageForces/住建.png create mode 100644 src/assets/linkageForces/公安.png create mode 100644 src/assets/linkageForces/医疗.png create mode 100644 src/assets/linkageForces/安监.png create mode 100644 src/assets/linkageForces/市政.png create mode 100644 src/assets/linkageForces/应急管理.png create mode 100644 src/assets/linkageForces/民政.png create mode 100644 src/assets/linkageForces/气象局.png create mode 100644 src/assets/linkageForces/水利.png create mode 100644 src/assets/linkageForces/海事.png create mode 100644 src/assets/linkageForces/燃气局.png create mode 100644 src/assets/linkageForces/环保局.png create mode 100644 src/assets/linkageForces/电力局.png create mode 100644 src/assets/linkageForces/通信.png diff --git a/src/app/data-collection/data-collection.module.ts b/src/app/data-collection/data-collection.module.ts index ad38bdf..50060c8 100644 --- a/src/app/data-collection/data-collection.module.ts +++ b/src/app/data-collection/data-collection.module.ts @@ -45,11 +45,11 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { DataCollectionRoutingModule } from './data-collection.routing'; import { AddWater, WaterCollectionComponent } from './water-collection/water-collection.component'; import { AddFireForce, FireForceComponent, ViewDetails } from './fire-force/fire-force.component'; -import { LinkageForcesComponent } from './linkage-forces/linkage-forces.component'; +import { AddLinkageForce, LinkageForcesComponent, ViewDetails2 } from './linkage-forces/linkage-forces.component'; import { NzTreeModule } from 'ng-zorro-antd/tree'; @NgModule({ - declarations: [WaterCollectionComponent, FireForceComponent, LinkageForcesComponent,AddWater,AddFireForce,ViewDetails], + declarations: [WaterCollectionComponent, FireForceComponent, LinkageForcesComponent,AddWater,AddFireForce,ViewDetails,AddLinkageForce,ViewDetails2], imports: [ CommonModule, A11yModule, diff --git a/src/app/data-collection/linkage-forces/addLinkageForce.html b/src/app/data-collection/linkage-forces/addLinkageForce.html new file mode 100644 index 0000000..4ba38db --- /dev/null +++ b/src/app/data-collection/linkage-forces/addLinkageForce.html @@ -0,0 +1,15 @@ +
+
+ 新增联动力量 +
+
+
+ + {{item.name}} +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.html b/src/app/data-collection/linkage-forces/linkage-forces.component.html index 413184e..abc51c7 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.html +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.html @@ -1,8 +1,260 @@ -
+
+
+
+
+ 列表过滤 +
+
+ + +
+
+ +
+
+
+
+ 消防队 + 完整度 +
+
+
    +
  • +
    {{item.name}}
    +
    + + {{accMul(item.integrityScore.toFixed(3),100,1)}}% + +
    +
    +
    +
    highlight_off
    +
  • +
+
+
+ +
+
-
+ + \ No newline at end of file diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.scss b/src/app/data-collection/linkage-forces/linkage-forces.component.scss index ef03c8d..9fbcf0f 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.scss +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.scss @@ -5,14 +5,532 @@ display: flex; box-sizing: border-box; padding: 10px; + font-size: 16px; + font-family: Source Han Sans CN; + font-weight: 400; + color: #000000; } .listbox{ width: 400px; height: 100%; background-color: #fff; + display: flex; + flex-direction: column; + .topbox{ + max-height: 200px; + box-sizing: border-box; + padding: 10px 22px 22px; + .add{ + height: 36px; + line-height: 36px; + display: flex; + justify-content: space-between; + } + .searchbox{ + .inputbox{ + width: 100%; + height: 36px; + font-size: 14px; + line-height: 36px; + margin: 10px 0; + display: flex; + span{ + margin-right: 5px; + } + select,input{ + flex: 1; + background-color: #F2F4F6; + border: 0; + border-radius: 5px; + box-sizing: border-box; + padding:0 8px; + + } + .gray{ + color: gray; + } + // input::-moz-placeholder { + // color: rgba(90, 83, 83, 0.89); + // opacity: 1; + // } + // input:-ms-input-placeholder { + // color: rgba(90, 83, 83, 0.89);; + // } + // input::-webkit-input-placeholder { + // color: rgba(90, 83, 83, 0.89);; + // } + } + } + } + .contantbox{ + flex: 1; + overflow-y: auto; + display: flex; + flex-direction: column; + .title{ + display: flex; + justify-content: space-between; + width: 100%; + box-sizing: border-box; + padding: 0 33px 0 22px; + height: 36px; + line-height: 36px; + span{ + font-size: 14px; + font-weight: 500; + } + } + .linkageForceList{ + flex: 1; + overflow-y: auto; + li{ + cursor: pointer; + width: 100%; + height: 36px; + line-height: 36px; + display: flex; + align-items: center; + font-size: 14px; + div{ + float: left; + box-sizing: border-box; + } + .name{ + text-align: left; + width: 60%; + padding-left: 22px; + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + } + .integrity{ + height: 58%; + width: 32%; + position: relative; + background-color: #F2F4F6; + .integrityNum{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + color: black; + font-size: 13px; + cursor: default; + } + .integrityColorDiv{ + height: 100%; + } + } + .deletebtn{ + flex: 1; + text-align: center; + mat-icon{ + width: 20px; + height: 20px; + cursor: pointer; + font-size: 20px; + vertical-align: text-top; + color: rgba(49, 46, 46, 0.144); + } + mat-icon:hover{ + color: #000; + } + } + } + li:hover{ + background-color: #b3d3ee; + } + .selectedLi{ + background-color: #b3d3ee; + } + } + .paginator{ + height: 56px; + width: 100%; + } + } } .mapbox{ flex: 1; margin-left: 10px; background-color: #fff; + display: flex; + overflow: hidden; + flex-direction: column; + .mapcheckbox,.swiper-container{ + width: 100%; + height: 50px; + .swiper-wrapper{ + flex: 1; + display: flex; + height: 50px; + line-height: 50px; + } + mat-checkbox{ + font-size: 15px; + span{ + display: flex; + justify-content: center; + align-items: center; + img{ + margin-right: 3px; + } + } + + } + mat-checkbox:nth-child(1){ + margin-left: 20px; + } + + } + #map{ + flex: 1; + position: relative; + #container{ + width: 100%; + height: 100%; + } + .gistopbox{ + position: absolute; + box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); + border-radius: 5px; + top: 3px; + width: 30%; + height:40px; + background: #FFFFFF; + display: flex; + align-items: center; + cursor: default;; + .inputBox{ + width: 100%; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + font-size: 14px; + .positionInput{ + border: 0; + border-radius: 6px; + width: 80%; + height: 28px; + background: #F2F2F2; + margin-left: 8px; + box-sizing: border-box; + padding-left: 10px; + } + } + + } + .hidden{ + opacity: 0; + z-index: -1; + } + .show{ + opacity: 1; + z-index: 1; + } + } + .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: text-top; + font-size: 20px; + width: 20px; + height: 20px; + } + } + span:hover{ + text-decoration: underline; + } + .submitAudit{ + margin: 0 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; + } + } + } +} + + +.addLinkageForceBox{ + width: 530px; + height: 262px; + display: flex; + flex-direction: column; + .topbox{ + width: 100%; + height: 40px; + line-height: 40px; + background-color: #2196F3; + text-align: center; + color: #FFFFFF; + font-size: 15px; + } + .contant{ + flex: 1; + box-sizing: border-box; + padding:20px 30px; + + div{ + width:86px; + margin: 3px; + height: 36px; + float: left; + line-height: 36px; + text-align: center; + background-color: #F2F4F6; + font-size: 14px; + cursor: pointer; + border: 1px solid #fff; + border-radius: 4px; + display: flex; + justify-content: center; + align-items: center; + img{ + margin-right: 3px; + } + } + .selectedDiv{ + background-color: #fff; + border: 1px solid #2196F3; + } + } + .btnbox{ + width: 100%; + height: 50px; + box-sizing: border-box; + padding: 0px 30px; + display: flex; + align-items: flex-start;; + justify-content: center; + button{ + width: 80px; + height: 36px; + line-height: 36px; + margin: 0 20px; + } + } } \ No newline at end of file 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 cbddc20..919b746 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -1,5 +1,16 @@ +import { FlatTreeControl } from '@angular/cdk/tree'; +import { HttpClient } from '@angular/common/http'; +import { Inject, Renderer2 } from '@angular/core'; +import { ElementRef } from '@angular/core'; import { Component, OnInit } from '@angular/core'; - +import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; +import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; +import { NzTreeNode } from 'ng-zorro-antd/tree'; +import { TreeService } from 'src/app/http-interceptors/tree.service'; +import Viewer from 'viewerjs' +import Swiper from 'swiper'; +declare var AMap: any; @Component({ selector: 'app-linkage-forces', templateUrl: './linkage-forces.component.html', @@ -7,9 +18,754 @@ import { Component, OnInit } from '@angular/core'; }) export class LinkageForcesComponent implements OnInit { - constructor() { } + constructor(private tree: TreeService,public snackBar: MatSnackBar,private http:HttpClient,private elementRef: ElementRef,public renderer2: Renderer2,public dialog: MatDialog) { } + + isCheckedOfSearchDiv:boolean = true//列表过滤滑块 + slideChange(e){ + this.isCheckedOfSearchDiv = e.checked + } + //搜索表单 + searchForm:any = { + name:'', + integrityNum:'' + } + listIntegrityNum:any[] = [ + {id:-1,name:'全部'}, + {id:0,name:'<=50%'}, + {id:1,name:'50%-60%'}, + {id:2,name:'60%-70%'}, + {id:3,name:'70%-80%'}, + {id:4,name:'80%-90%'}, + {id:5,name:'90%-100%'} + ] + checkBoxList:any[] = [ + {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png'}, + {id:1,name:'电力局',imgUrl:'/assets/linkageForces/电力局.png'}, + {id:2,name:'公安',imgUrl:'/assets/linkageForces/公安.png'}, + {id:3,name:'海事',imgUrl:'/assets/linkageForces/海事.png'}, + {id:4,name:'环保局',imgUrl:'/assets/linkageForces/环保局.png'}, + {id:5,name:'交通',imgUrl:'/assets/linkageForces/交通.png'}, + {id:6,name:'民政',imgUrl:'/assets/linkageForces/民政.png'}, + {id:7,name:'气象局',imgUrl:'/assets/linkageForces/气象局.png'}, + {id:8,name:'燃气局',imgUrl:'/assets/linkageForces/燃气局.png'}, + {id:9,name:'市政',imgUrl:'/assets/linkageForces/市政.png'}, + {id:10,name:'水利',imgUrl:'/assets/linkageForces/水利.png'}, + {id:11,name:'通信',imgUrl:'/assets/linkageForces/通信.png'}, + {id:12,name:'医疗',imgUrl:'/assets/linkageForces/医疗.png'}, + {id:13,name:'应急管理',imgUrl:'/assets/linkageForces/应急管理.png'}, + {id:14,name:'住建',imgUrl:'/assets/linkageForces/住建.png'} + ] + ngOnInit(): void { + this.getAllFireForce() + window.onload = () => { + var mySwiper = new Swiper('.swiper-container', { + slidesPerView: 10,//每页显示的个数 + slidesPerGroup: 3,//点击一次需要跳多少次 + // 如果需要前进后退按钮 + navigation: { + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + }, + }) + } + setTimeout(() => { + + this.createMap() + }, 0); + } + //获得所有联动力量 + allLinkageForceObj:any//获得的所有联动力量 + dataLength:any //获取的数据一共多少条 + PageNumber:any = 1 //当前第几页 + getAllFireForce(){ + let MinIntegrity = 0 + let MaxIntegrity = 1.1 + if(this.searchForm.integrityNum == '0'){ + MinIntegrity = 0 + MaxIntegrity = 0.5 + }else if(this.searchForm.integrityNum == '1'){ + MinIntegrity = 0.5 + MaxIntegrity = 0.6 + }else if(this.searchForm.integrityNum == '2'){ + MinIntegrity = 0.6 + MaxIntegrity = 0.7 + }else if(this.searchForm.integrityNum == '3'){ + MinIntegrity = 0.7 + MaxIntegrity = 0.8 + }else if(this.searchForm.integrityNum == '4'){ + MinIntegrity = 0.8 + MaxIntegrity = 0.9 + }else if(this.searchForm.integrityNum == '5'){ + MinIntegrity = 0.9 + MaxIntegrity = 1.1 + }else if(this.searchForm.integrityNum == '-1'){ + MinIntegrity = 0 + MaxIntegrity = 1.1 + } + let params:any = { + Keyword : this.searchForm.name ? this.searchForm.name : '', + MinIntegrity : MinIntegrity, + MaxIntegrity : MaxIntegrity, + PageSize : 15, + PageNumber : this.PageNumber, + } + this.http.get('/api/LinkageForces',{params:params}).subscribe((data:any) => { + console.log('所有消防力量列表',data) + this.dataLength = data.totalCount + this.allLinkageForceObj = data + }) + } + + + //选择要显示的联动力量 + selectedLinkageForce(item){ + this.isGisTopBox = false + if(this.LinkageForceDetailInfo.id != item.id){ + this.clearData() + this.LinkageForceDetailInfo = item + item.location?this.positionLngLat = item.location:null + this.AttachmentArr = JSON.parse(item.relevantInfomationData) + if(this.newPositionMarker){ + this.map.remove(this.newPositionMarker); + } + console.log('当前点击的li',item) + if(item.location && item.location.x){//如果已经标注单位坐标 + console.log('开始标注') + + this.map.setCenter([item.location.x,item.location.y]); + this.newPositionMarker = new AMap.Marker({ + position: [item.location.x,item.location.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }) + // 将 markers 添加到地图 + this.map.add(this.newPositionMarker); + } + } + } + //搜索 + searchList(){ + this.getAllFireForce() + } + //重置搜索 + reset(){ + this.searchForm = { + name:'', + integrityNum:'' + } + this.getAllFireForce() + } + //分页事件 + chagePage(e){ + this.PageNumber = e.pageIndex+1 + this.getAllFireForce() + } + //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(); + } + } + //完整度颜色 + integrity(width){ + let _this = this + let style:any = {} + style.width = width +'%'; + if(width < 30){ + style.background = '#FF5D4A' + } + if(width >= 30 && width < 60){ + style.background = '#FFDD00' + } + if(width >= 60){ + style.background = '#5CD64E' + } + return style + } + //删除某条联动力量 + deleteLinkageForc(item,e){ + e.stopPropagation() + let isDelete = window.confirm(`确定要删除${item.name}吗`) + if(isDelete){ + this.http.delete(`/api/LinkageForces/${item.id}`).subscribe(data => { + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('删除成功','确定',config); + if(item.id == this.LinkageForceDetailInfo.id){ + this.LinkageForceDetailInfo.linkageForceType = null + } + this.getAllFireForce() + }) + } + } + //当前点击tab页面第几个 + tabIndex:any = 1 + selectedTab(index){ + this.tabIndex = index + } + + //联动力量详情提交信息 + LinkageForceDetailInfo:any = { + // id:'',//编号 + linkageForceType:'', + name:'',//名称 + phoneNumber:'',//联系电话 + faxNumber:'',//传真 + remark:'',//备注 + administrativeRegion:'',//行政区 + address:'',//地址 + location:{ + x:'', + y:'' + }, + contactName:'',//联系人姓名 + contactTitle:'',//联系人职务 + contactPhone:'',//联系人电话 + serviceContent:'',//服务内容 + resourceRemark:'',//资源说明 + relevantInfomationData:[]//相关资料 + } + + //清空表单数据 + clearData(){ + this.deletedFile = []//清空相关资料已删除缓存 + this.AttachmentArr = []//清空相关资料 + this.positionLngLat = {x:'',y:''} + this.atLastPositionLngLat = {x:'',y:''} + this.LinkageForceDetailInfo = { + // id:'',//编号 + linkageForceType:'', + name:'',//名称 + phoneNumber:'',//联系电话 + faxNumber:'',//传真 + remark:'',//备注 + administrativeRegion:'',//行政区 + address:'',//地址 + location:{ + x:'', + y:'' + }, + contactName:'',//联系人姓名 + contactTitle:'',//联系人职务 + contactPhone:'',//联系人电话 + serviceContent:'',//服务内容 + resourceRemark:'',//资源说明 + relevantInfomationData:[]//相关资料 + } + } + //新增联动力量 + selectedFireForceTypeIndex:any//新增消防力量名称 + addLinkageForce(){ + const dialogRef = this.dialog.open(AddLinkageForce, { + data: {}, + id:'addLinkageForce' + }); + dialogRef.afterClosed().subscribe( + data=>{ + if(typeof data === 'number' && !isNaN(data)){ + this.clearData() + console.log('清空了',this.LinkageForceDetailInfo) + this.LinkageForceDetailInfo.linkageForceType = data + this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null + this.map.setCity('上海市'); + + } + } + ) + } + //保存 + save(){ + if(!this.LinkageForceDetailInfo.name){ + alert('名称必填') + return + } + this.isMasklayer = true + //删除一下数据库的文件 + if(this.deletedFile.length != 0){ + this.deletedFile.forEach(item => { + this.http.delete(`/api/Objects/PlanPlatform/${item.objectName}`).subscribe(data=>{ + console.log('删除原文件成功') + }) + }); + } + + this.LinkageForceDetailInfo.location = {x:'',y:''} + 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 + }else{ + this.LinkageForceDetailInfo.location = null + } + this.LinkageForceDetailInfo.relevantInfomationData = JSON.stringify(this.LinkageForceDetailInfo.relevantInfomationData) + let body = this.LinkageForceDetailInfo + if(this.LinkageForceDetailInfo.id){ + this.http.put(`/api/LinkageForces/${this.LinkageForceDetailInfo.id}`,body).subscribe((data:any) =>{ + console.log('修改成功',data) + this.isMasklayer = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('修改成功','确定',config); + // this.LinkageForceDetailInfo.id = data.id + this.getAllFireForce() + + }) + }else{ + this.http.post('/api/LinkageForces',body).subscribe((data:any) =>{ + console.log('创建成功',data) + this.isMasklayer = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.LinkageForceDetailInfo = data + this.getAllFireForce() + }) + } + + + } + + map:any + placeSearch:any//构造地点查询类 + isMapLabel:boolean = false //是否已经标记坐标 + newPositionMarkerContent:any = + '
' + + ' ' + + '
' + newPositionMarkerContentBtn:any = + '
' + + ' ' + + '
|
' + + '
' + //创建地图 + newPositionMarker:any//坐标实例 + createMap(){ + this.map = new AMap.Map('container', { + zoom:12 + }) + this.map.setCity('上海市'); + //输入提示 + var autoOptions = { + input: "tipinput" + }; + AMap.plugin(['AMap.PlaceSearch','AMap.AutoComplete'], ()=>{ + let auto = new AMap.AutoComplete(autoOptions); + this.placeSearch = new AMap.PlaceSearch(); //构造地点查询类 + auto.on("select", (e)=>{ + this.newPositionMarker.setPosition([e.poi.location.lng,e.poi.location.lat]) + this.positionLngLat = {x: e.poi.location.lng, y: e.poi.location.lat} + this.map.setCenter([e.poi.location.lng,e.poi.location.lat]); //设置地图中心点 + });//注册监听,当选中某条记录时会触发 + + }); + + if(this.isMapLabel){//如果已经标注单位坐标 + console.log('已标注单位位置') + // this.map.setCenter([this.unitinfo.location.x,this.unitinfo.location.y]); + // this.oldPositionMarker = new AMap.Marker({ + // position: [this.unitinfo.location.x,this.unitinfo.location.y], + // content: this.newPositionMarkerContent, + // offset: new AMap.Pixel(-15, -18) + // }) + // // 将 markers 添加到地图 + // this.map.add(this.oldPositionMarker); + }else{ + console.log('未标注单位位置') + // this.map.setCity('上海市'); + } + } + //点击位置 + isGisTopBox:boolean = false // + searchTitle:any = ''// + + positionLngLat:any = {x:'',y:''}//临时坐标点 + atLastPositionLngLat:any = {x:'',y:''}//最终坐标点 + setPosition(){ + if(!this.isGisTopBox){ + this.isGisTopBox = true + this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null + let center + console.log(789,this.atLastPositionLngLat) + if(this.newPositionMarker && this.atLastPositionLngLat.x){//如果已经标注单位坐标 + console.log(1) + center = [this.atLastPositionLngLat.x, this.atLastPositionLngLat.y] + }else if(this.newPositionMarker && !this.atLastPositionLngLat.x && this.LinkageForceDetailInfo.location && this.LinkageForceDetailInfo.location.x){ + console.log(2) + center = [this.LinkageForceDetailInfo.location.x, this.LinkageForceDetailInfo.location.y] + }else{ + console.log(3) + center = this.map.getCenter(); //获取当前地图中心位置 + } + this.newPositionMarker = new AMap.Marker({ + draggable: true, + position: center, + content: this.newPositionMarkerContentBtn, + offset: new AMap.Pixel(-15, -18) + }); + this.positionLngLat = {x: center.lng || center[0], y: center.lat || center[1]} + this.map.add(this.newPositionMarker); + this.isMapLabel = true + this.newPositionMarker.on('dragend', (e)=>{ + this.positionLngLat = {x: e.lnglat.lng, y: e.lnglat.lat} + }) + //点击确定 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionOk'),'click',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + this.newPositionMarker = new AMap.Marker({ + position: [this.positionLngLat.x,this.positionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.atLastPositionLngLat = JSON.parse(JSON.stringify(this.positionLngLat)) + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + }) + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#setPositionClose'),'click',(event)=>{ + this.isGisTopBox = false + this.map.remove(this.newPositionMarker) + if(this.positionLngLat.x && this.positionLngLat.x != 0 && !this.atLastPositionLngLat.x){//直接取消 + this.map.remove(this.newPositionMarker) + this.positionLngLat = {} + this.atLastPositionLngLat = {} + }else{ + this.newPositionMarker = new AMap.Marker({ + position: [this.atLastPositionLngLat.x,this.atLastPositionLngLat.y], + content: this.newPositionMarkerContent, + offset: new AMap.Pixel(-15, -18) + }); + this.map.setCenter([this.atLastPositionLngLat.x,this.atLastPositionLngLat.y]); //设置地图中心点 + this.map.add(this.newPositionMarker); + this.positionLngLat = this.atLastPositionLngLat + } + })//取消 + } + + } + + + + + //上传附件 + file:any; //上传的文件 + AttachmentArr:any = []//上传附件地址集合 + uploadId:any//分块上传id + objectName:any + progressBarValue:any = 0//分块上传进度 + isMasklayer:boolean = false//圆圈遮罩层是否打开 + isMasklayerUploading:boolean = false//上传进度条遮罩层是否打开 + isMasklayerDownload:boolean = false//下载进度条遮罩层是否打开 + uploadAttachment(e){ + console.log('选择的文件',e) + this.file = e.target.files[0] || null //上传的文件 + let file = e.target.files[0] || null //获取上传的文件 + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB一个分片 + + if (file && fileSize<=shardSize) { //上传文件<=5MB时 + this.isMasklayer = true + console.log('file',this.file) + let formData = new FormData() + formData.append("file",file) + //this.selectedFireForce.id 选择的组织机构的id + this.http.post(`/api/Objects/PlanPlatform/LinkageForce/${this.LinkageForceDetailInfo.id}`,formData).subscribe((data:any)=>{ + // this.objectName = data.objectName + let obj = { + objectName:data.objectName, + fileName:data.fileName, + fileLength:data.fileLength + } + this.AttachmentArr.push(obj) + this.isMasklayer = false + console.log('上传成功',data) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传成功','确定',config); + }) + } else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传 + this.isMasklayerUploading = true + let data = {filename: file.name} + this.http.post(`/api/NewMultipartUpload/PlanPlatform/LinkageForce/${this.LinkageForceDetailInfo.id}`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传 + console.log('初始化分块上传成功',data) + this.objectName = data.objectName + this.uploadId = data.uploadId + this.subsectionUploading() + }) + } + } + PartNumberETag:any=[]; //每次返回需要保存的信息 + + //开始分段上传 + async subsectionUploading () { + let file = this.file || null //获取上传的文件 + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 + for (let i = 0;i < allSlice;i++) { //循环分段上传 + let start = i * shardSize //切割文件开始位置 + let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 + let formData = new FormData() + formData.append("file",file.slice(start, end)) + + //同步写法实现异步调用 + let result = await new Promise((resolve, reject) => { + // await 需要后面返回一个 promise 对象 + this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i+1}`,formData).subscribe((data:any)=>{ + let msg = { + "partNumber":data.partNumber || null, + "eTag": data.eTag || null} + resolve(msg) // 调用 promise 内置方法处理成功 + }) + }); + this.PartNumberETag.push(result) + // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 + this.progressBarValue = this.accMul(Number((i/allSlice).toFixed(2))*100,1,0) + if (this.PartNumberETag.length === allSlice) { + this.progressBarValue = 100 + this.endUploading()} + }//for循环 + + } + + //完成分块上传 + endUploading () { + let data = this.PartNumberETag + let paramsData = {uploadId:this.uploadId} + this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`,data,{params:paramsData}).subscribe(data=>{ + this.PartNumberETag =[] //清空保存返回的信息 + let obj = { + objectName:this.objectName, + fileName:this.file.name, + fileLength:this.file.size + } + this.AttachmentArr.push(obj) + this.isMasklayerUploading = false//关闭进度条遮罩层 + this.progressBarValue = 0//重置进度数 + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传成功','确定',config); + }) + } + //取消分块上传 + cancelUploading() { + this.http.delete(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}`).subscribe(data=>{ + this.progressBarValue = 0; + this.isMasklayerUploading= false + this.PartNumberETag =[] //清空保存返回的信息 + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('取消上传成功','确定',config); + }) + } + + //下载 + 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循环结束 + + } + + //删除图片 + deletedFile:any = [] + deleteFile(item,e){ + console.log(this.AttachmentArr) + e.stopPropagation() + let isTrue = window.confirm('确定要删除该文件吗?') + if(isTrue){ + let index + this.AttachmentArr.forEach((element,key) => { + if(element.objectName == item.objectName){ + index = key + } + }); + this.AttachmentArr.splice(index,1) + this.deletedFile.push(item) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('删除成功','确定',config); + } + } + + //点击文件 + clickFile(item){ + console.log(item) + let suffix = item.fileName.split('.')[item.fileName.split('.').length-1] + if(suffix == 'png' || suffix == 'jpg' || suffix == 'JPG'){ + console.log('这是图片') + 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 config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('暂不支持查看','确定',config); + } + if(suffix == 'mp4'){ + const dialogRef = this.dialog.open(ViewDetails2, {//调用open方法打开对话框并且携带参数过去 + data: {item:item,type:"video"}, + id:'videodialog2' + }); + dialogRef.afterClosed().subscribe(); + } + } + +} + + + + +//新增联动力量弹出框 +@Component({ + selector: 'AddLinkageForce', + templateUrl: './addLinkageForce.html', + styleUrls: ['./linkage-forces.component.scss'] +}) +export class AddLinkageForce { + + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) {} + + + addList:any = [ + {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png'}, + {id:1,name:'电力局',imgUrl:'/assets/linkageForces/电力局.png'}, + {id:2,name:'公安',imgUrl:'/assets/linkageForces/公安.png'}, + {id:3,name:'海事',imgUrl:'/assets/linkageForces/海事.png'}, + {id:4,name:'环保局',imgUrl:'/assets/linkageForces/环保局.png'}, + {id:5,name:'交通',imgUrl:'/assets/linkageForces/交通.png'}, + {id:6,name:'民政',imgUrl:'/assets/linkageForces/民政.png'}, + {id:7,name:'气象局',imgUrl:'/assets/linkageForces/气象局.png'}, + {id:8,name:'燃气局',imgUrl:'/assets/linkageForces/燃气局.png'}, + {id:9,name:'市政',imgUrl:'/assets/linkageForces/市政.png'}, + {id:10,name:'水利',imgUrl:'/assets/linkageForces/水利.png'}, + {id:11,name:'通信',imgUrl:'/assets/linkageForces/通信.png'}, + {id:12,name:'医疗',imgUrl:'/assets/linkageForces/医疗.png'}, + {id:13,name:'应急管理',imgUrl:'/assets/linkageForces/应急管理.png'}, + {id:14,name:'住建',imgUrl:'/assets/linkageForces/住建.png'} + ] + selectedFireForceTypeIndex:any = 0 + selecteAddType(item,key){ + this.selectedFireForceTypeIndex = item.id + + } ngOnInit(): void { + + } + + confirm(){ + this.dialogRef.close(this.selectedFireForceTypeIndex) } } + +//查看图片大图和视频 +@Component({ + selector: 'viewdetails', + templateUrl: './viewdetails.html', + styleUrls: ['./linkage-forces.component.scss'] +}) +export class ViewDetails2 { + // myControl = new FormControl(); + //注入MatDialogRef,可以用来关闭对话框 + //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌 + constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) {} + Url:string + onNoClick(): void { + this.dialogRef.close(); + } + ngOnInit(): void { + this.Url = '/api/Objects/PlanPlatform/' + this.data.item.objectName + } + closeDialog(){ + this.dialogRef.close(); + } + +} \ No newline at end of file diff --git a/src/app/data-collection/linkage-forces/viewdetails.html b/src/app/data-collection/linkage-forces/viewdetails.html new file mode 100644 index 0000000..6d917bb --- /dev/null +++ b/src/app/data-collection/linkage-forces/viewdetails.html @@ -0,0 +1 @@ + diff --git a/src/app/data-collection/water-collection/water-collection.component.html b/src/app/data-collection/water-collection/water-collection.component.html index 542ed80..9fe492c 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -52,7 +52,7 @@
- +
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 17dd475..c88aa80 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -74,7 +74,7 @@ export class WaterCollectionComponent implements OnInit { } let params:any = { Keyword : this.searchForm.name, - PageSize : 30, + PageSize : 15, PageNumber : this.PageNumber, MinIntegrity : MinIntegrity, MaxIntegrity : MaxIntegrity diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.html b/src/app/gis-management/gis-labeling/gis-labeling.component.html index 331be05..60f2b04 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.html +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.html @@ -114,6 +114,7 @@ 显示范围 : + diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts index 819a3ff..d8d3330 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts @@ -27,28 +27,14 @@ export class GisLabelingComponent implements OnInit { {id:'0',name:'消火栓',selected:false}, {id:'1',name:'消防水池',selected:false}, {id:'2',name:'天然水源',selected:false}, - // {id:'0',name:'单位地上消火栓',selected:false}, - // {id:'0',name:'单位地下消火栓',selected:false}, - // {id:'0',name:'市政地上消火栓',selected:false}, - // {id:'0',name:'消防水池',selected:false}, - // {id:'0',name:'方形储水池',selected:false}, - // {id:'0',name:'蓄水池',selected:false}, - // {id:'0',name:'原型水塔',selected:false}, - // {id:'0',name:'水库',selected:false}, - // {id:'0',name:'消防水箱',selected:false}, - // {id:'0',name:'码头',selected:false}, - // {id:'0',name:'海洋',selected:false}, - // {id:'0',name:'河流',selected:false}, - // {id:'0',name:'湖泊',selected:false}, - // {id:'0',name:'沟渠',selected:false} - ] + ] keyUnitForm : FormGroup//gis右上角重点单位表单 watertForm : FormGroup//gis右上角水源表单 selectedUnitList:any = []//选择提交的单位 selectedWaterList:any = []//选择提交的水源 - unitAreaDefault:any = '0'//默认单位范围 - waterAreaDefault:any = '0'//默认水源范围 + unitAreaDefault:any = '-1'//默认单位范围 + waterAreaDefault:any = '-1'//默认水源范围 //获得单位循环出来的checkbox列表(formControl实例) get units():any{ return this.keyUnitForm.get('units') @@ -156,17 +142,19 @@ export class GisLabelingComponent implements OnInit { //重点单位提交 ketUnitSubmit(value){ if(this.markers.length == 0){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请先选择一个单位','确定',config); + let paramsdata:any = { + PageSize:99999, + BuildingTypeIdList : this.selectedUnitList.length != 0 ? this.selectedUnitList : ['123'] + } + this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any) => { + this.createUnitMarker(data.items) + }) }else if(!this.mapPattern){ const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('请切换2D模式使用此功能','确定',config); }else{ - // console.log('提交',this.selectedUnit) this.circle.setRadius(Number(this.unitAreaDefault)) this.circle.setCenter(this.markers[0]._position) this.circle.setMap(this.map) @@ -178,32 +166,43 @@ export class GisLabelingComponent implements OnInit { }else{ Distance = Math.abs(lnglat.offset(0, this.unitAreaDefault).lat - this.selectedUnit.location.y) } - - let paramsdata:any = { - Lon : this.selectedUnit.location.x, - Lat : this.selectedUnit.location.y, - Distance : Distance, - BuildingTypeIdList : this.selectedUnitList.length != 0 ? this.selectedUnitList : ['123'] - } - // console.log(666,paramsdata) - this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any) => { - data.items.forEach((i,index) => { - if(i.id == this.selectedUnit.id){ - data.items.splice(index,1) - } + if(this.unitAreaDefault == '-1'){//如果勾选全部 + let paramsdata:any = { + PageSize:99999, + BuildingTypeIdList : this.selectedUnitList.length != 0 ? this.selectedUnitList : ['123'] + } + this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any) => { + data.items.forEach((i,index) => { + if(i.id == this.selectedUnit.id){ + data.items.splice(index,1) + } + }) + this.createUnitMarker(data.items) }) - this.createUnitMarker(data.items) - }) + }else{ + let paramsdata:any = { + PageSize:99999, + Lon : this.selectedUnit.location.x, + Lat : this.selectedUnit.location.y, + Distance : Distance, + BuildingTypeIdList : this.selectedUnitList.length != 0 ? this.selectedUnitList : ['123'] + } + this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any) => { + data.items.forEach((i,index) => { + if(i.id == this.selectedUnit.id){ + data.items.splice(index,1) + } + }) + this.createUnitMarker(data.items) + }) + } } } //创建单位markers - unitMarkerList:any = [] - unitlabelsLayer:any + unitCluster:any //重点单位点聚合实例 createUnitMarker(list){ - this.unitlabelsLayer ? this.map.remove(this.unitlabelsLayer) : null - this.unitMarkerList ? this.map.remove(this.unitMarkerList) : null - - let markerArr = [] + let unitMarkerArrcluster = [] + this.unitCluster ? this.unitCluster.setData([]) : null list.forEach((item) => { let image if(item.buildingTypes[0].name.indexOf('高层') != -1){ @@ -241,176 +240,262 @@ export class GisLabelingComponent implements OnInit { }else{ image = '/assets/images/其他.png' } - var icon = { - // 图标类型,现阶段只支持 image 类型 - type: 'image', - // 图片 url - image: image, - // 图片尺寸 - size: [32, 32], - // 图片相对 position 的锚点,默认为 bottom-center - anchor: 'center', - }; - var text = { - // 要展示的文字内容 - content: item.name, - // 文字方向,有 icon 时为围绕文字的方向,没有 icon 时,则为相对 position 的位置 - direction: 'bottom', - // 在 direction 基础上的偏移量 - offset: [-3, -3], - // 文字样式 - style: { - // 字体大小 - fontSize: 12, - // 字体颜色 - fillColor: '#22886f', - // 描边颜色 - strokeColor: '#fff', - // 描边宽度 - strokeWidth: 2, - } + // 用于点集合的数组 + unitMarkerArrcluster.push({ + lnglat : [item.location.x,item.location.y], + image : image, + data : item + }) + }) + this.map.plugin(["AMap.MarkerClusterer"],() => { + var gridSize = 60 + var count = unitMarkerArrcluster.length; + var _renderClusterMarker = function (context) { + var factor = Math.pow(context.count / count, 1 / 18); + var div = document.createElement('div'); + var Hue = 180 - factor * 180; + var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; + var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; + var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; + var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; + div.style.backgroundColor = bgColor; + var size = Math.round(30 + Math.pow(context.count / count, 1 / 5) * 20); + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.style.boxShadow = '0 0 5px ' + shadowColor; + div.innerHTML = context.count; + div.style.lineHeight = size + 'px'; + div.style.color = fontColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); + context.marker.setContent(div) }; - var labelMarker = new AMap.LabelMarker({ - name: item.name, // 此属性非绘制文字内容,仅最为标识使用 - position: [item.location.x,item.location.y], - zIndex: 16, - // 将第一步创建的 icon 对象传给 icon 属性 - icon: icon, - // 将第二步创建的 text 对象传给 text 属性 - text: text, - }); - labelMarker.on('click', (e)=>{ - // console.log(item) - let markerContent = - `
-
${item.name}
-
-
单位性质:
-
消防负责人:
-
-
-
防火级别:
-
消防管理人:
-
-
-
防火管辖:
-
防火监督员:
-
-
-
责任队站:
-
总建筑面积:
-
-
-
建筑信息分类:
-
总占地面积:
-
-
-
值班电话:
-
-
-
基本信息
-
导航
-
全景漫游
-
三维场景
-
查看预案
-
分享
-
-
` - // 创建一个自定义内容的 infowindow 实例 - this.infoWindow = new AMap.InfoWindow({ - position: [item.location.x,item.location.y], - offset: new AMap.Pixel(0, -30), - content: markerContent, - }); - this.infoWindow.open(this.map); - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#baseInformation'),'click',(event)=>{ this.baseInformation(item) })//基本信息点击事件 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#route'),'click',(event)=>{ this.route(item) })//导航点击事件 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#fullViewNavigation'),'click',(event)=>{ this.fullViewNavigation(item) })//全景漫游点击事件 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#threeeScene'),'click',(event)=>{ this.threeeScene(item) })//三维场景点击事件 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#seePlan'),'click',(event)=>{ this.seePlan(item) })//查看预案点击事件 - this.renderer2.listen(this.elementRef.nativeElement.querySelector('#share'),'click',(event)=>{ this.share(item) })//分享点击事件 + var _renderMarker = (context)=> { + var content = ``; + var offset = new AMap.Pixel(-15, -25); + context.marker.setContent(content) + context.marker.setOffset(offset) + } + this.unitCluster = new AMap.MarkerCluster(this.map, unitMarkerArrcluster, { + gridSize: gridSize, // 设置网格像素大小 + renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 + renderMarker: _renderMarker, // 自定义非聚合点样式 }); - markerArr.push(labelMarker) - }) - this.unitlabelsLayer = new AMap.LabelsLayer({ - zooms: [3, 20], - zIndex: 1000, - // 该层内标注是否避让 - collision: false, - // 设置 allowCollision:true,可以让标注避让用户的标注 - // allowCollision: true, + this.unitCluster.on('click',(e)=>{ + if(e.clusterData.length == 1){ + let item = e.clusterData[0].data + let markerContent = + `
+
${item.name}
+
+
单位性质:
+
消防负责人:
+
+
+
防火级别:
+
消防管理人:
+
+
+
防火管辖:
+
防火监督员:
+
+
+
责任队站:
+
总建筑面积:
+
+
+
建筑信息分类:
+
总占地面积:
+
+
+
值班电话:
+
+
+
基本信息
+
导航
+
全景漫游
+
三维场景
+
查看预案
+
分享
+
+
` + // 创建一个自定义内容的 infowindow 实例 + this.infoWindow = new AMap.InfoWindow({ + position: [item.location.x,item.location.y], + offset: new AMap.Pixel(0, -30), + content: markerContent, + }); + this.infoWindow.open(this.map); + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#baseInformation'),'click',(event)=>{ this.baseInformation(item) })//基本信息点击事件 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#route'),'click',(event)=>{ this.route(item) })//导航点击事件 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#fullViewNavigation'),'click',(event)=>{ this.fullViewNavigation(item) })//全景漫游点击事件 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#threeeScene'),'click',(event)=>{ this.threeeScene(item) })//三维场景点击事件 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#seePlan'),'click',(event)=>{ this.seePlan(item) })//查看预案点击事件 + this.renderer2.listen(this.elementRef.nativeElement.querySelector('#share'),'click',(event)=>{ this.share(item) })//分享点击事件 + } + }) }); - this.unitlabelsLayer.add(markerArr); - this.map.add(this.unitlabelsLayer);//增加图层 - - this.unitMarkerList = markerArr - this.map.add(this.unitMarkerList);//将markers添加到图层上 + } - //取消单位markers - clearUnitMarker(){ - this.map.remove(this.unitlabelsLayer) - this.map.remove(this.unitMarkerList); + //取消显示单位 + resetUnit(){ + this.keyUnitForm.reset() + this.keyUnitForm.controls.areaUnit.setValue('-1') + this.map.remove(this.circle) + this.unitCluster.setData([]) } - //水源提交 waterSubmit(value){ if(this.markers.length == 0){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请先选择一个单位','确定',config); + if(this.selectedWaterList.length != 0){//勾选了水源类型 + let paramsdata:any = { + PageSize:99999, + WaterSourceTypes : this.selectedWaterList + } + this.http.get("/api/WaterSources",{params:paramsdata}).subscribe((data:any) => { + console.log('所有水源',data) + this.createwaterMarker(data.items) + }) + }else{ + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请勾选想要显示的水源类型','确定',config); + } }else if(!this.mapPattern){ const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('请切换2D模式使用此功能','确定',config); }else{ - this.createwaterMarker() this.circleofwater.setRadius(Number(this.waterAreaDefault)) this.circleofwater.setCenter(this.markers[0]._position) this.circleofwater.setMap(this.map) + let Distance + let lnglat = new AMap.LngLat(this.selectedUnit.location.x, this.selectedUnit.location.y) // lng, lat 替换成传入的坐标 + + //如果选择当前的视野范围算出查询半径 if(this.waterAreaDefault == '0'){ this.circleofwater.setRadius(this.Calculationofdistance(this.map.getBounds())/2) + Distance = Math.abs(lnglat.offset(0, this.Calculationofdistance(this.map.getBounds())/2).lat - this.selectedUnit.location.y) + }else{ + Distance = Math.abs(lnglat.offset(0, this.waterAreaDefault).lat - this.selectedUnit.location.y) + } + //如果选择全部 + if(this.waterAreaDefault == '-1'){ + if(this.selectedWaterList.length != 0){ + let paramsdata:any = { + PageSize:99999, + WaterSourceTypes : this.selectedWaterList + } + this.http.get("/api/WaterSources",{params:paramsdata}).subscribe((data:any) => { + console.log('所有水源',data) + this.createwaterMarker(data.items) + }) + }else{ + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请勾选想要显示的水源类型','确定',config); + } + + }else{ + if(this.selectedWaterList.length != 0){ + let paramsdata:any = { + PageSize:99999, + Lon : this.selectedUnit.location.x, + Lat : this.selectedUnit.location.y, + Distance : Distance, + WaterSourceTypes :this.selectedWaterList + } + this.http.get("/api/WaterSources",{params:paramsdata}).subscribe((data:any) => { + console.log('所有水源',data) + this.createwaterMarker(data.items) + }) + }else{ + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请勾选想要显示的水源类型','确定',config); + } } } } - waterIconList = []; //展示的水源图标 + //取消显示水源 + resetWater(){ + this.watertForm.reset() + + this.watertForm.controls.areaWater.setValue('-1') + + this.map.remove(this.circleofwater) + this.waterCluster.setData([]) + } //循环渲染出所有水源markers - createwaterMarker(){ - this.waterIconList.forEach((element,index) => { this.map.remove(element) }); //先删除所有标点 - this.waterIconList = [] - let waterType = this.selectedWaterList //筛选出展示的 水源类型 - if (waterType.length) { - let x = JSON.parse( JSON.stringify(this.markers[0]._position[0]) ) //中心标注的 坐标 - let y = JSON.parse( JSON.stringify(this.markers[0]._position[1]) ) //中心标注的 坐标 - let positonList = [0.015, -0.035, 0.045, 0.061, -0.013, 0.029] - // 创建一个 Icon - let startIcon = new AMap.Icon({ - image: '../../../assets/images/fireHydrant.png', - imageSize: new AMap.Size(20, 20), - }); - positonList.forEach((item,index)=>{ - let marker = new AMap.Marker({ - map: this.map, - position: index%2==0? JSON.parse( JSON.stringify([x+item,y-item]) ) : JSON.parse( JSON.stringify([x-item,y+item]) ), - icon: startIcon, - }); - this.waterIconList.push(marker) + waterCluster:any //水源聚合实例 + createwaterMarker(list){ + let waterMarkerArrcluster = [] + this.waterCluster ? this.waterCluster.setData([]) : null + list.forEach((item) => { + let image + if(item.waterSourceType == 0){//消火栓 + image = '/assets/images/市政消火栓.png' + }else if(item.waterSourceType == 1){//消防水池 + image = '/assets/images/方形储水池.png' + }else if(item.waterSourceType == 2){//天然水源 + image = '/assets/images/天然水源.png' + } + // 用于点集合的数组 + waterMarkerArrcluster.push({ + lnglat : [item.location.x,item.location.y], + image : image, + data : item }) - positonList.forEach((item,index)=>{ - let marker = new AMap.Marker({ - map: this.map, - position: index%2==0? JSON.parse( JSON.stringify([x+item,y+item]) ) : JSON.parse( JSON.stringify([x-item,y-item]) ), - icon: startIcon, - }); - this.waterIconList.push(marker) + }) + this.map.plugin(["AMap.MarkerClusterer"],() => { + var gridSize = 60 + var count = waterMarkerArrcluster.length; + var _renderClusterMarker = function (context) { + var factor = Math.pow(context.count / count, 1 / 18); + var div = document.createElement('div'); + var Hue = 180 - factor * 180; + var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; + var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; + var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; + var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; + div.style.backgroundColor = bgColor; + var size = Math.round(30 + Math.pow(context.count / count, 1 / 5) * 20); + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.style.boxShadow = '0 0 5px ' + shadowColor; + div.innerHTML = context.count; + div.style.lineHeight = size + 'px'; + div.style.color = fontColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); + context.marker.setContent(div) + }; + var _renderMarker = (context)=> { + var content = ``; + var offset = new AMap.Pixel(-15, -25); + context.marker.setContent(content) + context.marker.setOffset(offset) + } + this.waterCluster = new AMap.MarkerCluster(this.map, waterMarkerArrcluster, { + gridSize: gridSize, // 设置网格像素大小 + renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 + renderMarker: _renderMarker, // 自定义非聚合点样式 + }); + this.waterCluster.on('click',(e)=>{ + if(e.clusterData.length == 1){ + + } }) - } else { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('请选择水源类型','确定',config); - } + }); + } //计算两地距离 @@ -442,24 +527,9 @@ export class GisLabelingComponent implements OnInit { } } - //取消显示单位 - resetUnit(){ - this.keyUnitForm.reset() - this.keyUnitForm.controls.areaUnit.setValue('0') - this.map.remove(this.circle) - this.clearUnitMarker()//取消显示单位markers - // console.log('取消') - } - //取消显示水源 - resetWater(){ - this.waterIconList.forEach((element,index) => { this.map.remove(element) }); //先删除所有标点 - this.waterIconList = [] - this.watertForm.reset() - this.watertForm.controls.areaWater.setValue('0') - this.map.remove(this.circleofwater) - // console.log('取消') - } + + //右上角点击每一个title clickTitle(index){ @@ -482,15 +552,6 @@ export class GisLabelingComponent implements OnInit { loadChange(e){ e.checked ? this.map.add(this.roadNetLayer) : this.map.remove(this.roadNetLayer); } - // floorLayer = new AMap.Buildings({ - // zooms: [16, 18], - // zIndex: 10, - // heightFactor: 2 //2倍于默认高度,3D下有效 - // }) - //楼层图层 - // floorChange(e){ - // e.checked ? this.map.add(this.floorLayer) : this.map.remove(this.floorLayer); - // } @ViewChild( 'appLeft',{static: false} ) appLeft:any //子组件 leftDivState:boolean = false; //左侧工作区显示隐藏 @@ -556,19 +617,6 @@ export class GisLabelingComponent implements OnInit { that.map.setCity('上海市'); AMap.plugin(["AMap.RangingTool", "AMap.MouseTool"],function () { that.mouseTool=new AMap.MouseTool(that.map); - /* that.measureDistance = new AMap.RangingTool(that.map, rulerOptions); //测距离 - that.measureArea = new AMap.MouseTool(that.map); //侧面积 */ - /* that.measureDistance.on('addnode',function(e){ //监听测距离 标点事件 - that.distanceList.push(e.marker) - }) - that.measureDistance.on('end',function(e){ //监听测距离 连线事件 - that.distanceList.push(e.polyline) - }) */ - /* that.mouseTool.on("rightclick",function(e){ - if(this.mouseTool.eventsList[1]==undefined){ - alert("000") - } - }) */ }); } @@ -1093,7 +1141,6 @@ export class LookPlanDialog { } this.http.get("/api/PlanComponents",{params:paramsData}).subscribe((data:any)=>{ this.allPlanComponents = data.items - // console.log(this.allPlanComponents) }) } //查看预案 @@ -1137,7 +1184,6 @@ export class LookPlanDialog { dialogRef.afterClosed().subscribe( data=>{ if(data){ - // console.log(123,data) this.downloadFileName = data.fileName this.download = data this.downloadFile() 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 e461b35..a574865 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -332,44 +332,44 @@

{{item.PropertyName}}

{{item.PropertyName}}

- - + +

{{item.PropertyName}}

{{item.PropertyName}}

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 b776406..ba10c1b 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -661,6 +661,7 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvas.on("select",obj=>{ //选中素材属性注入函数 this.setAssetsProperty(obj.assetData) + console.log(obj.assetData) }) // 监听canvas组件取消选中素材事件 this.canvas.on("deselect",obj=>{ @@ -1258,6 +1259,7 @@ export class CollectionToolsPlanComponent implements OnInit { //点击数节点的显示隐藏icon clickLookItem(node){ + //修改真实素材islook属性 for(let key in this.storeyData.data){ if(key == node.id){ diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 58b9396..04fe06a 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -334,44 +334,44 @@

{{item.PropertyName}}

{{item.PropertyName}}

- - + +

{{item.PropertyName}}

{{item.PropertyName}}

diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index 19402a6..0a5f53f 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -304,6 +304,7 @@ //右侧消防要素 .firecategories{ position: relative; + background-color: #fff; display: flex; flex-flow: column; .firecategoriesTree{ diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index b101e13..b360f15 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -1217,10 +1217,9 @@ export class CollectionToolsComponent implements OnInit { if(selectPanelPoint.Data){ for(let key in selectPanelPoint.Data.Stock){ selectPanelPoint.Data.Stock[key].isLookPattern = true + selectPanelPoint.Data.Stock[key].isLook = true if(element.id == selectPanelPoint.Data.Stock[key].FireElementId){ selectPanelPoint.Data.Stock[key].isTemplate = false - selectPanelPoint.Data.Stock[key].isLook = true - element.isNewElement = true //该节点children是否存在新添加的真实素材 标识 //定义查看模式下能看到的元素 @@ -1276,13 +1275,19 @@ export class CollectionToolsComponent implements OnInit { //点击数节点的显示隐藏icon clickLookItem(node){ - //修改真实素材islook属性 for(let key in this.storeyData.data){ if(key == node.id){ this.storeyData.data[key].isLook = !this.storeyData.data[key].isLook } } + if(this.selectPanelPoint && this.selectPanelPoint.Data){ + for(let key in this.selectPanelPoint.Data.Stock){ + if(key == node.id){ + this.selectPanelPoint.Data.Stock[key].isLook = !this.selectPanelPoint.Data.Stock[key].isLook + } + } + } //所有消防要素模板变化islook值 if(node.isTemplate){ @@ -1395,7 +1400,7 @@ export class CollectionToolsComponent implements OnInit { this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) } } - let selectPanelPoint = JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint || {} )) //当前 节点 数据 + let selectPanelPoint:any = this.canvasData.selectPanelPoint || {} //当前 节点 数据 if(selectPanelPoint.Data){ for(let key in selectPanelPoint.Data.Stock){ //筛选数据 没有匹配全部放入到 其他 数组 let noMatch = this.allFireElements.find( every=> every.id===selectPanelPoint.Data.Stock[key].FireElementId ) diff --git a/src/app/ui/collection-tools/save.ts b/src/app/ui/collection-tools/save.ts index 1657b66..0cd4303 100644 --- a/src/app/ui/collection-tools/save.ts +++ b/src/app/ui/collection-tools/save.ts @@ -57,11 +57,13 @@ export class saveOneDialog { @Inject(MAT_DIALOG_DATA) public data) {} type = this.data.type - allDisposalNode = this.data.allDisposalNode - allPlanDisposalNode = [] + allDisposalNode = this.data.allDisposalNode//所有节点数据 + allPlanDisposalNode = []//所有非数据节点 allRootDisposalNode = [{name:"根节点",id:null}] allDisposalNodeChild = [] + defaultSelectedName = '根节点' ngOnInit(): void { + console.log(111,this.allDisposalNode) //所有非数据节点 this.allDisposalNode.forEach(item => { if(!item.sitePlanId && !item.buildingAreaId){ @@ -89,10 +91,9 @@ export class saveOneDialog { onNoClick(): void { this.dialogRef.close(); } - nodeItem - itemChildNum = 0 //点击处置节点子数据节点的数量 + nodeItem:any//当前选中的要保存到的父节点 + itemChildNum = 0 //点击处置节点子数据节点的数量(赋值order) clickNode(item){ - // console.log(item) this.nodeItem = item this.allDisposalNodeChild.forEach(item => { if(item.id == this.nodeItem.id){ @@ -150,6 +151,10 @@ export class saveOneDialog { // 保存平面图数据到当前节点 let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) postdata.Data = JSON.stringify(postdata.Data) + postdata.Version ? null : postdata.Version = "2.0" + postdata.DisposalNodeId ? null : postdata.DisposalNodeId = istrue.id + postdata.PlanComponentId ? null : postdata.PlanComponentId = sessionStorage.getItem("planId") + postdata.Id ? null : postdata.Id = '' this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { this.maskLayerService.sendMessage(false) const config = new MatSnackBarConfig(); @@ -173,7 +178,6 @@ export class saveOneDialog { resolve("更新处置节点成功,将天气 节点详情等信息保存到点击的节点") }) }).then((values)=>{ - // console.log(values) postdata.level = putdata.level + 1 new Promise((resolve,reject) => { this.http.post(`/api/DisposalNodes`,postdata).subscribe(data => { diff --git a/src/app/ui/collection-tools/saveTwo.html b/src/app/ui/collection-tools/saveTwo.html index fec97ff..ad8f075 100644 --- a/src/app/ui/collection-tools/saveTwo.html +++ b/src/app/ui/collection-tools/saveTwo.html @@ -11,7 +11,7 @@
- + {{item.name}} diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 04d2c17..73adefd 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -315,7 +315,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.app.stage.addChild(this.grid); this.grid.drawGrid(); this.grid.onMousemove = (evt, gridCoord) => { - console.log(gridCoord); + // console.log(gridCoord); }; this.createBackgroundImage(); diff --git a/src/assets/images/其他.png b/src/assets/images/其他.png index 5b0bcbc6788b7486e3dee94f427b28128fa5d6f8..678a7dce1e5805469eb4e93250c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3um#r`becCX=PrKEB_Z@h? zmt905w!(K!kH5a+9-g>!c61NjD~;$BSX%@hEFu*&T^?N=eZJU(7-A!UdM|DGNl2pP zNDvV~bAF8>yoK7b4@_=E1kewrq00re_2d#nU}P6SJw*>OZm!pOrCQhpv;|+AN<0hL z1>6=CkYp)!gZxDeK1t4&u00d4HfWV0Y5I9kQQ!Rx) d%17U&(r-Y@3g;l--@^a^002ovPDHLkV1n~EK_LJD diff --git a/src/assets/images/古建筑.png b/src/assets/images/古建筑.png index 0d3c068c02a3a28dd142748f3b78fbde1bcd612b..7329c511dc9ce1c220ef5c25b7a9976757eb6709 100644 GIT binary patch literal 2298 zcmbVO2~-nj9-n}K3W%)K#&S4}3k4;|BqWe|M2>`#v_=A?iq)!I&U%UD^ppp6%W*v_p#Gw3U#SI2Zv904b>@42l&IJZL2fNJ%8D=z4yDcnQ%Vqlz(MdRSmLl#98#i%hIkQS?b((=;1Gl_(n9GTfndJL z4C-i>098`81cMV*V3I}(tCfiwO#-Np!^tvvvJ6&AU^S8`M-&Qhf#stGYNGUJ)FhxlAx)#38?m<}9TQAX_ z(>&HNh>j&to@OmHZ66Jkc~oUkr}G3x1IEoIDV%n4@lV_#^e9hgA%$E4OXRRbp|rqq zBrzFLsAtHN5xIOAYNBz{R{9&zMCH$*Le}6YkNzPT#}FIMI#9u8(t#EbGKMOEK(8ke z9c`ysL9n2m^2vRpPG@Fm8)+8~xZJD^(3q)H!y2_(qL9Kv>Y7Z5k>Yri!U&^Y3km*_ zk|d5KqbLEZQCyHwxm6)iS=E{(Or=pMVe9C9J&hH6vS9Q+{(s)jW=Ww6 zQTw0f@zka#eGmi534tvgsh&Jy>B!1XfVN+zkv~uX|i4q@$3w^`0^foNv!`t!*O6YT} z(9i}>`R)e*-!(>kx}~Jy-nQ)QN$KLQH|F*Jy*p}2vLPr|^TO zi9f)sq!%wANb8uGJ8SO-#<40Y$kOz*=Ha*vUE(iK?~aC_>lx@zJMme?vSoLUG=6jc z;MMKU*UN3!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RN-~^#e zoDGkpxVLRIdVgIz4wm?}1PufH;|AzwZAR z2OCgCDFm81*e%1aXoP`U51`r;_!$`nXQEpwUl~~dN`EJ^AWFgSa2q)#W=Fkzq!8dT zH_w%xa(s=II&$J!G5f#Eh6>P%c{%A&9$o!`sKA-HKCCPs7y@#x&2{%DoLb{0T&=PV zlwKTIBx%nDIv$fwP{&OR#S^)&iRXA+4>E-Y0bn_y0I(cEj}nJGi;BZW2qg!< z+*R00)qh=ecgUc!FF)kZJS2q_+?Xa$2k-+wOfyj{w01Aiw&0ZWV7K_`aK1_O~6+53g}dxOrZ z{WjROD(hENR*S<05m-(r04ygI0G6ZwPf=aYo(Jad0#_G-sf*2HUq1t1czgX4`2Gzh zF)M&HdU>5iIM;c6dbYX6=73i(fP;OQ!khro>&uUaUn6_RJr?Na58&fln83^!Fm(yI z^;Tf?>!naq3ff)fV&qA5GMVP>h0Mi-*$gnX$SO~##LIGeo np#ZR)Pykp?C;%+SdIA0b-qZHT-?kul00000NkvXXu0mjfshNB@ diff --git a/src/assets/images/轨道交通.png b/src/assets/images/轨道交通.png index 9d2483a4b4edd16a945d96b2ef342fcb6423b74f..2d2f97da8df65941588c8ecd1816fc0a559ac92f 100644 GIT binary patch literal 2610 zcmbVO3se(V8omjHmm;j7fFg{MqG=nF2}vLWQ7{1$G!zjPDpiNc1R_Z$B*6r&GNK}` z77?s#0RgKh6<47`6_JMuK6bUj3W|?f5Np?}TdTELMCk;OWB0WC=$tci?|<)izyERn z|39-iCVGyu(+4`geGjVBZc~G!UY1}4V2qpfrGdg?PXHL+>bQ7Q zykZ`L5!wJ$NhIL`7OkE_0}wjPqDQe*+yo`z$!eXL`F(v86H+V1%*6r)SD}~SDQej& z1HNEYbR4!S6%#3$vt~k}7K9?u;wBWbXf-+`Vi7ZkcoAxDUFI;MA&4ne%nY|GgyI!3 zkc2SckRU+F#$dhx3K9jt!a%-A^e)8X!oeJFFb57~!$O45MR+`D5ylkacc@3Vf2Dv5twJ%X<2P;5Y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100644 index 0000000000000000000000000000000000000000..d3378a4bf0022c44541649dd2b9213a909330bd7 GIT binary patch literal 786 zcmV+t1MU2YP)CwlY7^Dr#r_04K5znV=vjRTpW>oPR6|8)z&o zr0N7=BG`!3PD>Sqc7wGPbkt2LokhiBKk%cZ46MyfZ|;$MYi2sx`R|W)NdH_bF8MUC$&XVH+mrA2ZAC@eh&;N7!f!b%jiBvFlgE} z{{r;Nx>JJeOExAf#k5Qhnh5i~Q@A%UM06zXTq`A4jEUYa2^O0UK(D-5E@%u#mq&h1Cf{EFi>9uA2cjU3lKG+sE*%t6H8wP1S?pUjm-6KWe14{xmhyGDT^b)( z-Jo^Gn>6kz#^3M1*0s~}=sD?WV-f%d&}7dkXQIyOFFv7gMmB-QyWD&* zKxlKJt$>QgyR7%+653Qq=d*vKAhyC|NE`Z zGt-YY@bXoRqa}-2n3u)g`r8Z+$8C7EP;ucSU2{D`NoL7hFRKf3@n7x0<4R-ef*B6r zN@pL2nc#=g#oX_U($Lv&&&ITng^nxSfx1dfFsm#)T=_;Q1yp3%A+>QVirdaYnsRn*6TJ#JPCYj;>Vr8+e%y{k`tf Qr2qf`07*qoM6N<$g0W0>j{pDw literal 0 HcmV?d00001 diff --git a/src/assets/linkageForces/公安.png b/src/assets/linkageForces/公安.png new file mode 100644 index 0000000000000000000000000000000000000000..cb3a71ce38a4229e0ed72ae24316dc1ecea8ef95 GIT binary patch literal 943 zcmV;g15o^lP)p;oO~(# zPs#Fxv^0Kh&*ZPka8+k5Z5{T(=ALK1Gnt-B{d=7HXM+$z#ZSLAFm`_WMM2Ap4Q>H~ z(~5#(L3Tz_H*fL&?CgHwd5l;fUyW_O3r@WKM;Df%{AnB)407dcUWXh>apWhcR&*j(j+evt$rVKtfdn#6~mNLLK#J2K%*b*x47r ze(x1rC#vPfVqe;t3msu$>*nU_*$DPaQl(O(?We5U?l-G?rHyM0S+Aur- z*c&a-7G@W@(4J;0GdZxOoERV0a|@uE8g7|ZVdTOLe)>(q#?}&A+$uglBf&svc=J^r zJG?hQ2!Zg36TBzbLlHvwO!U1mIg#k1lnS(R1@`qT!74fEbp~2R1?_Nv;TV+TccBpm zj3mGs@LjR5{$%s=7s}787!lNqBVdKKtqEvR|IV|fOAODHGnpVvMJEs zZE5a{Edzv%8jH6tovam7yQ=8|h*|?`DrlaEUR(ra-~ho0)*`~_X{u8O>si(43cFmd zlpYGx)RzY~P;725&EQGa!1x%N7H9)Y)meUlcQ_YRtv-^K)uGOv{jvLD`U^+YYbhB~ ReX{@n002ovPDHLkV1n?iv{?WE literal 0 HcmV?d00001 diff --git a/src/assets/linkageForces/医疗.png b/src/assets/linkageForces/医疗.png new file mode 100644 index 0000000000000000000000000000000000000000..61d8034547434d694f372adfbb76619807716636 GIT binary patch literal 839 zcmV-N1GxN&P) zYem%nWmCLkl78hB1KC}(+FA@i|T_^T57GDc_pPj zL`9jcEYhVFWd%w>1u=1(w{3Z;+}swMTfC3;W`5~>d(Lyt?>TUO4}}?_iwKRPLqiJr zD`S(mVzGj`cAHHG`IA|Apm`Hd_(Z{n^|nL+lArM)A-&{2T&A*TX#TwvKSm+-@lOE8I22CwAs{` zMe~#>P?8LQ#^T= zL;3i?<87(BdF?Y&HZQJOYlN9~iNWYZL1! zU4%3$=-lOx>>9mZSWX>>{kax0bsYhWUakOFXw8;Svc>A`oJz^ESBM#^sUd$N0$aA-f<${T;Xrb*Sb`}13G|Dpdga(gyCl1I#@?}v17ye zK9{*Dibydr8IO|29=M{jBPa6)yz{)^tQ4G`f`)P+9tQLRkOR^z9$b}x+~NeRe58h< z`f)y?QBha-Y#)_0w^@NHC6__9JmBzELqFITN&+JJG$G*IB-HF$fx9F7@ON?34Pu); z(N>Wb7dh+tTTCvk?3bJYp0x__m0l1RAg+=@DDm`5&KRn*l5u;&Fr?;HKPUFMXxrZO z@W}bs?U-+Q_;qIfci%@ecwUU*Tr^OIc7=wmfX^_=Zndu;={O4j7;b z0-Rl7G8rHjK>B(H?k*loMRT|UX-68ZM2d^wb>NS{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chg+`?(u&CAooAD TV1yZR00000NkvXXu0mjf&q#8$ literal 0 HcmV?d00001 diff --git a/src/assets/linkageForces/应急管理.png b/src/assets/linkageForces/应急管理.png new file mode 100644 index 0000000000000000000000000000000000000000..3cd54b850ce91319c687801e1bf126784d03cf18 GIT binary patch literal 901 zcmV;01A6?4P)ariQMq2#=_(w^a z3kMq|r=_f^tY&llxFv(OenCQjC|vGl;(_){gyZhM-}^r8&Q<91$Fn`p^ZvZHXM4W{ z_bjtVu5qry>nWmq#eJ+!JYTy>uz!f&z)jlJFU9cU5%J%lOj_3G(7wBpnynkbXtt;M}4HWwoyC)=7NIoV<678GuW74A<{2~OMi=uJVs<1+gE1l@z> z>}s{;iO06d&Vd7cyHczcZi#j5>s;W{RfR332A=U4l3zLTRh)C*tE_oQqiKhorTP$B zY>vV`r5&QKRZbqM3pml|`Q*p7G_*-xtJc_9Y~j!HLYJBT;V3P~&9r(IDvHJt ziizEwu7GGdCe^)94;Y1FX77nSy3R=sy{L2GW5`|^$DXQk@k$B})q?tW4R|Y|rRoyI zBkcdINJ|3tZ5cOWu<}mND!%?{fu@~S7NU~p4+_$ks2<4b z#3yS1uW}w|yWi5w9kwat>@XrF17XbqT}4J`kddn>%N{2*mrYfZ@b`}{s`9@+6s)Gb zp^BQyGO(EMmPw04w;v9l!Z-Nqy)rGznmn?=nT2tzg}M00000NkvXXu0mjfF_ODB literal 0 HcmV?d00001 diff --git a/src/assets/linkageForces/民政.png b/src/assets/linkageForces/民政.png new file mode 100644 index 0000000000000000000000000000000000000000..790924f3ab1304d90dc5caaccc330a0ad9b2d2f2 GIT binary patch literal 827 zcmV-B1H}A^P)ugd)*ow2# zMX4#d(PB|FlwK4s)J8;5u(OPo>bwwiTkA)v)hd4Eea4#?r+6`TZVu;g{=f5ozJ!mK zHaCB1cAseA^DnBIHOnQ2Av!Vfw~miz9o5xINvDTCl*qe-syfWotACXF^Y_ry^eH|c z8jr)s2y}EHxg7fQPk9~uE$!I1FDl{il%*{IEOFlNKg!mvwRk)jB_%d@`SQZ1i3Adh zVV*q;xyR_q?tW)``?nGZJSza+`2BGs7;K@m6uo~RsjNiG%FxDWodOZe>(`Ol zv(dYE;n1NT=jiBmd3o%ZyQr^kR9jm=vFu7k1+=xn#fuOO!h!|R)rGEDfsszzE{cnh z3l}hRxvwR^?5kfm-WAnHj}WI5u>@W(>hU0hgLVjhKXUad98aMeH=tLpAm!yqDAX@` zulILOpI%8ei)`8i4mXVxBt(GiSo#!w)21RrORdna_Cf z0$H>Oy>Y_^oIC;Fg=|1J3xR+QsH;OKCSYhxw*7J@9+O_z^_T9z77qAP_GvT1|G}XB}-BgiR_R}1`ZxXi;BSd;rj*% zM+)V$LePc=B(@vo%|#C!fK{uIOP4Oo>&C_k$H?#?fBt1ySywCOKmd)!Fz($e0Mxe@ zjVF-v=aE;hP?rncyxB_lH-$!eTfQa002ovPDHLk FV1l%9jU500 literal 0 HcmV?d00001 diff --git a/src/assets/linkageForces/气象局.png b/src/assets/linkageForces/气象局.png new file mode 100644 index 0000000000000000000000000000000000000000..654a1987e287ee5e44c95100423bf71e218ac3cf GIT binary patch literal 901 zcmV;01A6?4P)y&NZf-bKso!ymvcqbHko*&-UEcuHXG!m+-%{ zeZP7)4_gfnX6jRgIhtV_BI6hJ?}-_Hd~c8y7bS&BR&rNx8dA?$pu(sMHFGDa5 zIRBUO#r`<6b8z+&q`294c!Rq(J6j@-K*joK&sb1f$_wH2IXKzvq9EJ24epPtHf1ew zO7fLs0r2M;y<^=;tNyh`q(F-xc{7Vb$E+ILy( zIjocyDo4g8TDL;Wq^K#nIe3MpByCD`zzgtri+#*89o*30-CM9_W-;Y_0{;ItD+Mp;%1>u)Y93B3Q=ISY8MJ7A!Nf3xiVtG^IV-c0Qy&c) zCcepSE?lP2w$q~Hb(6UWd^u{-^t_9i>*}~0I$^PLs{MHov*Fdp z43;i2aJyh`-sWgPIXR(B&IrkF-S_oIckQFMqMQ&pr<&ZpDc1Shd0ms@!EMEz@;GHl zO;yB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png new file mode 100644 index 0000000000000000000000000000000000000000..21d6bbdcdcb54be773f4d310da1bbf8eb172c1ee GIT binary patch literal 1068 zcmV+{1k?M8P)*m_j1`1!Be#s^=2H}$~bOo70@3E2DFsq)m|*gwA0 zb{s`Lloy}iXs_l~?1vBnHKGO;pn`h2vAk@;ZqE0{$w%^p-1=_)aGECj@G($1)D){V z>rxGl#X^^J4U_tbI)&llh6_V2RaU2U8$uzNH_7haC6yhWpE2b2J=X4G5-d*|FR~GE z$zdRGuT$BfJ8XVwA(la-Pwz~4NqwZVw$Hid;^hS-%V>b^Y%&kD0u*%>CFdoLPffhN z=(44X{I_U17()+=d(Kr48MIa=N@R!n1eW*D-`hQ5oh=F>d1D5-CT8Qskn;sM4Gv3k zgm>UiuY{*p4nEX=zT~#)q(L!u@W!?3Zy&9iquC6vw&J**7ZtzP+?aJ*BM^#0#J<5A z2%&r0W-NpV0RA}3cq#8hOm*)CmB+m%;nO)QKz2o4OQ0B=hG3RBKhfC+?bTMJ%Nh|# z^BUvQSu=c+dsDw+mQ6bsw(<$~?7@^br6W^+9awfcV!W7a9Z=q=ukSV9O-E6%T9u)c zmvqz>KXg3a_g-Q_k!jVo3;_i=7<={7=r0;yoZb0Js^a~sp&v9Z%EOoP#KWMl^|ZTMgH=y~SB3-XJE{Tf2Os=fsN=fFu+e;68&fo4*L)E5pDLu9cfDq!ZUQvJXOxUwErxIS%E86ReBe}uL6P5>2 zI7+O$C=bD;G10p1MXJ*?J%L@fx<2|eO{tPRsqzLyr_&L~N1Km0aZ3L|lA_sc8ugj7 zm}xjhLm3p}@bdL{{%q*W0uFbqJUpi=QzH3Srl<8RY5g+Zkqp%U literal 0 HcmV?d00001 diff --git a/src/assets/linkageForces/电力局.png b/src/assets/linkageForces/电力局.png new file mode 100644 index 0000000000000000000000000000000000000000..69f21cdda2d3eb603ce4224b1abc3eafa47e477f GIT binary patch literal 920 zcmV;J184k+P)ctNfslgWZ2 z{t&`{KZ4BIy^v%i1J*YGI~}00&~-Y}qhdZ2*~N3+X@yEh69F#9#UnB!2|3ck2s!@C zzXHQ4%mDe*gouTHkcDkVF;#6O6-|vV6Xa)S@Ht%U3S5OvNr}imm6U# z*kChl(bx9{)Z1n#%I?Di0$bJ?$ig;WA<8Do>uGge%@jVLv2MN?*>`S11T@mspyBB0f3?TQ*+6sIZ+7P)bGsQlv< zvf`wuX==o=f~$Zv3t#}CX}EHDkcNh<7r1+hy##`ukyp~7*N?4js81`YtCmnLEmj>J zZ74jNiaS&lPTtIe9m@`ZGiM>tdw!lf&pF!H!{g(~XBvIk#kJKwJ)ewGtsiuYb=?N1 uAm6#fU^Mo885(+I?_hr}SmdJ`jsFY3l~bhn|Ke!?0000*mB{VC#IqL!`&dJs+&Li6s*0B|~C$xov@fL!uJgu1^bdqHIwIAkCm z;HJOw_RY||7gQmeg}^Gf_Y&TJ@!^$$ge4~>)~yj$CcIE}In Date: Sat, 23 Jan 2021 18:27:53 +0800 Subject: [PATCH 03/11] axSelection,axMessageSystem --- .../working-area/model/axImageShapeTest.ts | 11 - src/app/working-area/model/axLegend.ts | 1 - src/app/working-area/model/axMessageSystem.ts | 90 +++++ .../working-area/model/axRectangleShape.ts | 24 +- src/app/working-area/model/axSelection.ts | 48 +++ src/app/working-area/model/axShape.ts | 58 +-- src/app/working-area/model/messageSystem.ts | 37 -- .../working-area/working-area.component.ts | 347 +++++++----------- 8 files changed, 321 insertions(+), 295 deletions(-) delete mode 100644 src/app/working-area/model/axImageShapeTest.ts create mode 100644 src/app/working-area/model/axMessageSystem.ts create mode 100644 src/app/working-area/model/axSelection.ts delete mode 100644 src/app/working-area/model/messageSystem.ts diff --git a/src/app/working-area/model/axImageShapeTest.ts b/src/app/working-area/model/axImageShapeTest.ts deleted file mode 100644 index 81c141c..0000000 --- a/src/app/working-area/model/axImageShapeTest.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { AxRectangleShape } from "./axRectangleShape"; - -export class AxImageShapeTest extends AxRectangleShape{ - /** - * - */ - constructor(x:number,y:number,width:number,height:number) { - super(x,y,width,height); - - } -} \ No newline at end of file diff --git a/src/app/working-area/model/axLegend.ts b/src/app/working-area/model/axLegend.ts index a886fd3..f2158ac 100644 --- a/src/app/working-area/model/axLegend.ts +++ b/src/app/working-area/model/axLegend.ts @@ -429,7 +429,6 @@ export class AxLegend extends AxShape { */ public drawBorder(scale: number) { const visible = this.upLeft.visible; - console.log(visible); this.setPointVisiable(false); super.drawBorder(scale); diff --git a/src/app/working-area/model/axMessageSystem.ts b/src/app/working-area/model/axMessageSystem.ts new file mode 100644 index 0000000..1451f9c --- /dev/null +++ b/src/app/working-area/model/axMessageSystem.ts @@ -0,0 +1,90 @@ +/** + * 事件系统 + */ +export class AxMessageSystem { + /** 监听数组 */ + private static listeners = {}; + + /** + * 注册事件 + * @param name 事件名称 + * @param callback 回调函数 + * @param context 上下文 + */ + public static addListener(name: string, callback: () => void, context: any) { + const observers: Observer[] = AxMessageSystem.listeners[name]; + if (!observers) { + AxMessageSystem.listeners[name] = []; + } + AxMessageSystem.listeners[name].push(new Observer(callback, context)); + } + + /** + * 移除事件 + * @param name 事件名称 + * @param callback 回调函数 + * @param context 上下文 + */ + public static removeListener(name: string, callback: () => void, context: any) { + const observers: Observer[] = AxMessageSystem.listeners[name]; + if (!observers) { return; } + const length = observers.length; + for (let i = 0; i < length; i++) { + const observer = observers[i]; + if (observer.compar(context)) { + observers.splice(i, 1); + break; + } + } + if (observers.length === 0) { + delete AxMessageSystem.listeners[name]; + } + } + + /** + * 发送事件 + * @param name 事件名称 + */ + public static send(name: string, ...args: any[]) { + const observers: Observer[] = AxMessageSystem.listeners[name]; + if (!observers) { return; } + const length = observers.length; + for (let i = 0; i < length; i++) { + const observer = observers[i]; + observer.notify(name, ...args); + } + } +} + +/** + * 观察者 + */ +class Observer { + /** 回调函数 */ + private callback: () => void; + /** 上下文 */ + private context: any = null; + + constructor(callback: () => void, context: any) { + const self = this; + self.callback = callback; + self.context = context; + } + + /** + * 发送通知 + * @param args 不定参数 + */ + notify(...args: any[]): void { + const self = this; + self.callback.call(self.context, ...args); + } + + /** + * 上下文比较 + * @param context 上下文 + */ + compar(context: any): boolean { + return context === this.context; + } +} diff --git a/src/app/working-area/model/axRectangleShape.ts b/src/app/working-area/model/axRectangleShape.ts index 297ffdb..cf61f6c 100644 --- a/src/app/working-area/model/axRectangleShape.ts +++ b/src/app/working-area/model/axRectangleShape.ts @@ -1,21 +1,21 @@ -import { Sprite } from "pixi.js"; -import { Graphics } from "pixi.js"; -import { WorkingAreaComponent } from "../working-area.component"; -import { AxShape } from "./axShape"; +import { Sprite } from 'pixi.js'; +import { Graphics } from 'pixi.js'; +import { WorkingAreaComponent } from '../working-area.component'; +import { AxShape } from './axShape'; -export class AxRectangleShape extends AxShape{ +export class AxRectangleShape extends AxShape { /** * */ - constructor(x:number,y:number,width:number,height:number,assetData: any, workingArea: WorkingAreaComponent) { - super(assetData,workingArea); - this.beginFill(0x0000ff,1); - this.lineStyle(1, 0xff0000,1); + constructor(x: number, y: number, width: number, height: number, assetData: any, workingArea: WorkingAreaComponent) { + super(assetData, workingArea); + this.beginFill(0x0000ff, 1); + this.lineStyle(1, 0xff0000, 1); this.drawRect(x, y, width, height); this.endFill(); - - + + } - + } diff --git a/src/app/working-area/model/axSelection.ts b/src/app/working-area/model/axSelection.ts new file mode 100644 index 0000000..e61cd78 --- /dev/null +++ b/src/app/working-area/model/axSelection.ts @@ -0,0 +1,48 @@ +/** + * 选择器 + */ +export class AxSelection { + constructor() { + } + private objects: Set = new Set(); + // 获得第一个对象 + public first(): any { + if (this.objects.size > 0) { + return this.objects[0]; + } else { + return null; + } + } + // 获得所有对象 + public all() { + return this.objects; + } + // 获取集合长度 + public size(): number { + return this.objects.size; + } + // 添加对象 + public add(obj: any) { + this.objects.add(obj); + } + // 添加集合 + public addArray(array: any[]) { + array.forEach(item => { + this.objects.add(item); + }); + } + // 移除对象 + public delete(obj: any) { + this.objects.delete(obj); + } + // 移除集合 + public deleteArray(array: any[]) { + array.forEach(item => { + this.objects.delete(item); + }); + } + // 清空所有对象 + public clear() { + this.objects.clear(); + } +} diff --git a/src/app/working-area/model/axShape.ts b/src/app/working-area/model/axShape.ts index 27c1773..2d032d5 100644 --- a/src/app/working-area/model/axShape.ts +++ b/src/app/working-area/model/axShape.ts @@ -8,7 +8,7 @@ import { WorkingAreaComponent } from '../working-area.component'; */ export class AxShape extends Graphics { assetData: any; - pointTexture: PIXI.Texture = PIXI.Texture.from('assets/images/handle-main.png') + pointTexture: PIXI.Texture = PIXI.Texture.from('assets/images/handle-main.png'); workingArea: WorkingAreaComponent; // 可以被移动的 moveable = true; @@ -20,7 +20,7 @@ export class AxShape extends Graphics { showName = true; // 边框 border: PIXI.Graphics = new PIXI.Graphics(); - + constructor(assetData: any, workingArea: WorkingAreaComponent) { super(); this.border.visible = false; @@ -35,7 +35,7 @@ export class AxShape extends Graphics { .on('pointerdown', event => { event.stopPropagation(); if (this.selectable) { - this.workingArea.selection.selectOne(this); + this.workingArea.selectSingle(this); } if (this.moveable) { event.currentTarget.data = event.data; @@ -86,14 +86,14 @@ export class AxShape extends Graphics { }); } redraw(): void { - + } - refresh(): void{ - + refresh(): void { + } public setItemScale(scale: number) { - + } public showBorder() { @@ -110,10 +110,10 @@ export class AxShape extends Graphics { * @param value 显示状态 */ public setPointVisiable(value: boolean) { - + } /** - * + * * @param rect 画边框 */ public drawBorder(scale: number) { @@ -127,14 +127,14 @@ export class AxShape extends Graphics { this.border.lineStyle(scale * 1, 0x00a8ff); - var spaceLength = scale * 1; - var lineLenght = rect.width + 0.5 + 0.5; - var dashLength = scale*( lineLenght +spaceLength - Math.floor((rect.width + rect.height)/2 / 4.1))/Math.floor((rect.width + rect.height)/2 / 4.1); - this.drawDash(this.border, p1.x -0.5*scale, p1.y, p2.x + 0.5*scale, p2.y,dashLength,spaceLength); - this.drawDash(this.border, p2.x, p2.y -0.5*scale, p3.x, p3.y + 0.5*scale, dashLength, spaceLength); - this.drawDash(this.border, p3.x+0.5*scale, p3.y, p4.x - 0.5*scale, p4.y, dashLength, spaceLength); - this.drawDash(this.border, p4.x, p4.y + 0.5*scale, p1.x, p1.y - 0.5*scale, dashLength, spaceLength); - + let spaceLength = scale * 1; + let lineLenght = rect.width + 0.5 + 0.5; + let dashLength = scale * ( lineLenght + spaceLength - Math.floor((rect.width + rect.height) / 2 / 4.1)) / Math.floor((rect.width + rect.height) / 2 / 4.1); + this.drawDash(this.border, p1.x - 0.5 * scale, p1.y, p2.x + 0.5 * scale, p2.y, dashLength, spaceLength); + this.drawDash(this.border, p2.x, p2.y - 0.5 * scale, p3.x, p3.y + 0.5 * scale, dashLength, spaceLength); + this.drawDash(this.border, p3.x + 0.5 * scale, p3.y, p4.x - 0.5 * scale, p4.y, dashLength, spaceLength); + this.drawDash(this.border, p4.x, p4.y + 0.5 * scale, p1.x, p1.y - 0.5 * scale, dashLength, spaceLength); + this.border.lineStyle(0, 0x0000ff); // this.border.beginFill(0x00ff00,0.1); this.border.moveTo(p1.x, p1.y); @@ -145,19 +145,19 @@ export class AxShape extends Graphics { // this.border.endFill(); } // 画虚线 - drawDash(target, x1, y1, x2, y2,dashLength = 5, spaceLength = 1) { - let x = x2 - x1; - let y = y2 - y1; + drawDash(target, x1, y1, x2, y2, dashLength = 5, spaceLength = 1) { + const x = x2 - x1; + const y = y2 - y1; let hyp = Math.sqrt((x) * (x) + (y) * (y)); - let units = hyp / (dashLength + spaceLength); - let dashSpaceRatio = dashLength / (dashLength + spaceLength); - let dashX = (x / units) * dashSpaceRatio; - let spaceX = (x / units) - dashX; - let dashY = (y / units) * dashSpaceRatio; - let spaceY = (y / units) - dashY; + const units = hyp / (dashLength + spaceLength); + const dashSpaceRatio = dashLength / (dashLength + spaceLength); + const dashX = (x / units) * dashSpaceRatio; + const spaceX = (x / units) - dashX; + const dashY = (y / units) * dashSpaceRatio; + const spaceY = (y / units) - dashY; target.moveTo(x1, y1); - + while (hyp > 0) { x1 += dashX; y1 += dashY; @@ -200,7 +200,7 @@ export class AxShape extends Graphics { return new PIXI.Point(gravityLat, gravityLng); } // 计算线段中点坐标 - public getLineCenter(point1:PIXI.Point,point2:PIXI.Point) { - return new PIXI.Point((point1.x+point2.x)/2,(point1.y+point2.y)/2) + public getLineCenter(point1: PIXI.Point, point2: PIXI.Point) { + return new PIXI.Point((point1.x + point2.x) / 2, (point1.y + point2.y) / 2); } } diff --git a/src/app/working-area/model/messageSystem.ts b/src/app/working-area/model/messageSystem.ts deleted file mode 100644 index 322eef4..0000000 --- a/src/app/working-area/model/messageSystem.ts +++ /dev/null @@ -1,37 +0,0 @@ -class MyEvent extends CustomEvent { - public static readonly CMD: string = "EVENT_NAME"; - public constructor($type: string , $data: T ) { - super( $type , { detail: $data, bubbles: true, cancelable: true, composed: true }); - } -} - -class MyDispatch extends EventTarget { - private static _instance: MyDispatch; - public static get Instance(): MyDispatch { - if (!MyDispatch._instance) MyDispatch._instance = new MyDispatch(); - return MyDispatch._instance; - } - public send($data: T, $type: string = MyEvent.CMD): void { - const $event: CustomEvent = new MyEvent($type, $data); - this.dispatchEvent($event); - } -} - -class Test { - - public constructor() { - MyDispatch.Instance.addEventListener(MyEvent.CMD, this.onEvent as EventListener); - } - private onEvent($e: MyEvent): void { - console.log(`target ${$e.target}`); - console.log(`name: ${$e.detail._name} , occupation: ${$e.detail._occupation}`); - } -} - -interface ITest { - _name: string; - _occupation: string; -} - -let $test: Test = new Test(); -MyDispatch.Instance.send({ _name: `Aonaufly`, _occupation: `it` }); diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index adaa4d7..1b05d4c 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -16,9 +16,9 @@ import { PropertyInfo } from './model/PropertyInfo'; import { AxPreviewImageShape } from './model/axPreviewImageShape'; import { AxArrowConnector } from './model/axArrowConnector'; import { AxLegend, Legend } from './model/axLegend'; -import { NullTemplateVisitor } from '@angular/compiler'; -import { AxRectangleShape } from './model/axRectangleShape'; import { AxGrid } from './model/axGrid'; +import { AxSelection } from './model/axSelection'; +import { AxMessageSystem } from './model/axMessageSystem'; @Component({ @@ -76,7 +76,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV /** * 选择器 */ - public selection: Selection = new Selection(this); + public readonly selection: AxSelection = new AxSelection(); /** * 当前鼠标的点 */ @@ -141,6 +141,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 网格 */ public grid: AxGrid = null; + // 是否按下Ctrl键 + isCtrlKeyClicked = false; + isMove = false; /** * 本软件版本号由四部分组成:<主版本号><次版本号><修订版本号><日期加希腊字母版本号> 例如:1.0.0.20210105_beta * Alpha版: 此版本表示该软件在此阶段主要是以实现软件功能为主,通常只在软件开发者内部交流,一般而言,该版本软件的Bug较多,需要继续修改。 @@ -157,12 +160,12 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.sayHello(); this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { if (event.keyCode === 17) { - this.selection.isMultiselection = true; + this.isCtrlKeyClicked = true; } }); this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => { if (event.keyCode === 17) { - this.selection.isMultiselection = false; + this.isCtrlKeyClicked = false; this.rectToolGraphics.visible = false; this.rectToolGraphics.clear(); } @@ -171,23 +174,56 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.deleteSelectedShape(); } }); + // 消息系统事件监听 + AxMessageSystem.addListener(CanvasAction.selectionChanged, () => { + this.selection.all().forEach(item => { + item.showBorder(); + item.drawBorder(1 / this.backgroundImage.scale.x); + item.setPointVisiable(this.allowEdit); + }); + }, this); } /** * 删除选中的图标 */ public deleteSelectedShape() { - this.selection.objects.forEach(item => { - this.deleteShape(item); - }); - this.selection.deselectAll(); - } - /** - * - * @param obj 删除一个形状 - */ - public deleteShape(shape) { - if (this.allowEdit && this.canvasData.gameMode === shape.assetData.GameMode) { - this.emit('deleteIcon', shape); + if (this.selection.all().size > 0) { + this.selection.all().forEach(axShape => { + if (this.allowEdit && this.canvasData.gameMode === axShape.assetData.GameMode) { + // 删除图例对象 + const temp = this.backgroundImage.getChildByName('图例') as AxLegend; + if ( temp !== undefined + && temp !== null + && axShape.assetData.Name !== '图例') { + const itemLegend = new Legend(axShape.assetData.Name, axShape.assetData.ImageUrl, 1); + temp.deleteItem(itemLegend); + } + if (axShape.assetData.GameMode === GameMode.BasicInformation) { // 基本信息 + // 删除楼层数据 + delete this.canvasData.originaleveryStoreyData.data[axShape.assetData.Id]; + // 删除建筑数据 + delete this.canvasData.originalcompanyBuildingData.data[axShape.assetData.Id]; + } else if (axShape.assetData.GameMode === GameMode.Assignment) { // 处置预案 + delete this.canvasData.selectPanelPoint.Data.DefinedIncrement[axShape.assetData.Id]; + delete this.canvasData.selectPanelPoint.Data.Increment[axShape.assetData.Id]; + delete this.canvasData.selectPanelPoint.Data.Stock[axShape.assetData.Id]; + } else if (axShape.assetData.GameMode === GameMode.Examinee) { // 考生考试 + if (axShape.assetData.Tag === 1) { + // 删除楼层数据 + delete this.canvasData.examOriginaleveryStoreyData.data[axShape.assetData.Id]; + } else { + delete this.canvasData.selectPanelPoint.Data.DefinedIncrement[axShape.assetData.Id]; + delete this.canvasData.selectPanelPoint.Data.Increment[axShape.assetData.Id]; + delete this.canvasData.selectPanelPoint.Data.Stock[axShape.assetData.Id]; + } + } + this.backgroundImage.removeChild(axShape); + } + }); + this.selection.clear(); + this.emit('canvasDataChanged'); + this.canvasData.isChange = true; + AxMessageSystem.send(CanvasAction.selectionChanged); } } /** @@ -315,7 +351,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.app.stage.addChild(this.grid); this.grid.drawGrid(); this.grid.onMousemove = (evt, gridCoord) => { - console.log(gridCoord); + }; this.createBackgroundImage(); @@ -419,39 +455,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 删除图标事件(数据处理) */ this.on('deleteIcon', (axShape: AxShape) => { - // 删除图例对象 - const temp = this.backgroundImage.getChildByName('图例') as AxLegend; - if ( temp !== undefined - && temp !== null - && axShape.assetData.Name !== '图例') { - const itemLegend = new Legend(axShape.assetData.Name, axShape.assetData.ImageUrl, 1); - temp.deleteItem(itemLegend); - } - - if (axShape.assetData.GameMode === GameMode.BasicInformation) { // 基本信息 - // 删除楼层数据 - delete this.canvasData.originaleveryStoreyData.data[axShape.assetData.Id]; - // 删除建筑数据 - delete this.canvasData.originalcompanyBuildingData.data[axShape.assetData.Id]; - } else if (axShape.assetData.GameMode === GameMode.Assignment) { // 处置预案 - delete this.canvasData.selectPanelPoint.Data.DefinedIncrement[axShape.assetData.Id]; - delete this.canvasData.selectPanelPoint.Data.Increment[axShape.assetData.Id]; - delete this.canvasData.selectPanelPoint.Data.Stock[axShape.assetData.Id]; - } else if (axShape.assetData.GameMode === GameMode.Examinee) { // 考生考试 - if (axShape.assetData.Tag === 1) { - // 删除楼层数据 - delete this.canvasData.examOriginaleveryStoreyData.data[axShape.assetData.Id]; - } else { - delete this.canvasData.selectPanelPoint.Data.DefinedIncrement[axShape.assetData.Id]; - delete this.canvasData.selectPanelPoint.Data.Increment[axShape.assetData.Id]; - delete this.canvasData.selectPanelPoint.Data.Stock[axShape.assetData.Id]; - } - - } - this.backgroundImage.removeChild(axShape); - this.emit('canvasDataChanged'); - this.canvasData.isChange = true; }); } /** @@ -514,17 +518,16 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }); } /** - * 设置高亮 + * 设置选中 + * 清空所有选择对象,选择ids集合元素 */ public setHighlight(ids: string[]): void { - this.selection.deselectAll(); + this.selection.clear(); ids.forEach(item => { - let obj = this.backgroundImage.getChildByName(item); - if (obj === null) { - obj = this.app.stage.getChildByName(item); - } - this.selection.select(obj); + const obj = this.backgroundImage.getChildByName(item); + this.selection.add(obj); }); + AxMessageSystem.send(''); } /** * 创建楼层图形 @@ -631,10 +634,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV .on('pointerdown', event => { if (event.data.button !== 0) { return; } console.log(this.backgroundImage.toLocal(this.mousePosition)); - if (!event.currentTarget.dragging && this.selection.isMultiselection === false) { - this.selection.deselectAll(); + if (!this.isMove && this.isCtrlKeyClicked === false) { event.currentTarget.data = event.data; - event.currentTarget.dragging = true; + this.isMove = true; event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); event.currentTarget.dragPoint.x -= event.currentTarget.x; event.currentTarget.dragPoint.y -= event.currentTarget.y; @@ -828,18 +830,17 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // this.emit('backgroundScale', this.backgroundImage.scale.x); break; } - } else if (!event.currentTarget.dragging && this.selection.isMultiselection === true) { + } else if (!this.isMove && this.isCtrlKeyClicked === true) { this.rectToolGraphics.visible = true; - event.currentTarget.dragging = true; + this.isMove = true; this.initialScreenMousePos = this.backgroundImage.toLocal(this.mousePosition); this.finalScreenMousePos = this.backgroundImage.toLocal(this.mousePosition); } }) .on('pointerup', event => { - if (event.currentTarget.dragging) { - event.currentTarget.dragging = false; - event.currentTarget.data = null; - } + this.isMove = false; + event.currentTarget.data = null; + if (this.rectToolGraphics.visible === true) { this.backgroundImage.children.forEach(item => { if ( item instanceof AxImageShape @@ -850,26 +851,27 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV const rect1 = this.rectToolGraphics.getBounds(); const rect2 = item.getBounds(); if (this.isOverlap(rect1, rect2)) { - this.selection.select(item); + this.selection.add(item); } } }); this.rectToolGraphics.clear(); this.rectToolGraphics.visible = false; + AxMessageSystem.send(CanvasAction.selectionChanged); } }) .on('pointerupoutside', event => { - if (event.currentTarget.dragging) { - event.currentTarget.dragging = false; + if (this.isMove) { + this.isMove = false; event.currentTarget.data = null; } }) .on('pointermove', event => { - if (event.currentTarget.dragging && this.selection.isMultiselection === false) { + if (this.isMove && this.isCtrlKeyClicked === false) { const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); event.currentTarget.x = newPosition.x - event.currentTarget.dragPoint.x; event.currentTarget.y = newPosition.y - event.currentTarget.dragPoint.y; - } else if (event.currentTarget.dragging && this.selection.isMultiselection === true) { + } else if (this.isMove && this.isCtrlKeyClicked === true) { if (this.rectToolGraphics.visible === true) { this.finalScreenMousePos = this.backgroundImage.toLocal(this.mousePosition); } @@ -877,7 +879,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }) .on('rightclick', event => { event.stopPropagation(); - this.selection.deselectAll(); + this.deselectAll(); this.setPaintMode(PaintMode.endPaint); }) .on('pointerover', (event) => { @@ -951,11 +953,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * @param imageUrl * @param imageAngle */ - public async refresh(imageUrl: string = this.canvasData.selectStorey.imageUrl, imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise { + public async refresh(imageUrl: string = this.canvasData.selectStorey.imageUrl, + imageAngle: number = this.canvasData.selectStorey.imageAngle): Promise { await this.refreshBackgroundImage(); - // 清空所有图形 - this.selection.deselectAll(); + this.deselectAll(); const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { @@ -978,10 +980,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 加载无关联信息处置预案 * @data 处置预案数据 */ - public async loadNoRelevantInformationDisposalPlan(data:DisposalNodeData): Promise { - await this.refreshBackgroundImage(data.BackgroundImageUrl,data.BackgroundImageAngle); + public async loadNoRelevantInformationDisposalPlan(data: DisposalNodeData): Promise { + await this.refreshBackgroundImage(data.BackgroundImageUrl, data.BackgroundImageAngle); // 清空所有图形 - this.selection.deselectAll(); + this.deselectAll(); const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { @@ -1142,7 +1144,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV */ public beginPaint() { console.log(this.canvasData.selectTemplateData); - this.selection.deselectAll(); + this.deselectAll(); this.setPaintMode(PaintMode.endPaint); this.setPaintMode(this.canvasData.selectTemplateData.interactiveMode); } @@ -1291,49 +1293,52 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 复制 */ public copy(): void { - this.copyData = []; - this.selection.objects.forEach(item => { - const newData = JSON.parse(JSON.stringify(item.assetData)); - this.copyData.push(newData); - }); + this.copyData = []; + this.selection.all().forEach(item => { + const newData = JSON.parse(JSON.stringify(item.assetData)); + this.copyData.push(newData); + }); } /** * 粘贴 */ public paste(companyId: string, buildingId: string, floorId: string): void { - this.copyData.forEach(item => { - item.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); - const newData = JSON.parse(JSON.stringify(item)); - newData.Id = ObjectID.default.generate(), - newData.CompanyId = companyId; - newData.BuildingId = buildingId; - newData.FloorId = floorId; - newData.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); - switch (item.InteractiveMode) { - case PaintMode.singlePointIcon: - const singleIcon = new AxImageShape(newData, this); - this.emit('createIcon', singleIcon); - break; - case PaintMode.lineIcon: - const lineIcon = new MultipointIcon(newData, this); - this.emit('createIcon', lineIcon); - break; - case PaintMode.polygonIcon: - const polygonIcon = new PolygonIcon(newData, this); - this.emit('createIcon', polygonIcon); - break; - case PaintMode.Pipeline: - if (item.Name === '距离') { - const wall = new AxArrowConnector(newData, this, true, true); - this.emit('createIcon', wall); - } else if (item.Name === '普通墙' || item.Name === '承重墙') { - const wall = new AxArrowConnector(newData, this, false, false); - this.emit('createIcon', wall); - } - break; - } - this.selection.select(this.backgroundImage.getChildByName(newData.Id)); - }); + if (this.copyData.length > 0) { + this.copyData.forEach(item => { + item.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); + const newData = JSON.parse(JSON.stringify(item)); + newData.Id = ObjectID.default.generate(), + newData.CompanyId = companyId; + newData.BuildingId = buildingId; + newData.FloorId = floorId; + newData.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); + switch (item.InteractiveMode) { + case PaintMode.singlePointIcon: + const singleIcon = new AxImageShape(newData, this); + this.emit('createIcon', singleIcon); + break; + case PaintMode.lineIcon: + const lineIcon = new MultipointIcon(newData, this); + this.emit('createIcon', lineIcon); + break; + case PaintMode.polygonIcon: + const polygonIcon = new PolygonIcon(newData, this); + this.emit('createIcon', polygonIcon); + break; + case PaintMode.Pipeline: + if (item.Name === '距离') { + const wall = new AxArrowConnector(newData, this, true, true); + this.emit('createIcon', wall); + } else if (item.Name === '普通墙' || item.Name === '承重墙') { + const wall = new AxArrowConnector(newData, this, false, false); + this.emit('createIcon', wall); + } + break; + } + this.selection.add(this.backgroundImage.getChildByName(newData.Id)); + }); + AxMessageSystem.send(CanvasAction.selectionChanged); + } } //////////////////////////////////////////////////////////////////////// 通用///////////////////////////////////////////////////////////////////////////// /** @@ -1357,7 +1362,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public async onExamineeClickFloor() { await this.refreshBackgroundImage(); // 清空所有图形 - this.selection.deselectAll(); + this.deselectAll(); const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { @@ -1384,7 +1389,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public async onExaminerClickFloor() { await this.refreshBackgroundImage(); // 清空所有图形 - this.selection.deselectAll(); + this.deselectAll(); const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { @@ -1410,7 +1415,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public async onExaminerClickFloor_CreateTestpaper() { await this.refreshBackgroundImage(); // 清空所有图形 - this.selection.deselectAll(); + this.deselectAll(); const itemList = []; this.backgroundImage.children.forEach(item => { if (item instanceof AxShape && item instanceof AxPreviewImageShape === false) { @@ -1428,94 +1433,26 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // 隐藏图标 this.setNameVisible(false, 0); } -} - -/** - * 选择器 - */ -export class Selection { - constructor(private workingArea: WorkingAreaComponent) {} - public objects: any[] = []; - public isMultiselection = false; - /** - * 返回选择器中是否包含对象 - * @param obj 对象 - */ - public contains(obj: any): boolean { - return this.objects.includes(obj); - } - /** - * 选定对象 - * @param obj 对象 - */ - public select(obj: any) { - if (!this.contains(obj)) { - this.workingArea.emit('select', obj); - this.objects.push(obj); - } - } - /** - * 取消选定对象 - * @param obj 对象 - */ - public deselect(obj: any) { - if (this.contains(obj)) { - this.workingArea.emit('deselect', obj); - const idx = this.objects.findIndex(x => x === obj); - this.objects.splice(idx, 1); - } - } - /** - * 选定或取消选定对象 - * @param obj 对象 - */ - public selectOrDeselect(obj: any) { - if (this.contains(obj)) { - this.deselect(obj); - } else { - this.select(obj); - } - } - /** - * 取消选定所有已选定对象 - */ + //////////////////////////////////////////////////////////////////// 选择逻辑 + // 取消所有选择 public deselectAll() { - this.objects.forEach(item => { - this.workingArea.emit('deselect', item); - }); - this.objects.splice(0, this.objects.length); - } - /** - * 取消选定所有对象后选定一个对象 - * @param obj 对象 - */ - public selectOne(obj: any) { - if (this.isMultiselection) { - this.selectOrDeselect(obj); - } else { - this.deselectAll(); - this.select(obj); + if (this.selection.first() !== null) { + this.selection.all().forEach(item => { + item.hideBorder(); + item.setPointVisiable(false); + }); + this.selection.clear(); + AxMessageSystem.send(CanvasAction.selectionChanged); } } - /** - * 选定对象集合中所有对象 - * @param objects 对象集合 - */ - public selectAll(objects: any[]) { - this.objects.forEach(item => { - this.select(item); - }); + // 选择单个 + public selectSingle(obj: any) { + this.deselectAll(); + this.selection.add(obj); + AxMessageSystem.send(CanvasAction.selectionChanged); } } - - -/** - * 车辆类型 - */ -export enum Type { - 水源 = 0, - 举高喷射消防车 = 1, - 泡沫消防车 = 2, - 水罐消防车 = 3, - 压缩空气泡沫消防车 = 4 +enum CanvasAction { + selectionChanged = 'selectionChanged', + copyDataChanged = 'copyDataChanged' } From e6c0c6c8b889935ee97c9df45dcb03fa2106acbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 25 Jan 2021 09:11:03 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E5=88=A0=E9=99=A4debug.log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debug.log | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 debug.log diff --git a/debug.log b/debug.log deleted file mode 100644 index c4638ef..0000000 --- a/debug.log +++ /dev/null @@ -1,3 +0,0 @@ -[1229/141605.754:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[0104/100053.968:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) -[0122/085819.900:ERROR:directory_reader_win.cc(43)] FindFirstFile: ϵͳҲָ· (0x3) From 45ffea975865fcafe9fc7d1e378c1ef09ad64355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 25 Jan 2021 11:47:35 +0800 Subject: [PATCH 05/11] 1.0.12.20210125b --- .gitignore | 1 + src/app/working-area/model/axSelection.ts | 4 + src/app/working-area/model/axShape.ts | 60 +++--- .../working-area/working-area.component.ts | 171 +++++++++++------- 4 files changed, 132 insertions(+), 104 deletions(-) diff --git a/.gitignore b/.gitignore index 86d943a..a80a6b3 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ testem.log # System Files .DS_Store Thumbs.db +debug.log diff --git a/src/app/working-area/model/axSelection.ts b/src/app/working-area/model/axSelection.ts index e61cd78..ce7a6e0 100644 --- a/src/app/working-area/model/axSelection.ts +++ b/src/app/working-area/model/axSelection.ts @@ -13,6 +13,10 @@ export class AxSelection { return null; } } + // 是否已经选择了对象 + public has(obj: any): boolean { + return this.objects.has(obj); + } // 获得所有对象 public all() { return this.objects; diff --git a/src/app/working-area/model/axShape.ts b/src/app/working-area/model/axShape.ts index 2d032d5..3a5dae7 100644 --- a/src/app/working-area/model/axShape.ts +++ b/src/app/working-area/model/axShape.ts @@ -20,6 +20,10 @@ export class AxShape extends Graphics { showName = true; // 边框 border: PIXI.Graphics = new PIXI.Graphics(); + // 鼠标位置 + mousePosition: PIXI.Point; + // 鼠标拖动 + mouseDragging: boolean; constructor(assetData: any, workingArea: WorkingAreaComponent) { super(); @@ -35,50 +39,30 @@ export class AxShape extends Graphics { .on('pointerdown', event => { event.stopPropagation(); if (this.selectable) { - this.workingArea.selectSingle(this); + this.workingArea.select(this); } if (this.moveable) { - event.currentTarget.data = event.data; - event.currentTarget.alpha = 0.5; - event.currentTarget.dragging = true; - - event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); - event.currentTarget.dragPoint.x -= event.currentTarget.x; - event.currentTarget.dragPoint.y -= event.currentTarget.y; + this.mouseDragging = true; + this.mousePosition = new PIXI.Point(event.data.global.x, event.data.global.y); } }) .on('pointerup', event => { - if (event.currentTarget.dragging) { - event.currentTarget.alpha = 1; - event.currentTarget.dragging = false; - event.currentTarget.data = null; - } + this.mouseDragging = false; }) .on('pointerupoutside', event => { - if (event.currentTarget.dragging) { - event.currentTarget.alpha = 1; - event.currentTarget.dragging = false; - event.currentTarget.data = null; - } + this.mouseDragging = false; }) .on('pointermove', event => { - if (event.currentTarget.dragging) { - const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); - - // const offsetX = newPosition.x - event.currentTarget.dragPoint.x; - // const offsetY = newPosition.y - event.currentTarget.dragPoint.y; - // const offset = this.workingArea.backgroundImage.toLocal(new Point(offsetX, offsetY)); - // event.currentTarget.position += offset; - // // this.workingArea.selection.objects.forEach(shpae => { - // // shpae.x = newPosition.x - event.currentTarget.dragPoint.x; - // // shpae.y = newPosition.y - event.currentTarget.dragPoint.y; - // // shpae.assetData.Point = new PIXI.Point(this.x, this.y); - // // this.workingArea.canvasData.isChange = true; - // // }) - event.currentTarget.x = newPosition.x - event.currentTarget.dragPoint.x; - event.currentTarget.y = newPosition.y - event.currentTarget.dragPoint.y; - this.assetData.Point = new PIXI.Point(this.x, this.y); - this.workingArea.canvasData.isChange = true; + if (this.mouseDragging) { + this.workingArea.selection.all().forEach(item => { + const x = event.data.global.x - this.mousePosition.x; + const y = event.data.global.y - this.mousePosition.y; + item.x += x * (1 / this.workingArea.backgroundImage.scale.x); + item.y += y * (1 / this.workingArea.backgroundImage.scale.y); + item.assetData.Point = new PIXI.Point(item.x, item.y); + this.workingArea.canvasData.isChange = true; + }); + this.mousePosition = new PIXI.Point(event.data.global.x, event.data.global.y); } }) .on('rightclick', event => { @@ -127,9 +111,9 @@ export class AxShape extends Graphics { this.border.lineStyle(scale * 1, 0x00a8ff); - let spaceLength = scale * 1; - let lineLenght = rect.width + 0.5 + 0.5; - let dashLength = scale * ( lineLenght + spaceLength - Math.floor((rect.width + rect.height) / 2 / 4.1)) / Math.floor((rect.width + rect.height) / 2 / 4.1); + const spaceLength = scale * 1; + const lineLenght = rect.width + 0.5 + 0.5; + const dashLength = scale * ( lineLenght + spaceLength - Math.floor((rect.width + rect.height) / 2 / 4.1)) / Math.floor((rect.width + rect.height) / 2 / 4.1); this.drawDash(this.border, p1.x - 0.5 * scale, p1.y, p2.x + 0.5 * scale, p2.y, dashLength, spaceLength); this.drawDash(this.border, p2.x, p2.y - 0.5 * scale, p3.x, p3.y + 0.5 * scale, dashLength, spaceLength); this.drawDash(this.border, p3.x + 0.5 * scale, p3.y, p4.x - 0.5 * scale, p4.y, dashLength, spaceLength); diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 1b05d4c..851b75d 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -151,7 +151,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * RC版: 该版本已经相当成熟了,基本上不存在导致错误的BUG,与即将发行的正式版相差无几。 * Release版: 该版本意味“最终版本”,在前面版本的一系列测试版之后,终归会有一个正式版本,是最终交付用户使用的一个版本。该版本有时也称为标准版。一般情况下,Release不会以单词形式出现在软件封面上,取而代之的是符号®。 */ - public VERSION = '1.0.11.20210122_beta'; + public VERSION = '1.0.12.20210125_beta'; /** * 数据初始化 */ @@ -174,14 +174,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.deleteSelectedShape(); } }); - // 消息系统事件监听 - AxMessageSystem.addListener(CanvasAction.selectionChanged, () => { - this.selection.all().forEach(item => { - item.showBorder(); - item.drawBorder(1 / this.backgroundImage.scale.x); - item.setPointVisiable(this.allowEdit); - }); - }, this); } /** * 删除选中的图标 @@ -391,28 +383,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.rectToolGraphics.endFill(); } }); - /** - * 选中事件 - */ - this.on('select', (axShape: AxShape) => { - // if (axShape instanceof AxRectangleShape) { - // let upLeft: PIXI.Sprite= new PIXI.Sprite(this.editorPointTexture); - // let upRight: PIXI.Sprite= new PIXI.Sprite(this.editorPointTexture); - // let downLeft: PIXI.Sprite= new PIXI.Sprite(this.editorPointTexture); - // let downRight: PIXI.Sprite = new PIXI.Sprite(this.editorPointTexture); - // } else { - axShape.showBorder(); - axShape.drawBorder(1 / this.backgroundImage.scale.x); - axShape.setPointVisiable(this.allowEdit); - // } - }); - /** - * 取消选中事件 - */ - this.on('deselect', (axShape: AxShape) => { - axShape.hideBorder(); - axShape.setPointVisiable(false); - }); /** * 创建图标事件(数据处理) */ @@ -451,12 +421,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.emit('canvasDataChanged'); this.canvasData.isChange = true; }); - /** - * 删除图标事件(数据处理) - */ - this.on('deleteIcon', (axShape: AxShape) => { - - }); } /** * 重置画布 @@ -517,18 +481,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } }); } - /** - * 设置选中 - * 清空所有选择对象,选择ids集合元素 - */ - public setHighlight(ids: string[]): void { - this.selection.clear(); - ids.forEach(item => { - const obj = this.backgroundImage.getChildByName(item); - this.selection.add(obj); - }); - AxMessageSystem.send(''); - } /** * 创建楼层图形 */ @@ -842,22 +794,21 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV event.currentTarget.data = null; if (this.rectToolGraphics.visible === true) { + const shapes: AxShape[] = []; this.backgroundImage.children.forEach(item => { - if ( item instanceof AxImageShape - || item instanceof MultipointIcon - || item instanceof PolygonIcon - || item instanceof AxArrowConnector) { + if ( item instanceof AxShape + && item instanceof AxPreviewImageShape === false) { // 判断2个矩形是否相交 const rect1 = this.rectToolGraphics.getBounds(); const rect2 = item.getBounds(); if (this.isOverlap(rect1, rect2)) { - this.selection.add(item); + shapes.push(item); } } }); this.rectToolGraphics.clear(); this.rectToolGraphics.visible = false; - AxMessageSystem.send(CanvasAction.selectionChanged); + this.selectAll(shapes); } }) .on('pointerupoutside', event => { @@ -1303,12 +1254,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 粘贴 */ public paste(companyId: string, buildingId: string, floorId: string): void { + const ids: string[] = []; if (this.copyData.length > 0) { this.copyData.forEach(item => { item.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); const newData = JSON.parse(JSON.stringify(item)); newData.Id = ObjectID.default.generate(), - newData.CompanyId = companyId; + newData.CompanyId = companyId; newData.BuildingId = buildingId; newData.FloorId = floorId; newData.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); @@ -1335,9 +1287,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV } break; } - this.selection.add(this.backgroundImage.getChildByName(newData.Id)); + ids.push(newData.Id); }); - AxMessageSystem.send(CanvasAction.selectionChanged); + this.setHighlight(ids); } } //////////////////////////////////////////////////////////////////////// 通用///////////////////////////////////////////////////////////////////////////// @@ -1434,22 +1386,109 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.setNameVisible(false, 0); } //////////////////////////////////////////////////////////////////// 选择逻辑 - // 取消所有选择 + /** + * 清空选择,选择单个形状 + * @param shape 形状 + */ + public selectSingle(shape: AxShape) { + if (this.selection.first() !== null) { + this.selection.all().forEach(item => { + this.clearSelectEffect(item); + }); + this.selection.clear(); + } + this.selection.add(shape); + this.setSelectEffect(shape); + AxMessageSystem.send(CanvasAction.selectionChanged); + } + /** + * 选择 + * @param shape 形状 + */ + public select(shape: AxShape) { + if (this.selection.first() !== null + && !this.isCtrlKeyClicked + && !this.selection.has(shape)) { + this.selection.all().forEach(item => { + this.clearSelectEffect(item); + }); + this.selection.clear(); + } + this.selection.add(shape); + this.setSelectEffect(shape); + AxMessageSystem.send(CanvasAction.selectionChanged); + } + /** + * 选择集合中的形状 + * @param shape 形状集合 + */ + public selectAll(shape: AxShape[]) { + this.selection.addArray(shape); + this.selection.all().forEach(item => { + this.setSelectEffect(item); + }); + AxMessageSystem.send(CanvasAction.selectionChanged); + } + /** + * 先清空再选择全部 + * @param shape 形状集合 + */ + public selectAllWithClear(shape: AxShape[]) { + if (this.selection.first() !== null) { + this.selection.all().forEach(item => { + this.clearSelectEffect(item); + }); + this.selection.clear(); + } + this.selection.addArray(shape); + this.selection.all().forEach(item => { + this.setSelectEffect(item); + }); + AxMessageSystem.send(CanvasAction.selectionChanged); + } + /** + * 选择集合中所有id的形状 + * @param ids 形状id集合 + */ + public setHighlight(ids: string[]): void { + const shapes: AxShape[] = []; + // 重新选择 + ids.forEach(item => { + const obj = this.backgroundImage.getChildByName(item); + shapes.push(obj as AxShape); + }); + this.selectAllWithClear(shapes); + } + /** + * 取消所有选择 + */ public deselectAll() { if (this.selection.first() !== null) { this.selection.all().forEach(item => { - item.hideBorder(); - item.setPointVisiable(false); + this.clearSelectEffect(item); }); this.selection.clear(); AxMessageSystem.send(CanvasAction.selectionChanged); } } - // 选择单个 - public selectSingle(obj: any) { - this.deselectAll(); - this.selection.add(obj); - AxMessageSystem.send(CanvasAction.selectionChanged); + /** + * 设置选中效果 + * @param shape 形状 + */ + public setSelectEffect(shape: AxShape) { + shape.hideBorder(); + shape.setPointVisiable(false); + shape.showBorder(); + shape.drawBorder(1 / this.backgroundImage.scale.x); + shape.setPointVisiable(this.allowEdit); + } + /** + * 设置形状选中效果 + * @param shape 形状 + */ + public clearSelectEffect(shape: AxShape) { + shape.hideBorder(); + shape.setPointVisiable(false); } } enum CanvasAction { From 34177788a2f5d512463f430361ba355064d5f941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 25 Jan 2021 12:02:24 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9B=BE=E4=BE=8B?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 851b75d..0d407f3 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -1490,6 +1490,15 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV shape.hideBorder(); shape.setPointVisiable(false); } + ////////////////////////////////////////////////////////////////////////////////////////////////图例 + /** + * 设置图例显示隐藏 + * @param b true 显示,false隐藏 + */ + public setLegendVisible(b: boolean): void { + const legend = this.backgroundImage.getChildByName('图例') as AxLegend; + legend.visible = b; + } } enum CanvasAction { selectionChanged = 'selectionChanged', From b5e615c00686e7d9b800139c20dc675d65fd8b0d Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 25 Jan 2021 13:46:22 +0800 Subject: [PATCH 07/11] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E9=87=87=E9=9B=86?= =?UTF-8?q?=E5=B7=A5=E5=85=B7,=E7=BC=96=E5=88=B6=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=8C=89=E5=8E=9F=E5=9E=8B=E5=9B=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/canvas-share-data.service.ts | 2 +- .../edit-plan-info.component.html | 39 +- .../view-unit-details.component.html | 25 +- .../addDisposalNode.html | 24 + .../addPlaneFigure.html | 38 + .../collection-tools.component.html | 384 +++ .../collection-tools.component.scss | 450 ++++ .../collection-tools.component.spec.ts | 25 + .../collection-tools.component.ts | 2391 +++++++++++++++++ .../createBuilding.html | 28 + .../editBuilding.html | 23 + .../editDisposalNode.html | 23 + .../editPlaneFigure.html | 39 + .../leftFunctionalDomain.ts | 180 ++ .../ui/collection-tools-building/panel.scss | 291 ++ 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 + .../collection-tools-plan/addPlaneFigure.html | 11 + .../collection-tools.component.html | 152 +- .../collection-tools.component.scss | 37 +- .../collection-tools.component.ts | 49 +- .../leftFunctionalDomain.ts | 95 +- src/app/ui/collection-tools-plan/panel.scss | 25 + .../collection-tools.component.html | 20 +- .../collection-tools.component.scss | 6 + .../collection-tools.component.ts | 52 +- .../collection-tools/leftFunctionalDomain.ts | 2 +- src/app/ui/collection-tools/save.ts | 147 +- src/app/ui/ui.module.ts | 6 +- 31 files changed, 4626 insertions(+), 320 deletions(-) create mode 100644 src/app/ui/collection-tools-building/addDisposalNode.html create mode 100644 src/app/ui/collection-tools-building/addPlaneFigure.html create mode 100644 src/app/ui/collection-tools-building/collection-tools.component.html create mode 100644 src/app/ui/collection-tools-building/collection-tools.component.scss create mode 100644 src/app/ui/collection-tools-building/collection-tools.component.spec.ts create mode 100644 src/app/ui/collection-tools-building/collection-tools.component.ts create mode 100644 src/app/ui/collection-tools-building/createBuilding.html create mode 100644 src/app/ui/collection-tools-building/editBuilding.html create mode 100644 src/app/ui/collection-tools-building/editDisposalNode.html create mode 100644 src/app/ui/collection-tools-building/editPlaneFigure.html create mode 100644 src/app/ui/collection-tools-building/leftFunctionalDomain.ts create mode 100644 src/app/ui/collection-tools-building/panel.scss create mode 100644 src/app/ui/collection-tools-building/save.ts create mode 100644 src/app/ui/collection-tools-building/saveOne.html create mode 100644 src/app/ui/collection-tools-building/saveTwo.html create mode 100644 src/app/ui/collection-tools-building/viewdetails.html diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index 16298ba..56daf18 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -31,7 +31,7 @@ export class CanvasShareDataService { allDisposalNode: any = []; // 所有 处置节点 allNodeMarkers: any; // 灾情 标签信息 selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点 - selectPanelPointBaseData: any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 所对应的 天气,详情 数据节点 + selectPanelPointBaseData: any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 对应 父级节点 customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称 // 处置 节点 diff --git a/src/app/key-unit/edit-plan-info/edit-plan-info.component.html b/src/app/key-unit/edit-plan-info/edit-plan-info.component.html index c46fef7..cc729aa 100644 --- a/src/app/key-unit/edit-plan-info/edit-plan-info.component.html +++ b/src/app/key-unit/edit-plan-info/edit-plan-info.component.html @@ -7,52 +7,57 @@ - + - + - - - - + + + + - - - - + + + + + + + + + - + - + - + - + - + - + - +
+ + + + + 基本信息名称 + visibility + + + + + + + + + + +
+ + +
+ + +
+ + +
+
+ + + + +
+
+ +
+
+ keyboard_arrow_up + keyboard_arrow_down + + +
+
+
+ + + + + + + + + + photo_size_select_actual + + + + + + +
+

+ keyboard_arrow_up +

+

+ edit + delete +

+

+ cached + library_books +

+

+ keyboard_arrow_down +

+
+ +
+
+
+ + +
+
+ keyboard_arrow_up + keyboard_arrow_down + +
+
+ + + + + + +
+
+ +

{{items.name}}

+
+
+ +
+
+
+
+ + +
+
+ keyboard_arrow_up + keyboard_arrow_down + + +
+
+ + + +
+ +
+ edit + add + library_books + delete_forever +
+
+
+ +
+
+ + +
+ +
+ +
+ +
+
+
+ 属性 +
+
+ +
+

面积(平方米)

+
{{canvasData.selectStorey.area}}
+

详情

+
+ {{canvasData.selectStorey.details}} +
+
+ +
+

{{assetName}}

+ +
+

宽度(像素)

+ +

高度(像素)

+ +

角度

+
+ + +
+
+ +
+

厚度

+
+ + +
+
+ +

是否高亮

+
+ + 选中高亮 +
+
+
+ 颜色 +
+ +
+
+
+
    +
  • +
+
+ 透明度 + + {{colorDivSliderValue}}% +
+
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+ +
+ +
+
+

{{item.PropertyName}}

+ {{imagesArr.length ? imagesArr.length : 0}} / {{item.PropertyValue}} + +
添加
+ + +
+
+
+
+ +
+
+ + delete + +
+
+
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ + +
+ +
+

{{item.PropertyName}}

+ +
+ +
+

{{item.PropertyName}}

+ +
+
+
+ +
+ +
+ +
+ +
+
+ 消防要素 +
+
+ +
+ + + + + + + {{node.name}} + + ({{node.children.length}}) + visibility + + + + + + + {{node.name}} + + ({{node.children.length}}) + visibility + + + +
+
+
+ +
+
+
+
+ 节点详情 +
+
+ 注意事项 +
+
+
+ + +
+
+
+
+ +
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/collection-tools.component.scss b/src/app/ui/collection-tools-building/collection-tools.component.scss new file mode 100644 index 0000000..02c4e97 --- /dev/null +++ b/src/app/ui/collection-tools-building/collection-tools.component.scss @@ -0,0 +1,450 @@ +@import './panel.scss'; +.icongray{ + color: #D9D0DC; +} +.content { + width: 100%; + height: 100%; + overflow: hidden; + box-sizing: border-box; + padding: 1px; + display: flex; + flex-direction: column; + + .buildingbtnchecked{ + background-color: #34A6FD; + color: white; + } +} + +//header头部 +.header { + position: relative; + flex: 5%; + display: flex; + align-items:center; + min-height: 40px; + background-color: #fff; + .marginLeftRight { + margin: 0 8px; + font-size: 16px; + user-select: none; + cursor: pointer; + .mat-icon { vertical-align: middle; font-size: 24px; } + } + .copytobutn{ + width: 60px; + min-width: 60px; + display: flex; + justify-content: center; + } + span{ + height: 24px; + line-height: 24px; + } + .patternSwitch{ + position: absolute; + right: 140px; + span{ + font-size: 18px; + cursor: pointer; + margin: 0 3px; + display: inline-block; + border: 1px solid gray; + border-radius: 3px; + padding: 0 5px; + } + .selectedPattern{ + background-color: #2196f3; + color: white; + } + } + .rightSave { + cursor: pointer; + position: absolute; + right: 60px; + label { vertical-align: middle; color: #279FFF; } + } +} + +//头部操作栏 +.headerOperate { + img { + width: 24px; + height: 24px; + vertical-align: middle; + margin-left: 1px; + } + span{ + font-size: 18px; + } + flex: 5%; + display: flex; + align-items:center; + min-height: 40px; + box-sizing: border-box; + margin: 3px 0; + background-color: white; + button{ + border: 0.5px solid rgb(208, 211, 214); + margin: 0 2px; + } + .editdeletebtn{ + display: none; + } + .bigeditdeletebtn:hover{ + .editdeletebtn{ + display: inline-block; + } + } +} + +//功能区 +// icon统一样式 +.mat-icon { + cursor:pointer; + vertical-align: middle; +} +//左右两侧功能栏 统一样式 +.publicCss { + border-radius: 5px; + position: absolute; + height: 100%; + top: 0; +} +.functionalDomain { + flex: 90%; + overflow: hidden; + .functionalDomainContent { + position: relative; + width: 100%; + height: 100%; + } + .functionalDomainLeft { + background-color: #fff; + display: flex; + flex-direction: column; + margin-left: 0px; + transition: margin-left 0.5s; + min-width: 235px; + border: 1px solid #E6EAEE; + width: 235px; + left: 0; + z-index: 111; + .leftDragDiv{ + position: absolute; + right: 0; + height: 100%; + width: 3px; + z-index: 1000; + cursor: e-resize; + } + } + .functionalDomainRight { + z-index: 1001; + margin-right: 0px; + transition: margin-right 0.5s; + border: 1px solid #464646; + width: 235px; + right: 0; + + } + //右边导航栏显示隐藏 + .togglePanel2 { + margin-right: -2000px; + transition: margin-right 1s; + } + //左侧导航栏显示隐藏 + .togglePanel { + margin-left: -2000px; + transition: margin-left 1s; + } + +} + +//右边操作栏 +.title{ + width: 100%; + height: 35px; + background-color: #464646; + div{ + width: 50%; + height: 35px; + line-height: 35px; + background-color: #595959; + border-radius: 5px; + span{ + color: white; + font-size: 14px; + font-weight: 400; + padding-left: 5px; + } + } +} + + +//右侧属性 +.property{ + display: flex; + flex-flow: column; + .siteproperty{ + height: 100%; + overflow-y: auto; + p{ + color: #9c9fa5; + padding-left: 5px; + } + .siteproperty_size{ + background-color: #e3e3e3; + width: 93%; + margin: 0 auto; + border-radius: 3px; + min-height: 21px; + } + .rightAttribute{ + width: 12%; + height: 99.5%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + border: 2px solid #464646; + } + } + .assetsproperty{ + overflow-y: auto; + height: 100%; + p{ + color: #9c9fa5; + margin:1px 0 3px 8px; + font-size: 14px; + } + span{ + font-size: 15px; + } + input{ + height: 18px; + } + .biginput{ + display: block; + width: 88%; + margin: 0 auto; + } + .smallinput{ + display: block; + width: 19%; + margin-left: 8px; + } + .textarea{ + display: block; + width: 88%; + height: 50px; + margin: 0 auto; + } + .swiper-button-next{ + right: 6px; + } + .swiper-button-prev{ + left: 6px; + } + .swiper-container{ + // --swiper-theme-color: #ff6600;/* 设置Swiper风格 */ + // --swiper-navigation-color: #00ff33;/* 单独设置按钮颜色 */ + --swiper-navigation-size:20px;/* 设置按钮大小 */ + } + .hoverred:hover{ + color: rgb(187, 28, 28); + } + .selectDiv{ + height: 21px; + position: relative; + margin-bottom: 5px; + select{ + width: 98px; + height: 22px; + vertical-align: middle; + position: absolute; + right: 10px; + top: 1px; + border: 1px solid rgb(208, 211, 214); + border-radius: 2px; + } + } + .colorBigDiv{ + width: 88%; + margin-left: 8px; + .colorBigTemplateDiv{ + span{ + color: #9c9fa5; + font-size: 14px; + height: 26px; + line-height: 26px; + } + .colorTemplateDiv{ + width: 65%; + height: 22px; + display: inline-block; + vertical-align: middle; + margin-left: 26px; + } + } + + .colorDiv{ + .colorLi{ + width: 24px; + height: 24px; + list-style: none; + float: left; + border: 2px solid white; + } + .coloractive{ + border: 2px solid black; + } + } + } + + } +} +//右侧消防要素 +.firecategories{ + background-color: #fff; + position: relative; + display: flex; + flex-flow: column; + .firecategoriesTree{ + overflow-y: auto; + height: 100%; + mat-tree-node{ + position: relative; + } + .isLookCss{ + position: absolute; + right: 6px; + } + } +} + +// 解决轮播图蓝框问题 +div:focus { + outline: none; +} + +//没有图片时显示无图片背景图 +.noImgCss{ + background: url(../../../assets/images/noImg.png) no-repeat center center; + background-size: 88% 100%;/*按比例缩放*/ +} +.input{ + width: 18px; + height: 18px; + vertical-align: middle; + margin-left: 9px; + margin-right: 3px; +} + + +// tree +.mat-tree-node{ + min-height: 0; + height: 32px; + line-height: 32px; + font-size: 13px; + cursor: pointer; +} +.treeNode:hover{ + background-color: #ccebf8; +} +.isLookPattern{ + display: none; +} +.treeText{ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + display: inline-block; + width: 65px; +} + +.bigBox{ + width: 700px; + height: 40px; + position: absolute; + overflow: hidden; + right: 0; +} +.weatherBox{ + height: 40px; + width: 700px; + line-height: 40px; + position: absolute; + right: 0; + transition: right linear .5s; + .openbtn{ + font-size: 45px; + height: 45px; + width: 40px; + } + .name{ + font-size: 16px; + vertical-align: middle; + margin-left: 3px; + } + input{ + width: 140px; + height: 22px; + margin-left: 3px; + } + select{ + width: 96px; + height: 25px; + margin-left: 3px; + vertical-align: middle; + } +} +.open{ + right: 0px; +} +.close{ + right:-622px; +} +.bottomCss{ + position: absolute; + left: 232px; + right: 0px; + bottom: 0; + height: 158px; + width: auto; + z-index: 100; + background-color: white; + border: 1px solid #464646; + .dragDiv{ + width: 100%; + height: 3px; + position: absolute; + top: 0; + z-index: 1000; + cursor: n-resize; + } + .title{ + height: 35px; + background-color: #464646; + div{ + background-color: #464646; + float: left; + width: 80px; + color: white; + font-size: 13px; + padding-left: 5px; + cursor: pointer; + } + .detailsAndattentBtn{ + background-color: #595959; + } + } + .body{ + textarea{ + width: 100%; + border-radius: 0px; + } + } +} \ No newline at end of file diff --git a/src/app/ui/collection-tools-building/collection-tools.component.spec.ts b/src/app/ui/collection-tools-building/collection-tools.component.spec.ts new file mode 100644 index 0000000..acc7d5e --- /dev/null +++ b/src/app/ui/collection-tools-building/collection-tools.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CollectionToolsComponent } from './collection-tools.component'; + +describe('CollectionToolsComponent', () => { + let component: CollectionToolsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CollectionToolsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CollectionToolsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts new file mode 100644 index 0000000..fb2e03b --- /dev/null +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -0,0 +1,2391 @@ +import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContainerRef } 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 {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,addDisposalNodeBuildingComponent,editDisposalNodeBuildingComponent} 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'; +import { ActivatedRoute, Router } from '@angular/router'; +import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service'; +import { MaskLayerService } from 'src/app/mask-layer.service'; +import * as ObjectID from 'bson-objectid'; + +@Component({ + selector: 'app-collection-tools-building', + templateUrl: './collection-tools.component.html', + styleUrls: ['./collection-tools.component.scss'] +}) +export class CollectionToolsBuildingComponent implements OnInit { + + @ViewChild('canvas',{static: true}) canvas:WorkingAreaComponent; //父组件中获得子组件的引用 + + constructor(private maskLayerService:MaskLayerService,private tabbarService: TabbarAndScoreService,private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private element: ElementRef,public canvasData: CanvasShareDataService,private router:Router,private route:ActivatedRoute) { } + @ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent; + // tree配置 + private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数 + return { + expandable: !!node.children && node.children.length > 0, + name: node.name || node.Name, + level: level, + id: node.id || node.Id, + children:node.children, + isTemplate:node.isTemplate, + isNewElement:node.isNewElement, + isLook:node.isLook, + isLookPattern:node.isLookPattern || null + }; + } + treeControl = new FlatTreeControl(node => node.level, node => node.expandable); + + treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); + dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); + hasChild = (_: number, node: any) => node.expandable; + + colors = ['#076eec','#4dd0e1','#00ee76','#ffff00','#eeb422', + '#FF6A6A','#ff0000','#ff6eb4','#00bfff','#54ff9f', + '#009688','#836fff','#ff8c00','#ee00ee','#ffa07a', + '#00C500','#00ffff','#6495ed','#ffdAb9','#AA00FF'] + selected = "1" //图标大小选择框 + + allBuildings //该单位所有建筑 + beforeOneCheckedBuilding:any; //当前点击选择的建筑 + checkedBuildingIndex:number = 0; //当前点击选择的建筑index + isEditPat:boolean = true; //当前是否是编辑模式 + + assetName:String//素材名称 + assetWidth:number//素材宽度 + assetHeight:number//素材高度 + sliderValue:number = 0//角度滑竿的值 + sliderValueThickness:number = 0//厚度滑竿的值 + isHighLight:boolean = false//是否高亮选择框 + PropertyInfos = [] //去除图片链接真正用于循环的内容 + imagesArrNum //素材属性图片数量上限 + imagesArr = [] //属性中的图片链接集合 + clickedIndex //点击图片时的索引值 + + //传入素材对象,设置右侧属性栏内容 + canvasAssetObj //传入的素材属性对象 + isImgNumCss = false //控制上传文件input显隐 + mySwiper:any //轮播图实例 + + gallery//viewerJs实例 + //设置属性框 + setAssetsProperty(obj){ + //初始化viewerJs实例 + setTimeout(() => { + obj.PropertyInfos.forEach(item => { + if(item.PropertyType == 4){ + this.gallery = new Viewer(document.getElementById('viewerjs'),{ + url: 'data-original' + }); + } + }) + }, 0); + + //从颜色中取出透明度 + let color = obj.Color + let strh = color.substring(color.length -2,color.length) + let opacity = Math.round(parseInt(strh,16)/255 * 100) + this.colorDivSliderValue = opacity + + this.isShowProperty = true + this.isShowAttribute = false + let _this = this + this.imagesArr = [] + this.imagesArrNum = "" + + this.canvasAssetObj = obj //将选中素材对象存到本地变量 + + this.assetName = obj.Name + this.assetWidth = obj.Width + this.assetHeight = obj.Height + this.sliderValue = obj.Angle + this.selectedcolor = obj.Color + this.PropertyInfos = obj.PropertyInfos + this.sliderValueThickness = obj.Thickness + this.PropertyInfos.forEach(item => { + if(item.PropertyType == 3){ //如果是图片链接类型 + this.imagesArr.push(item) + } + if(item.PropertyType == 4){//图片数值上线 + this.imagesArrNum = item.PropertyValue + } + }) + + //如果存在图片则加载轮播图 + if(this.imagesArr.length){ + setTimeout(() => { + this.mySwiper = new Swiper('.swiper-container',{ + loop: false, + // grabCursor: true, + // 如果需要前进后退按钮 + navigation: { + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + }, + on:{ + click: function(){ + _this.clickedIndex = this.clickedIndex + }, + } + }); + }, 0); + } + //判断此时图片数量是否达到上限 + if(this.imagesArr.length < this.imagesArrNum){//如果不超出 + this.isImgNumCss = true + }else{ + this.isImgNumCss = false + } + } + pattern:boolean = true//默认为基本信息编辑 + + //基本信息编辑模式 + baseInfo(){ + if (!this.pattern) { + this.pattern = true + this.canvasData.gameMode = GameMode.BasicInformation + this.canvasData.selectPanelPoint = new DisposalNodeData(); + this.mateDeleteCustomize() + this.getAllLibrary() + this.checkedBuildingIndex = -1 + this.getSitePlan() //总平面图一层 + } + } + + //想定作业编辑模式 + wantWork(){ + if (this.pattern) { + this.pattern = false + this.canvasData.gameMode = GameMode.Assignment + this.getAllLibrary('plan') + this.getDisposalNode() + } + } + + //ngzorro tree 拖拽 + nzEvent(event: NzFormatEmitEvent): void { + if(this.isDrag){ + let parentId + if(this.pos == 0){ + parentId = event.node.key + }else{ + if(event.node.level == 0){ + parentId = null + }else{ + parentId = event.node.origin.parentId + } + } + + + let orders = {} + let originalData = JSON.parse(JSON.stringify( this.canvasData.allDisposalNode || [] )) //tree原始数据 + let targetNodeData = []//拖动移入节点的数据,用于遍历求出放在该数组的第几位 + + //找到需要重新排序的数组 + if(this.pos == 0){ + originalData.forEach(item => { + if(item.parentId == event.node.key){ + targetNodeData.push(item) + } + }) + }else{ + if(event.node.origin.parentId){//如果拖动目标为非一级节点 + originalData.forEach(item => { + if(item.parentId == event.node.origin.parentId){ + targetNodeData.push(item) + } + }) + }else{//如果拖动目标为一级节点 + originalData.forEach(item => { + if(!item.parentId){ + targetNodeData.push(item) + } + }) + } + } + + + let idArr = [] + targetNodeData.forEach(i => { + idArr.push(i.id) + }) + if(this.pos == 0 && event.node.origin.children.length == 1){ + let key = event.dragNode.key + orders[key] = 0 + parentId = event.node.key + }else{ + let array = [] + targetNodeData.forEach(item => { + if(item.id != event.dragNode.key){ //将拖动项先移除掉 + array.push(item) + } + }) + if(event.dragNode.isEnd[event.dragNode.isEnd.length - 1]){ //如果移入到最后一个 + array.push(event.dragNode.origin) + }else if(event.dragNode.isStart[event.dragNode.isStart.length - 1]){//如果移入到第一个 + array.unshift(event.dragNode.origin) + }else{//如果移入中间位置 + array.splice(event.node.origin.order, 0, event.dragNode.origin) + } + array.forEach((item,key) => { + orders[item.id] = key + }) + } + + let obj ={ + id : event.dragNode.origin.id, + parentId : parentId, + orders : orders + } + + this.http.put("/api/DisposalNodes/Sort",obj).subscribe(data => { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('排序成功','确定',config) + this.refurbishTreeData() + }) + } + } + + isDrag //是否可以拖动 + pos//放置位置 + beforeDrop = (arg: NzFormatBeforeDropEvent) => { + if(arg.dragNode.origin.isDataNode && arg.node.level === 0){//如果为数据节点则不允许拖到一级节点 + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('数据节点不允许拖拽到一级节点','确定',config) + this.isDrag = false + return of(false); + }else if(!arg.dragNode.origin.isDataNode && arg.node.level === 2){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('处置节点不允许拖拽到三级节点','确定',config) + this.isDrag = false + return of(false); + }else{ + this.isDrag = true + this.pos = arg.pos + return of(true) + } + } + //ngzorro tree 拖拽 + + //天气栏目 + weatherBtn = true + weatherBtnShow(){ + this.weatherBtn = !this.weatherBtn + } + weatherBtnHidden(){ + this.weatherBtn = !this.weatherBtn + } + + //底部切换按钮div + detailsAndattentBtn = true + //节点详情 + details(){ + this.detailsAndattentBtn = true + } + //注意事项 + attent(){ + this.detailsAndattentBtn = false + } + + //消防要素div边框高度调节 + firecategoriesDivMouseDown(e){ + document.onmousemove = (ev) => { + let bodyHeight = document.body.clientHeight //网页宽度 + let maxHeight = this.element.nativeElement.querySelector('#rightDiv').clientHeight - 35 //最大宽度 + if(bodyHeight - ev.clientY >= maxHeight){ + this.element.nativeElement.querySelector('#firecategories').style.height = maxHeight+ 'px' + this.element.nativeElement.querySelector('#property').style.height = 35+ 'px' + }else{ + this.element.nativeElement.querySelector('#firecategories').style.height = (bodyHeight - ev.clientY) + 'px' ; + this.element.nativeElement.querySelector('#property').style.height = (this.element.nativeElement.querySelector('#rightDiv').clientHeight - this.element.nativeElement.querySelector('#firecategories').clientHeight) + 'px' + } + } + document.onmouseup = () => { + document.onmousemove = null; + document.onmouseup = null; + } + } + + //左侧div边框宽度调节 + leftDivMouseDown(e){ + document.onmousemove = (ev) => { + let bodyWidth = document.body.clientWidth //网页宽度 + let maxWidth = bodyWidth - 260 - this.element.nativeElement.querySelector('#rightDiv').clientWidth //最大宽度 + if(ev.clientX - 240 >= maxWidth){ + this.element.nativeElement.querySelector('#leftDiv').style.width = maxWidth + 'px' + }else{ + this.element.nativeElement.querySelector('#leftDiv').style.width = ev.clientX - 260 + 'px'; + } + } + document.onmouseup = () => { + document.onmousemove = null; + document.onmouseup = null; + } + } + + //底部div高度调节 + bottomDivMouseDown(e){ + document.onmousemove = (ev) => { + let bodyHeight = document.body.clientHeight //网页高度 + let maxHeight = this.element.nativeElement.querySelector('#rightDiv').clientHeight //最大高度 + if(bodyHeight - ev.clientY >= maxHeight){ + this.element.nativeElement.querySelector('#bottomDiv').style.height = maxHeight + 'px' + }else{ + this.element.nativeElement.querySelector('#bottomDiv').style.height = (bodyHeight - ev.clientY) + 'px' ; + } + } + document.onmouseup = () => { + document.onmousemove = null; + document.onmouseup = null; + } + } + + //右侧div边框宽度调节 + rightDivMouseDown(e){ + document.onmousemove = (ev) => { + let bodyWidth = document.body.clientWidth //网页宽度 + let maxWidth = bodyWidth - 240 - this.element.nativeElement.querySelector('#leftDiv').clientWidth //最大宽度 + if(bodyWidth - ev.clientX >= maxWidth){ + this.element.nativeElement.querySelector('#rightDiv').style.width = maxWidth + 'px' + }else{ + this.element.nativeElement.querySelector('#rightDiv').style.width = bodyWidth - ev.clientX + 'px'; + } + } + document.onmouseup = () => { + document.onmousemove = null; + document.onmouseup = null; + } + } + + //放大图标 + iconScale(){ + let number = Number(this.selected) + this.canvas.setIconScale(number) + } + + //素材宽度输入框改变 + assetWidthIunput(){ + this.canvasAssetObj.Width = this.assetWidth + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) + } + + //素材高度输入框改变 + assetHeightIunput(){ + this.canvasAssetObj.Height = this.assetHeight + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) + } + + //素材角度输入框改变 + assetAngleIunput(){ + this.canvasAssetObj.Angle = this.sliderValue + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) + } + + //素材厚度输入框改变 + assetThicknessIunput(){ + this.canvasAssetObj.Thickness = this.sliderValueThickness + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) + } + + //素材是否高亮改变----->本地操作行为 + assetHighLightIunput(){ + + } + + //动态属性素材input框值改变 + assetInputChange(i,e){ + let index = this.canvasAssetObj.PropertyInfos.findIndex((item)=>{ + return i.PropertyName == item.PropertyName + }) + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) + } + + //动态属性素材布尔值框改变radio + assetRadioChange(i,boolean){ + let index = this.canvasAssetObj.PropertyInfos.findIndex((item)=>{ + return i.PropertyName == item.PropertyName + }) + this.canvasAssetObj.PropertyInfos[index].PropertyValue = boolean + this.canvasData.isChange = true + } + + colorIndex//默认素材颜色 + selectedcolor//点击选择的颜色 + //选择素材颜色 + selectcolor(item,key){ + //在当前透明度基础上改变颜色 + this.selectedcolor = item + this.selectedcolor.substring(this.selectedcolor.length-2) + this.canvasAssetObj.Color = this.selectedcolor + this.canvasData.isChange = true + this.canvas.refreshIcon(this.canvasAssetObj.Id) + } + //颜色选择滑竿的值 + colorDivSliderValue + colorDivSliderChange(){ + let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01) + //根据滑竿值改变16进制颜色后两位 + function replacepos(text,start,stop,replacetext){ + let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1); + return mystr; + } + this.selectedcolor = replacepos(this.selectedcolor,7,8,colorOpacity.toString(16)) + this.canvasAssetObj.Color = this.selectedcolor + this.canvasData.isChange = true + 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 //上传的文件 + this.startUploading(imgFile) + } + objectName:any //上传对象名 + startUploading (imgFile) { + let _this = this + let file = imgFile || null //获取上传的文件 + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let companyId = sessionStorage.getItem("companyId") + if (file && fileSize <= shardSize) { //上传文件<=5MB时 + let formData = new FormData() + formData.append("file",file) + this.http.post(`api/Objects/WebPlan2D/${companyId}`,formData).subscribe((data:any)=>{ + this.objectName = data.objectName + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传成功','确定',config) + + //在原始素材对象和需要循环图片的对象中分别push最新上传的图片 + let imgObj = { + "Tag": null, + "Order": 0, + "Enabled": false, + "Visible": false, + "Required": false, + "RuleName": null, + "RuleValue": null, + "PhysicalUnit": null, + "PropertyName": "图片", + "PropertyType": 3, + "PropertyValue": "/api/Objects/WebPlan2D/" + this.objectName + } + + this.imagesArr.push(imgObj) + this.canvasAssetObj.PropertyInfos.push(imgObj) + + setTimeout(() => { + this.mySwiper = new Swiper('.swiper-container',{ + loop: false, + // grabCursor: true, + // 如果需要前进后退按钮 + navigation: { + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + }, + on:{ + click: function(){ + _this.clickedIndex = this.clickedIndex + }, + } + }); + + this.mySwiper.slideTo(this.imagesArr.length - 1) + this.gallery.update() + }, 0); + + //判断上传素材属性图片是否超出数量 超出数量则隐藏input框 + if(this.imagesArr.length < this.imagesArrNum){//不超出input才会显示 + this.isImgNumCss = true + }else{ + this.isImgNumCss = false + } + + this.canvasData.isChange = true + }) + } else if (file && fileSize>shardSize) { //上传文件>5MB时,分块上传 + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传图片文件不允许大于5mb','确定',config); + } + + } + + //不能上传图片提示 + imgNumBeyond(){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('图片数量已达上限','确定',config); + } + + //删除素材属性图片 + deleteImg(){ + if(this.imagesArr.length == 0){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('没有可删除的图片,请先上传','确定',config) + }else{ + // 在素材原始对象中将删除的图片去掉 + this.canvasAssetObj.PropertyInfos = [...this.canvasAssetObj.PropertyInfos.filter((item)=>{ + return item.PropertyValue != this.imagesArr[this.mySwiper.activeIndex].PropertyValue + })] + //在图片循环数组中将图片去掉 + this.imagesArr.splice(this.mySwiper.activeIndex, 1); + //更新swiper视图 + setTimeout(() => { + this.mySwiper.update(); + this.gallery.update() + }, 0); + + //将上传的input框显示出来 + this.isImgNumCss = true; + //清除图片缓存 + if((document.getElementById('inputimg'))){ + (document.getElementById('inputimg')).value = null //清空input框缓存 + } + + this.canvasData.isChange = true + } + } + + //动态属性方向select选择框 + direction(i,e){ + let index = this.canvasAssetObj.PropertyInfos.findIndex((item)=>{ + return i.PropertyName == item.PropertyName + }) + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value + this.canvasData.isChange = true + } + + //动态属性供给区域select选择框 + supplyArea(i,e){ + let index = this.canvasAssetObj.PropertyInfos.findIndex((item)=>{ + return i.PropertyName == item.PropertyName + }) + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value + this.canvasData.isChange = true + } + + //动态属性供给类型select选择框 + supplyType(i,e){ + let index = this.canvasAssetObj.PropertyInfos.findIndex((item)=>{ + return i.PropertyName == item.PropertyName + }) + this.canvasAssetObj.PropertyInfos[index].PropertyValue = e.target.value + this.canvasData.isChange = true + } + + + isSixShow = true + isSixbtn = true //控制想定作业编辑按钮 + isediticon = true //控制查看编辑模式的编辑模式小笔按钮 + ngOnInit(): void { + + if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){ + this.isSixbtn = false + } + + if(!this.isSixbtn && sessionStorage.getItem("six") == "edit"){ + this.isSixShow = true + } + if(!this.isSixbtn && sessionStorage.getItem("six") == "look"){ + this.isEditPattern = false + this.isediticon = false + } + //gis模块平面图 + if(this.router.url.indexOf("gis") != -1 && sessionStorage.getItem("gisplan") == "look"){ + this.isEditPattern = false + this.isediticon = false + this.canvasData.gameMode = GameMode.Assignment + } else { + this.getAllLibrary() //获取素材库 + } + + let that = this + window.setTimeout(()=>{ + document.getElementById("functionalDomainContent").oncontextmenu = function (event) { + // that.canvas.cancelPaint() + that.selectImageIndex = -1 + event.preventDefault(); + }; + }) + + this.canvasData.getMessage().subscribe((message: any)=>{ + if(message == "send a message"){ + this.refurbishTreeData() + } + }) + } + + + + ngAfterViewInit(): void { + //gis模块平面图 + if(this.router.url.indexOf("gis") == -1) { + this.getAllBuildings(true) //获取所有建筑 + } + // 监听canvas组件选中素材事件 + this.canvas.on("select",obj=>{ + //选中素材属性注入函数 + this.setAssetsProperty(obj.assetData) + }) + // 监听canvas组件取消选中素材事件 + this.canvas.on("deselect",obj=>{ + this.isShowProperty = false + }) + //监听数据变化后 + this.canvas.on('canvasDataChanged',()=>{ + // 收到数据表示共享数据发生变化 + this.renovateTreeData(false) + }); + } + + copyAssetData:any //存储用于复制的素材 + //复制素材 + copyAsset(){ + this.canvas.copy() + } + //粘贴素材 + pasteAsset(){ + let companyId = sessionStorage.getItem("companyId") + let buildingId = this.beforeOneCheckedBuilding.id + let floorId = this.selectingSitePlan.id + this.canvas.paste(companyId,buildingId,floorId) + this.renovateTreeData(false) + } + + basicInfo:boolean = true //基本信息名称显隐 + wantToWork:boolean = true //想定作业名称显隐 + //点击基本信息名称 + basicInfoClick(){ + this.basicInfo = !this.basicInfo + this.canvas.setNameVisible(this.basicInfo,0) + } + + //点击想定作业名称 + wantToWorkClick(){ + this.wantToWork = !this.wantToWork + this.canvas.setNameVisible(this.wantToWork,1) + } + + isEditPattern:boolean = true //是否为编辑模式 + //进入编辑模式 + editpat(){ + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('进入编辑模式','确定',config); + this.isEditPattern = true + } + + //进入查看模式 + lookpat(){ + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('进入查看模式','确定',config); + this.isEditPattern = false + } + + //保存平面图 + saveNum :any = [] + saveSite(){ + //更新用于统计的数据 + this.canvasData.updateBuildingData() + + + if (this.selectingSitePlan && this.selectingSitePlan.id) { + //打开遮罩层 + this.maskLayerService.sendMessage(true) + this.saveNum = [] + let SitePlanData = JSON.parse(JSON.stringify(this.canvasData.originaleveryStoreyData)); + SitePlanData.data = JSON.stringify(SitePlanData.data) + let CompanyData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); + CompanyData.data = JSON.stringify(CompanyData.data) + + let object = this.canvasData.originalcompanyBuildingData.data + let adjoinArr = [] //毗邻数组 + + if(this.pattern){//如果是基本信息编辑模式 + for (const key in object) { + if (object[key].Name == "毗邻") {//如果是相同楼层,则筛选出毗邻 + + object[key].PropertyInfos.forEach(element => { + if(element.PropertyName == "方向"){ + adjoinArr.push(element.PropertyValue) + } + }); + } + } + + if((new Set(adjoinArr)).size != adjoinArr.length){ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存失败,毗邻存在相同方向','确定',config); + return false + }else{ + //如果是单位 总平面图 + if(this.checkedBuildingIndex==-1){ + // console.log(111,SitePlanData) + //保存平面图数据 + this.http.post("/api/SitePlanData",SitePlanData,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('平面图数据保存失败','确定',config); + }) + + //保存建筑数据 + this.http.post("/api/CompanyData",CompanyData,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('单位数据保存失败','确定',config); + }) + + //批量保存单位毗邻 + let CompanyAdjoins = this.canvasData.getCompanyAdjoinInfo() + this.http.post("/api/CompanyAdjoins/Batch",CompanyAdjoins,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + if(err == 'infos 有重复方向!'){ + this.snackBar.open('单位毗邻同步失败,存在相同方向','确定',config); + }else{ + this.snackBar.open('单位毗邻同步失败','确定',config); + } + }) + + //批量保存单位重点部位 + let CompanyImportantLocations = this.canvasData.getCompanyImportantLocations() + this.http.post("/api/CompanyImportantLocations/Batch",CompanyImportantLocations,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('单位重点部位同步失败','确定',config); + }) + + //批量保存单位消防设施素材 + let CompanyFacilityAssets = this.canvasData.getAllCompanyFacilityAssetInfo() + this.http.post("/api/CompanyFacilityAssets/Batch",CompanyFacilityAssets,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('单位消防设施素材同步失败','确定',config); + }) + + }else{ //如果是建筑 + + //建筑平面图数据 + this.http.post("/api/BuildingAreaData",SitePlanData,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('平面图数据保存失败','确定',config); + }) + + //建筑数据 + this.http.post("/api/BuildingData",CompanyData,{ + params:{ + companyId:this.params.companyId + } + }).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('单位数据保存失败','确定',config); + }) + + //批量保存建筑毗邻 + let buildingAdjoins = this.canvasData.getBuildingAdjoinInfo() + this.http.post(`/api/BuildingAdjoins/Batch?companyId=${this.params.companyId}&buildingId=${this.canvasData.selectStorey.buildingId}`,buildingAdjoins).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + if(err == 'infos 有重复方向!'){ + this.snackBar.open('建筑毗邻同步失败,存在相同方向','确定',config); + }else{ + this.snackBar.open('建筑毗邻同步失败','确定',config); + } + }) + + //批量保存建筑重点部位 + let buildingImportantLocations = this.canvasData.getBuildingImportantLocations() + this.http.post(`/api/BuildingImportantLocations/Batch?companyId=${this.params.companyId}&buildingId=${this.canvasData.selectStorey.buildingId}`,buildingImportantLocations).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('建筑重点部位同步失败','确定',config); + }) + + //批量保存建筑消防设施素材 + let buildingFacilityAssets = this.canvasData.getAllBuildingFacilityAssetInfo() + this.http.post(`/api/BuildingFacilityAssets/Batch?companyId=${this.params.companyId}&buildingId=${this.canvasData.selectStorey.buildingId}`,buildingFacilityAssets).subscribe(data => { + this.saveNum.push("1") + if(this.saveNum.length == 5){ + this.maskLayerService.sendMessage(false) + this.canvasData.isChange = false + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore'); + } + },err=>{ + this.maskLayerService.sendMessage(false) + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.canvasData.isChange = true + this.snackBar.open('建筑消防设施素材同步失败','确定',config); + }) + + } + } + }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'; + config.duration = 3000 + this.snackBar.open('暂无楼层数据','确定',config); + } + } + + //获得所有的建筑物 + getAllBuildings(init:boolean = false){ + this.http.get("/api/Buildings",{ params:{companyId : this.params.companyId}}).subscribe((data:any)=>{ + this.allBuildings = data + if (init) { + this.checkedBuildingIndex = 0 + data && data.length? this.beforeOneCheckedBuilding = data[0] : this.beforeOneCheckedBuilding = {id:null, buildingTypes:[{id:null}]} + this.getBuildingSitePlan(this.beforeOneCheckedBuilding) + } //if + }) + } + + //拖拽tree + drop(e){ + // console.log(1111,e) + } + drop2(e){ + // console.log(222,e) + } + + //创建建筑 + createBuilding(){ + let data = { + allBuildings:this.allBuildings, + companyId :this.params.companyId + } + let dialogRef = this.dialog.open(CreateBuildingBuilding,{data}); + dialogRef.afterClosed().subscribe(data=>{ + if (data == "创建成功") { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('创建成功','确定',config); + this.allBuildings.length? this.getAllBuildings() : this.getAllBuildings(true) + }else if (data == "创建失败") { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('创建失败','确定',config); + } + }); + } + + //选择建筑 + checkedBuilding(item,index){ + if (this.checkedBuildingIndex!=index) { + + if (this.canvasData.isChange) { //true 数据被改动 + let isTrue = confirm('是否保存当前编辑数据') + if (isTrue) { //先保存数据 在切换 + let isSuccess = this.saveSite()//true的时候 先保存数据 + if (isSuccess != false) { + this.beforeOneCheckedBuilding = item + this.checkedBuildingIndex = index + if (index==-1) { //总平面图数据 + this.getSitePlan() + } else { //建筑楼层/区域数据 + this.getBuildingSitePlan(item) + } + } + } else { + this.beforeOneCheckedBuilding = item + this.checkedBuildingIndex = index + if (index==-1) { //总平面图数据 + this.getSitePlan() + } else { //建筑楼层/区域数据 + this.getBuildingSitePlan(item) + } + } + } else { //flase 数据未被改动 + this.beforeOneCheckedBuilding = item + this.checkedBuildingIndex = index + if (index==-1) { //总平面图数据 + this.getSitePlan() + } else { //建筑楼层/区域数据 + this.getBuildingSitePlan(item) + } + } //if + + } //if + } + + //编辑建筑 + editBuilding(e,item){ + e.stopPropagation(); + let dialogRef = this.dialog.open(EditBuildingBuilding,{data: {item:item}}); + dialogRef.afterClosed().subscribe(data=>{ + if (data == "修改成功") { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('修改成功','确定',config); + this.getAllBuildings() + }else if (data == "修改失败") { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('修改失败','确定',config); + } + }); + } + + //删除建筑 + deleteBuilding(e,item){ + e.stopPropagation(); + if(confirm("是否删除该建筑") == true){ + let isHave = this.canvasData.allDisposalNode.find(items=>{ return items.buildingId === item.id }) + if (isHave == undefined) { + this.http.delete(`/api/Buildings/${item.id}`).subscribe(data=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('删除成功','确定',config); + this.getAllBuildings(true) + },err=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('删除失败','确定',config); + this.getAllBuildings(true) + }) + } else { //建筑 含有数据节点时 + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('含有数据节点的建筑不允许删除','确定',config); + } + } + } + + storeyData //将建筑素材和当前楼层素材合二为一 + + //处理 tree 数据结构 + handleTreeData (storeyData) { + + this.storeyData = storeyData + let data = this.allFireElements //所有消防要素模板 + let treeData = [] //tree型 处理完成后的数据 + data.forEach(element => { + element.isTemplate = true //添加模板标识 + element.isLook = true //添加是否可见标识 + element.name!='其他'? element.children = [] : null + + if(storeyData){ + for(let key in storeyData.data){ + storeyData.data[key].isLookPattern = true + if(element.id == storeyData.data[key].FireElementId){ + storeyData.data[key].isTemplate = false + storeyData.data[key].isLook = true + + element.isNewElement = true //该节点children是否存在新添加的真实素材 标识 + + //定义查看模式下能看到的元素 + element.isLookPattern = true + if(element.parentId){ + data.forEach(i => { + if(i.id == element.parentId){ + i.isLookPattern = true + } + }) + } + // + + element.children.push(storeyData.data[key]) + } + } + } + data.forEach(item => { if (item.parentId == element.id) {element.children.push(item)} }); + }); + data.forEach(element => { + if (!element.parentId) { treeData.push(element) } + }); + this.dataSource.data = treeData + this.treeControl.expandAll() + + } + + //点击树节点 + clickTreeNode(node){ + if(this.canvasData.originalcompanyBuildingData.data[node.id]){ + this.setAssetsProperty(this.canvasData.originalcompanyBuildingData.data[node.id]) + }else if(this.canvasData.originaleveryStoreyData.data[node.id]){ + this.setAssetsProperty(this.canvasData.originaleveryStoreyData.data[node.id]) + } + + //canvas上的素材高亮 + let iconHighLightArr:any = [] + if(node.isTemplate){//如果是模板,则开始向下找 + node.children.forEach(item => { + if(item.isTemplate){//如果子节点依旧是模板,则继续开始向下找 + item.children.forEach(i => { + iconHighLightArr.push(i.Id) + }) + }else{ + iconHighLightArr.push(item.Id) + } + }) + }else{ + iconHighLightArr.push(node.id) + } + this.canvas.setHighlight(iconHighLightArr) + } + + //点击数节点的显示隐藏icon + clickLookItem(node){ + + //修改真实素材islook属性 + for(let key in this.storeyData.data){ + if(key == node.id){ + this.storeyData.data[key].isLook = !this.storeyData.data[key].isLook + } + } + + //所有消防要素模板变化islook值 + if(node.isTemplate){ + this.allFireElements.forEach(item=>{ + if(item.id == node.id || item.name == "其他"){ + item.isLook = !item.isLook + } + }) + } + + + //子节点跟随父节点的islook变化 +   if(node.children && node.children.length != 0){ +      node.children.forEach(item=>{ +        item.isLook = !node.isLook  +        if(item.children && item.children.length != 0){ +          item.children.forEach(i=>{ +            i.isLook =  !node.isLook  +          }) +        } +      }) +     } + + + const nodes = this.treeControl.dataNodes; + const expandNodes = []; + nodes.forEach((item) => { + if(item.expandable && this.treeControl.isExpanded(item)){ + expandNodes.push(item.id); + } + }); + + this.dataSource.data = [...this.dataSource.data] + + let newNodes = this.treeControl.dataNodes; + newNodes = newNodes.filter(n => { + return expandNodes.indexOf(n.id) >= 0; + }); + newNodes.forEach(item => { + this.treeControl.expand(item); + }); + + //canvas上的素材显隐 + let iconVisibleArr:any = [] + if(node.isTemplate){//如果是模板,则开始向下找 + node.children.forEach(item => { + if(item.isTemplate){//如果子节点依旧是模板,则继续开始向下找 + item.children.forEach(i => { + iconVisibleArr.push(i.Id) + }) + }else{ + iconVisibleArr.push(item.Id) + } + }) + }else{ + iconVisibleArr.push(node.id) + } + this.canvas.setIconVisible(iconVisibleArr,!node.isLook) + } + + //计算 可视区域内宽度, 是否缩放背景图 + backGroundScale () { + // let that = this + // let dad = this.element.nativeElement.querySelector('.functionalDomainContent').clientWidth + // let dadHeight = this.element.nativeElement.querySelector('.functionalDomainContent').clientHeight + // let left = this.element.nativeElement.querySelector('.functionalDomainLeft').clientWidth + // let right = this.element.nativeElement.querySelector('.functionalDomainRight').clientWidth + // let imgWidth = dad - left - right//可视区域内 宽度 + // let img = new Image() + // img.src = this.selectingSitePlan.imageUrl; + // img.onload = function(){ + // if (img.height > dadHeight && img.width > imgWidth) { + // let width = imgWidth/img.width + // let height = dadHeight/img.height + // that.canvas.setBackgroundScale((width>height? height : width)-0.005) + // return + // } else if (img.height > dadHeight) { + // that.canvas.setBackgroundScale((dadHeight/img.height)-0.005) + // return + // } else if (img.width > imgWidth) { + // that.canvas.setBackgroundScale((imgWidth/img.width)-0.005) + // return + // } + // }; + } + + //封装 刷新 tree 数据 + async renovateTreeData (isRefresh:boolean = true) { + this.allFireElements[this.allFireElements.length-1].children = [] + isRefresh? await this.canvas.refresh() : null + this.canvas.setNameVisible(this.basicInfo,0) + this.canvas.setNameVisible(this.wantToWork,1) + isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false + isRefresh? this.isShowProperty = true : null + isRefresh? this.isShowAttribute = true : null + !this.pattern? this.mateFireForce() : null //刷新 建筑楼层 火源/力量图标 + + let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id + let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据 + let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据 + + for(let key in companyBuildingData.data){ + if (companyBuildingData.data[key].FloorId === beforeOneId) { //处理 单位/建筑 数据是否归于当前楼层下 + storeyData.data[key] = companyBuildingData.data[key] + } + } + for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组 + let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId ) + if (!noMatch) { + this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) + } + } + this.handleTreeData(storeyData) //处理tree数据结构 + } + + + + //陈鹏飞↓↓↓ + //陈鹏飞↓↓↓ + //陈鹏飞↓↓↓ + params = {companyId: sessionStorage.getItem('companyId')} + // params = {companyId: this.route.snapshot.queryParams.id} + allFireElements:any = []; //当前 单位/建筑 下的消防要素 + + isShowAttribute:boolean = true; //属性栏 是否显示 默认数据 + isShowProperty:boolean = false //属性栏 是否有东西 + + toggleExpandPanel:boolean = false; //左侧可展开面板展开或关闭 + toggleExpandPanelRight:boolean = false; //右侧可展开面板展开或关闭 + togglePlane:boolean = true; //可展开面板平面图 显隐 + toggleMaterialBank:boolean = false; //可展开面板素材库 显隐 + toggleHandlePlans:boolean = true; //可展开面板处置预案 显隐 + //可展开面板展开或关闭 + toggle () { + this.toggleExpandPanel = !this.toggleExpandPanel + } + //可展开面板展开或关闭 + toggle2 () { + this.toggleExpandPanelRight = !this.toggleExpandPanelRight + } + //可展开面板 平面图 展开或关闭 + togglePlanarGraph () { + this.togglePlane = !this.togglePlane + } + //可展开面板 素材库 展开或关闭 + toggleMaterial () { + this.toggleMaterialBank = !this.toggleMaterialBank + } + //可展开面板 处置预案 展开或关闭 + toggleHandlePlan () { + this.toggleHandlePlans = !this.toggleHandlePlans + } + + sitePlanData:any = []; //总平面图 楼层/区域 数据 + selectingSitePlan:any; //选中的 平面图 楼层/区域 + selectSitePlanIndex:number; //选中的 平面图 楼层/区域 index + + //获取总平面图 + getSitePlan () { + let fireData = this.getFireElements(sessionStorage.getItem('buildingTypeId')) //获取单位下 消防要素 + let planData = this.getSitePlanCompanyData() //获取 单位 数据 + this.http.get('/api/SitePlans',{params:this.params}).subscribe(data=>{ + this.sitePlanData = data + this.selectingSitePlan = this.sitePlanData[0] || {} + this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 + this.selectSitePlanIndex = 0 + + Promise.all([fireData,planData]).then((res)=>{ + this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据 + }) + + }) + } + + //获取建筑 楼层/区域 + getBuildingSitePlan (item) { + let params = { buildingId: item.id } + let fireData = this.getFireElements(item.buildingTypes[0].id || '') //获取建筑下 消防要素 + let planData = this.getBuildingData(params) //获取 建筑 数据 + this.http.get('/api/BuildingAreas',{params}).subscribe(data=>{ + this.sitePlanData = data + this.selectingSitePlan = this.sitePlanData[0] || {} + this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 + this.selectSitePlanIndex = 0 + + Promise.all([fireData,planData]).then((res)=>{ + this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据 + }) + + }) + } + + //根据单位类型获得所有的消防要素 + getFireElements (e) { + let params = {ids:e} + return new Promise ((resolve,reject)=>{ + this.http.get('/api/Companies/FireElements',{params}).subscribe((data:any)=>{ + this.allFireElements = data //所有消防要素 + let other = { + children: [], + computed: true, + id: '', + name: '其他', + order: 999, + parentId: null, + tag: "INPUT", + isLookPattern : true + } + this.allFireElements.push(other) + resolve('success') + }) + }) + } + + //获取 单位 数据 + getSitePlanCompanyData () { + return new Promise ((resolve,reject)=>{ + this.http.get('/api/CompanyData',{params:this.params}).subscribe((data:any)=>{ + this.canvasData.originalcompanyBuildingData = data || {} // 单位原数据 + this.canvasData.originalcompanyBuildingData.data? this.canvasData.originalcompanyBuildingData.data = JSON.parse(this.canvasData.originalcompanyBuildingData.data) : this.canvasData.originalcompanyBuildingData.data = {} + this.canvasData.originalcompanyBuildingData.version = "2.0" + this.canvasData.originalcompanyBuildingData.companyId? null : this.canvasData.originalcompanyBuildingData.companyId = sessionStorage.getItem('companyId') + resolve('success') + }) + }) + } + + //获取 平面图 楼层数据 + getSitePlanStorey (e) { + let params = {sitePlanId: e.id} + this.http.get(`/api/SitePlanData`,{params}).subscribe((data:any)=>{ + this.canvasData.originaleveryStoreyData = data || {} // 楼层原数据 + this.canvasData.originaleveryStoreyData.data? this.canvasData.originaleveryStoreyData.data = JSON.parse(this.canvasData.originaleveryStoreyData.data) : this.canvasData.originaleveryStoreyData.data = {} + this.canvasData.originaleveryStoreyData.version = "2.0" + this.canvasData.originaleveryStoreyData.sitePlanId? null : this.canvasData.originaleveryStoreyData.sitePlanId = e.id || null + this.renovateTreeData() + }) + } + + //获取 建筑 数据 + getBuildingData (e) { + return new Promise ((resolve,reject)=>{ + this.http.get(`/api/BuildingData`,{params:e}).subscribe((data:any)=>{ + this.canvasData.originalcompanyBuildingData = data || {} // 建筑原数据 + this.canvasData.originalcompanyBuildingData.data? this.canvasData.originalcompanyBuildingData.data = JSON.parse(this.canvasData.originalcompanyBuildingData.data) : this.canvasData.originalcompanyBuildingData.data = {} + this.canvasData.originalcompanyBuildingData.version = "2.0" + this.canvasData.originalcompanyBuildingData.buildingId? null : this.canvasData.originalcompanyBuildingData.buildingId = e.buildingId + resolve('success') + }) + }) + } + + //获取 建筑 楼层数据 + getBuildingStorey (e) { + let params = {buildingAreaId: e.id} + this.http.get(`/api/BuildingAreaData`,{params}).subscribe((data:any)=>{ + this.canvasData.originaleveryStoreyData = data || {} // 楼层原数据 + this.canvasData.originaleveryStoreyData.data? this.canvasData.originaleveryStoreyData.data = JSON.parse(this.canvasData.originaleveryStoreyData.data) : this.canvasData.originaleveryStoreyData.data = {} + this.canvasData.originaleveryStoreyData.version = "2.0" + this.canvasData.originaleveryStoreyData.buildingAreaId? null : this.canvasData.originaleveryStoreyData.buildingAreaId = e.id || null + this.renovateTreeData() + }) + } + + //点击选中 平面图 楼层/区域 时 + selectSitePlan (item,index) { + if (this.selectSitePlanIndex != index) { + this.canvasData.selectPanelPoint = new DisposalNodeData(); + if (this.canvasData.isChange) { //true 数据被改动 + let isTrue = confirm('是否保存当前编辑数据') + if (isTrue) { //先保存数据 在切换 + let isSuccess = this.saveSite()//true的时候 先保存数据 + if (isSuccess != false) { + this.selectingSitePlan = item + this.selectSitePlanIndex = index + this.canvasData.selectStorey = item //服务中 存一份数据 + if (this.checkedBuildingIndex==-1) { //总平面图时 + this.getSitePlanStorey(item) //获取 平面图 楼层数据 + } else { //楼层/区域时 + this.getBuildingStorey(item) //获取 建筑 楼层数据 + } + } + } else { //不保存数据 直接切换 + this.selectingSitePlan = item + this.selectSitePlanIndex = index + this.canvasData.selectStorey = item //服务中 存一份数据 + if (this.checkedBuildingIndex==-1) { //总平面图时 + this.getSitePlanStorey(item) //获取 平面图 楼层数据 + this.getSitePlanCompanyData() + } else { //楼层/区域时 + this.getBuildingStorey(item) //获取 建筑 楼层数据 + let params = { buildingId: this.beforeOneCheckedBuilding.id } + this.getBuildingData(params) + } + } + + } else { //false 数据没被改动 + this.selectingSitePlan = item + this.selectSitePlanIndex = index + this.canvasData.selectStorey = item //服务中 存一份数据 + if (this.checkedBuildingIndex==-1) { //总平面图时 + this.getSitePlanStorey(item) //获取 平面图 楼层数据 + } else { //楼层/区域时 + this.getBuildingStorey(item) //获取 建筑 楼层数据 + } + } //if + + } + } + + //新增平面图 楼层/区域 + foundPanel (e) { + e.stopPropagation() + let data = { + isBuilding: this.checkedBuildingIndex==-1? false:true, + Panel: this.beforeOneCheckedBuilding, + order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0, + } + let dialogRef = this.dialog.open(leftFunctionalDomainBuildingComponent,{data}); + dialogRef.afterClosed().subscribe(data=>{ + if (data =='总平面图') { + this.renovateSitePlan() + } else if (data =='建筑') { + this.renovateBuilding() + } + }) + } + + //编辑平面图 楼层/区域 + editPlaneData (e) { + let data = { + isBuilding: this.checkedBuildingIndex==-1? false:true, + Panel: this.beforeOneCheckedBuilding, + buildingData: e, + } + let dialogRef = this.dialog.open(editPlaneFigureBuildingComponent,{data}); + dialogRef.afterClosed().subscribe(data=>{ + if (data =='总平面图') { + this.renovateSitePlan() + } else if (data =='建筑') { + this.renovateBuilding() + } + }) + } + + //平面图 楼层/区域 上移 + moveUp (item,index) { + if (index != 0) { + let replaceIndex = this.sitePlanData[index].order + this.sitePlanData[index].order = this.sitePlanData[index-1].order + this.sitePlanData[index-1].order = replaceIndex + if (this.checkedBuildingIndex==-1) { //总平面图 + this.http.put(`/api/SitePlans/${this.sitePlanData[index-1].id}`,this.sitePlanData[index-1]).subscribe(data=>{ + this.http.put(`/api/SitePlans/${this.sitePlanData[index].id}`,this.sitePlanData[index]).subscribe(data=>{ + this.selectSitePlanIndex = this.selectSitePlanIndex-1 + this.renovateSitePlan() + }) + }) + } else { //楼层/区域 + this.http.put(`/api/BuildingAreas/${this.sitePlanData[index-1].id}`,this.sitePlanData[index-1],{params:this.params}).subscribe(data=>{ + this.http.put(`/api/BuildingAreas/${this.sitePlanData[index].id}`,this.sitePlanData[index],{params:this.params}).subscribe(data=>{ + this.selectSitePlanIndex = this.selectSitePlanIndex-1 + this.renovateBuilding() + }) + }) + } + + } //if index + } + + //平面图 楼层/区域 下移 + moveDown (item,index) { + if (index != this.sitePlanData.length-1) { + let replaceIndex = this.sitePlanData[index].order + this.sitePlanData[index].order = this.sitePlanData[index+1].order + this.sitePlanData[index+1].order = replaceIndex + if (this.checkedBuildingIndex==-1) { //总平面图 + this.http.put(`/api/SitePlans/${this.sitePlanData[index+1].id}`,this.sitePlanData[index+1]).subscribe(data=>{ + this.http.put(`/api/SitePlans/${this.sitePlanData[index].id}`,this.sitePlanData[index]).subscribe(data=>{ + this.selectSitePlanIndex = this.selectSitePlanIndex+1 + this.renovateSitePlan() + }) + }) + } else { //楼层/区域 + this.http.put(`/api/BuildingAreas/${this.sitePlanData[index+1].id}`,this.sitePlanData[index+1],{params:this.params}).subscribe(data=>{ + this.http.put(`/api/BuildingAreas/${this.sitePlanData[index].id}`,this.sitePlanData[index],{params:this.params}).subscribe(data=>{ + this.selectSitePlanIndex = this.selectSitePlanIndex+1 + this.renovateBuilding() + }) + }) + } + + } //if index + } + + //旋转底图 + revolveImg (item) { + item.imageAngle==270? item.imageAngle = 0 : item.imageAngle = item.imageAngle+90 + if (this.checkedBuildingIndex==-1) { //总平面图 + this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{ + let isSuccess = this.renovateSitePlan() + isSuccess.then(res=>{ + this.canvas.refreshBackgroundImage() + }) + }) + } else { //楼层/区域 + this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{ + let isSuccess = this.renovateBuilding() + isSuccess.then(res=>{ + this.canvas.refreshBackgroundImage() + }) + }) + } + + } + + //删除 平面图 楼层/区域 + deletePlaneData (item) { + const isDelete = confirm('您确定要删除吗'); + if (isDelete) { + if (this.checkedBuildingIndex==-1) { //总平面图 + let isHave = this.canvasData.allDisposalNode.find(items=>{ return items.sitePlanId === item.id }) + if (isHave == undefined) { + this.http.delete(`/api/SitePlans/${item.id}`).subscribe(data=>{ + this.deleteShareData(item,-1) + }) + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('含有数据节点的楼层不允许删除','确定',config); + } + } else { //楼层/区域 + let isHave = this.canvasData.allDisposalNode.find(items=>{ return items.buildingAreaId === item.id }) + if (isHave == undefined) { + this.http.delete(`/api/BuildingAreas/${item.id}`).subscribe(data=>{ + this.deleteShareData(item,1) + }) + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('含有数据节点的楼层不允许删除','确定',config); + } + } + } + } + + //删除当前 单位/建筑的 共享数据中 已删除data + deleteShareData (e,isCompany) { + this.sitePlanData.forEach((element,index) => { + if (element.id===e.id) { + this.sitePlanData.splice(index,1) + return + } + }); + let data = this.canvasData.originalcompanyBuildingData; + for(let key in data.data){ + if (data.data[key].FloorId === e.id) { //处理 单位/建筑 数据是否归于当前楼层下 + delete data.data[key] + } + } + let newData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); + newData.data = JSON.stringify(newData.data) // 转换JSON 数据格式 + this.selectingSitePlan = this.sitePlanData[0] || {} + this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 + this.selectSitePlanIndex = 0 + this.canvasData.isChange = false + if (isCompany===-1) { + this.http.post("/api/CompanyData",newData).subscribe(data => {}) + this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据 + } else { + this.http.post("/api/BuildingData",newData,{params:this.params}).subscribe(data => {}) + this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据 + } + } + + //复制图层 平面图 楼层/区域 + duplicateLayer (item) { + let paramsData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData.data || {} )) + Object.keys(paramsData).forEach((key)=>{ + if (key != '图例') { + let ID = ObjectID.default.generate() + paramsData[key].Id = ID + paramsData[ID] = paramsData[key] + delete paramsData[key] + } + }) //图标Id重新赋值 + if (this.checkedBuildingIndex==-1) { //总平面图 + item.id = "" + item.modifiedTime = new Date() + item.name = item.name + '(副本)' + item.order = this.sitePlanData[this.sitePlanData.length-1].order+1 + this.http.post('/api/SitePlans',item).subscribe((data:any)=>{ + let newData = { + version: "2.0", + id: "", + data: JSON.stringify( paramsData ) || null, + sitePlanId: data.id + } + this.http.post('/api/SitePlanData',newData,{params:this.params}).subscribe(data=>{ + this.renovateSitePlan() + }) + + }) + } else { //楼层/区域 + item.id = "" + item.modifiedTime = new Date() + item.name = item.name + '(副本)' + item.order = this.sitePlanData[this.sitePlanData.length-1].order+1 + this.http.post('/api/BuildingAreas',item,{params:this.params}).subscribe((data:any)=>{ + let newData = { + version: "2.0", + id: "", + data: JSON.stringify( paramsData ) || null, + buildingAreaId: data.id + } + this.http.post('/api/BuildingAreaData',newData,{params:this.params}).subscribe(data=>{ + this.renovateBuilding() + }) + + }) + } + } + + //平面图 楼层/区域 替换底图 + replaceBaseMap (e,item) { + e.stopPropagation(); + let file = e.target.files[0] || null //获取上传的文件 + let fileSize = file.size || null //上传文件的总大小 + let maxSize = 5 * 1024 * 1024 //5MB一个分片 + + if (file && fileSize<=maxSize) { //上传文件<=5MB时 + let formData = new FormData() + formData.append("file",file) + this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{ + this.renovateBaseMap(data.objectName,item) + }) + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传底图需小于5MB','确定',config); + } + } + + //封装 替换底图 function + renovateBaseMap (e,item) { + item.imageUrl = '/api/Objects/WebPlan2D/' + e + if (this.checkedBuildingIndex ==-1) { //总平面图 + this.http.put(`/api/SitePlans/${item.id}`,item).subscribe(data=>{ + let isSuccess = this.renovateSitePlan() + isSuccess.then(res=>{ + this.canvas.refreshBackgroundImage() + }) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传底图成功','确定',config); + }) + } else { //楼层/区域 + this.http.put(`/api/BuildingAreas/${item.id}`,item,{params:this.params}).subscribe(data=>{ + let isSuccess = this.renovateBuilding() + isSuccess.then(res=>{ + this.canvas.refreshBackgroundImage() + }) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传底图成功','确定',config); + }) + } + } + + //封装 刷新总平面图 数据 + renovateSitePlan () { + return new Promise ((resolve,reject)=>{ + this.http.get('/api/SitePlans',{params:this.params}).subscribe(data=>{ + this.sitePlanData = data + this.selectingSitePlan = this.sitePlanData[this.selectSitePlanIndex] + this.canvasData.selectStorey = this.sitePlanData[this.selectSitePlanIndex] //服务中 存一份数据 + this.canvasData.originaleveryStoreyData.sitePlanId? null : this.canvasData.originaleveryStoreyData.sitePlanId = this.selectingSitePlan.id || null + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('数据更新成功','确定',config); + resolve('success') + }) + }) + } + + //封装 刷新 楼层/区域 数据 + renovateBuilding () { + let params = { + buildingId: this.beforeOneCheckedBuilding.id + } + return new Promise ((resolve,reject)=>{ + this.http.get('/api/BuildingAreas',{params}).subscribe(data=>{ + this.sitePlanData = data + this.selectingSitePlan = this.sitePlanData[this.selectSitePlanIndex] + this.canvasData.selectStorey = this.sitePlanData[this.selectSitePlanIndex] //服务中 存一份数据 + this.canvasData.originaleveryStoreyData.buildingAreaId? null : this.canvasData.originaleveryStoreyData.buildingAreaId = this.selectingSitePlan.id || null + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('数据更新成功','确定',config); + resolve('success') + }) + }) + } + + allLibrary:any = []; //所有素材库 + 素材 + selectLibrary:any; //选中的素材库 + selectImage:any; //选中的素材库图片 + selectImageIndex:number; //选中的素材库图片index + + //获取素材库 + getAllLibrary (type:string='input') { + this.http.get(`/api/AssetLibraries?tag=${type}`).subscribe((data:any)=>{ + data.forEach(element => { + element.images = [] + }); + this.allLibrary = data + this.selectImageIndex = -1 + }) + } + + //素材库展开面板展开时 + opened (e) { + if (!e.images.length) { //当前素材库没加载素材时 + this.http.get(`/api/Assets?libraryId=${e.id}`).subscribe((data:any)=>{ + e.images = data + }) + } + } + + //点击选中素材库图片时 + selectImg (item,items,index) { + this.selectLibrary = item.name + this.selectImage = items + this.selectImageIndex = index + this.canvasData.selectTemplateData = items + this.canvas.beginPaint() + } + + + + //处置预案 + allFirePlan:any = []; //所有灾情 + selectDisposalNode:string = ''; //当前点击tree节点 css选中样式 + + //获取所有灾情 + getAllFirePlan () { + let params = {componentId: sessionStorage.getItem('planId')} + this.http.get('/api/Disasters',{params:params}).subscribe((data:any)=>{ + if (!data.length) { //该 单位没有灾情时 + let msg = { + name: '灾情', + modifiedTime: new Date(), + planComponentId: sessionStorage.getItem('planId') + } + this.http.post('/api/Disasters',msg).subscribe(data=>{ + this.allFirePlan.push(data) + let params = {disasterId: this.allFirePlan[0].id || ''} + this.http.get('/api/DisposalNodes',{params:params}).subscribe(data=>{ //所有处置节点 + this.canvasData.allDisposalNode = data + }) + }) + } else { //单位 有灾情时 + this.allFirePlan = data + let params = {disasterId: this.allFirePlan[0].id || ''} + this.http.get('/api/DisposalNodes',{params:params}).subscribe(data=>{ //所有处置节点 + this.canvasData.allDisposalNode = data + }) + } + }) + } + + //获取所有处置节点 + getDisposalNode () { + this.selectDisposalNode = '' + let params = {disasterId: this.allFirePlan[0].id || ''} + this.http.get('/api/DisasterData/Markers',{params:params}).subscribe(data=>{ //灾情标签信息 + this.canvasData.allNodeMarkers = data + this.mateFireForce() + }) + this.http.get('/api/DisposalNodes',{params:params}).subscribe(data=>{ //处置节点 + this.canvasData.allDisposalNode = data + this.handleHybridTree() + }) + } + + treeData:any = []; //渲染tree处理完成数据 + defaultExpandedKeys:any = []; //首次渲染 tree展开状态 + //处理 节点 Tree数据 + handleHybridTree () { + this.defaultExpandedKeys = [] + let treeData = [] + let data = JSON.parse(JSON.stringify( this.canvasData.allDisposalNode || [] )) + data.forEach(element => { + this.defaultExpandedKeys.push(element.id) + element.title = element.name //name + element.key = element.id //id + element.children = [] //children + if (element.sitePlanId || element.buildingAreaId) { //是数据节点 + element.isLeaf = true + element.isDataNode = true + } else { //不是数据节点 + element.isLeaf = false + element.isDataNode = false + } + data.forEach(item=>{ + item.parentId === element.id? element.children.push(item) : null + }) + }); + data.forEach(element=>{ + !element.parentId? treeData.push(element) : null + }) + this.treeData = [...treeData] + this.defaultExpandedKeys = [...this.defaultExpandedKeys] + } + + //刷新 treeData 保存已展开节点 + refurbishTreeData () { + this.defaultExpandedKeys = [] + let params = {disasterId: this.allFirePlan[0].id || ''} + this.http.get('/api/DisposalNodes',{params:params}).subscribe(nodeData=>{ //处置节点 + this.canvasData.allDisposalNode = nodeData + let oldTreeData = this.nzTreeComponent.getExpandedNodeList() + oldTreeData.forEach(item=>{ + this.defaultExpandedKeys.push(item.key) + }) + let treeData = [] + let data = JSON.parse(JSON.stringify( this.canvasData.allDisposalNode || [] )) + data.forEach(element => { + element.title = element.name //name + element.key = element.id //id + element.children = [] //children + if (element.sitePlanId || element.buildingAreaId) { //是数据节点 + element.isLeaf = true + element.isDataNode = true + } else { //不是数据节点 + element.isLeaf = false + element.isDataNode = false + } + data.forEach(item=>{ + item.parentId === element.id? element.children.push(item) : null + }) + }); + data.forEach(element=>{ + !element.parentId? treeData.push(element) : null + }) + this.treeData = [...treeData] + this.defaultExpandedKeys = [...this.defaultExpandedKeys] + }) + } + + sitePlanIcon = {fire:0,force:0} // 总平面图 火源/力量 图标 是否展示 + + //刷新 建筑楼层 匹配 火源/力量 图标 + mateFireForce () { + let data = this.canvasData.allNodeMarkers.markers || {} + for(let key in data){ //遍历 火/力量 图标 + this.sitePlanData.forEach(element => { //楼层 + if (element.id==key) { // 相匹配时 + data[key].fireCount != 0? element.fire=1 : element.fire=0 + data[key].forceCount != 0? element.force=1 : element.force=0 + } + }); + this.allBuildings.forEach(element => { //建筑 + if (element.id==key) { // 相匹配时 + data[key].fireCount != 0? element.fire=1 : element.fire=0 + data[key].forceCount != 0? element.force=1 : element.force=0 + } + }); + if (this.params.companyId==key) { //总平面图时 + data[key].fireCount != 0? this.sitePlanIcon.fire=1 : this.sitePlanIcon.fire=0 + data[key].forceCount != 0? this.sitePlanIcon.force=1 : this.sitePlanIcon.force=0 + } + } + + let buildingMSG = this.canvasData.allNodeMarkers.highlightMarkers || {} + for (let key in buildingMSG) { + if (key === this.canvasData.selectPanelPoint.DisposalNodeId) { + for (let keys in buildingMSG[key]) { + this.sitePlanData.forEach(element => { //楼层 + if (element.id === keys) { + buildingMSG[key][keys].fireCount != 0? element.fire=2 : null + buildingMSG[key][keys].forceCount != 0? element.force=2 : null + } + }); + this.allBuildings.forEach(element => { //建筑 + if (element.id === keys) { // 相匹配时 + buildingMSG[key][keys].fireCount != 0? element.fire=2 : null + buildingMSG[key][keys].forceCount != 0? element.force=2 : null + } + }); + if (this.params.companyId === keys) { //总平面图时 + buildingMSG[key][keys].fireCount != 0? this.sitePlanIcon.fire=2 : null + buildingMSG[key][keys].forceCount != 0? this.sitePlanIcon.force=2 : null + } + } + } + } + } + + // 切换 基本信息时 刷新 删除 建筑楼层 自定义属性 + mateDeleteCustomize () { + this.canvasData.selectPanelPointBaseData = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''} + this.defaultExpandedKeys = [] + this.sitePlanIcon = {fire:0,force:0} + this.sitePlanData.forEach(element => { //楼层 + delete element.fire + delete element.force + }); + this.allBuildings.forEach(element => { //建筑 + delete element.fire + delete element.force + }); + } + + //计算差异 + countValue (e) { + e.stopPropagation() + let params = {disasterId: this.allFirePlan[0].id || ''} + this.http.get('/api/DisasterData/Diffs',{params:params}).subscribe(data=>{ + this.canvasData.allNodeMarkers = data + this.mateFireForce() + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('计算差异完成','确定',config); + }) + } + + //新建 处置预案 节点 + 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() + if (confirm(`确定要复制 ${item.title} ?`)) { + let params = {id: item.origin.id} + let order + if (item.level==0) { + treeData.length? order = treeData[treeData.length-1].order+1 : order = 0 + } else { + let parent = item.getParentNode() //获取父节点 + parent.origin.children.length? order = parent.origin.children[parent.origin.children.length-1].order+1 : order = 0 + } + let data = { + name: item.title + '(副本)', + level: item.level, + order: order, + description: '', + disasterId: item.origin.disasterId || '', + parentId: item.origin.parentId || null, + planComponentId: item.origin.planComponentId || '', + } + this.http.post('/api/DisposalNodes/Clone',data,{params:params}).subscribe(data=>{ + this.refurbishTreeData() + }) + } //isTrue + } + + //删除 处置预案 节点 + deletePanelPoint (e,item) { + e.stopPropagation() + if (confirm(`确定要删除 ${item.name} ?`)) { + this.http.delete(`/api/DisposalNodes/${item.id}`).subscribe(data=>{ + this.refurbishTreeData() + }) + } + } + + //点击 处置Tree节点 + selectanelPoint (e) { + if (!e.buildingAreaId && !e.sitePlanId) { //当前节点 不是 数据节点 时 + let msg = this.canvasData.findDisposalNode(e.id) + this.canvasData.selectPanelPointBaseData = msg + this.selectDisposalNode == msg.id? this.selectDisposalNode = '' : this.selectDisposalNode = msg.id //选中 节点 + + } else if (e.buildingAreaId || e.sitePlanId) { //当前节点 是 数据节点 时 + let msg = this.canvasData.findDisposalNode(e.parentId) + this.canvasData.selectPanelPointBaseData = msg + this.selectDisposalNode = e.parentId //选中 节点 + + if (this.canvasData.selectPanelPoint.DisposalNodeId != e.id) { //选择节点 不是当前节点时 + let params = {nodeId: e.id} + let parameter = { //查询 节点 对应 建筑/楼层 index,id + buildingIndex: e.sitePlanId? -1 : this.allBuildings.findIndex(item=>{ return item.id===e.buildingId }), //总平面图/建筑 index + storeyId: e.sitePlanId? e.sitePlanId : e.buildingAreaId, //楼层id + } + this.http.get('/api/DisposalNodeData',{params:params}).subscribe(data=>{ + this.canvasData.selectPanelPoint = this.canvasData.deserialize(JSON.stringify(data || new DisposalNodeData())) //选择 当前 节点 + this.canvasData.selectPanelPoint.Data = this.canvasData.deserialize(this.canvasData.selectPanelPoint.Data) + this.seekPanelPoint(parameter) + }) + } //if + + } //else if + } + + //查找 数据节点 对应 建筑/楼层 + seekPanelPoint (paramsData) { + this.checkedBuildingIndex = paramsData.buildingIndex + if (paramsData.buildingIndex ==-1) { //总平面图时 + this.beforeOneCheckedBuilding={name:"总平面图"} + let fireData = this.getFireElements(sessionStorage.getItem('buildingTypeId')) //获取单位下 消防要素 + let planData = this.getSitePlanCompanyData() //获取 单位 数据 + this.http.get('/api/SitePlans',{params:this.params}).subscribe(data=>{ + this.sitePlanData = data + let index = this.sitePlanData.findIndex(item=>{ return item.id===paramsData.storeyId }) + this.selectingSitePlan = this.sitePlanData[index] || {} + this.canvasData.selectStorey = this.sitePlanData[index] || {} //服务中 存一份数据 + this.selectSitePlanIndex = index + + Promise.all([fireData,planData]).then((res)=>{ + this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据 + }) + }) //get + } else { //建筑时 + this.beforeOneCheckedBuilding=this.allBuildings[paramsData.buildingIndex] + let params = { buildingId: this.beforeOneCheckedBuilding.id } + let fireData = this.getFireElements(this.beforeOneCheckedBuilding.buildingTypes[0].id || '') //获取建筑下 消防要素 + let planData = this.getBuildingData(params) //获取 建筑 数据 + this.http.get('/api/BuildingAreas',{params}).subscribe(data=>{ + this.sitePlanData = data + let index = this.sitePlanData.findIndex(item=>{ return item.id===paramsData.storeyId }) + this.selectingSitePlan = this.sitePlanData[index] || {} + this.canvasData.selectStorey = this.sitePlanData[index] || {} //服务中 存一份数据 + this.selectSitePlanIndex = index + + Promise.all([fireData,planData]).then((res)=>{ + this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据 + }) + }) //get + } + } + + + +} + + + +//创建建筑 +@Component({ + selector: 'app-createBuilding-building', + templateUrl: './createBuilding.html', + styleUrls: ['./collection-tools.component.scss'] +}) +export class CreateBuildingBuilding { + + constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + + allBuildingType:any//所有的建筑类型 + selected:any; //选中的建筑 + ngOnInit(): void { + this.getAllBuildingType() + } + + //获得所有单位类型 + getAllBuildingType(){ + this.http.get("/api/BuildingTypes/Simple").subscribe(data=>{ + this.allBuildingType = data + }) + } + + //创建建筑功能分区 + onSubmit (e) { + let companyId = sessionStorage.getItem("companyId") + let lastBuildingOrder = this.data.allBuildings.length != 0 ? this.data.allBuildings[this.data.allBuildings.length - 1].order + 1 : 0 + let data = + { + id: "", + name: e.propertyName, + order: lastBuildingOrder , + enabled: true, + companyId: companyId, + buildingTypes: [ + { + id: e.buildingId, + name: "" + } + ] + } + this.http.post("/api/Buildings",data,{ + params:{ + companyId : this.data.companyId + } + }).subscribe(data=>{ + this.dialogRef.close("创建成功"); + },err=>{ + this.dialogRef.close("创建失败"); + }) + } +} + +//编辑建筑 +@Component({ + selector: 'app-editBuilding-building', + templateUrl: './editBuilding.html', + styleUrls: ['./collection-tools.component.scss'] +}) +export class EditBuildingBuilding { + + constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + + defaultName:String = this.data.item.name//默认建筑名称 + defaultBuildingType:String = this.data.item.buildingTypes[0].id//默认建筑类型 + allBuildingType:any//所有的建筑类型 + + ngOnInit(): void { + this.getAllBuildingType() + } + + getAllBuildingType(){ + this.http.get("/api/BuildingTypes/Simple").subscribe(data=>{ + this.allBuildingType = data + }) + } + + //编辑建筑信息 + onSubmit (e) { + let companyId = sessionStorage.getItem("companyId") + let data = + { + id: this.data.item.id, + name: e.propertyName, + order: this.data.item.order, + enabled: true, + companyId: companyId, + buildingTypes: [ + { + id: e.buildingId, + name: "" + } + ] + } + this.http.put(`/api/Buildings/${this.data.item.id}`,data,{ + params:{ + id:this.data.item.id, + companyId:companyId + } + }).subscribe(data=>{ + this.dialogRef.close("修改成功"); + },err=>{ + this.dialogRef.close("修改失败"); + }) + } +} + +//查看图片大图 +@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/createBuilding.html b/src/app/ui/collection-tools-building/createBuilding.html new file mode 100644 index 0000000..16fdd7b --- /dev/null +++ b/src/app/ui/collection-tools-building/createBuilding.html @@ -0,0 +1,28 @@ +
新增建筑
+
+
+ +
+ + + +
+
+ + + + {{item.name}} + + + +
+
+ + +
+
+
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/editBuilding.html b/src/app/ui/collection-tools-building/editBuilding.html new file mode 100644 index 0000000..433316d --- /dev/null +++ b/src/app/ui/collection-tools-building/editBuilding.html @@ -0,0 +1,23 @@ +
编辑建筑
+
+
+
+ + + +
+
+ + + + {{item.name}} + + + +
+
+ + +
+
+
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/editDisposalNode.html b/src/app/ui/collection-tools-building/editDisposalNode.html new file mode 100644 index 0000000..40b2270 --- /dev/null +++ b/src/app/ui/collection-tools-building/editDisposalNode.html @@ -0,0 +1,23 @@ +
+
+ +
+ +
+ +
+ + + +
+ +
+ + +
+ +
+ +
\ No newline at end of file diff --git a/src/app/ui/collection-tools-building/editPlaneFigure.html b/src/app/ui/collection-tools-building/editPlaneFigure.html new file mode 100644 index 0000000..a0f8016 --- /dev/null +++ b/src/app/ui/collection-tools-building/editPlaneFigure.html @@ -0,0 +1,39 @@ +
+ +
+ + +
+ +
+ +
+ + + +
+ +
+ 是否为避难层 +
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ +
+ +
\ 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 new file mode 100644 index 0000000..e60ca32 --- /dev/null +++ b/src/app/ui/collection-tools-building/leftFunctionalDomain.ts @@ -0,0 +1,180 @@ +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'; + +@Component({ + selector: 'app-leftFunctionalDomain-building', + templateUrl: './addPlaneFigure.html', + styleUrls: ['./panel.scss'] +}) +export class leftFunctionalDomainBuildingComponent implements OnInit { + + constructor( + private http:HttpClient, + public dialog: MatDialog, + public snackBar: MatSnackBar, + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data) { } + + ngOnInit(): void { + + } + + params = {companyId: sessionStorage.getItem('companyId')} + checked:boolean = false;//是否为避难层 + + //提交表单创建平面图 + onSubmit (e) { + if (!this.data.isBuilding) { //总平面图 创建平面图 + let data = { + companyId: sessionStorage.getItem('companyId'), + name: e.name, + order: this.data.order, + area:e.area, + details:e.details, + enabled: true, + modifiedTime: new Date(), + } + this.http.post('/api/SitePlans',data).subscribe(data=>{ + this.dialogRef.close('总平面图'); + }) + } else { //建筑 创建楼层/区域 + let data = { + isRefugeStorey: e.isRefugeStorey, + buildingId: this.data.Panel.id, + name: e.name, + order: this.data.order, + area:e.area, + details:e.details, + enabled: true, + modifiedTime: new Date(), + } + this.http.post('/api/BuildingAreas',data,{params:this.params}).subscribe(data=>{ + this.dialogRef.close('建筑'); + }) + } + } + + + +} + +//编辑平面图 楼层/区域 +@Component({ + selector: 'app-editPlaneFigure-building', + templateUrl: './editPlaneFigure.html', + styleUrls: ['./panel.scss'] +}) +export class editPlaneFigureBuildingComponent implements OnInit { + + constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + + ngOnInit(): void { + this.name = this.data.buildingData.name || '' + this.checked = this.data.buildingData.isRefugeStorey || false + this.area = this.data.buildingData.area || 0 + this.details = this.data.buildingData.details || '' + } + + params = {companyId: sessionStorage.getItem('companyId')} + name:any; //name + checked:boolean = false;//是否为避难层 + area:number; //面积 + details:string; //详情 + + //提交表单修改平面图 + onSubmit (e) { + if (!this.data.isBuilding) { //总平面图 修改平面图 + let data = { + companyId: sessionStorage.getItem('companyId'), + id: this.data.buildingData.id, + name: e.name, + cadUrl: this.data.buildingData.cadUrl, + imageUrl: this.data.buildingData.imageUrl, + imageAngle: this.data.buildingData.imageAngle, + order: this.data.buildingData.order, + area:e.area, + details:e.details, + enabled: this.data.buildingData.enabled, + modifiedTime: new Date(), + } + this.http.put(`/api/SitePlans/${this.data.buildingData.id}`,data).subscribe(data=>{ + this.dialogRef.close('总平面图'); + }) + } else { //建筑 修改楼层/区域 + let data = { + isRefugeStorey: e.isRefugeStorey, + buildingId: this.data.Panel.id, + id: this.data.buildingData.id, + name: e.name, + cadUrl: this.data.buildingData.cadUrl, + imageUrl: this.data.buildingData.imageUrl, + imageAngle: this.data.buildingData.imageAngle, + order: this.data.buildingData.order, + area:e.area, + details:e.details, + enabled: this.data.buildingData.enabled, + modifiedTime: new Date(), + } + this.http.put(`/api/BuildingAreas/${this.data.buildingData.id}`,data,{params:this.params}).subscribe(data=>{ + this.dialogRef.close('建筑'); + }) + } + } + + + +} + + + +//创建 处置预案 节点 +@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/panel.scss b/src/app/ui/collection-tools-building/panel.scss new file mode 100644 index 0000000..f0ae073 --- /dev/null +++ b/src/app/ui/collection-tools-building/panel.scss @@ -0,0 +1,291 @@ +.matIcons { + color: #8E909F; +} + + + +//平面图 素材库 公共样式 头部 +.planarGraphHeader{ + height: 35px; + min-height: 35px; + cursor: pointer; + display: flex; + flex-direction: row; + align-items: center; + padding: 0 24px; + border-radius: 5px; + font-family: Roboto, "Helvetica Neue", sans-serif; + font-size: 15px; + font-weight: 400; + color: #000; + background: linear-gradient(to top,#cdced1,#FFF); +} +//平面图头部字体图标样式 +.hover { + width: 18px; + height: 18px; + margin-left: 90px; + border: 1px solid #999; + border-radius: 3px; + .mat-icon {font-size: 18px; color: #999;} +} +.hover:hover { + background-color: #4DA5FA; + .mat-icon {color: #fff;} +} + +//平面图 +.sitePlanContent { + position: relative; + width: 100%; + height: 35px; + line-height: 35px; + box-sizing: border-box; + padding: 0 10px 0 25px; + .mat-icon { + font-size: 20px; + } +} + +//火源/力量 图标 +.fireForce { + display: block; + float: right; + margin: 8px 5px 0 0; + width: 40px; + height: 20px; + line-height: 20px; + text-align: center; + position: relative; + overflow: hidden; + img{ + width: 20px; + height: 20px; + } +} +//替换底图 inputfile +.a-upload { + display: block; + float: right; + margin: 8px 18px 0 0; + width: 20px; + height: 20px; + line-height: 20px; + text-align: center; + position: relative; + overflow: hidden; + input { + position: absolute; + width: 20px; + height: 20px; + left: 0; + top: 0; + opacity: 0; + } +} +.a-upload:hover { + .mat-icon { + color: #fff; + } +} +//上传底图 inputfile +#a-uploadImg { + display: block; + width: 300px; + height: 170px; + position: fixed; + top: 40%; + left: 48%; + overflow: hidden; + border-radius: 5px; + border: 1px solid #999; + z-index: 999; + input { + position: absolute; + width: 300px; + height: 170px; + left: 0; + top: 0; + opacity: 0; + } + img { + width: 100%; + height: auto; + } +} +#a-uploadImg:hover { + border: 5px solid skyblue; +} + +//hover时显示右边操作栏 +.sitePlanContent:hover { + #rightOperate { + display: block; + } +} +//右边操作栏 +#rightOperate{ + width: 50px; + height: 100px; + position: absolute; + top: -32px; + right: -48px; + z-index: 99999; + border-radius: 0 100px 100px 0; + background-color: #F0F4F7; + // #F0F4F7 cdced1 + display: none; + .functionButton { + height: 25%; + line-height: 25px; + } + .bigFunctionIcon { + font-size: 24px; + } + .functionIcon { + color: #999; + } + .functionIcon:hover { + color: #4DA5FA; + } +} + +//处置预案 素材库 公用div +.publiclBankPlan { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + padding-bottom: 10px; + // border-top: 1px dashed #999; +} + + + +// 基本信息/想定作业 切换 +.scenarioAssignment { + overflow-y: auto; +} +.selectEditMode { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; +} +.materialBankDIV{ + flex: 1; + overflow-x: hidden; + overflow-y: auto; +} +// 基本信息/想定作业 切换 +//处置预案 +#terrNodePublic { + height: 35px; + line-height: 35px; + display: flex; + .textNode {flex: 1;} +} +//字体图标 +.planIconDiv { + display: inline-block; + .mat-icon{ + font-size: 20px; + width: 20px; + height: 20px; + color: #666; + margin-right: 3px; + } +} + + + +.mat-expansion-panel-header { + height: 40px !important; +} +//素材库溢出隐藏 +#materialBank { + margin: 1px 0; +} +//素材库图片flex +#panelLibrary .text{ + box-sizing: border-box; + margin-left: 10px; +} +.panelLibraryFlex { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; /* 水平居中 */ + .imgBox { + width: 70px; + height: 100px; + display: inline-block; + text-align: center; + border-radius: 3px; + margin: 5px 0; + img { + width: 70px; + height: auto; + max-height: 70px; + cursor:pointer; + } + p { + font-size: 12px; + cursor:pointer; + } + } +} + +//文本溢出 +.overflowText { + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +// 楼层/区域 是避难层时 +.isRefugeStorey { + color: #fff; + background-color: rgb(238, 186, 186); +} +//选中平面图时 +.selectSitePlan { + color: #fff; + background-color: #6BC2FF; +} +//选中素材库图片时 +.selectImg { + color: #fff; + background-color: #4DA5FA; +} +//选中 处置节点时 +.selectanelPoint { + background-color: #F4C235; +} + + + +//左侧功能区弹出框样式 +.keyMargin { + width: 100%; + margin: 5px 0; + .mat-form-field { + width: 100%; + } +} +.submitBottom { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-between; /* 水平居中 */ +} +.functionalDomainContent { + width: 300px; + height: 100%; + textarea { + border-radius: 5px; + border: 1px solid #999; + width: 100%; + height: 120px; + resize:none; + } +} diff --git a/src/app/ui/collection-tools-building/save.ts b/src/app/ui/collection-tools-building/save.ts new file mode 100644 index 0000000..03b5abd --- /dev/null +++ b/src/app/ui/collection-tools-building/save.ts @@ -0,0 +1,300 @@ +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 new file mode 100644 index 0000000..a6b0b32 --- /dev/null +++ b/src/app/ui/collection-tools-building/saveOne.html @@ -0,0 +1,5 @@ +
处置节点保存
+
+ + +
\ 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 new file mode 100644 index 0000000..fec97ff --- /dev/null +++ b/src/app/ui/collection-tools-building/saveTwo.html @@ -0,0 +1,53 @@ +
+
新增节点
+
+
+ +
+ + + +
+
+ + + + {{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 new file mode 100644 index 0000000..76638c2 --- /dev/null +++ b/src/app/ui/collection-tools-building/viewdetails.html @@ -0,0 +1,24 @@ +
+
+ clear +
+ +
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/src/app/ui/collection-tools-plan/addPlaneFigure.html b/src/app/ui/collection-tools-plan/addPlaneFigure.html index 930bf81..605e5e5 100644 --- a/src/app/ui/collection-tools-plan/addPlaneFigure.html +++ b/src/app/ui/collection-tools-plan/addPlaneFigure.html @@ -12,6 +12,17 @@
+ + +
+ + 上传本地图片 + +

选择文件: {{file.name}}

+
+
是否为避难层
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 b2bdb47..4f411b2 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.html +++ b/src/app/ui/collection-tools-plan/collection-tools.component.html @@ -2,16 +2,16 @@
- + - - tv - create - description + + +
- -
- - - - -
-
- keyboard_arrow_right - keyboard_arrow_left - 天气 - - 气温 -
- - -
- 风力 - - 风向 - -
-
-
-
@@ -218,12 +150,8 @@
-
-
-
- 属性 -
-
+
+
属性

面积(平方米)

@@ -366,69 +294,11 @@
-
- -
- -
- -
- -
-
- 消防要素 -
-
- -
- - - - - - - {{node.name}} - - ({{node.children.length}}) - visibility - - - - - - - {{node.name}} - - ({{node.children.length}}) - visibility - - -
+
-
-
-
-
- 节点详情 -
-
- 注意事项 -
-
-
- - -
-
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 985cf7e..acae429 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.scss +++ b/src/app/ui/collection-tools-plan/collection-tools.component.scss @@ -59,6 +59,12 @@ color: white; } } + .rightSave { + cursor: pointer; + position: absolute; + right: 60px; + label { vertical-align: middle; color: #279FFF; } + } } //头部操作栏 @@ -107,7 +113,7 @@ top: 0; } .functionalDomain { - flex: 90%; + flex: 95%; overflow: hidden; .functionalDomainContent { position: relative; @@ -138,10 +144,9 @@ z-index: 1001; margin-right: 0px; transition: margin-right 0.5s; - border: 1px solid #464646; + border: 1px solid #E6EAEE; width: 235px; right: 0; - } //右边导航栏显示隐藏 .togglePanel2 { @@ -153,27 +158,17 @@ margin-left: -2000px; transition: margin-left 1s; } - } //右边操作栏 -.title{ - width: 100%; - height: 35px; - background-color: #464646; - div{ - width: 50%; - height: 35px; - line-height: 35px; - background-color: #595959; - border-radius: 5px; - span{ - color: white; - font-size: 14px; - font-weight: 400; - padding-left: 5px; - } - } +.rightTitle{ + height: 35x; + line-height: 35px; + text-align: center; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + background-color: #2196F3; + color: #fff; } 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 b776406..17f69c5 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -607,7 +607,6 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvasData.isChange = true } - isSixShow = true isSixbtn = true //控制想定作业编辑按钮 isediticon = true //控制查看编辑模式的编辑模式小笔按钮 @@ -631,7 +630,6 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvasData.gameMode = GameMode.Assignment } else { this.getAllLibrary() //获取素材库 - this.getAllBuildings() //获取所有建筑 } let that = this @@ -645,7 +643,7 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvasData.getMessage().subscribe((message: any)=>{ if(message == "send a message"){ - this.refurbishTreeData() + // this.refurbishTreeData() } }) } @@ -669,7 +667,7 @@ export class CollectionToolsPlanComponent implements OnInit { //监听数据变化后 this.canvas.on('canvasDataChanged',()=>{ // 收到数据表示共享数据发生变化 - this.renovateTreeData(false) + // this.renovateTreeData(false) }); } @@ -684,7 +682,7 @@ export class CollectionToolsPlanComponent implements OnInit { let buildingId = this.beforeOneCheckedBuilding.id let floorId = this.selectingSitePlan.id this.canvas.paste(companyId,buildingId,floorId) - this.renovateTreeData(false) + // this.renovateTreeData(false) } basicInfo:boolean = true //基本信息名称显隐 @@ -1352,31 +1350,30 @@ export class CollectionToolsPlanComponent implements OnInit { //封装 刷新 tree 数据 async renovateTreeData (isRefresh:boolean = true) { - this.allFireElements[this.allFireElements.length-1].children = [] + // this.allFireElements[this.allFireElements.length-1].children = [] isRefresh? await this.canvas.refresh() : null this.canvas.setNameVisible(this.basicInfo,0) this.canvas.setNameVisible(this.wantToWork,1) isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false isRefresh? this.isShowProperty = true : null isRefresh? this.isShowAttribute = true : null - !this.pattern? this.mateFireForce() : null //刷新 建筑楼层 火源/力量图标 - let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id - let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据 - let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据 + // let beforeOneId = this.selectingSitePlan.id || '' //当前 选中 平面图 楼层/区域 id + // let companyBuildingData = JSON.parse(JSON.stringify( this.canvasData.originalcompanyBuildingData || {} )) // 当前 单位/建筑 数据 + // let storeyData = JSON.parse(JSON.stringify( this.canvasData.originaleveryStoreyData || {} )) //当前 楼层 数据 - for(let key in companyBuildingData.data){ - if (companyBuildingData.data[key].FloorId === beforeOneId) { //处理 单位/建筑 数据是否归于当前楼层下 - storeyData.data[key] = companyBuildingData.data[key] - } - } - for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组 - let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId ) - if (!noMatch) { - this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) - } - } - this.handleTreeData(storeyData) //处理tree数据结构 + // for(let key in companyBuildingData.data){ + // if (companyBuildingData.data[key].FloorId === beforeOneId) { //处理 单位/建筑 数据是否归于当前楼层下 + // storeyData.data[key] = companyBuildingData.data[key] + // } + // } + // for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组 + // let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId ) + // if (!noMatch) { + // this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) + // } + // } + // this.handleTreeData(storeyData) //处理tree数据结构 } @@ -1423,7 +1420,7 @@ export class CollectionToolsPlanComponent implements OnInit { //获取总平面图 getSitePlan () { - let fireData = this.getFireElements(sessionStorage.getItem('buildingTypeId')) //获取单位下 消防要素 + // let fireData = this.getFireElements(sessionStorage.getItem('buildingTypeId')) //获取单位下 消防要素 let planData = this.getSitePlanCompanyData() //获取 单位 数据 this.http.get('/api/SitePlans',{params:this.params}).subscribe(data=>{ this.sitePlanData = data @@ -1431,7 +1428,7 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 this.selectSitePlanIndex = 0 - Promise.all([fireData,planData]).then((res)=>{ + Promise.all([planData]).then((res)=>{ this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据 }) @@ -1441,7 +1438,7 @@ export class CollectionToolsPlanComponent implements OnInit { //获取建筑 楼层/区域 getBuildingSitePlan (item) { let params = { buildingId: item.id } - let fireData = this.getFireElements(item.buildingTypes[0].id || '') //获取建筑下 消防要素 + // let fireData = this.getFireElements(item.buildingTypes[0].id || '') //获取建筑下 消防要素 let planData = this.getBuildingData(params) //获取 建筑 数据 this.http.get('/api/BuildingAreas',{params}).subscribe(data=>{ this.sitePlanData = data @@ -1449,7 +1446,7 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 this.selectSitePlanIndex = 0 - Promise.all([fireData,planData]).then((res)=>{ + Promise.all([planData]).then((res)=>{ this.getBuildingStorey(this.selectingSitePlan) //获取 建筑 楼层数据 }) diff --git a/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts b/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts index 598e178..b010e94 100644 --- a/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts +++ b/src/app/ui/collection-tools-plan/leftFunctionalDomain.ts @@ -23,36 +23,75 @@ export class leftFunctionalDomainComponentPlan implements OnInit { params = {companyId: sessionStorage.getItem('companyId')} checked:boolean = false;//是否为避难层 - + file:any = null; //上传的文件 + + //选择文件 + selectFile (e) { + if (e.target.files.length) { + let maxSize = 5*1024*1024 + if (e.target.files[0].size <= maxSize) { + this.file = e.target.files[0] + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('上传图片需小于5MB','确定',config); + } + } + } + + //导入GIS + toGIS () { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('功能开发测试中,即将上线','确定',config); + } + //提交表单创建平面图 onSubmit (e) { - if (!this.data.isBuilding) { //总平面图 创建平面图 - let data = { - companyId: sessionStorage.getItem('companyId'), - name: e.name, - order: this.data.order, - area:e.area, - details:e.details, - enabled: true, - modifiedTime: new Date(), - } - this.http.post('/api/SitePlans',data).subscribe(data=>{ - this.dialogRef.close('总平面图'); - }) - } else { //建筑 创建楼层/区域 - let data = { - isRefugeStorey: e.isRefugeStorey, - buildingId: this.data.Panel.id, - name: e.name, - order: this.data.order, - area:e.area, - details:e.details, - enabled: true, - modifiedTime: new Date(), - } - this.http.post('/api/BuildingAreas',data,{params:this.params}).subscribe(data=>{ - this.dialogRef.close('建筑'); - }) + if (this.file) { + let formData = new FormData() + formData.append("file",this.file) + this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}`,formData).subscribe((data:any)=>{ + let imgURL = '/api/Objects/WebPlan2D/' + data.objectName + console.log(imgURL) + if (!this.data.isBuilding) { //总平面图 创建平面图 + let data = { + companyId: sessionStorage.getItem('companyId'), + name: e.name, + order: this.data.order, + area:e.area, + details:e.details, + enabled: true, + modifiedTime: new Date(), + imageUrl: imgURL, + } + this.http.post('/api/SitePlans',data).subscribe(data=>{ + this.dialogRef.close('总平面图'); + }) + } else { //建筑 创建楼层/区域 + let data = { + isRefugeStorey: e.isRefugeStorey, + buildingId: this.data.Panel.id, + name: e.name, + order: this.data.order, + area:e.area, + details:e.details, + enabled: true, + modifiedTime: new Date(), + imageUrl: imgURL, + } + this.http.post('/api/BuildingAreas',data,{params:this.params}).subscribe(data=>{ + this.dialogRef.close('建筑'); + }) + } + }) //post + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请上传图片','确定',config); } } diff --git a/src/app/ui/collection-tools-plan/panel.scss b/src/app/ui/collection-tools-plan/panel.scss index f0ae073..11200e8 100644 --- a/src/app/ui/collection-tools-plan/panel.scss +++ b/src/app/ui/collection-tools-plan/panel.scss @@ -268,9 +268,34 @@ .keyMargin { width: 100%; margin: 5px 0; + text-align: center; .mat-form-field { width: 100%; } + //上传CAD弹窗 inputfile + .uploadBackGround { + width: 80%; + padding: 0 25px; + height: 30px; + line-height: 30px; + position: relative; + cursor: pointer; + color: #000; + font-size: 14px; + background: #fafafa; + border: 1px solid #ddd; + border-radius: 5px; + overflow: hidden; + display: inline-block; + } + .uploadBackGround input { + position: absolute; + width: 100%; + right: 0; + top: 0; + opacity: 0; + cursor: pointer + } } .submitBottom { display: flex; diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index dfc085f..b6a073f 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -2,21 +2,21 @@
- + 基本信息名称visibility 想定作业名称visibility - + 显示图例 @@ -36,10 +36,10 @@ 想定作业编辑
- - tv - create - description + + + @@ -404,7 +404,7 @@ -
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index f01a7b7..9f00105 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -59,6 +59,12 @@ color: white; } } + .rightSave { + cursor: pointer; + position: absolute; + right: 60px; + label { vertical-align: middle; color: #279FFF; } + } } //头部操作栏 diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index c9da111..e3ce60c 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -1025,12 +1025,7 @@ export class CollectionToolsComponent implements OnInit { disasterId: this.allFirePlan[0].id || '' } }); - - dialogRef.afterClosed().subscribe(result => { - // console.log('The dialog was closed'); - }); - } - + } //else } else { //if const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -1276,7 +1271,6 @@ export class CollectionToolsComponent implements OnInit { //点击数节点的显示隐藏icon clickLookItem(node){ - //修改真实素材islook属性 for(let key in this.storeyData.data){ if(key == node.id){ @@ -1563,7 +1557,7 @@ export class CollectionToolsComponent implements OnInit { selectSitePlan (item,index) { if (this.selectSitePlanIndex != index) { this.canvasData.selectPanelPoint = new DisposalNodeData(); - if (this.canvasData.isChange) { //true 数据被改动 + if (this.pattern && this.canvasData.isChange) { //true 数据被改动 let isTrue = confirm('是否保存当前编辑数据') if (isTrue) { //先保存数据 在切换 let isSuccess = this.saveSite()//true的时候 先保存数据 @@ -2136,9 +2130,13 @@ export class CollectionToolsComponent implements OnInit { let dialogRef = this.dialog.open(addBGCDisposalNodeComponent); dialogRef.afterClosed().subscribe(data=>{ if (data) { - this.canvasData.customizeDisposalNode = data + this.canvasData.customizeDisposalNode = data //自定义数据节点 let imgURL = window.URL.createObjectURL(data.file) //将图片生成 url地址 - console.log(imgURL,this.canvasData.customizeDisposalNode) + this.canvasData.selectPanelPointBaseData = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''} //更新 当前数据节点对应父级节点 + this.selectDisposalNode = '' + this.canvasData.selectPanelPoint = new DisposalNodeData() //更新 当前数据节点 + this.canvasData.selectPanelPoint.BackgroundImageUrl = imgURL + this.customizeNodes() } }) } @@ -2235,16 +2233,46 @@ export class CollectionToolsComponent implements OnInit { buildingIndex: e.sitePlanId? -1 : this.allBuildings.findIndex(item=>{ return item.id===e.buildingId }), //总平面图/建筑 index storeyId: e.sitePlanId? e.sitePlanId : e.buildingAreaId, //楼层id } - this.http.get('/api/DisposalNodeData',{params:params}).subscribe(data=>{ + this.http.get('/api/DisposalNodeData',{params:params}).subscribe((data:any)=>{ this.canvasData.selectPanelPoint = this.canvasData.deserialize(JSON.stringify(data || new DisposalNodeData())) //选择 当前 节点 this.canvasData.selectPanelPoint.Data = this.canvasData.deserialize(this.canvasData.selectPanelPoint.Data) - this.seekPanelPoint(parameter) + data.backgroundImageUrl? this.customizeNodes() : this.seekPanelPoint(parameter) }) } //if } //else if } + //自定义数据节点 时 + async customizeNodes() { + await this.canvas.loadNoRelevantInformationDisposalPlan(this.canvasData.selectPanelPoint) + let other = { + children: [], + computed: true, + id: '', + name: '其他', + order: 999, + parentId: null, + tag: "INPUT", + isLookPattern : true + } + this.allFireElements = [other] + this.canvas.setNameVisible(this.basicInfo,0) + this.canvas.setNameVisible(this.wantToWork,1) + this.beforeOneCheckedBuildingIsShow = false + + let selectPanelPoint = JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint || {} )) //当前 节点 数据 + if(selectPanelPoint.Data){ + for(let key in selectPanelPoint.Data.Stock){ //筛选数据 没有匹配全部放入到 其他 数组 + let noMatch = this.allFireElements.find( every=> every.id===selectPanelPoint.Data.Stock[key].FireElementId ) + if (!noMatch) { + this.allFireElements[this.allFireElements.length-1].children.push(selectPanelPoint.Data.Stock[key]) + } + } + } + this.handleTreeData({data:{}},selectPanelPoint) //处理tree数据结构 + } + //查找 数据节点 对应 建筑/楼层 seekPanelPoint (paramsData) { this.checkedBuildingIndex = paramsData.buildingIndex diff --git a/src/app/ui/collection-tools/leftFunctionalDomain.ts b/src/app/ui/collection-tools/leftFunctionalDomain.ts index 3deb432..9703cd8 100644 --- a/src/app/ui/collection-tools/leftFunctionalDomain.ts +++ b/src/app/ui/collection-tools/leftFunctionalDomain.ts @@ -144,7 +144,7 @@ export class addBGCDisposalNodeComponent implements OnInit { file:any = null; //文件 //上传图片 selectFile (e) { - if (e.target.files.length ) { + if (e.target.files.length) { let maxSize = 5*1024*1024 if (e.target.files[0].size <= maxSize) { this.file = e.target.files[0] diff --git a/src/app/ui/collection-tools/save.ts b/src/app/ui/collection-tools/save.ts index 1657b66..4be3e0b 100644 --- a/src/app/ui/collection-tools/save.ts +++ b/src/app/ui/collection-tools/save.ts @@ -92,7 +92,6 @@ export class saveOneDialog { nodeItem itemChildNum = 0 //点击处置节点子数据节点的数量 clickNode(item){ - // console.log(item) this.nodeItem = item this.allDisposalNodeChild.forEach(item => { if(item.id == this.nodeItem.id){ @@ -105,8 +104,17 @@ export class saveOneDialog { selectedSiteData = this.data.selectedSiteData onSubmit(value,type){ this.maskLayerService.sendMessage(true) - - let name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name + let name + if (this.canvasData.selectPanelPoint.BackgroundImageUrl) { //当前 为自定义处置节点 + if (this.canvasData.selectPanelPoint.DisposalNodeId) { // 保存逻辑 + let node = this.canvasData.findDisposalNode(this.canvasData.selectPanelPoint.DisposalNodeId,null) + node? name = node.name : null + } else { //新建逻辑 + name = this.canvasData.customizeDisposalNode.name + } + } else { + name = this.selectedBuildingData.name + '-' + this.selectedSiteData.name + } //如果保存到已有节点 var postdata = { id: "", @@ -138,8 +146,7 @@ export class saveOneDialog { 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 => { @@ -150,21 +157,30 @@ export class saveOneDialog { // 保存平面图数据到当前节点 let postdata =JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint)) postdata.Data = JSON.stringify(postdata.Data) - this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { - this.maskLayerService.sendMessage(false) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - },err=>{ - this.maskLayerService.sendMessage(false) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage('send a message');//发布一条消息 + postdata.Version = "2.0" + postdata.DisposalNodeId ? null : postdata.DisposalNodeId = istrue.id + postdata.PlanComponentId ? null : postdata.PlanComponentId = sessionStorage.getItem("planId") + postdata.Id ? null : postdata.Id = '' + postdata.BackgroundImageUrl? null : postdata.BackgroundImageUrl = null + let imgURL = this.uploadBGC() //更新 背景图 + imgURL.then(url=>{ + url? postdata.BackgroundImageUrl = url.toString() : null + this.http.post(`/api/DisposalNodeData`,postdata).subscribe(data => { + this.maskLayerService.sendMessage(false) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config) + },err=>{ + this.maskLayerService.sendMessage(false) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存失败','确定',config) + }) + this.dialogRef.close(); + this.canvasData.sendMessage('send a message');//发布一条消息 + }) //imgURL }) }else{//需要3个接口 @@ -186,22 +202,27 @@ export class saveOneDialog { version: this.canvasData.selectPanelPoint.Version || "2.0", disposalNodeId: data.id, planComponentId: sessionStorage.getItem("planId"), + backgroundImageUrl: this.canvasData.selectPanelPoint.BackgroundImageUrl, } - this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { - this.maskLayerService.sendMessage(false) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - },err=>{ - this.maskLayerService.sendMessage(false) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage('send a message');//发布一条消息 + let imgURL = this.uploadBGC() //更新 背景图 + imgURL.then(url=>{ + url? objData.backgroundImageUrl = url.toString() : null + this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { + this.maskLayerService.sendMessage(false) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config) + },err=>{ + this.maskLayerService.sendMessage(false) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存失败','确定',config) + }) + this.dialogRef.close(); + this.canvasData.sendMessage('send a message');//发布一条消息 + }) //imgURL }) }) } @@ -280,26 +301,48 @@ export class saveOneDialog { version: this.canvasData.selectPanelPoint.Version || "2.0", disposalNodeId: data.id, planComponentId: sessionStorage.getItem("planId"), + backgroundImageUrl: this.canvasData.selectPanelPoint.BackgroundImageUrl, } - - this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { - this.maskLayerService.sendMessage(false) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存成功','确定',config) - - },err=>{ - this.maskLayerService.sendMessage(false) - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('保存失败','确定',config) - }) - this.dialogRef.close(); - this.canvasData.sendMessage("send a message") + let imgURL = this.uploadBGC() //更新 背景图 + imgURL.then(url=>{ + url? objData.backgroundImageUrl = url.toString() : null + this.http.post(`/api/DisposalNodeData`,objData).subscribe(data => { + this.maskLayerService.sendMessage(false) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存成功','确定',config) + + },err=>{ + this.maskLayerService.sendMessage(false) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('保存失败','确定',config) + }) + this.dialogRef.close(); + this.canvasData.sendMessage("send a message") + }) //imgURL }) }) } } + + //封装方法 上传 自定义底图 + uploadBGC () { + return new Promise((resolve,reject)=>{ + if (this.canvasData.selectPanelPoint.BackgroundImageUrl && !this.canvasData.selectPanelPoint.DisposalNodeId) { //新建逻辑 + if (this.canvasData.customizeDisposalNode) { + let formData = new FormData() + formData.append("file",this.canvasData.customizeDisposalNode.file) + this.http.post(`/api/Objects/WebPlan2D/${sessionStorage.getItem('companyId')}/DisposalNode`,formData).subscribe((data:any)=>{ + resolve('/api/Objects/WebPlan2D/' + data.objectName) + }) + } + } else { + resolve(null) + } //else + }) + } + } \ No newline at end of file diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index d1129ac..81265f8 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -96,8 +96,11 @@ 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' @NgModule({ - declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, 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], + declarations: [UiComponent, DateselectComponent, MenuComponent, CardComponent, ListComponent, GridComponent, StepperComponent, TabgroupComponent, ButtonComponent, BadgeComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, FooterComponent, 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], imports: [ CommonModule, @@ -155,6 +158,7 @@ import { saveOneDialogPlan, saveTwoDialogPlan } from './collection-tools-plan/sa exports:[ FooterComponent, CollectionToolsComponent, + CollectionToolsBuildingComponent, CollectionToolsPlanComponent ] }) From deca37772c8b92aae8b2d5c612ef0a74d2aa73d5 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 26 Jan 2021 11:02:05 +0800 Subject: [PATCH 08/11] =?UTF-8?q?[=E5=88=A0=E9=99=A4]=20=E4=BD=9C=E6=88=98?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E5=88=A0=E9=99=A4=20=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collection-tools.component.ts | 2 - .../collection-tools.component.html | 44 +++---------------- .../collection-tools.component.scss | 19 ++++---- .../collection-tools.component.ts | 26 ++++++----- 4 files changed, 30 insertions(+), 61 deletions(-) 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 0fe2b71..d4b9d0b 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -659,7 +659,6 @@ export class CollectionToolsPlanComponent implements OnInit { this.canvas.on("select",obj=>{ //选中素材属性注入函数 this.setAssetsProperty(obj.assetData) - console.log(obj.assetData) }) // 监听canvas组件取消选中素材事件 this.canvas.on("deselect",obj=>{ @@ -760,7 +759,6 @@ export class CollectionToolsPlanComponent implements OnInit { }else{ //如果是单位 总平面图 if(this.checkedBuildingIndex==-1){ - // console.log(111,SitePlanData) //保存平面图数据 this.http.post("/api/SitePlanData",SitePlanData,{ params:{ diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index ac990f4..be34123 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -18,7 +18,7 @@ 多选 --> - 显示图例 + 显示图例 -
- - 基本信息编辑 - - - 想定作业编辑 - -
- - - - -
- - -
- - - - - -
+
- keyboard_arrow_right - keyboard_arrow_left 天气 气温
- - + +
风力 +
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index af88cc7..1d5a3de 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -60,10 +60,10 @@ } } .rightSave { + margin: 0 10px; cursor: pointer; - position: absolute; - right: 60px; - label { vertical-align: middle; color: #279FFF; } + vertical-align: middle; + color: #279FFF; } } @@ -113,7 +113,7 @@ top: 0; } .functionalDomain { - flex: 90%; + flex: 95%; overflow: hidden; .functionalDomainContent { position: relative; @@ -409,19 +409,16 @@ div:focus { } .bigBox{ - width: 700px; + width: 650px; height: 40px; + line-height: 40px; position: absolute; overflow: hidden; right: 0; + top: 0; } .weatherBox{ - height: 40px; - width: 700px; - line-height: 40px; - position: absolute; - right: 0; - transition: right linear .5s; + width: 100%; .openbtn{ font-size: 45px; height: 45px; diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index ec74a0b..db6d785 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -145,7 +145,7 @@ export class CollectionToolsComponent implements OnInit { this.isImgNumCss = false } } - pattern:boolean = true//默认为基本信息编辑 + pattern:boolean = false//默认为基本信息编辑 //基本信息编辑模式 @@ -625,7 +625,7 @@ export class CollectionToolsComponent implements OnInit { isxxx = true //控制查看编辑模式的编辑模式按钮 ngOnInit(): void { - + this.canvasData.gameMode = GameMode.Assignment if(this.router.url.indexOf("keyUnit/viewunitinfoplan") == -1 && this.router.url.indexOf("keyUnit/viewunitinfo") != -1 || this.router.url.indexOf("keyUnit/editplaninfo")!= -1){ this.isSixbtn = false } @@ -643,7 +643,7 @@ export class CollectionToolsComponent implements OnInit { this.isxxx = false } - this.getAllLibrary() //获取素材库 + this.getAllLibrary('plan') //获取素材库 this.getAllBuildings() //获取所有建筑 this.getAllFirePlan() //获取当前单位灾情 @@ -666,7 +666,7 @@ export class CollectionToolsComponent implements OnInit { ngAfterViewInit(): void { - + this.getSitePlan() // 监听canvas组件选中素材事件 this.canvas.on("select",obj=>{ @@ -680,7 +680,7 @@ export class CollectionToolsComponent implements OnInit { //监听数据变化后 this.canvas.on('canvasDataChanged',()=>{ // 收到数据表示共享数据发生变化 - this.renovateTreeData(false) + this.canvasData.selectPanelPoint.BackgroundImageUrl? this.customizeNodes() : this.renovateTreeData(false) }); } @@ -695,10 +695,10 @@ export class CollectionToolsComponent implements OnInit { let buildingId = this.beforeOneCheckedBuilding.id let floorId = this.selectingSitePlan.id this.canvas.paste(companyId,buildingId,floorId) - this.renovateTreeData(false) + this.canvasData.selectPanelPoint.BackgroundImageUrl? this.customizeNodes() : this.renovateTreeData(false) } - basicInfo:boolean = true //基本信息名称显隐 + basicInfo:boolean = false //基本信息名称显隐 wantToWork:boolean = true //想定作业名称显隐 //点击基本信息名称 basicInfoClick(){ @@ -1239,7 +1239,6 @@ export class CollectionToolsComponent implements OnInit { }); this.dataSource.data = treeData this.treeControl.expandAll() - } //点击树节点 @@ -1375,6 +1374,7 @@ export class CollectionToolsComponent implements OnInit { isRefresh? await this.canvas.refresh() : null this.canvas.setNameVisible(this.basicInfo,0) this.canvas.setNameVisible(this.wantToWork,1) + this.canvas.setLegendVisible(this.isShowLegend) //图例显隐 isRefresh? this.canvasData.isChange = false : null //服务中 数据是否改动 改为false isRefresh? this.isShowProperty = true : null isRefresh? this.isShowAttribute = true : null @@ -1392,7 +1392,7 @@ export class CollectionToolsComponent implements OnInit { } for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组 let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId ) - if (!noMatch) { + if (!noMatch && storeyData.data[key].Id != "图例") { this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key]) } } @@ -1400,7 +1400,7 @@ export class CollectionToolsComponent implements OnInit { if(selectPanelPoint.Data){ for(let key in selectPanelPoint.Data.Stock){ //筛选数据 没有匹配全部放入到 其他 数组 let noMatch = this.allFireElements.find( every=> every.id===selectPanelPoint.Data.Stock[key].FireElementId ) - if (!noMatch) { + if (!noMatch && selectPanelPoint.Data.Stock[key].Id != "图例") { this.allFireElements[this.allFireElements.length-1].children.push(selectPanelPoint.Data.Stock[key]) } } @@ -1427,6 +1427,9 @@ export class CollectionToolsComponent implements OnInit { beforeOneCheckedBuildingIsShow:boolean = false; //想定作业下 建筑是否显示 togglebeforeOneCheckedBuilding () { this.beforeOneCheckedBuildingIsShow = !this.beforeOneCheckedBuildingIsShow } + isShowLegend:boolean = true; //图例是否显示 + changeLegend (e) { this.canvasData.selectPanelPoint.BackgroundImageUrl? null : this.canvas.setLegendVisible(this.isShowLegend) } + //可展开面板展开或关闭 toggle () { this.toggleExpandPanel = !this.toggleExpandPanel @@ -1961,6 +1964,7 @@ export class CollectionToolsComponent implements OnInit { let params = {disasterId: this.allFirePlan[0].id || ''} this.http.get('/api/DisposalNodes',{params:params}).subscribe(data=>{ //所有处置节点 this.canvasData.allDisposalNode = data + this.getDisposalNode() }) }) } else { //单位 有灾情时 @@ -1968,6 +1972,7 @@ export class CollectionToolsComponent implements OnInit { let params = {disasterId: this.allFirePlan[0].id || ''} this.http.get('/api/DisposalNodes',{params:params}).subscribe(data=>{ //所有处置节点 this.canvasData.allDisposalNode = data + this.getDisposalNode() }) } }) @@ -2265,6 +2270,7 @@ export class CollectionToolsComponent implements OnInit { this.allFireElements = [other] this.canvas.setNameVisible(this.basicInfo,0) this.canvas.setNameVisible(this.wantToWork,1) + // this.canvas.setLegendVisible(this.isShowLegend) //图例显隐 this.beforeOneCheckedBuildingIsShow = false let selectPanelPoint = JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint || {} )) //当前 节点 数据 From 51e1f579ede4842663b755d2125d5219d8fac398 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 26 Jan 2021 11:16:02 +0800 Subject: [PATCH 09/11] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=E9=A1=B5=E9=9D=A2gis?= =?UTF-8?q?=E7=82=B9=E8=81=9A=E5=90=88=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-force/fire-force.component.html | 2 +- .../fire-force/fire-force.component.ts | 102 ++++++++++++- .../linkage-forces.component.html | 4 +- .../linkage-forces.component.ts | 141 ++++++++++++++++-- .../water-collection.component.html | 2 +- .../water-collection.component.ts | 91 ++++++++++- .../gis-labeling/gis-labeling.component.ts | 10 +- src/assets/fireForcesMarkers/中队.png | Bin 0 -> 707 bytes src/assets/fireForcesMarkers/其他.png | Bin 0 -> 839 bytes src/assets/fireForcesMarkers/大队.png | Bin 0 -> 748 bytes src/assets/fireForcesMarkers/总队.png | Bin 0 -> 845 bytes src/assets/fireForcesMarkers/支队.png | Bin 0 -> 687 bytes .../images/市政消火栓(地上).png | Bin 0 -> 2436 bytes src/assets/linkageForcesMarkers/交通.png | Bin 0 -> 2927 bytes src/assets/linkageForcesMarkers/住建.png | Bin 0 -> 2698 bytes src/assets/linkageForcesMarkers/公安.png | Bin 0 -> 3330 bytes src/assets/linkageForcesMarkers/医疗.png | Bin 0 -> 2974 bytes src/assets/linkageForcesMarkers/安监.png | Bin 0 -> 3230 bytes src/assets/linkageForcesMarkers/市政.png | Bin 0 -> 2958 bytes .../linkageForcesMarkers/应急管理.png | Bin 0 -> 3161 bytes src/assets/linkageForcesMarkers/民政.png | Bin 0 -> 3043 bytes src/assets/linkageForcesMarkers/气象局.png | Bin 0 -> 3190 bytes src/assets/linkageForcesMarkers/水利.png | Bin 0 -> 2877 bytes src/assets/linkageForcesMarkers/海事.png | Bin 0 -> 3395 bytes src/assets/linkageForcesMarkers/燃气局.png | Bin 0 -> 3020 bytes src/assets/linkageForcesMarkers/环保局.png | Bin 0 -> 3743 bytes src/assets/linkageForcesMarkers/电力局.png | Bin 0 -> 3277 bytes src/assets/linkageForcesMarkers/通信.png | Bin 0 -> 2514 bytes src/assets/waterMarkers/天然水源.png | Bin 0 -> 2483 bytes src/assets/waterMarkers/市政消火栓.png | Bin 0 -> 2269 bytes src/assets/waterMarkers/方形储水池.png | Bin 0 -> 2179 bytes src/styles.scss | 5 + 32 files changed, 325 insertions(+), 32 deletions(-) create mode 100644 src/assets/fireForcesMarkers/中队.png create mode 100644 src/assets/fireForcesMarkers/其他.png create mode 100644 src/assets/fireForcesMarkers/大队.png create mode 100644 src/assets/fireForcesMarkers/总队.png create mode 100644 src/assets/fireForcesMarkers/支队.png create mode 100644 src/assets/images/市政消火栓(地上).png create mode 100644 src/assets/linkageForcesMarkers/交通.png create mode 100644 src/assets/linkageForcesMarkers/住建.png create mode 100644 src/assets/linkageForcesMarkers/公安.png create mode 100644 src/assets/linkageForcesMarkers/医疗.png create mode 100644 src/assets/linkageForcesMarkers/安监.png create mode 100644 src/assets/linkageForcesMarkers/市政.png create mode 100644 src/assets/linkageForcesMarkers/应急管理.png create mode 100644 src/assets/linkageForcesMarkers/民政.png create mode 100644 src/assets/linkageForcesMarkers/气象局.png create mode 100644 src/assets/linkageForcesMarkers/水利.png create mode 100644 src/assets/linkageForcesMarkers/海事.png create mode 100644 src/assets/linkageForcesMarkers/燃气局.png create mode 100644 src/assets/linkageForcesMarkers/环保局.png create mode 100644 src/assets/linkageForcesMarkers/电力局.png create mode 100644 src/assets/linkageForcesMarkers/通信.png create mode 100644 src/assets/waterMarkers/天然水源.png create mode 100644 src/assets/waterMarkers/市政消火栓.png create mode 100644 src/assets/waterMarkers/方形储水池.png diff --git a/src/app/data-collection/fire-force/fire-force.component.html b/src/app/data-collection/fire-force/fire-force.component.html index 94191c0..90520a6 100644 --- a/src/app/data-collection/fire-force/fire-force.component.html +++ b/src/app/data-collection/fire-force/fire-force.component.html @@ -94,7 +94,7 @@
- {{item.name}} + {{item.name}}
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 5784fa2..9764080 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -38,12 +38,104 @@ export class FireForceComponent implements OnInit { {id:5,name:'90%-100%'} ] checkBoxList:any[] = [ - {id:0,name:'总队'}, - {id:1,name:'支队'}, - {id:2,name:'大队'}, - {id:3,name:'中队(消防站)'}, - {id:4,name:'其他消防队伍'} + {id:0,name:'总队',isChecked:false}, + {id:1,name:'支队',isChecked:false}, + {id:2,name:'大队',isChecked:false}, + {id:3,name:'中队(消防站)',isChecked:false}, + {id:4,name:'其他消防队伍',isChecked:false} ] + //勾选力量类型checkbox在地图上显示marker + checkBoxChange(){ + let Levels = [] + this.checkBoxList.forEach(item =>{ + if(item.isChecked){ + Levels.push(item.id) + } + }) + let params:any = { + PageSize : 999999, + Levels:Levels + } + console.log('4444',Levels) + if(Levels.length != 0){//如果勾选了checkbox + this.http.get('/api/CustomFireForce',{params:params}).subscribe((data:any) => { + console.log('所有力量',data) + this.createMarker(data) + }) + }else{ + this.cluster.setData([]) + } + } + //循环渲染出所有力量markers + cluster:any //力量聚合实例 + createMarker(list){ + let markerArrcluster = [] + this.cluster ? this.cluster.setData([]) : null + list.forEach((item) => { + let image + if(item.forceType == 2){ + image = '/assets/fireForcesMarkers/其他.png' + }else if(item.level == 0){ + image = '/assets/fireForcesMarkers/总队.png' + }else if(item.level == 1){ + image = '/assets/fireForcesMarkers/支队.png' + }else if(item.level == 2){ + image = '/assets/fireForcesMarkers/大队.png' + }else if(item.level == 3){ + image = '/assets/fireForcesMarkers/中队.png' + } + // 用于点集合的数组 + item.fireForceDetailInfo.location ? + markerArrcluster.push({ + lnglat : [item.fireForceDetailInfo.location.x,item.fireForceDetailInfo.location.y], + image : image, + data : item + }) : null + }) + this.map.plugin(["AMap.MarkerClusterer"],() => { + var gridSize = 60 + var count = markerArrcluster.length; + var _renderClusterMarker = function (context) { + var factor = Math.pow(context.count / count, 1 / 18); + var div = document.createElement('div'); + var Hue = 180 - factor * 180; + var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; + var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; + var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; + var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; + div.style.backgroundColor = bgColor; + var size = Math.round(30 + Math.pow(context.count / count, 1 / 5) * 20); + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.style.boxShadow = '0 0 5px ' + shadowColor; + div.innerHTML = context.count; + div.style.lineHeight = size + 'px'; + div.style.color = fontColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); + context.marker.setContent(div) + }; + var _renderMarker = (context)=> { + var content = ``; + var offset = new AMap.Pixel(-12.5, -12.5); + context.marker.setContent(content) + context.marker.setOffset(offset) + } + this.cluster = new AMap.MarkerCluster(this.map, markerArrcluster, { + gridSize: gridSize, // 设置网格像素大小 + renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 + renderMarker: _renderMarker, // 自定义非聚合点样式 + }); + this.cluster.on('click',(e)=>{ + if(e.clusterData.length == 1){ + + } + }) + }); + + } ngOnInit(): void { this.getAllFireForce() setTimeout(() => { diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.html b/src/app/data-collection/linkage-forces/linkage-forces.component.html index abc51c7..632b6a9 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.html +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.html @@ -62,9 +62,9 @@
- + - + {{item.name}} 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 919b746..21ef260 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -39,22 +39,133 @@ export class LinkageForcesComponent implements OnInit { {id:5,name:'90%-100%'} ] checkBoxList:any[] = [ - {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png'}, - {id:1,name:'电力局',imgUrl:'/assets/linkageForces/电力局.png'}, - {id:2,name:'公安',imgUrl:'/assets/linkageForces/公安.png'}, - {id:3,name:'海事',imgUrl:'/assets/linkageForces/海事.png'}, - {id:4,name:'环保局',imgUrl:'/assets/linkageForces/环保局.png'}, - {id:5,name:'交通',imgUrl:'/assets/linkageForces/交通.png'}, - {id:6,name:'民政',imgUrl:'/assets/linkageForces/民政.png'}, - {id:7,name:'气象局',imgUrl:'/assets/linkageForces/气象局.png'}, - {id:8,name:'燃气局',imgUrl:'/assets/linkageForces/燃气局.png'}, - {id:9,name:'市政',imgUrl:'/assets/linkageForces/市政.png'}, - {id:10,name:'水利',imgUrl:'/assets/linkageForces/水利.png'}, - {id:11,name:'通信',imgUrl:'/assets/linkageForces/通信.png'}, - {id:12,name:'医疗',imgUrl:'/assets/linkageForces/医疗.png'}, - {id:13,name:'应急管理',imgUrl:'/assets/linkageForces/应急管理.png'}, - {id:14,name:'住建',imgUrl:'/assets/linkageForces/住建.png'} + {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png',isChecked:false}, + {id:1,name:'电力局',imgUrl:'/assets/linkageForces/电力局.png',isChecked:false}, + {id:2,name:'公安',imgUrl:'/assets/linkageForces/公安.png',isChecked:false}, + {id:3,name:'海事',imgUrl:'/assets/linkageForces/海事.png',isChecked:false}, + {id:4,name:'环保局',imgUrl:'/assets/linkageForces/环保局.png',isChecked:false}, + {id:5,name:'交通',imgUrl:'/assets/linkageForces/交通.png',isChecked:false}, + {id:6,name:'民政',imgUrl:'/assets/linkageForces/民政.png',isChecked:false}, + {id:7,name:'气象局',imgUrl:'/assets/linkageForces/气象局.png',isChecked:false}, + {id:8,name:'燃气局',imgUrl:'/assets/linkageForces/燃气局.png',isChecked:false}, + {id:9,name:'市政',imgUrl:'/assets/linkageForces/市政.png',isChecked:false}, + {id:10,name:'水利',imgUrl:'/assets/linkageForces/水利.png',isChecked:false}, + {id:11,name:'通信',imgUrl:'/assets/linkageForces/通信.png',isChecked:false}, + {id:12,name:'医疗',imgUrl:'/assets/linkageForces/医疗.png',isChecked:false}, + {id:13,name:'应急管理',imgUrl:'/assets/linkageForces/应急管理.png',isChecked:false}, + {id:14,name:'住建',imgUrl:'/assets/linkageForces/住建.png',isChecked:false} ] + //勾选力量类型checkbox在地图上显示marker + checkBoxChange(){ + let LinkageForceTypes = [] + this.checkBoxList.forEach(item =>{ + if(item.isChecked){ + LinkageForceTypes.push(item.id) + } + }) + let params:any = { + PageSize : 999999, + LinkageForceTypes:LinkageForceTypes + } + console.log('4444',LinkageForceTypes) + if(LinkageForceTypes.length != 0){//如果勾选了checkbox + this.http.get('/api/LinkageForces',{params:params}).subscribe((data:any) => { + console.log('所有力量',data) + this.createMarker(data.items) + }) + }else{ + this.cluster.setData([]) + } + } + //循环渲染出所有力量markers + cluster:any //力量聚合实例 + createMarker(list){ + let markerArrcluster = [] + this.cluster ? this.cluster.setData([]) : null + list.forEach((item) => { + let image + if(item.linkageForceType == 0){//消火栓 + image = '/assets/linkageForcesMarkers/安监.png' + }else if(item.linkageForceType == 1){//消防水池 + image = '/assets/linkageForcesMarkers/电力局.png' + }else if(item.linkageForceType == 2){//天然水源 + image = '/assets/linkageForcesMarkers/公安.png' + }else if(item.linkageForceType == 3){//天然水源 + image = '/assets/linkageForcesMarkers/海事.png' + }else if(item.linkageForceType == 4){//天然水源 + image = '/assets/linkageForcesMarkers/环保局.png' + }else if(item.linkageForceType == 5){//天然水源 + image = '/assets/linkageForcesMarkers/交通.png' + }else if(item.linkageForceType == 6){//天然水源 + image = '/assets/linkageForcesMarkers/民政.png' + }else if(item.linkageForceType == 7){//天然水源 + image = '/assets/linkageForcesMarkers/气象局.png' + }else if(item.linkageForceType == 8){//天然水源 + image = '/assets/linkageForcesMarkers/燃气局.png' + }else if(item.linkageForceType == 9){//天然水源 + image = '/assets/linkageForcesMarkers/市政.png' + }else if(item.linkageForceType == 10){//天然水源 + image = '/assets/linkageForcesMarkers/水利.png' + }else if(item.linkageForceType == 11){//天然水源 + image = '/assets/linkageForcesMarkers/通信.png' + }else if(item.linkageForceType == 12){//天然水源 + image = '/assets/linkageForcesMarkers/医疗.png' + }else if(item.linkageForceType == 13){//天然水源 + image = '/assets/linkageForcesMarkers/应急管理.png' + }else if(item.linkageForceType == 14){//天然水源 + image = '/assets/linkageForcesMarkers/住建.png' + } + // 用于点集合的数组 + markerArrcluster.push({ + lnglat : [item.location.x,item.location.y], + image : image, + data : item + }) + }) + this.map.plugin(["AMap.MarkerClusterer"],() => { + var gridSize = 60 + var count = markerArrcluster.length; + var _renderClusterMarker = function (context) { + var factor = Math.pow(context.count / count, 1 / 18); + var div = document.createElement('div'); + var Hue = 180 - factor * 180; + var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; + var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; + var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; + var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; + div.style.backgroundColor = bgColor; + var size = Math.round(30 + Math.pow(context.count / count, 1 / 5) * 20); + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.style.boxShadow = '0 0 5px ' + shadowColor; + div.innerHTML = context.count; + div.style.lineHeight = size + 'px'; + div.style.color = fontColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); + context.marker.setContent(div) + }; + var _renderMarker = (context)=> { + var content = ``; + var offset = new AMap.Pixel(-12.5, -12.5); + context.marker.setContent(content) + context.marker.setOffset(offset) + } + this.cluster = new AMap.MarkerCluster(this.map, markerArrcluster, { + gridSize: gridSize, // 设置网格像素大小 + renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 + renderMarker: _renderMarker, // 自定义非聚合点样式 + }); + this.cluster.on('click',(e)=>{ + if(e.clusterData.length == 1){ + + } + }) + }); + + } ngOnInit(): void { this.getAllFireForce() window.onload = () => { diff --git a/src/app/data-collection/water-collection/water-collection.component.html b/src/app/data-collection/water-collection/water-collection.component.html index 9fe492c..763a772 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -58,7 +58,7 @@
- {{item.name}} + {{item.name}}
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 c88aa80..153eba2 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -33,10 +33,95 @@ export class WaterCollectionComponent implements OnInit { {id:5,name:'90%-100%'} ] checkBoxList:any[] = [ - {id:0,name:'消火栓'}, - {id:1,name:'消防水池'}, - {id:2,name:'天然水源'} + {id:0,name:'消火栓',isChecked:false}, + {id:1,name:'消防水池',isChecked:false}, + {id:2,name:'天然水源',isChecked:false} ] + //勾选水源类型checkbox在地图上显示marker + checkBoxChange(){ + let WaterSourceTypesArr = [] + this.checkBoxList.forEach(item =>{ + if(item.isChecked){ + WaterSourceTypesArr.push(item.id) + } + }) + let params:any = { + PageSize : 999999, + WaterSourceTypes:WaterSourceTypesArr + } + if(WaterSourceTypesArr.length != 0){//如果勾选了checkbox + this.http.get('/api/WaterSources',{params:params}).subscribe((data:any) => { + this.createMarker(data.items) + }) + }else{ + this.cluster.setData([]) + } + } + //循环渲染出所有水源markers + cluster:any //水源聚合实例 + createMarker(list){ + let markerArrcluster = [] + this.cluster ? this.cluster.setData([]) : null + list.forEach((item) => { + let image + if(item.waterSourceType == 0){//消火栓 + image = '/assets/waterMarkers/市政消火栓.png' + }else if(item.waterSourceType == 1){//消防水池 + image = '/assets/waterMarkers/方形储水池.png' + }else if(item.waterSourceType == 2){//天然水源 + image = '/assets/waterMarkers/天然水源.png' + } + // 用于点集合的数组 + markerArrcluster.push({ + lnglat : [item.location.x,item.location.y], + image : image, + data : item + }) + }) + this.map.plugin(["AMap.MarkerClusterer"],() => { + var gridSize = 60 + var count = markerArrcluster.length; + var _renderClusterMarker = function (context) { + var factor = Math.pow(context.count / count, 1 / 18); + var div = document.createElement('div'); + var Hue = 180 - factor * 180; + var bgColor = 'hsla(' + Hue + ',100%,40%,0.7)'; + var fontColor = 'hsla(' + Hue + ',100%,90%,1)'; + var borderColor = 'hsla(' + Hue + ',100%,40%,1)'; + var shadowColor = 'hsla(' + Hue + ',100%,90%,1)'; + div.style.backgroundColor = bgColor; + var size = Math.round(30 + Math.pow(context.count / count, 1 / 5) * 20); + div.style.width = div.style.height = size + 'px'; + div.style.border = 'solid 1px ' + borderColor; + div.style.borderRadius = size / 2 + 'px'; + div.style.boxShadow = '0 0 5px ' + shadowColor; + div.innerHTML = context.count; + div.style.lineHeight = size + 'px'; + div.style.color = fontColor; + div.style.fontSize = '14px'; + div.style.textAlign = 'center'; + context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); + context.marker.setContent(div) + }; + var _renderMarker = (context)=> { + var content = ``; + context.marker.setContent(content) + var offset = new AMap.Pixel(-12.5, -12.5); + context.marker.setOffset(offset) + } + this.cluster = new AMap.MarkerCluster(this.map, markerArrcluster, { + gridSize: gridSize, // 设置网格像素大小 + renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 + renderMarker: _renderMarker, // 自定义非聚合点样式 + }); + this.cluster.on('click',(e)=>{ + if(e.clusterData.length == 1){ + + } + }) + }); + + } ngOnInit(): void { this.getAllWaterData() setTimeout(() => { diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts index d8d3330..5fc2e49 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts @@ -440,11 +440,11 @@ export class GisLabelingComponent implements OnInit { list.forEach((item) => { let image if(item.waterSourceType == 0){//消火栓 - image = '/assets/images/市政消火栓.png' + image = '/assets/waterMarkers/市政消火栓.png' }else if(item.waterSourceType == 1){//消防水池 - image = '/assets/images/方形储水池.png' + image = '/assets/waterMarkers/方形储水池.png' }else if(item.waterSourceType == 2){//天然水源 - image = '/assets/images/天然水源.png' + image = '/assets/waterMarkers/天然水源.png' } // 用于点集合的数组 waterMarkerArrcluster.push({ @@ -479,8 +479,8 @@ export class GisLabelingComponent implements OnInit { context.marker.setContent(div) }; var _renderMarker = (context)=> { - var content = ``; - var offset = new AMap.Pixel(-15, -25); + var content = ``; + var offset = new AMap.Pixel(-12.5, -12.5); context.marker.setContent(content) context.marker.setOffset(offset) } diff --git a/src/assets/fireForcesMarkers/中队.png b/src/assets/fireForcesMarkers/中队.png new file mode 100644 index 0000000000000000000000000000000000000000..e32707dd4ba43b88ae8b8ec5d237df2778084756 GIT binary patch literal 707 zcmV;!0zCbRP)P000>X1^@s6#OZ}&00004b3#c}2nYxW zd8z}E)mB|=W5m)&;?gWzt_6|B2X{eHLGPHkcb6>O2aBjv-Q>)jfBu<&&KzMA8>nbj zU__O)2pM2E;HXj%p^TC*_Q{jDFcNjxKd)yK%B@<^&2n*E;Zmtba$$}Ekp2ZtCsue2 zUe;T+f}3Qtl#+7ekLy4N=QV@!yvgjN5^xYs6nmslcUS|dF?hR8fO=fVO)^wxv<5O* zQA0ko)%wKv7mB?yWal18t;u)(B7hgl70#7<W#yenN0<7uJe!%@@ zzgNce<`O*k7Tc3*Y)>wCz?q%F0M>^K4&=Jw)e1~5MKjS_PeRpoxD|4#=nPF&v%h>s z#_nP@+}Br^zb^uF5~ZwqC}U#+c)2&e`D%0GP5hjeMcCh%i`Ba`a@+WxuUGw9F*DGm z4H8o2-AtdP|KHtZnf!xWc)Hjt-r`%gPh^Ec)J56cP33zjR5eK^uunWT^O{j*YCAv% zAi{9yW~^sg+mQJ`Twv47NruZQaT=M&zE;F#Vx#K9%4RCk1QWKP!p=7lskhLwKo%v9 pkg-x)Nl*&dy9@F&y<*HG?KcV{{_$E*gQoxh002ovPDHLkV1nO0O9TJ_ literal 0 HcmV?d00001 diff --git a/src/assets/fireForcesMarkers/其他.png b/src/assets/fireForcesMarkers/其他.png new file mode 100644 index 0000000000000000000000000000000000000000..db5e809a319649eb83b882dd8b3b50e55ddbb4d8 GIT binary patch literal 839 zcmV-N1GxN&P)P000>X1^@s6#OZ}&00004b3#c}2nYxW zd{{w+N)5X-b1xmc)x*CMiWiiLIQ*kic07L*)j9!)-B!N7V%%& z{F$9MZ{GYrAEC@L)Bb)WUamzT=3GEWi$(!4S}t~xohU&n4j7Sa(rqgMF=wlzxT#E3l)Wqiq73=$ zZe#yO!g0xiHeK>O-;D8y*+G^VunwUb$H;5rSc8+2Jjaq?$p*;C8RtDhh? zw@VlDzy;0($w58ain((z>ct|g9)%O(SHi@Bj_kV+iIp27>%)z=;86W#Shq9qcs3%f zGNCn}k^<89#VIha;+62|5_V0q&+oNoRKbyY3!<<~v>1ng0T*&(kQx&7ngBn?M3l{6y3EoFN)5IyM6ia@#+pe5xRU|eE{#4 zE{Z*;mEC)8Bymo7qg01Ud$R%q5u^+~tCzjIDu^XNBksE^$L7D@!bCJ}=$06K1@i+w>${Q*e(XDRf$ Rr!D{h002ovPDHLkV1mdZZL9zQ literal 0 HcmV?d00001 diff --git a/src/assets/fireForcesMarkers/大队.png b/src/assets/fireForcesMarkers/大队.png new file mode 100644 index 0000000000000000000000000000000000000000..f58f18c11fa4caa978e561d4d21a101ce7ca264b GIT binary patch literal 748 zcmVP000>X1^@s6#OZ}&00004b3#c}2nYxW zdW4B;oJTT$3Fj$F+HfrKgNM&&s8xjpdB83)=ncG|BZr|=6=u0k_eKT+V z^PibF^MsT&?CS*)&I4J6oWM?nWq}e>P z8v(iGYj#bT5y+((Zx-3Fl(y_Z|A=~~}m1Rh)r*u;fTl{W_B%*XWs=-nScKYR<_djrsL*`68C9}RZqzQCh*4kp%u zMkZ8U(X#v>(~ML-XJIAuY%CJRxFbv`vNb`V`FrtJ9^w?BG7j* z2x&}CR-8HM+y(c}!NMX;m*DoP_)@hBGls_e=8I^Rg*k~-SD1A3&Mu#;vO-vM!j|c{ zk{?!=&5OEwVqRHN%S(UnNgNl;kLAQJs{J?SrFu{7@QANAd^+QUvPFqfDR`2tf;8K^ zHVakPyJ~FyYZpeDFL+Yz6ZP{1N@XgbFjM;#4ww1IP+q?nnm&M*)LYswz@ZAN) eDNl+?cK!egg9!dmaXDB30000P000>X1^@s6#OZ}&00004b3#c}2nYxW zd0XzUFS<%+B}b zn{VDMq0Hj(WCBcaFrom*K(qtQ1%PrOg_;X6j;jxo4>;o75b{QRx2YLWUN;TdBFFk1a2Dy>h}RPJ8kpEPhj;EurLw= z$T><)w8{%6h*@N4k9`0Qhk*9;z_yz3Q~%ij<{tpx-v{^@XDKx~yakdJN!Gf&1fb)J zy(JVm1BqRzv)0`0AfP;@GEKDA2U9Kpp(uV&WgsX0FbaH~^`Er46F4|v`%Pc;Q%BrG zJeC{=(V#0r`#GSwOKrWq4}6=m&Bv|*uWs7U0wk2mT7IDp>B z!0v9KMOVSc`@ESHh||67+TFDWIDTDi3CPlOpgN*NP`}r9UHuG5u{VDKEhlV{mp6bP zUtA#rGKm2CBR7aVdDZ4rlM}?733$Eonuv;|$WmDOFKV-jT(%~as!J5NFskSg`q~D7 z`G5~W`3bQ(0WGsy+0M-&9p-|K&OZrKa<@Aw#=@a?obgx{^jjn11 zcKkcrrQvWT9lt`UO!WWVU1m0+w{Qg5uPbW2x3Cmny4*{V84!!qpD_oYd!86Z&UaBd zIg~mS=ZT{}o*oBy9hw&N%@b7{JqD0mGwvJN7o^k%uLIl_I2oP000>X1^@s6#OZ}&00004b3#c}2nYxW zdS)5NHLJ5<;1PqGSs%+l3LAQI|$9BXTbc>N`ftbs3nQNkYa*bY&t# ztu_ym_l1tzwL}n%NcLH|)wY8~S4Q*HOxLz3mO z3P_LFtMfD*zX?AUVEwTd4wNNV$V%fL%%}0-*bV496GF?AQ2Xt7QynpqX+$o0(N>GT z2Tj=8L-_g5>xSx#kt`rG6hrr%Z)R=A11IAFx7NWvJO9?;`%GM&>RWNvqk9N?ulh5M z5Y9SjMRa*wosstS!-?AvbhRhjn1hWMPK;Yg?>=<&CI|a`3pQ8XM2+sUec`?*yIZ&VD(t$5)HbU1M{M#+U6Qj4h;SX|K}!QWxY z7AvhL&ub-^a(3NLf>pFOWeY0lPdZ7qmD#%s?8_k7yQ>GZiel^9TE8d*v!>j6{sXFo V@f8(gf6M>?002ovPDHLkV1g7yK7RlJ literal 0 HcmV?d00001 diff --git a/src/assets/images/市政消火栓(地上).png b/src/assets/images/市政消火栓(地上).png new file mode 100644 index 0000000000000000000000000000000000000000..6e46ae1c4de4f0cc617277db8db02d8faa481536 GIT binary patch literal 2436 zcmbVO3s4hx8sG4Kh#(IYsJJ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0uRZ<(s7i`Y}@+S&Jknd<^NZ*pM;(G~hA%cR5(PfKE z+MbWLRSFn<_Z2H{%NiAwn=xX_zQL=1oS(RpSyG~ixqP{1$Nbl2ifv`q1VmOG2FGhg#F*qwq85gyzT^`EW0#cAMuxPFG`3 zWZLzrwjxjclOw}6+hM=t&2eb8CHTFT)2fjdHDBgFz5n>Fp+BFh-D+x4~^zW2_DnR|-Eeh_R+X}uYAw>P|03dhuMwqd zN{Y2S=!-ptvCnARO7~j*g*&QBGNEN}4&)qq%vN1ITNbfmBB;lCq-uw)ygL_Y+n0X# z!H0ubNZ82%wv19y;YXlMcl34VzF{aJfEv|#<;3l1pRUIFV*w|FC-XcEk_gLad^yL* zDtTxw84r;tKO1O%2K2}Ht(&wW8}_)_Ub-IYRX^wU=@$+EAvNqfukoBiRBy+Lz4ZrQ x)@`JC{`fT4Jz9J`FOAI7!=XM`Ze9H(AGlMQ!{h%0h_nAENyYJ^y14X$e*;R~mtX(@ literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/交通.png b/src/assets/linkageForcesMarkers/交通.png new file mode 100644 index 0000000000000000000000000000000000000000..386b5d3fdf43e71b7fe09ce5cd41c078fb544521 GIT binary patch literal 2927 zcmbVO3p7;g9v@K+h0;+`u4$C?n5UUxhEX1q@ff5L%FvkEX7({Nd(4dYp(7%NNS7pB zYAIQ?BsA$zNlK?QJy441NYaZ`dQEqaWOeT9tb6a-Ykm9s_V@k1-~atzJKe|2RbS6k z4}n1FyD?pS;n_qpkh9?T#o?Vic+!Dn=}l$Z0Wj^dv70UTd~-Xw)P`5l%-tY6PMJSUxCcNCu$D zSPF(mAdyivR4jpFO`=lQqKJ5cEe>ysBUoby6dDOnBN93FT{cX~g1_i! zp+X_0;c(H>(b#BfEF=@)2vjN+hbQ8QL=23;$YUi6ZVW~uxA?~30?2tXP^thS2};Ar z4TT~VbTq8#R};k2XKK_#c*tIOyw2U9>A{I}JkSiEbuo+Vh`5{`)j+Fv9UqB8;%6I@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ER{BXr?KhsU{9-dy@WNw|(pf#Q`_7!~o7TU@ MFkytCiYLqYH|u{PEdT%j literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/公安.png b/src/assets/linkageForcesMarkers/公安.png new file mode 100644 index 0000000000000000000000000000000000000000..a6cec4a470f26bef961055d7dd8e3e16ce67a787 GIT binary patch literal 3330 zcmbVP3piA1A4du4BCJqp8s*wtnTcU?nW0e)l3cc=F>}TYGjqmV%&4VALXBIx$)&9% zglx4XL`aItgd~zksVusYMfOY=&+hl^KHvB4d7k&Y?|I+f`}^Pj&vOzy-Pg^ZYdBX) zNol?th3o~*28y9R2YT1N+DC^b4L-$RsHCK+qZrCc8JYS@N~(HnZ$FVAbt8cea*;F! z7z7}tTt0+WQnGiD@@e!?Km-c{g4sMGe7L*{4r4Qja9Hgyw&`1CVJVfC$H;u^0pz zgTUgvF*pJSXNk5UpwVA(RFJ`DM*J-fPr#u60)-0{oCQ;F{77Rwf6>T z;mnSqa7hOuSCk7g*DZCSH|D1mEDfsIv%?U#Xzw!>TpZcC0>+9@l{%kV>}j}JB@wZR zJ)gHVvA_Aj(65((E9Fl*Y6qJJmv&3KFE0MEcHiQ)yQ|-qP0p=~Jh&S*d!vf0(*XIN z+qMan+r0}~>nGyUIorzkZ!N7%-Ji(q>_0e#Jx^RL-&-5S+t5-bnoB%xs;3gKQKOAn z3scsb)^VD}OzFOj@gEJ35)9S`9J-aqTWc5al2aBF^f1__gnu_!%_E>v+_Ltfv_B_+ z``mB9+cADx&46U6C$IT@tNZChx#`$cDZ?bUu{p){zGK|b>bgqR0@|89Q@!JM0YMXs zuU+lGu`B23_?s$&2)xr($Ae>m2t_ zJn-?B!`YXz7TwWh%tMiJB@PuwdXI#T%ikkgbkv5ZE9+jM&uNV#wC?nWrkiGeTHtJ< z?y@Rr6_zDCmoqqCd$G#Cd{c&j(bFw8HrEbL*I18c$||_=Bbl}Dgu}f@LI$OrV~N`u z;jFUS}#nYwYb)#Zbs6I~yA%R5y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Lh)(844 z8=TDbqF5%NXW#otXV=+8OtTF4XdUZ{oS?S*g!w#sXHExY7VcfA`U)*L$J@hJ=kBXE zH9{PY_Iy6!gOPQ>%|h=@+633qB{f<%(`SdDsNeTPdaTQ>wg^V?q2|*3oUJuxCXM;d z-3hgZvlrF)OJ519f4#QB^z&Z$`D$U9kD+>rtl*}Z#z+A!2uCeAR)0LOCV-`VQ~Pv^ zD>YXmMl06wKH%AsPjOq=MOr#M%M)iTEUUWJn|-7G^o~&@&O-lEr^BC;l6~1LR#G%8 zHf*UljIY@U+XqXuc6K0NwoVJ3OD<5wjum7N+Rw%)z3$i3%qOG{R7%97O;bb8+$%h3 zr}itqhD&uNg>^jgz(Y^5C*p^`#MLTVXH^QE^ta01sqDs;pMScwtR^&GskgBq&!kQ3 zX~L*=@KmI`WklP9j{Fl?-v(-=@5l3F+>KPZICAyjx4&KJu;~lLUNmnV%+M@yG0Bki m8)KI@y%0Y6S@%XBIKCKfmW^f~by=wROL22?Cl@>K*!u?nRDACM literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/医疗.png b/src/assets/linkageForcesMarkers/医疗.png new file mode 100644 index 0000000000000000000000000000000000000000..5f3be9d557ffed43184c930f66a3c4f31d580a60 GIT binary patch literal 2974 zcmbVO2~-p377j&%sJMUyWRW4DRUj*iOeA1T(6EFhM8St5VKRY0k_nTrE1QoNR0OM3 z5bRTmw1{BEq7?zLxK^PSrBVT@5=4xExS+`PCWxHAp7y-=I_J#HKmY&z-*@l*@4aWT z{e3s;&oiBe!{PKjIcy&GUZ%O{;<4xD{!9pa>B%`;6gb>`L(Q#)J6vpn!|51_`N7Iy zt`8kTq$Gh535Q7uQaOgk;auGlO!Wtkf{ztsx#e@LZ{JynTvp_p+XUz$KEib zg?%vykxHeUPA134$CKh6NC+B1rh*_yrqIYV8WBSf6^SyXAb}`TSbtz(!wLu$%avk8 z251-s;Yh5KLBK41?}Ai5ODj{%gb526IYA&NQ%Mw!OVdChG>enRqLOKGAw-5HuoRXl z6&RK}i)mlHz?^sLywk1-@k3_rEAZ?Fapvp#87bZIH5>tJN$)wciP>;65K z1KxG_oc8N|y054tX|HFCQmglcm(2$MzP=*+wu;b~%jxFd4n^tqp~kA=LO_a77%q`wJ`cw_K9TW9RhiyryIQ7eJGslQG7%bD`MxViSxV@+RBJ95cH_vHgd zLdpw*J-1oMMQXpdaAItwaYntxmfX&tmT13=KC#$7311;_U&e_+3MJVsF?BVlpIF2jPgWL%Sy3)YngOpG3|!&=JD~MT8Mhr#9?9|{5Oyz5EX3Q~W_PTl8HIz_Rd+1Tn6rOI-Pc~7ABG9t+GT>P zO>Hsu>1s6@# z^+L7J+|L_-1I~rr4(^!R^4!QS?f9DJtgfQ<2{}_as^f#M<%SI7Ra>`nnQ1aNqoaka zpLnl&|Fxu0wD3&A;Lh4H^>+VKNLNS8bR_@wqYmWpaA{TOvD5E1eKKcvXaA3{UZ-@t zYwtO4ASG4?k6tt6G)(z%YHAAHCv~q^M4_8-X>QAykDi4*AAjNzTx6NqX_EF;PjsR| znHxQqZG$fS%J+gpb+S5ZSjTMYhTo#V#Yg)i7OIYri$U%Lj%(Q-w4NwwMF}mU?tS9#PVZZ95ZP$OSK<=u=+je~yCH*g?AW;^M)Qrj$EP|H?{GY=hm zYU>!eeeq>rZrPlCKW1*rsB#-p6Vx_nRQF)RgNb!uLTH9KO0*-!HhFC1wQ69P#LR2i nGuV3G9!XoEz5A$2XVjfHtZlmVpOYlbAGD{3FS}}eSjN8r<>s{w literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/安监.png b/src/assets/linkageForcesMarkers/安监.png new file mode 100644 index 0000000000000000000000000000000000000000..46f9fc7db2ff6cc18cbd34846a7a68ac06f843b3 GIT binary patch literal 3230 zcmbVP2T)Vl8V-VrV4+$_hvkY*>(YgUIZ@*_~JJ%(>^>bH4Na{hztVog8e|$ZV2vDRu&KG72vyWG@1rZt9Z6v0tiG_Q9L9dDQQ1JAj>x}-8_Y!6nh+v%S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xT#j{v6UOC z{dD}B{&PLnKQ2FqC7I_WC$2MY?r(Lr12VH$$mAazSIgh0UsD|?7hns6iQ=7G`|&~c V6w~1>!FlD2+0EIDn(w$Z?%z6`(yssj literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/应急管理.png b/src/assets/linkageForcesMarkers/应急管理.png new file mode 100644 index 0000000000000000000000000000000000000000..0adac17a18e31d142fc1717d07ecffe0ac257907 GIT binary patch literal 3161 zcmbVO2|UzkA0H(5Dp$xc#<5ak4l~0{ypACTGma#8#>^j+xtbZb$ep8OB?{#z$yPeF z(V7)0g_5IIR)@kMYgHB%)%zdGXZQW=e%|-p|L61kpXdKP-{c3KW}0rmpbWYVY$ukCBy)*CB*P_v2W(HE_|Ouf zXm~oz_FquzI08t(0t8fO9E-{36XI-O%e(||E#5}Jpvw?Jlnu;YED-8P_Jk5SJOGL{ z$H8eR3>IpMH%H+tFnIhHC>n{fLLjXWC<{0WN5CKnXf$-?fq~L^^l*Z=#l z7PX4yMsfrkekA8_s8^5wBmi_RnY=3FFLhzDRz>gyPBEYvD-QWfG~Xwl3n07!J|~(- z1Ds+&H4Vkqa0x^nKoxL!J{%77YoI*8sthF(#eu;?O?NWbbWSXP(;w~tj#L3)14ARx zC^!-YM`L|ZSON;W8EHj8BER6s96BRB{x5NO0vi7(D3~&Is(|`m!E_oSoWo;LL4z4A zY6O7bvLj&7RW}ld943bc3I03|sQaVR_v2S=NumenPb z2_!aOKxNYalA{d_bdEWLK_>v=G&&ZEM8hqpI6Rz=!QkL{6cPsqXfz}m9S&Gxk(jUd z9XYgUaSD9BPyavfd+-=w2~wH=m`7Zg;@ly)F!*3p<5x;&JFsVE#biL2(}h5#iOawS zMia*$pu<+S8UNS=Uua_^0g&|XlHv=7&j}aAQh9)V1n8>&CFu~L@(6Lkez61bpC&G! z{h_$O!oiLqUaqz(@ME>v0c^0t@xWH*zg|5J0$DpraMXxT*nPp}MC+S?smI?P-@S*hUs1z3@jJ9+ z6>_>zlI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og~JD%d6!*`8-I zfysA07j|50tdAe4-8U*h%1Yd*f9iT;#!pSnuKh(j^ixK5rN|`zSl;!~aT a-z&orjJlg=k4lSw{z*<0$2y15w0{GIJPdsR literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/民政.png b/src/assets/linkageForcesMarkers/民政.png new file mode 100644 index 0000000000000000000000000000000000000000..dca126799175e2dc912bc4decdc1a89da0ac92c3 GIT binary patch literal 3043 zcmbVO3piA1A3rlR%9LzQ|XUrT-7LiX|iKVY7 za!ao19+IVrLMkQH+FEI)A}y;eG0}HM^0eQx`+VQG=Q;0rZ@>5Vzr6qd|2g~oeAnpf z80!E4pwISjKGMyVdTf>hfbM*CLjhUG76HJV1w!s7c$1GegAa)b zJOLC85)@)7f(8J4M}?Hf-vPqdU@%lDVd92sui&sk0TZ{8>O=C8vcNE*N3;xFAMMNK zNAKX%1vp0sti6JP5QssThgFD05;;S`#7*-ukgzg@Q*Ac==8V%v0bc@@1bGTtPWsCX~WLNP<-} z@`9lVn2AF){b+(%I!h~&&$tP37*WBK63GOT+N5cqfIo|qM#x0d!UcRHC<4Wx1ePOM z@+?*w2EmX#4EhV|+3i0FKwRtNGb`gybrFkaMaW^dNW_d8hx{p8&fO^mi5yT4MacM| zTO^|9GPN~Q21^F=U`WP=Akn9b^82JRmc>$E3>|B+Q792WQSz0aodI2WFv!GFNE9-j zM8;F7Tr!nGrdpBg7$nk1oDU=rhV1-PoGpV)`vVjS837OG{a3Jn&j^8JVjg0!P|OPj ziBd@@4m;~c1`85FGDI+1B zeuO#%KAji*pXb-ggh&eVM1Pw{otWy_VR#7T$gS?2NuBjz_{>No#7>6`gU45=0Tahp z-#;k8%`6N5wg*1aMumY0>0brKM~oZ_fundb&^Z)w)&CN7L_~R_I$=NBLHth>r}sWf z?oV)}VyK6+r3#tM7CTUaR5%$@$};Xg`~mv$4Yv{9BG8C^!OW{HnUKBD%QE}Iz=G@|v&vntSK#sMm{$i^{-jfs z9h?-)=5^@LqwaP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al 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/燃气局.png b/src/assets/linkageForcesMarkers/燃气局.png new file mode 100644 index 0000000000000000000000000000000000000000..ffcd19b6fb953cd92fa901d7691ecee5a86e86e1 GIT binary patch literal 3020 zcmbVO2~-o;8Xl-3Ye5kOT$n@@7eW@2kfa8J2@-@5N&<)*hGYVfB$Fm#3u4)o2Poi^ zQcxOH5K)w(C=~=36s>h(seq`c6lD`?U#lP}Z-U5a-)YZ#uXE0wd*|Noe*gZTN%!;h zG&8m}1^~d!i_P*!W*glwG(g^s{i#A^GE%UERRCaOsT+Dg!9i;Pn7u&4->BZm@u3M} znUg>SheA#JQiGvTm_$xTkJL7xL5YZt4kB@I90d~!m#{TTh^O)8 z3pEi!stE1o3a*WzAp|l=EdXO=Qn`v2Lq|{X(vY=o8;b^~AnFJ@+Fd6Q+{p0*nXnQ9 zNls*p5Kkn5E>tHx*_lYCI)Vfoo`S_uuy|(-o=hX+XaoW{{h$$PN|Bi6&ssk%3;Cj> z!_{g94U3JAj&_Q6c7l~*SUiog6Ob`ZP z74k4NIO9ed6PChCL@=V7^Y8b)m`pz@?z1^h;y7I5)n-x6bT6gAqC@tr;stBE<`*g6e0^SBr-|tOeNuQ1kucW7A%a^ zrNGDgqW|+gS1CbCP$2!=Ji5ZvT7Mwzpp7a{5o5DGK=jdhgs*ywH z{qZ4-d;H9=3U1xOde#4sGN8ZKX0zwu!22PMXk_bs*=LNc!?~`{7jYYN2E#p{bu>R7 z8to8PH8o$YAvCdQl{MuG-0aa&QN{($Z>zd9zT6@odn>lMO$cJ+ERWv<4E5|!RMhZp z>z5Q8J!rp=CAwWa+iGgI^NQ@w+$)9*V6`D=Z@lyyS)1*mZExy-RaVz21H8^V7GC@5 z>nQ8y$5 zl^-9P#*3ftZMo^4cX;St^QOUP7c3iph)FT_Ti%2^_N!g(>!FZU*pM%p^oO4W;hNt^ z+t=4Sm94tM?8ix}iyY}`HPmgHxHcdvo9L}5f{ac5H?kPZy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f-NIXZ*?ar$TWcQ6jU^RM`n2LsAOVfFL^t6dlcth})+X zoxL^JgsmYzU318FJ@H}=P~xpkB#5?)-(+lAp-)^-`g2dWEVc^P8Dyd6XPFI zF?Pt4DcJ>k+US+_KE2x6ckC0~duCRow{#pG(nxnvH?c&zz&%q8)n)^7(ln}pDvbxY j?5FMycDn7KP`{(L@lMs68$#@tej%M5-0aJ@2PXatTDmFc literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/电力局.png b/src/assets/linkageForcesMarkers/电力局.png new file mode 100644 index 0000000000000000000000000000000000000000..4ff9f6b45b57df5f4fab21ee65893afa7a3ee378 GIT binary patch literal 3277 zcmbVP4LDS38y-p|f3=a;&=@7km>)A^W|*-IHL5A05Ms<6OwG(0Gl%h4N?WL1`7eY` zr6RxC6%ZMxbP)(89lonOz(!+k}ca+`RyV@&f|+B074k`WhO==h4w_BsPvMW&(kHR=5Ok z3E%3<4d2V9^3XO6lyxW#CJ+J;2Nfz5h@`YoI{FhY4Iay;rjpS;?G^PaLK%m4G1O;CY%IT}iC?->WFjSO@8(+i&Wm3~W>;ddK5I{#0 za0EOChsO{|u6Pm+Pg;+o&~UiVI5x=R`-lBCjz%Q@2@0nSj{|Z3E11Wn`GXQ62Nuj1 zasmLXSQLOp&4-c31O=c3HVnIF@yB^bCeuj*`tt?wg4B7V9m>&xNybyjWDLO^|H)l8 zo8~BzLL3nnaI~kR;oz9_`8*nzh$oY%1V0P`XK8^U^N4;JD#d~b3nmZ=79;|ROeB5X zZx3>ViG^lTK_ zuGY;*860!=c*b1S-+aZ4SI1rL=ts%&h=e!x%K&^^<|EJVO9)IKbg?p z_jLMQQ6N(L^tsZYYpbh!s%p<+TapA;@smGBG|Xk5yuzOItrH) z6D6-+EA0Q+AbB>Uc&LL>f)OLd-%X}EdwMrE45fQ9M3JvzC38lqcGW&1Q9?AVN(CM5 z@!ZRdHty;(RyEaE(F4-UbKYuWlksZCk0O>>+^|dz67*VGeHYTNf*?PiNN9W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oNn+Acfo<%!Es|I~2aZtEh`7vpc+QbqcOXNgAcZ@o7U`Bc~X_N5l~Jsz%P zgD&6X^L{(FK0!OZSyYpLf-HRAE*wKE-^5>5!byBHpLW)HHFFxiU;NMpv=wc+I;&CK z+~>3K>_&qq~8JJzENY^b$n;a%&Jn= z!|iKCmZbh~AqU&=H*ssVloGuRx6!h4t#xVK-kuEBg@(F+XUlpQhM z8OhOyo2c?fUzHt6m6FcoqqY8=H%Y6!N;(TF$KK3D&N&(<2b!;76l)Il8OL4M0tRhw zzn#Vlc;l*@uKwy04iJ)0$u13haov1;;?S|3DYJ{J?UOF2nINZTH&@(nxu~D+SJ$?_ mAVvA+${(6dCqwJVGuWX!c2*x-kJrk7I2;|e+85dRM*kbA5>>ST literal 0 HcmV?d00001 diff --git a/src/assets/linkageForcesMarkers/通信.png b/src/assets/linkageForcesMarkers/通信.png new file mode 100644 index 0000000000000000000000000000000000000000..3bd0a03a99f099a9d54adc8c8858a5d4d48f9b11 GIT binary patch literal 2514 zcmbVO2~-nj9*-0hq^t*^f)!%`i(Qh*4H=0%NDxv8${`xGNSGO5AjyPGFbRvGSQn`X z7DNhC3W{4+D}wB{6s&^9C}q_m2%?}CvD{ijQJ~^ZxSri--|lwaeDhtu|9!kk+wAXc zvCwuQiA1sx`3M7v*~TzT=M&%hzWop}nJIlFIEiF#X&CcJ`2{OTB$H)m@HX`}u^$Lw za+(yzA`qHZt|ZVTlAF6$DTQJYH8}!_LKS?dj{ssgv4~@+0u>@vW2#^blg$Qd^Q_8bfxr+L9@%Lts(>*KzU~bgL?~4wdS%pQSGU5Uc^!6l+yaZeZkISVpX^bg##bQvTz|~R(gouQE z3gH|Yiozh`3b7e%giei&Ad(Y;*(@rL>Ec4=vROPjHrLsTF$55Dt+yQ-1oQSG!rgVakxS5p{?o*%yElq^7EW{w!*Z@w5u3SY zhbV{+ry^R}4JX&rB$9E2NazvlleWKABFovbc)>6CUp&8a(^H=2m2$ZCc!*WBxo1b( zo}#X$hb}l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MgIam Cg{Hm$ literal 0 HcmV?d00001 diff --git a/src/assets/waterMarkers/市政消火栓.png b/src/assets/waterMarkers/市政消火栓.png new file mode 100644 index 0000000000000000000000000000000000000000..96228958af8c78ea8ad1e1aab6d4c58a14cef705 GIT binary patch literal 2269 zcmbVM3s4j17ET{3$Y?>a0*WrHpcInbEJ?_2Nf8o|6cZ?qhE^ypnnMcWR&K(CFhUZddLyWx?sj=hiW%)kHZ zJLfy+{O6pyOzrA9v%_W!1cEv0G*uQqhkA$KO#a_9TubnizcuXzRv-wN?;Vc_b~J?u z1Tz*>IeA>3W(`KrW)ZHZi%5~(Y~|4cK|-S4iW8+I2NaP8%Ax>&ah?PLO0NKQQVp!J zDoG=iR>hFnRoWb)s+2(WVB#}Cf*s=(m`M%?>}HdN#q0`jLNCUzy~hv;OhC9&1(@U| z1oAYQfRbiNKq`_639&>9#G@jyEKY)=u>b;#p8B6rhpgtQZ8@Y&MZCPDC>XNQ|N=1S1fF2zi8%t+a5sU1(vKO>0n*EWuD#j-oAq zS0i3Tmvah`w{+44v(=~8!cK*W4;W;}t&ms*dtI6U>IomtTF#gz$n^w7nn*Kg;aDCk z_F=6?nxk1G{RgUj*S{m+L#xsFI38+?+3cfWxs(dtjj4b<6wT&TT1hC2Wa)B-AX6%M zGnaY2v0_Sw#5tPDp=s0fLuF2z3@DY}he3grI?AG_ZEW;?GNcOUNCk+%h*$`Vg@`mq zEX5EQgJm(W9E0IWsD{>4#gz|*N*;vrS)<1}{J(zK%JtLiBXwMh={}!=4v#U+QM?Ug&@@`1<1!o zL{WMSAyFA3A>xHNj1t0PQi2OnR4Nw|a)}g%C4>Z)>!;;aG*Rx&f@yjE|0$orP<$2Q zra!I6TbthW!O|#}f7r^Y>d7X{rdB2jn8+9mC%l!Q010mjkh}+z$JC#Wz@)s*Nb*Ym zLtae6Sh|?A;S8B%;G^}wq#nfE4|&UW(iP}IFDLHqEAeSK-#5HVU&G=zzLrN?_&&$* z4K1jmuu&j*%%D~!<)qa$f2A?zt`45%9&}ZQwd@OwG@dqY_B@yJtfSyqtgr)2+I=** zeO`V^Q0$eC3SHoSi)-cO<^V_ItHD91a#y{c_l+@Z+s3*rArA53l7{WWMGYrxgX{NP zNX&0sKh$*RJj#C7v$4Z^6zWX-I)w8hZ#I2Hski_oD6In|qxJQ3mkB zdn@X0WE|Dm-QUkpDu2Fwsy5(sSAp~IBSm+Zu(17=T)N*PTxOlcJ}#B6(IWCjzqw1b z0dIdlerNdxH!!TxMma&*)s`1BMo!D$80s2Mj;Q@0bKOtcH^XBF$)K^@7q1lD#4;qW zEeL(4Kd8G~5FYMw#wR|qSkZUIsot>e{p!xpaOt2de#5c_F9t;{zx`eU{@YOSZ#tZN z>xVO4OyuT8i~6Ne$@v{4QJp{b%$eir+B)~hq5AUCWA-fzVlKDWjt+z_(e{2maOUo< z=={=wUw%C;l(qvI&yINM80@gF5t=C(=_~NLaX;3@%siTd`E*q$Qw0_BRh39vrq}&6K zD@~Y>DuRkP8)mO zHU9YS1K9ev73&)cqLV#K<~u&J9^&>na!j=0+s@$5k;B@v$dj>GzmeV@OOHEH=r?+{ z@YX-F&L7NP`);CZASpfl*|+vZH+IjAaK)@pH;Zcu+dQ{)hq@a>66YnKH@*H@UvO28 z`>$WN{OgIAo2hFG$KRNF$AmSlo-k$ZPzxTi$-Shie?|Ytxz&BUb-kdt;;M3A_<_{c oo7a!m50(Wjbl+|Y?^<~7WVLGbt}SYmFFAogouXA8OkTI~-%B!E5&!@I literal 0 HcmV?d00001 diff --git a/src/assets/waterMarkers/方形储水池.png b/src/assets/waterMarkers/方形储水池.png new file mode 100644 index 0000000000000000000000000000000000000000..d7862c113362b092bbb6ff5ce0b0d17dbbfe36b4 GIT binary patch literal 2179 zcmbVO2~ZPP7*5BVf_RGxx-KFfBzuHhtC32A5+$e@1xHbr-6d>IcGKO31gf>8!HO0y zM!BqYilV5XA|91dQN*KCp{3YLTdiWHI;d2rXg%5uM@BpLa%bMYx9@%b_aE>7|Jk&e zkyE`qhI&XO5-&rzK1!U2xJJ+J;`{8KR6?A3*}~`X63N^BUE?iD&Q>3Zq?<2oiVbYLQZl@f5kVYM(k=Foy|yqLIlZ9^c?1`(EM!O1R#K#XxFpkp}- zP{@>00tr?CDvbK6ck1AY$8WcVM(Hy{w{B9n2w`x zf#pmrYw5hGnVlvBI-TocG{Bf>nju*`KlUXVN{?6)iFd-qzTsNB8$Xm!`N7fU2v zybSuurtq}F+8L{B=M3o4RQ34-RiuF$)Z#r~?_=y85Or&hvRj4z_`8Ek=-82CdXD@$ zG-CIa!w0sB|Bg$)oasLi z{oz#N)=_28AN#6e2cHI+UMI_@q)qGl{ zZs(oG@)fy}`O~qDH@ciVYqFGGa##{_3(~($Nk5v~IN$%o@Jj*9=bzc8{Bl&t-8-9w z(vk@=Y;Y!SozS#!Km)jRX+YOPtu^K7#)W0aD>C}wL+72@yRj}JyTF6b%I!0J*0a7h z9$u(CZn3fh_*I$lT^pK&a~q!A-JQ3vU%vP&c-hEp(`JhxashV4mE)V!xm2oS`d1F=MIg>2#PK9kB=j>UG%^CMmbjGYzyRrrp z#T3W)EAF3kOkXu}L5ys2NE~8{E**U^yyfYIZ&J6c&&hAtpY!O--NFF;`wuh6W$tS^ zAf5BW&IWYbq63>3SEuA%&sl%9b@piLClh|VPS$$YXKwwS7iC=(W1sI>v>VU;=8q9- zGHZmXs^swW55C2)C%ZBNn;MqiI<`9S*P2lCsVJZF2lW^0hn#$&T3;J_Q~pV1Mc^}! zb9|3Rq)-8}t@^d!Vti*e#cy=$bwm$df1(_qVF!-74H^C4VsV@p$yy8#I(l_D& literal 0 HcmV?d00001 diff --git a/src/styles.scss b/src/styles.scss index a1e9b69..7c77928 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -192,3 +192,8 @@ table td.mat-footer-cell:last-of-type{ width: 30px; height: 30px; } +//水源采集点聚合 +.clusterImgCollection{ + width:25px; + height:25px; +} \ No newline at end of file From 58f75315d0a6fee245c4ec715047f20b885bd002 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 26 Jan 2021 11:21:50 +0800 Subject: [PATCH 10/11] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=BA=95=E5=9B=BE=E9=A2=84=E6=A1=88=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/ui/collection-tools/collection-tools.component.ts | 3 +++ src/app/working-area/working-area.component.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index db6d785..9ac9bd6 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -2272,6 +2272,9 @@ export class CollectionToolsComponent implements OnInit { this.canvas.setNameVisible(this.wantToWork,1) // this.canvas.setLegendVisible(this.isShowLegend) //图例显隐 this.beforeOneCheckedBuildingIsShow = false + this.canvasData.isChange = false //服务中 数据是否改动 改为false + this.isShowProperty = true + this.isShowAttribute = true let selectPanelPoint = JSON.parse(JSON.stringify(this.canvasData.selectPanelPoint || {} )) //当前 节点 数据 if(selectPanelPoint.Data){ diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index dd61efb..30d61ec 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -159,11 +159,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV PIXI.utils.skipHello(); this.sayHello(); this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { + event.stopPropagation() if (event.keyCode === 17) { this.isCtrlKeyClicked = true; } }); this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => { + event.stopPropagation() if (event.keyCode === 17) { this.isCtrlKeyClicked = false; this.rectToolGraphics.visible = false; From c50e55e6e7dcfa148eb77a09064c2a9b89ba6d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Tue, 26 Jan 2021 11:57:21 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E9=9B=86=E5=90=88=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/axSelection.ts | 4 ++-- src/app/working-area/working-area.component.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/working-area/model/axSelection.ts b/src/app/working-area/model/axSelection.ts index ce7a6e0..8bd6400 100644 --- a/src/app/working-area/model/axSelection.ts +++ b/src/app/working-area/model/axSelection.ts @@ -8,7 +8,7 @@ export class AxSelection { // 获得第一个对象 public first(): any { if (this.objects.size > 0) { - return this.objects[0]; + return [...this.objects][0]; } else { return null; } @@ -19,7 +19,7 @@ export class AxSelection { } // 获得所有对象 public all() { - return this.objects; + return [...this.objects]; } // 获取集合长度 public size(): number { diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 30d61ec..7f80485 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -151,7 +151,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * RC版: 该版本已经相当成熟了,基本上不存在导致错误的BUG,与即将发行的正式版相差无几。 * Release版: 该版本意味“最终版本”,在前面版本的一系列测试版之后,终归会有一个正式版本,是最终交付用户使用的一个版本。该版本有时也称为标准版。一般情况下,Release不会以单词形式出现在软件封面上,取而代之的是符号®。 */ - public VERSION = '1.0.12.20210125_beta'; + public VERSION = '1.0.13.20210126_beta'; /** * 数据初始化 */ @@ -159,13 +159,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV PIXI.utils.skipHello(); this.sayHello(); this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { - event.stopPropagation() + event.stopPropagation(); if (event.keyCode === 17) { this.isCtrlKeyClicked = true; } }); this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => { - event.stopPropagation() + event.stopPropagation(); if (event.keyCode === 17) { this.isCtrlKeyClicked = false; this.rectToolGraphics.visible = false; @@ -181,7 +181,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 删除选中的图标 */ public deleteSelectedShape() { - if (this.selection.all().size > 0) { + if (this.selection.size() > 0) { this.selection.all().forEach(axShape => { if (this.allowEdit && this.canvasData.gameMode === axShape.assetData.GameMode) { // 删除图例对象