From 4ed800667189f562644e769da96bcc1d96bd5149 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Thu, 4 Mar 2021 09:42:05 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=A0=87=E6=B3=A8?= =?UTF-8?q?=E5=9B=BE=E4=BE=8B=E5=AE=8C=E5=96=84,=20=E5=9B=9B=E5=91=A8?= =?UTF-8?q?=E6=AF=97=E9=82=BB=E5=AE=8C=E5=96=84,=20=E6=B6=88=E9=98=B2?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=E5=AE=8C=E5=96=84,=20=E5=A4=A9=E6=B0=94?= =?UTF-8?q?=E7=BB=A7=E6=89=BF=E5=AE=8C=E5=96=84,=20=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=B7=B2=E6=9C=89=E8=8A=82=E7=82=B9=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/canvas-share-data.service.ts | 17 ++-- .../fire-force/fire-force.component.ts | 2 +- .../linkage-forces.component.ts | 2 +- .../water-collection.component.ts | 2 +- .../gis-labeling/gis-labeling.component.ts | 4 +- .../allaround/allaround.component.html | 36 +++---- .../key-unit/allaround/allaround.component.ts | 2 +- .../edit-plan-info.component.html | 2 +- .../fire-fighting-device.component.html | 95 +++++++++++++++++++ .../fire-fighting-device.component.ts | 1 + .../fire-fighting-device.component.html | 95 +++++++++++++++++++ .../fire-fighting-device.component.ts | 1 + .../view-unit-details.component.html | 2 +- .../collection-tools.component.ts | 10 +- src/app/ui/collection-tools/save.ts | 46 +++++++-- src/app/ui/collection-tools/saveTwo.html | 2 +- src/styles.scss | 4 +- 17 files changed, 276 insertions(+), 47 deletions(-) diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index 2c62212..468cc09 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -23,23 +23,24 @@ 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: ''}; // 当前 数据节点 对应 父级节点 + allDisposalNode:any = []; // 所有 处置节点 + allNodeMarkers:any = { highlightMarkers:{}, markers:{} }; // 灾情 标签信息 + selectPanelPoint:DisposalNodeData = new DisposalNodeData(); // 当前数据节点 + selectPanelPointBaseData:any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 对应 父级节点 + isInheritSky:any; //缓存 节点 天气 customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称 // 处置 节点 /** * 游戏模式 */ - gameMode: GameMode = GameMode.BasicInformation; + gameMode:GameMode = GameMode.BasicInformation; facilityAssetsName = new Map([ [ '消防水池', '消防水池'], 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 4b4d194..a583f8c 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -118,7 +118,7 @@ export class FireForceComponent implements OnInit { }; var _renderMarker = (context)=> { var content = ``; - var offset = new AMap.Pixel(-12.5, -12.5); + var offset = new AMap.Pixel(-15, -15); context.marker.setContent(content) context.marker.setOffset(offset) } 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 77185f3..197d740 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -148,7 +148,7 @@ export class LinkageForcesComponent implements OnInit { }; var _renderMarker = (context)=> { var content = ``; - var offset = new AMap.Pixel(-12.5, -12.5); + var offset = new AMap.Pixel(-15, -15); context.marker.setContent(content) context.marker.setOffset(offset) } 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 7cdea43..781bb41 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -106,7 +106,7 @@ export class WaterCollectionComponent implements OnInit { var _renderMarker = (context)=> { var content = ``; context.marker.setContent(content) - var offset = new AMap.Pixel(-12.5, -12.5); + var offset = new AMap.Pixel(-15, -15); context.marker.setOffset(offset) } this.cluster = new AMap.MarkerCluster(this.map, markerArrcluster, { 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 86de6b8..2fb7fe3 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts @@ -274,7 +274,7 @@ export class GisLabelingComponent implements OnInit { }; var _renderMarker = (context)=> { var content = ``; - var offset = new AMap.Pixel(-15, -25); + var offset = new AMap.Pixel(-15, -15); context.marker.setContent(content) context.marker.setOffset(offset) } @@ -480,7 +480,7 @@ export class GisLabelingComponent implements OnInit { }; var _renderMarker = (context)=> { var content = ``; - var offset = new AMap.Pixel(-12.5, -12.5); + var offset = new AMap.Pixel(-15, -15); context.marker.setContent(content) context.marker.setOffset(offset) } diff --git a/src/app/key-unit/allaround/allaround.component.html b/src/app/key-unit/allaround/allaround.component.html index fd54eb2..467a928 100644 --- a/src/app/key-unit/allaround/allaround.component.html +++ b/src/app/key-unit/allaround/allaround.component.html @@ -1,39 +1,41 @@
- +
-
-
- +
+
+ +
+
+
-
- +
- - + +
-

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

+

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

diff --git a/src/app/key-unit/allaround/allaround.component.ts b/src/app/key-unit/allaround/allaround.component.ts index 27693f8..2c4b7d4 100644 --- a/src/app/key-unit/allaround/allaround.component.ts +++ b/src/app/key-unit/allaround/allaround.component.ts @@ -17,7 +17,7 @@ export class AllaroundComponent implements OnInit { constructor(private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private route:ActivatedRoute,) { } ngOnInit(): void { - this.getAllBuilding() + this.getAllCompany() } AllAdjoining: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 cc729aa..c9ae164 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 @@ -12,7 +12,7 @@ - + diff --git a/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html b/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html index ee701d0..dc84234 100644 --- a/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html +++ b/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html @@ -1,6 +1,101 @@
+ +
+ +

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

+
+

{{item.name}}

+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
{{header}}
{{body[header]? body[header] : '暂无数据'}}
+
+
+

楼层/区域名称: {{tableMsg.name? tableMsg.name: '暂无名称'}}

+ + + + + + + +
{{header}}
{{body[header]? body[header] : '暂无数据'}}
+
+
+
+ +
+
+
+ +
+ + + + +

{{item.name}}

+ +
+
+ + + + + + + {{radio.name}} + +
+
+ +
+
+ +
+
+
diff --git a/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts b/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts index ce55913..926c2b7 100644 --- a/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts +++ b/src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts @@ -21,6 +21,7 @@ export class FireFightingDeviceLookComponent implements OnInit { constructor(private router:Router,private route:ActivatedRoute,public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { } ngOnInit(): void { + this.getCompanyInformation() this.getAllBuilding() } 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 2ccf727..1c825ef 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 @@ -1,6 +1,101 @@
+ +
+ +

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

+
+

{{item.name}}

+
+ add_circle_outline + description + delete +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
{{header}}
{{body[header]? body[header] : '暂无数据'}}
+
+
+

楼层/区域名称: {{tableMsg.name? tableMsg.name: '暂无名称'}}

+ + + + + + + +
{{header}}
{{body[header]? body[header] : '暂无数据'}}
+
+
+
+ +
+
+
+ +
+ + + + +

{{item.name}}

+ description +
+
+ + + + + + + {{radio.name}} + +
+
+ +
+
+ +
+
+
diff --git a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts index 8393abf..53abf57 100644 --- a/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts +++ b/src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts @@ -22,6 +22,7 @@ export class FireFightingDeviceComponent implements OnInit { constructor(private tabbarService: TabbarAndScoreService,private router:Router,private route:ActivatedRoute,public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { } ngOnInit(): void { + this.getCompanyInformation() this.getAllBuilding() } diff --git a/src/app/key-unit/view-unit-details/view-unit-details.component.html b/src/app/key-unit/view-unit-details/view-unit-details.component.html index 32dc972..d544d46 100644 --- a/src/app/key-unit/view-unit-details/view-unit-details.component.html +++ b/src/app/key-unit/view-unit-details/view-unit-details.component.html @@ -9,7 +9,7 @@ - + diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index b7d32ae..7f3b35e 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -641,7 +641,7 @@ export class CollectionToolsComponent implements OnInit { firstMultipleAssetData:any//当前多选的第一个素材 ngOnInit(): void { - let _this = this + this.canvasData.isInheritSky = { weather:'', airTemperature:'', windDirection:'', windScale:'', }; //缓存 节点 天气 AxMessageSystem.addListener('selectionChanged', ()=>{ if(this.canvas.selection.size() == 1){//如果是单选 @@ -2317,10 +2317,10 @@ export class CollectionToolsComponent implements OnInit { e.stopPropagation() let dialogRef = this.dialog.open(addBGCDisposalNodeComponent); dialogRef.afterClosed().subscribe(data=>{ - if (data) { + if (data) { this.canvasData.customizeDisposalNode = data //自定义数据节点 let imgURL = window.URL.createObjectURL(data.file) //将图片生成 url地址 - this.canvasData.selectPanelPointBaseData = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''} //更新 当前数据节点对应父级节点 + // this.canvasData.selectPanelPointBaseData = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''} //更新 当前数据节点对应父级节点 this.selectDisposalNode = '' this.canvasData.selectPanelPoint = new DisposalNodeData() //更新 当前数据节点 this.canvasData.selectPanelPoint.BackgroundImageUrl = imgURL @@ -2346,6 +2346,10 @@ export class CollectionToolsComponent implements OnInit { disasterId: this.allFirePlan[0].id || '', parentId: item? item.id : null, planComponentId: sessionStorage.getItem('planId') || '', + weather: this.canvasData.isInheritSky.weather, + airTemperature: Number(this.canvasData.isInheritSky.airTemperature), + windDirection: Number(this.canvasData.isInheritSky.windDirection), + windScale: Number(this.canvasData.isInheritSky.windScale), } let dialogRef = this.dialog.open(addDisposalNodeComponent,{data}); dialogRef.afterClosed().subscribe(data=>{ diff --git a/src/app/ui/collection-tools/save.ts b/src/app/ui/collection-tools/save.ts index 13a0797..07b61a0 100644 --- a/src/app/ui/collection-tools/save.ts +++ b/src/app/ui/collection-tools/save.ts @@ -85,10 +85,18 @@ export class saveOneDialog { } }) }) + //保存到已有节点 自动选择父节点 + if (this.data.type == 'old' && this.canvasData.selectPanelPointBaseData.id) { + this.selectedOld = this.canvasData.selectPanelPointBaseData.id + let item = this.allPlanDisposalNode.find(item=>{ return item.id === this.canvasData.selectPanelPointBaseData.id }) + this.clickNode(item) + } } + onNoClick(): void { this.dialogRef.close(); } + selectedOld:any; //当前选中的要保存到的父节点ID nodeItem:any//当前选中的要保存到的父节点 itemChildNum = 0 //点击处置节点子数据节点的数量(赋值order) clickNode(item){ @@ -140,12 +148,18 @@ export class saveOneDialog { 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 (!this.canvasData.selectPanelPointBaseData.weather && !this.canvasData.selectPanelPointBaseData.airTemperature && !this.canvasData.selectPanelPointBaseData.windScale && !this.canvasData.selectPanelPointBaseData.windDirection) { //继承 天气 + this.canvasData.selectPanelPointBaseData.weather = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.weather)) + this.canvasData.selectPanelPointBaseData.airTemperature = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.airTemperature)) + this.canvasData.selectPanelPointBaseData.windScale = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windScale)) + this.canvasData.selectPanelPointBaseData.windDirection = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windDirection)) + } + 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)=>{ @@ -178,6 +192,7 @@ export class saveOneDialog { config.duration = 3000 this.snackBar.open('保存失败','确定',config) }) + this.cacheWeather() this.dialogRef.close(); this.canvasData.sendMessage('send a message');//发布一条消息 }) //imgURL @@ -219,6 +234,7 @@ export class saveOneDialog { config.duration = 3000 this.snackBar.open('保存失败','确定',config) }) + this.cacheWeather() this.dialogRef.close(); this.canvasData.sendMessage('send a message');//发布一条消息 }) //imgURL @@ -272,10 +288,15 @@ export class saveOneDialog { buildingId: null, buildingAreaId: null } - + if (!this.canvasData.selectPanelPointBaseData.weather && !this.canvasData.selectPanelPointBaseData.airTemperature && !this.canvasData.selectPanelPointBaseData.windScale && !this.canvasData.selectPanelPointBaseData.windDirection) { //继承 天气 + this.canvasData.selectPanelPointBaseData.weather = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.weather)) + this.canvasData.selectPanelPointBaseData.airTemperature = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.airTemperature)) + this.canvasData.selectPanelPointBaseData.windScale = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windScale)) + this.canvasData.selectPanelPointBaseData.windDirection = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windDirection)) + } dispositionNodeData.weather = this.canvasData.selectPanelPointBaseData.weather dispositionNodeData.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature) - dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale) + 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 @@ -319,6 +340,7 @@ export class saveOneDialog { config.duration = 3000 this.snackBar.open('保存失败','确定',config) }) + this.cacheWeather() this.dialogRef.close(); this.canvasData.sendMessage("send a message") }) //imgURL @@ -327,6 +349,14 @@ export class saveOneDialog { } } + //缓存节点 天气 + cacheWeather () { + this.canvasData.isInheritSky.weather = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.weather)) + this.canvasData.isInheritSky.airTemperature = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.airTemperature)) + this.canvasData.isInheritSky.windDirection = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.windDirection)) + this.canvasData.isInheritSky.windScale = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.windScale)) + } + //封装方法 上传 自定义底图 uploadBGC () { return new Promise((resolve,reject)=>{ diff --git a/src/app/ui/collection-tools/saveTwo.html b/src/app/ui/collection-tools/saveTwo.html index ad8f075..df94750 100644 --- a/src/app/ui/collection-tools/saveTwo.html +++ b/src/app/ui/collection-tools/saveTwo.html @@ -34,7 +34,7 @@
- + {{item.name}} diff --git a/src/styles.scss b/src/styles.scss index f69d5a0..1c8dd97 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -204,6 +204,6 @@ table td.mat-footer-cell:last-of-type{ } //水源采集点聚合 .clusterImgCollection{ - width:25px; - height:25px; + width:30px; + height:30px; } \ No newline at end of file