diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index f8097f2..52f72dd 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -6,7 +6,7 @@ import { Observable } from 'rxjs'; }) export class CanvasShareDataService { constructor() { } - private _sendMessage: ReplaySubject = new ReplaySubject(1); + private _sendMessage: ReplaySubject = new ReplaySubject(1); GameMode: any; isChange = false; // 数据 是否改动 @@ -19,16 +19,16 @@ export class CanvasShareDataService { originaleveryStoreyData: any; // 总平面图/楼层/区域 楼层数据 // 总平面图/建筑 楼层 - //处置 节点 - allDisposalNode:any = []; //所有 处置节点 - allNodeMarkers:any; //灾情 标签信息 - selectPanelPoint:any = {disposalNodeId:''}; //选择当前 数据节点 - selectPanelPointBaseData:any = {description: '', notes: '',weather: '',airTemperature: '',windDirection: '',windScale: ''}; //当前 数据节点 所对应的 天气,详情 数据节点 - //处置 节点 + // 处置 节点 + allDisposalNode: any = []; // 所有 处置节点 + allNodeMarkers: any; // 灾情 标签信息 + selectPanelPoint: any = {disposalNodeId: ''}; // 选择当前 数据节点 + selectPanelPointBaseData: any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 所对应的 天气,详情 数据节点 + // 处置 节点 - //预案赋能 选择 车辆 - selectCar:any = {Id: '', WaterYield: '', Foam: '', PeopleNum: '', Tonnage: '', Assignment: '', LinkCar: '', WaterOccupy: ''} - //预案赋能 选择 车辆 + // 预案赋能 选择 车辆 + selectCar: any = {Id: '', WaterYield: '', Foam: '', PeopleNum: '', Tonnage: '', Assignment: '', LinkCar: '', WaterOccupy: ''}; + // 预案赋能 选择 车辆 /** * 游戏模式 @@ -67,23 +67,48 @@ export class CanvasShareDataService { [ 'DCS控制室', 'DCS控制室'] ]); - /** * 向其他组件发送信息 * - * @param message 需要发送的信息 * @returns {Observavle} */ - public sendMessage(message: any){ - this._sendMessage.next(message); - } - public getMessage(): Observable { - return this._sendMessage.asObservable(); - } + + public getLinkCarName(car: any): any[] { + const linkCar = []; + car.assetData.Pipelines.forEach(pipeline => { + const icon = pipeline.assetData.LinkedObjects.find(i => i.assetData !== car); + if (icon.assetData.Type === 1) { + linkCar.push(icon.assetData.Name); + } + }); + return linkCar; + } + + public getWaterOccupyName(car: any): any[] { + const waterOccupy = []; + car.assetData.Pipelines.forEach(pipeline => { + const icon = pipeline.assetData.LinkedObjects.find(i => i.assetData !== car); + if (icon.assetData.Type === 0) { + car.assetData.WaterOccupy.push(icon.assetData.Name); + } + }); + return waterOccupy; + } + /** + * 向其他组件发送信息 * + * @param message 需要发送的信息 + * @returns {Observavle} + */ + public sendMessage(message: any) { + this._sendMessage.next(message); + } + public getMessage(): Observable { + return this._sendMessage.asObservable(); + } // 处置节点 筛选出 匹配数据 匹配不到 return undefined - findDisposalNode (parentId:string=null, name:string=null) { - if (parentId && name) { //匹配 父id, name - let returnData = this.allDisposalNode.find(item=>{ return item.parentId === parentId && item.name === name }) - return returnData - } else { //匹配 id - let returnData = this.allDisposalNode.find(item=>{ return item.id === parentId }) - return returnData + findDisposalNode(parentId: string= null, name: string= null) { + if (parentId && name) { // 匹配 父id, name + const returnData = this.allDisposalNode.find(item => item.parentId === parentId && item.name === name); + return returnData; + } else { // 匹配 id + const returnData = this.allDisposalNode.find(item => item.id === parentId); + return returnData; } } /** diff --git a/src/app/ui/plan-assistance/plan-assistance.component.html b/src/app/ui/plan-assistance/plan-assistance.component.html index 8e9cf2c..9bdf0ac 100644 --- a/src/app/ui/plan-assistance/plan-assistance.component.html +++ b/src/app/ui/plan-assistance/plan-assistance.component.html @@ -1,6 +1,7 @@
+
-
到场力量
+
到场力量
@@ -11,7 +12,7 @@
已到场
@@ -68,8 +69,8 @@

-

{{canvasData.selectCar.LinkCar}}

-

{{canvasData.selectCar.WaterOccupy}}

+

{{canvasData.selectCar.LinkCar}}

+

{{canvasData.selectCar.WaterOccupy}}

diff --git a/src/app/ui/plan-assistance/plan-assistance.component.scss b/src/app/ui/plan-assistance/plan-assistance.component.scss index a13bb04..78e6f57 100644 --- a/src/app/ui/plan-assistance/plan-assistance.component.scss +++ b/src/app/ui/plan-assistance/plan-assistance.component.scss @@ -40,7 +40,7 @@ .left { width: 300px; height: 100%; - min-width: 250px; + min-width: 200px; box-sizing: border-box; padding: 1px; display: flex; @@ -77,6 +77,16 @@ } } } +//打开关闭左侧 车辆 +.openLeft { + width: 300px; + transition: width 0.5s; +} +.closeLeft { + width: 0px; + min-width: 0px; + transition: width 0.5s; +} //选中状态 .selectIcon { @@ -94,6 +104,7 @@ //右侧工作区 .center { flex: 1; + min-width: 810px; box-sizing: border-box; display: flex; flex-direction: column; @@ -123,7 +134,16 @@ display: flex; align-items: center; justify-content: center; - p { flex: 1; text-align: center; line-height: 35px; } + p { + color: #fff; + flex: 1; + text-align: center; + line-height: 35px; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + cursor: pointer; + } } .taskInput { width: 100px; diff --git a/src/app/ui/plan-assistance/plan-assistance.component.ts b/src/app/ui/plan-assistance/plan-assistance.component.ts index 58791b3..07b884c 100644 --- a/src/app/ui/plan-assistance/plan-assistance.component.ts +++ b/src/app/ui/plan-assistance/plan-assistance.component.ts @@ -20,6 +20,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f670ceae03abe3856d87d3e', Name: '消防泵房', Angle: 0, + Pipelines: [], + Type: 0, Color: '80', Point: { x: 538.0725371265185, @@ -115,6 +117,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f670dd3e03abe3856d87d3f', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -854.3835678799273, @@ -254,6 +258,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6711f5e03abe3856d87d43', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -539.9645631808662, @@ -354,6 +360,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67128ae03abe3856d87d44', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -563.1123674185176, @@ -495,6 +503,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671330e03abe3856d87d45', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -51.57937113008251, @@ -636,6 +646,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671341e03abe3856d87d47', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 299.11560093170795, @@ -777,6 +789,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671357e03abe3856d87d49', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 500.9012712134421, @@ -918,6 +932,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67136fe03abe3856d87d4a', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 88.60901628649833, @@ -1059,6 +1075,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671382e03abe3856d87d4b', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1089.647824545333, @@ -1200,6 +1218,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671396e03abe3856d87d4c', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 916.5868780327887, @@ -1341,6 +1361,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6713afe03abe3856d87d4d', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1267.7987988964815, @@ -1482,6 +1504,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6713c0e03abe3856d87d4e', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1507.3371984219418, @@ -1623,6 +1647,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671412e03abe3856d87d4f', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2114.4400960509874, @@ -1764,6 +1790,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671425e03abe3856d87d50', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1936.2891216998387, @@ -1905,6 +1933,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671434e03abe3856d87d51', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1656.3375905766052, @@ -2046,6 +2076,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671441e03abe3856d87d52', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1155.818186447188, @@ -2187,6 +2219,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67144de03abe3856d87d53', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2915.2711426580545, @@ -2328,6 +2362,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67145be03abe3856d87d54', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2913.5744667118533, @@ -2469,6 +2505,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67146ee03abe3856d87d55', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2096.1298123494207, @@ -2610,6 +2648,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671481e03abe3856d87d56', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1901.6453605180648, @@ -2751,6 +2791,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67148be03abe3856d87d57', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1354.5242652562279, @@ -2892,6 +2934,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6714ade03abe3856d87d58', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1160.7655915494565, @@ -3033,6 +3077,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6714bde03abe3856d87d59', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 993.7723947424533, @@ -3174,6 +3220,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6714c5e03abe3856d87d5a', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 577.8951065403974, @@ -3315,6 +3363,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6714d4e03abe3856d87d5b', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 126.55162198821722, @@ -3456,6 +3506,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6714ebe03abe3856d87d5c', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -179.95583881318612, @@ -3597,6 +3649,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6714ffe03abe3856d87d5d', Name: '地上消火栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -435.1702143376199, @@ -3738,6 +3792,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67158fe03abe3856d87d5e', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -5.796097596718141, @@ -3840,6 +3896,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67165ce03abe3856d87d5f', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 462.9058952959447, @@ -3942,6 +4000,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671670e03abe3856d87d60', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1155.2026113881834, @@ -4044,6 +4104,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67167ee03abe3856d87d61', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1218.8312292956107, @@ -4146,6 +4208,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671690e03abe3856d87d62', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1561.5581030242533, @@ -4248,6 +4312,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67169de03abe3856d87d63', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1046.7447399550688, @@ -4350,6 +4416,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6716bce03abe3856d87d64', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2115.4162998093598, @@ -4452,6 +4520,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6716c9e03abe3856d87d65', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2915.112338509526, @@ -4554,6 +4624,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6716e0e03abe3856d87d66', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1988.5158013887126, @@ -4656,6 +4728,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6716f6e03abe3856d87d67', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2975.3868020413206, @@ -4758,6 +4832,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671701e03abe3856d87d68', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1703.0254066222362, @@ -4860,6 +4936,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671717e03abe3856d87d69', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2092.983870088383, @@ -4962,6 +5040,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671730e03abe3856d87d6a', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1951.9378727440935, @@ -5064,6 +5144,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67173be03abe3856d87d6b', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1408.1271940944434, @@ -5166,6 +5248,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671744e03abe3856d87d6c', Name: '泡沫栓', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1160.4571509862274, @@ -5268,6 +5352,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671767e03abe3856d87d6d', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -592.1952057948927, @@ -5355,6 +5441,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671842e03abe3856d87d6e', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -97.79605019753274, @@ -5444,6 +5532,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671853e03abe3856d87d6f', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1150.6880828651256, @@ -5533,6 +5623,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671863e03abe3856d87d70', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1152.4040527919356, @@ -5622,6 +5714,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6718dbe03abe3856d87d71', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1456.632463331941, @@ -5711,6 +5805,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6718ece03abe3856d87d72', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2115.794019501953, @@ -5800,6 +5896,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6718fce03abe3856d87d73', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2918.6189917603, @@ -5889,6 +5987,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67190ce03abe3856d87d74', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1887.6227115969486, @@ -5978,6 +6078,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671916e03abe3856d87d75', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1609.5189625658177, @@ -6067,6 +6169,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671945e03abe3856d87d76', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 2095.5215915504127, @@ -6156,6 +6260,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671954e03abe3856d87d77', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1851.9430767861622, @@ -6245,6 +6351,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67195de03abe3856d87d78', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1286.183169018807, @@ -6334,6 +6442,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f671978e03abe3856d87d79', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: 1159.3027504423208, @@ -6423,6 +6533,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f67198ce03abe3856d87d7a', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -32.3318372843471, @@ -6512,6 +6624,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { Id: '5f6719a4e03abe3856d87d7b', Name: '固定水炮', Angle: 0, + Pipelines: [], + Type: 0, Color: '#066eed80', Point: { x: -276.2867550650558, @@ -6598,62 +6712,21 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { InteractiveMode: 0 } ]; - - tempCarData = { - TemplateId: null, - FloorId: null, - Angle: 0, - Color: 0, - Enabled: true, - FillMode: 0, - FireElementId: 0, - FixedSize: false, - CanConnection: true, - ConnectionObjs: [], - Height: 32, - Width: 32, - Id: '5f67f92238f13cd2048cae9d', - ImageUrl: './assets/images/泡沫消防车.png', - InteractiveMode: 0, - MultiPoint: null, - Point: { - x: 1295, - y: 1237 - }, - Name: '泡沫消防车', - PropertyInfos: [ - { - Enabled: true, - Order: 0, - PhysicalUnit: '', - PropertyName: '名称/编号', - PropertyType: 0, - PropertyValue: '钦南区新兴消防', - Required: false, - RuleName: '', - RuleValue: '', - Tag: '', - Visible: true - } - ], - Border: null, - DrawMode: null, - Thickness: 0, - IsFromBuilding: false, - GameMode: 0 - }; - // 所有车辆信息 allCarsData = [ { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6672,8 +6745,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { PeopleNum: 6, // 载人数 Tonnage: '10t', // 吨位 Assignment: '供液', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6699,11 +6772,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6722,8 +6799,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { PeopleNum: 6, // 载人数 Tonnage: '12t', // 吨位 Assignment: '灭火', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6749,11 +6826,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6772,8 +6853,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { PeopleNum: 6, // 载人数 Tonnage: '6t', // 吨位 Assignment: '灭火', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6799,11 +6880,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6822,8 +6907,8 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { PeopleNum: 6, // 载人数 Tonnage: '20t', // 吨位 Assignment: '灭火', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6849,11 +6934,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6866,14 +6955,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '水罐消防车', FireTeamName: '八塘消防救援站', // 所属消防队 - ReachTime: 240, // 到场剩余时间 + ReachTime: 237, // 到场剩余时间 WaterYield: '12t', // 载水量 Foam: '0t', // 载泡沫 PeopleNum: 6, // 载人数 Tonnage: '14t', // 吨位 Assignment: '冷却', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6899,11 +6988,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6916,14 +7009,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '水罐泡沫消防车', FireTeamName: '八塘消防救援站', // 所属消防队 - ReachTime: 240, // 到场剩余时间 + ReachTime: 249, // 到场剩余时间 WaterYield: '6t', // 载水量 Foam: '2t', // 载泡沫 PeopleNum: 6, // 载人数 Tonnage: '8t', // 吨位 Assignment: '冷却', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6949,11 +7042,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -6966,14 +7063,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '水罐泡沫消防车', FireTeamName: '八塘消防救援站', // 所属消防队 - ReachTime: 240, // 到场剩余时间 + ReachTime: 277, // 到场剩余时间 WaterYield: '3t', // 载水量 Foam: '1t', // 载泡沫 PeopleNum: 8, // 载人数 Tonnage: '5t', // 吨位 Assignment: '堵截', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -6999,11 +7096,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -7016,14 +7117,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '举高喷射消防车', FireTeamName: '八塘消防救援站', // 所属消防队 - ReachTime: 300, // 到场剩余时间 + ReachTime: 310, // 到场剩余时间 WaterYield: '16t', // 载水量 Foam: '2t', // 载泡沫 PeopleNum: 4, // 载人数 Tonnage: '18t', // 吨位 Assignment: '灭火', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -7049,11 +7150,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -7066,14 +7171,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '水罐泡沫消防车', FireTeamName: '龚州消防救援站', // 所属消防队 - ReachTime: 660, // 到场剩余时间 + ReachTime: 666, // 到场剩余时间 WaterYield: '6t', // 载水量 Foam: '2t', // 载泡沫 PeopleNum: 6, // 载人数 Tonnage: '8t', // 吨位 Assignment: '供液', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -7099,11 +7204,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -7116,14 +7225,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '水罐泡沫消防车', FireTeamName: '龚州消防救援站', // 所属消防队 - ReachTime: 720, // 到场剩余时间 + ReachTime: 721, // 到场剩余时间 WaterYield: '5t', // 载水量 Foam: '1t', // 载泡沫 PeopleNum: 6, // 载人数 Tonnage: '7t', // 吨位 Assignment: '供液', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -7149,11 +7258,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -7166,14 +7279,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '水罐泡沫消防车', FireTeamName: '龚州消防救援站', // 所属消防队 - ReachTime: 960, // 到场剩余时间 + ReachTime: 978, // 到场剩余时间 WaterYield: '3t', // 载水量 Foam: '1t', // 载泡沫 PeopleNum: 6, // 载人数 Tonnage: '5t', // 吨位 Assignment: '供液', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -7199,11 +7312,15 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { TemplateId: null, FloorId: null, Angle: 0, + Pipelines: [], + Type: 1, Color: 0, Enabled: true, FillMode: 0, FireElementId: 0, FixedSize: false, + CanConnection: true, + ConnectionObjs: [], Height: 32, Width: 32, Id: ObjectID.default.generate(), @@ -7216,14 +7333,14 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { }, Name: '举高喷射消防车', FireTeamName: '龚州消防救援站', // 所属消防队 - ReachTime: 960, // 到场剩余时间 + ReachTime: 999, // 到场剩余时间 WaterYield: '18t', // 载水量 Foam: '2t', // 载泡沫 PeopleNum: 4, // 载人数 Tonnage: '20t', // 吨位 Assignment: '灭火', // 执行任务 - LinkCar: '', // 连接车辆 - WaterOccupy: '', // 水源占用 + LinkCar: [], // 连接车辆 + WaterOccupy: [], // 水源占用 PropertyInfos: [ { Enabled: true, @@ -7247,11 +7364,6 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { } ]; - bottomIsShow = false; // 底部车辆信息是否展示 - rightIsShow = true; // 右侧楼层是否展示 - rightSayIsShow = false; // 右侧语音是否展示 - selectCarID:string = ''; // 选中车辆 样式 - ngOnInit(): void { const that = this; window.setTimeout(() => { @@ -7267,21 +7379,30 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { this.dataInit(); // 监听canvas组件选中素材事件 - this.workingArea.on("select",obj=>{ - //选中素材属性注入函数 - if (obj && obj.assetData && obj.assetData.ReachTime!=undefined) { - this.canvasData.selectCar = obj.assetData - this.selectCarID = JSON.parse(JSON.stringify( obj.assetData.Id || '' )) - this.bottomIsShow = true + this.workingArea.on('select', obj => { + // 选中素材属性注入函数 + if (obj && obj.assetData && obj.assetData.ReachTime != undefined) { + this.selectCarID = JSON.parse(JSON.stringify( obj.assetData.Id || '' )); //选中样式 赋值ID + let linkCar = this.canvasData.getLinkCarName(obj) //连接车辆 + let waterOccupy = this.canvasData.getWaterOccupyName(obj) //水源占用 + obj.assetData.LinkCar = linkCar //连接车辆 + obj.assetData.WaterOccupy = waterOccupy //水源占用 + this.canvasData.selectCar = obj.assetData; + this.bottomIsShow = true; } - }) + }); // 监听canvas组件取消选中素材事件 - this.workingArea.on("deselect",obj=>{ + this.workingArea.on('deselect', obj => { this.bottomIsShow = false; - this.selectCarID = '' + this.selectCarID = ''; }); } + bottomIsShow:boolean = false; // 底部车辆信息是否展示 + rightIsShow:boolean = true; // 右侧楼层是否展示 + rightSayIsShow:boolean = false; // 右侧语音是否展示 + selectCarID:string = ''; // 选中车辆ID 选中效果css + // 开始绘制 plot(e) { e == 0 ? this.workingArea.beginPaintingArrows() : this.workingArea.beginPaintPipeline(); @@ -7304,12 +7425,12 @@ export class PlanAssistanceComponent implements OnInit, AfterViewInit { } } - //选择 车辆 - selectCar (e,isSelect:boolean = true) { + // 选择 车辆 + selectCar(e, isSelect: boolean = true) { if (e.ReachTime == 0) { - let list = [] - list.push(e.Id) - isSelect? this.workingArea.setHighlight(list) : null + const list = []; + list.push(e.Id); + isSelect ? this.workingArea.setHighlight(list) : null; } else if (e.ReachTime && e.ReachTime != 0) { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 016f93f..75af60f 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -157,7 +157,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV if (event.keyCode === 46) { this.selection.objects.forEach(item => { // 删除 选中的数据 - if (item.assetData.IsFromBuilding) { + if (item.assetData?.IsFromBuilding) { // console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]); delete this.canvasData.originalcompanyBuildingData?.data[item.assetData.Id]; // console.log(this.canvasData.originalcompanyBuildingData.data[item.assetData.Id]); @@ -251,7 +251,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // this.createEnterPaintEndButton(); // this.backgroundImage.addChild(this.paintingLine); this.on('select', obj => { - console.log('选择了' + obj); if (this.allowEdit) { if (obj instanceof MultipointIcon) { obj.setPointVisiable(true); @@ -318,7 +317,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.rectToolGraphics.closePath(); } if (this.paintingArrows !== null) { - this.paintingArrows.data.pointB = new PIXI.Point(this.circleShadow.position.x, this.circleShadow.position.y); + this.paintingArrows.assetData.pointB = new PIXI.Point(this.circleShadow.position.x, this.circleShadow.position.y); this.paintingArrows.refresh(); } }); @@ -776,10 +775,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV case PaintMode.Arrows: if (this.paintingArrows === null) { const data = { + Id: ObjectID.default.generate(), name: 'string', point: new PIXI.Point(this.circleShadow.x, this.circleShadow.y), pointA: new PIXI.Point(this.circleShadow.x, this.circleShadow.y), - pointB: new PIXI.Point(this.circleShadow.x, this.circleShadow.y), + pointB: new PIXI.Point(this.circleShadow.x, this.circleShadow.y), source: 'assets/images/进攻方向.png', }; this.paintingArrows = new Arrows(data, this); @@ -1162,12 +1162,6 @@ export class SinglePointIcon extends PIXI.Container { + '\r\n' + this.assetData.PropertyInfos?.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style); private image = PIXI.Sprite.from(this.assetData.ImageUrl); - // 是否可以被链接 - canConnection = false; - // 链接对象 - connectionObjs: any[] = []; - // 链接的管线 - pipelines: any[] = []; constructor(public assetData: any, private workingArea: WorkingAreaComponent) { super(); @@ -1176,8 +1170,6 @@ export class SinglePointIcon extends PIXI.Container { this.y = this.assetData.Point.y; this.name = this.assetData.Id; - this.canConnection = this.assetData.CanConnection === undefined ? false : this.assetData.CanConnection; - this.image.angle = this.assetData.Angle; this.image.x = 0; @@ -1190,10 +1182,10 @@ export class SinglePointIcon extends PIXI.Container { this.image.interactive = true; this.image .on('mousedown', event => { - console.log(this.assetData); + console.log(this.assetData.Pipelines); event.stopPropagation(); this.workingArea.selection.selectOne(this); - if (this.canConnection && this.parent === this.workingArea.backgroundImage) { + if (this.assetData.CanConnection && this.parent === this.workingArea.backgroundImage) { if (this.workingArea.paintMode === PaintMode.Pipeline) { if (this.workingArea.paintingPipeline === null) { this.workingArea.previewLineSegment.visible = true; @@ -1205,21 +1197,26 @@ export class SinglePointIcon extends PIXI.Container { MultiPoint: JSON.parse(JSON.stringify(this.workingArea.paintPoints)), Point: new PIXI.Point(0, 0), Name: '管线', + LinkedObjects: [], }; this.workingArea.paintingPipeline = new Pipeline(tempData, this.workingArea); + this.workingArea.paintingPipeline.assetData.LinkedObjects.push(this); + this.assetData.Pipelines.push(this.workingArea.paintingPipeline); } else { this.workingArea.previewLineSegment.visible = false; this.workingArea.currentClickPoint.position = new PIXI.Point(this.workingArea.circleShadow.x, this.workingArea.circleShadow.y); this.workingArea.paintPoints.push(new PIXI.Point(this.position.x, this.position.y)); this.workingArea.paintingPipeline.assetData.MultiPoint = JSON.parse(JSON.stringify(this.workingArea.paintPoints)); + this.workingArea.paintingPipeline.assetData.LinkedObjects.push(this); + this.assetData.Pipelines.push(this.workingArea.paintingPipeline); this.workingArea.paintingPipeline.refresh(); this.workingArea.paintingPipelineFinish(); } } } // 如果链接对象不为空,禁止移动 - if ((this.workingArea.allowEdit || this.assetData.GameMode === 2) && this.connectionObjs.length === 0) { + if ((this.workingArea.allowEdit || this.assetData.GameMode === 2) ) { event.currentTarget.parent.data = event.data; event.currentTarget.parent.alpha = 0.5; event.currentTarget.parent.dragging = true; @@ -1784,13 +1781,15 @@ export class Car extends SinglePointIcon { /** * 管线 */ -export class Pipeline extends PIXI.Graphics { +export class Pipeline extends PIXI.Container { + public line: PIXI.Graphics = new PIXI.Graphics(); constructor(public assetData: any, private workingArea: WorkingAreaComponent) { super(); this.name = this.assetData.Id; this.x = this.assetData.Point.x; this.y = this.assetData.Point.y; this.workingArea.backgroundImage.addChild(this); + this.addChild(this.line); // 画线图标 this.refresh(); this.interactive = true; @@ -1804,25 +1803,25 @@ export class Pipeline extends PIXI.Graphics { * 刷新 */ public refresh() { - this.clear(); - this.lineStyle(5, 0x0000ff, 1); + this.line.clear(); + this.line.lineStyle(5, 0x0000ff, 1); for (let i = 0, count = this.assetData.MultiPoint.length; i < count; i++) { const pointA = this.assetData.MultiPoint[i]; if (i === 0) { - this.moveTo(pointA.x, pointA.y); + this.line.moveTo(pointA.x, pointA.y); } else { - this.lineTo(pointA.x, pointA.y); + this.line.lineTo(pointA.x, pointA.y); if (i === count - 1) { const pointB = this.assetData.MultiPoint[i - 1]; const angle = Math.atan2((pointA.y - pointB.y), (pointA.x - pointB.x)) * (180 / Math.PI) + 90; - this.beginFill(0x0000ff); - this.drawStar(pointA.x, pointA.y, 3, 5, 0, (Math.PI / 180 * angle)); + this.line.beginFill(0x0000ff); + this.line.drawStar(pointA.x, pointA.y, 3, 5, 0, (Math.PI / 180 * angle)); } else { - this.drawCircle(pointA.x, pointA.y, 5); + this.line.drawCircle(pointA.x, pointA.y, 5); } } } - this.endFill(); + this.line.endFill(); // if (this.assetData.MultiPoint.length >= 2) { // const pointA = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 2]; // const pointB = this.assetData.MultiPoint[this.assetData.MultiPoint.length - 1]; @@ -1838,20 +1837,13 @@ export class Pipeline extends PIXI.Graphics { * 创建一个只有2个点组成的箭头 */ export class Arrows extends PIXI.Container { - public data: any; - // public icon: PIXI.Sprite; public line: PIXI.Graphics = new PIXI.Graphics(); - public san: PIXI.Graphics = new PIXI.Graphics(); public ready = false; - constructor(assetData: any, private workingArea: WorkingAreaComponent) { + constructor(public assetData: any, private workingArea: WorkingAreaComponent) { super(); this.workingArea.backgroundImage.addChild(this); - this.data = assetData; - // 画线图标 - // this.icon = new PIXI.Sprite(PIXI.Texture.from(this.data.source)); + this.name = this.assetData.Id; this.addChild(this.line); - this.addChild(this.san); - // this.addChild(this.icon); this.refresh(); this.interactive = true; this.on('mousedown', event => { @@ -1866,22 +1858,16 @@ export class Arrows extends PIXI.Container { public refresh() { this.line.clear(); this.line.lineStyle(5, 0xff0000, 1); - this.line.moveTo(this.data.pointA.x, this.data.pointA.y); - this.line.lineTo(this.data.pointB.x, this.data.pointB.y); + this.line.moveTo(this.assetData.pointA.x, this.assetData.pointA.y); + this.line.lineTo(this.assetData.pointB.x, this.assetData.pointB.y); - const angle = Math.atan2((this.data.pointB.y - this.data.pointA.y), (this.data.pointB.x - this.data.pointA.x)) * (180 / Math.PI) + 90; + const angle = Math.atan2((this.assetData.pointB.y - this.assetData.pointA.y), (this.assetData.pointB.x - this.assetData.pointA.x)) + * (180 / Math.PI) + 90; - // this.san.clear(); - // this.san.lineStyle(5, 0xff0000, 1); this.line.beginFill(0xff0000); console.log(Math.PI / 180 / 1.6); - this.line.drawStar(this.data.pointB.x, this.data.pointB.y, 3, 10, 0, (Math.PI / 180 * angle)); - // this.san.angle = angle; + this.line.drawStar(this.assetData.pointB.x, this.assetData.pointB.y, 3, 10, 0, (Math.PI / 180 * angle)); this.line.endFill(); - // this.icon.anchor.set(0, 0.5); - // this.icon.x = this.data.pointB.x; - // this.icon.y = this.data.pointB.y; - // this.icon.angle = angle; } } /**