From 71659c053a3b2dec3fd0771c2c296253fe80e08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Thu, 15 Apr 2021 14:41:44 +0800 Subject: [PATCH 1/5] 1.4.3 --- src/app/working-area/model/axLegend.ts | 3 ++ .../working-area/working-area.component.ts | 36 +++++++++++-------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/app/working-area/model/axLegend.ts b/src/app/working-area/model/axLegend.ts index a1c8281..dffc4a8 100644 --- a/src/app/working-area/model/axLegend.ts +++ b/src/app/working-area/model/axLegend.ts @@ -41,6 +41,7 @@ export class AxLegend extends AxShape { public addItem(item: Legend) { if (this.shapeMap.has(item.Name)) { this.shapeMap.get(item.Name).Count++; + this.shapeMap.get(item.Name).Index++; } else { this.shapeMap.set(item.Name, item); } @@ -449,6 +450,7 @@ export class Legend { public Name: string; public ImageUrl: string; public Count: number; + public Index: number; /** * */ @@ -456,5 +458,6 @@ export class Legend { this.Name = name; this.ImageUrl = imageUrl; this.Count = count; + this.Index = 1; } } diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 157d794..52628f2 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -24,6 +24,7 @@ import { Viewport } from 'pixi-viewport'; import { EVENT_IMAGE_RESIZE, EVENT_SELECTION_CHANGED } from './model/events'; import { Dimensioning } from './model/dimensioning'; import { Configuration, viewBounds } from './model/configuration'; +import { id } from 'date-fns/locale'; @Component({ @@ -144,6 +145,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 允许编辑 */ public allowEdit = true; + /** + * 图形索引 + */ + public shapesIndex: Map = new Map(); /** * 动画控制器 */ @@ -166,7 +171,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 重大调整-主版本号增加 * 日期变更-日期版本号增加 */ - public VERSION = '1.4.2.20210325_rc'; + public VERSION = '1.4.3.20210415_rc'; /** * 数据初始化 */ @@ -524,7 +529,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV */ private createGrid2D(): void { this.grid2D = new Grid2D(this.camera2D, null); - this.camera2D.addChild(this.grid2D); } /** @@ -593,6 +597,18 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV && axShape.assetData.Name !== '图例') { const itemLegend = new Legend(axShape.assetData.Name, axShape.assetData.ImageUrl, 1); temp.addItem(itemLegend); + // 设置新增图形的名称/编号 + let Id = temp.shapeMap.get(axShape.assetData.Name).Index; + let index = "000"; + // 检查Id的长度 + if (Id < 10) { + index = axShape.assetData.Name + "00" + Id; + } else if (Id < 100) { + index = axShape.assetData.Name + "0" + Id; + } else { + index = axShape.assetData.Name + Id; + } + (axShape.assetData.PropertyInfos.find(i => i.PropertyName == "名称/编号")).PropertyValue = index; } this.emit('canvasDataChanged'); this.canvasData.isChange = true; @@ -721,6 +737,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }); } } + /** * 创建确认绘制结束按钮 */ @@ -757,13 +774,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV case PaintMode.endPaint: break; case PaintMode.singlePointIcon: + // 整理数据 const json = JSON.parse(JSON.stringify(this.canvasData.selectTemplateData.propertyInfos)); const list = []; json.forEach(element => { const property = new PropertyInfo(element); list.push(property); }); - const assetData = { TemplateId: this.canvasData.selectTemplateData.id, CanConnect: this.canvasData.selectTemplateData.canConnect, @@ -793,7 +810,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }; const singleIcon = new AxImageShape(assetData, this); this.emit('createIcon', singleIcon); - // this.emit('backgroundScale', this.backgroundImage.scale.x); break; case PaintMode.lineIcon: this.previewLineSegment.visible = true; @@ -859,18 +875,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV GameMode: this.canvasData.gameMode, Tag: this.canvasData.selectTemplateData.tag }; - // const assetData1 = { - // ImageUrl: this.canvasData.selectTemplateData.imageUrl, - // Point: new PIXI.Point(0, 0), - // Width: 32, - // Height: 32, - // MultiPoint: this.paintPoints, - // Name: this.canvasData.selectTemplateData.name - // }; this.paintingIcon = new MultipointIcon(assetData1, this); - // this.paintingIcon = new MultipointIcon(this.previewSinglePointIcon.texture, new PIXI.Point(0, 0), this.paintPoints, this, - // this.canvasData.selectTemplateData.name); - // this.emit('backgroundScale', this.backgroundImage.scale.x); break; case PaintMode.polygonIcon: this.previewLineSegment.visible = true; @@ -1427,6 +1432,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.enterPaintEndButton.visible = false; switch (this.paintMode) { case PaintMode.singlePointIcon: + break; case PaintMode.lineIcon: if (this.paintPoints.length >= 2) { From 3f0db36e47fc108144908351b8b37150fa82c2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Thu, 15 Apr 2021 15:55:44 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A5=BC=E5=B1=82?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/canvas-share-data.service.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index 4fef136..401ff23 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -23,24 +23,23 @@ export class CanvasShareDataService { selectTemplateData: any; // 选择当前 模板数据 // 总平面图/建筑 楼层 - selectStorey:any = {area: '', details: ''}; // 选择当前 楼层 数据 - originalcompanyBuildingData:any; // 单位/建筑 数据 - originaleveryStoreyData:any; // 总平面图/楼层/区域 楼层数据 + selectStorey: any = { area: '', details: '' }; // 选择当前 楼层 数据 + originalcompanyBuildingData: any; // 单位/建筑 数据 + originaleveryStoreyData: any; // 总平面图/楼层/区域 楼层数据 // 总平面图/建筑 楼层 // 处置 节点 - allDisposalNode:any = []; // 所有 处置节点 - allNodeMarkers:any = { highlightMarkers:{}, markers:{} }; // 灾情 标签信息 - selectPanelPoint:DisposalNodeData = new DisposalNodeData(); // 当前数据节点 - selectPanelPointBaseData:any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 对应 父级节点 - isInheritSky:any; //缓存 节点 天气 - customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称 + allDisposalNode: any = []; // 所有 处置节点 + allNodeMarkers: any = { highlightMarkers: {}, markers: {} }; // 灾情 标签信息 + selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点 + selectPanelPointBaseData: any = { description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: '' }; // 当前 数据节点 对应 父级节点 + customizeDisposalNode: any; // 新建 自定义数据节点 底图+名称 // 处置 节点 /** * 游戏模式 */ - gameMode:GameMode = GameMode.BasicInformation; + gameMode: GameMode = GameMode.BasicInformation; facilityAssetsName = new Map([ ['消防水池', '消防水池'], @@ -263,6 +262,7 @@ export class CanvasShareDataService { important.Id = ''; important.ImageUrls = []; important.BuildingId = this.selectStorey.buildingId; + important.BuildingAreaId = item.FloorId; item.PropertyInfos.forEach(element => { if (element.PropertyName === '名称/编号') { important.Name = element.PropertyValue; @@ -409,6 +409,7 @@ export class BuildingAdjoinInfo { */ export class BuildingImportantLocationInfo { public BuildingId: string; + public BuildingAreaId: string; public Id: string; public Name: string; public Position: string; From 26ae2a5bc66256cf0f5d645a934370ca032f9580 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 15 Apr 2021 17:14:19 +0800 Subject: [PATCH 3/5] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E9=87=8D=E7=82=B9?= =?UTF-8?q?=E9=83=A8=E4=BD=8D=E6=B7=BB=E5=8A=A0=E5=9B=BE=E7=89=87=20?= =?UTF-8?q?=E6=B6=88=E9=98=B2=E8=AE=BE=E6=96=BD=E6=89=8B=E5=8A=A8=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edit-plan-info.component.html | 2 +- .../edit-unit-info.component.html | 2 +- .../fire-fighting-device.component.html | 111 +++++++++++++++++- .../fire-fighting-device.component.ts | 88 +++++++++++--- .../key-unit/key-site/key-site.component.html | 5 +- .../key-unit/key-site/key-site.component.scss | 30 +++++ .../key-unit/key-site/key-site.component.ts | 52 +++++++- .../key-site/keysiteimgs.component.html | 9 +- .../key-site/keysiteimgs.component.ts | 59 +++++++--- .../view-unit-details-plan.component.html | 2 +- .../view-unit-details.component.html | 2 +- .../water-road/water-road.component.ts | 93 +++++++++++---- .../home/home.component.html | 35 +++++- .../home/home.component.scss | 8 +- .../statistic-analysis/home/home.component.ts | 10 ++ src/assets/css/newStyle.css | 1 - 16 files changed, 438 insertions(+), 71 deletions(-) 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 245a209..5443aac 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 @@ -50,7 +50,7 @@ - + diff --git a/src/app/key-unit/edit-unit-info/edit-unit-info.component.html b/src/app/key-unit/edit-unit-info/edit-unit-info.component.html index 264980a..d2b71c7 100644 --- a/src/app/key-unit/edit-unit-info/edit-unit-info.component.html +++ b/src/app/key-unit/edit-unit-info/edit-unit-info.component.html @@ -36,7 +36,7 @@ - + diff --git a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html index e18b570..37151f4 100644 --- a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html +++ b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html @@ -125,10 +125,115 @@ - +