diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index 1d74555..4fef136 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: '' }; // 当前 数据节点 对应 父级节点 - customizeDisposalNode: any; // 新建 自定义数据节点 底图+名称 + 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.html b/src/app/data-collection/water-collection/water-collection.component.html index 2782ab8..f46cd80 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -79,13 +79,17 @@
- (待审核) - (审核通过) - (审核驳回) + ( + 删除 + 新增 + 更新 + 待审核) + (审核通过) + (审核驳回) - open_in_browser提交审核 - 撤销审核 - save保存 + open_in_browser提交审核 + 撤销审核 + save保存 close关闭
diff --git a/src/app/data-collection/water-collection/water-collection.component.scss b/src/app/data-collection/water-collection/water-collection.component.scss index 37f7a20..b8caeac 100644 --- a/src/app/data-collection/water-collection/water-collection.component.scss +++ b/src/app/data-collection/water-collection/water-collection.component.scss @@ -252,7 +252,7 @@ } } span:hover{ - text-decoration: underline; + // text-decoration: underline; } .state{ margin-right:30px; 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 4f14906..c5cad6e 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, { @@ -244,16 +244,34 @@ export class WaterCollectionComponent implements OnInit { e.stopPropagation() let isDelete = window.confirm('确定要删除此条水源信息吗') if(isDelete){ - this.http.delete(`/api/WaterSources/${item.id}`).subscribe(data => { - const config = new MatSnackBarConfig(); + // this.http.delete(`/api/WaterSources/${item.id}`).subscribe(data => { + // const config = new MatSnackBarConfig(); + // config.verticalPosition = 'top'; + // config.duration = 3000 + // this.addWaterListData.items = this.addWaterListData.items.filter(x => { + // return item.id != x.id + // }) + // this.dataLength = this.dataLength - 1 + // this.snackBar.open('删除成功','确定',config); + // }) + + let body = { + title: item.name, + operation: 2,//删除操作方式 + contentType: 12,//水源类型 + itemId: item.id, + verifyState: 3, + } + this.http.post('/api/ContentVerifies',body).subscribe((data) => { + let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.addWaterListData.items = this.addWaterListData.items.filter(x => { - return item.id != x.id - }) - this.dataLength = this.dataLength - 1 - // this.getAllWaterData() - this.snackBar.open('删除成功','确定',config); + this.snackBar.open('删除审核提交成功','确定',config); + this.addWaterListData.items.forEach(element => { + if(element.id == item.id){ + element.contentVerify = data + } + }); }) } } @@ -435,24 +453,37 @@ export class WaterCollectionComponent implements OnInit { submitAudit(){ let isTrue = window.confirm('请确认保存后提交审核,否则将无法审核最新内容,是否继续?') if(isTrue){ - console.log('提交审核的水源',this.waterData) + // console.log('提交审核的水源',this.waterData) let body = { title: this.waterData.name, - operation: this.waterData.verifyState == -1 ? 0 : 1,//操作方式 + operation: this.waterData.contentVerify ? 1 : 0,//操作方式 contentType: 12,//水源类型 itemId: this.waterData.id, verifyState: 3, } this.http.post('/api/ContentVerifies',body).subscribe((data) => { - console.log('提交成功',data) - this.waterData.verifyState = 3 + this.waterData.contentVerify = data + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('提交成功','确定',config); }) } } //撤销审核 cancelAudit(){ - + let isTrue = window.confirm('您确认要撤销该审核吗?') + if(isTrue){ + // console.log('撤销审核的水源',this.waterData) + this.http.delete(`/api/ContentVerifies/${this.waterData.contentVerify.id}`).subscribe((data) => { + this.waterData.contentVerify = null + let config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('撤销成功','确定',config); + }) + } } //关闭 close(){ 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/basicinfo/basicinfo.component.html b/src/app/key-unit/basicinfo/basicinfo.component.html index bd4b66c..6f90418 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.html +++ b/src/app/key-unit/basicinfo/basicinfo.component.html @@ -112,7 +112,7 @@
- +
diff --git a/src/app/key-unit/basicinfo/basicinfo.component.ts b/src/app/key-unit/basicinfo/basicinfo.component.ts index f3a523d..0bd7844 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.ts +++ b/src/app/key-unit/basicinfo/basicinfo.component.ts @@ -19,6 +19,7 @@ import * as _ from 'lodash'; import Swiper from 'swiper'; import { LookMaster } from './lookmaster.component' import { ActivatedRoute } from '@angular/router'; +import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service'; declare var AMap: any; @Component({ @@ -81,7 +82,7 @@ export class BasicinfoComponent implements OnInit { buildingCustomData:any //存储当前建筑的自定义信息 allunittype: any //所有单位类型 allorganizing:any = [] //所有组织机构 - constructor(private route:ActivatedRoute,private elementRef: ElementRef,public renderer2: Renderer2,private http: HttpClient, private tree: TreeService, private sanitizer: DomSanitizer, public dialog: MatDialog,public snackBar: MatSnackBar) { } + constructor(private tabbarService: TabbarAndScoreService,private route:ActivatedRoute,private elementRef: ElementRef,public renderer2: Renderer2,private http: HttpClient, private tree: TreeService, private sanitizer: DomSanitizer, public dialog: MatDialog,public snackBar: MatSnackBar) { } houses: any = [] //存储当前单位的建筑信息 unitId : any //当前单位id @@ -103,7 +104,9 @@ export class BasicinfoComponent implements OnInit { element.data = [] }); this.houses = data - this.getBuildingInfo() + if(this.houses.length != 0){ + this.getBuildingInfo() + } }) } @@ -408,7 +411,7 @@ export class BasicinfoComponent implements OnInit { async data => { if(data){ this.houses.push(data) - // console.log('新增了',this.houses) + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 } } ); @@ -513,9 +516,12 @@ export class BasicinfoComponent implements OnInit { selectedTabChange(e){ // console.log(e) this.selectedBuildingIndex = e.index - if((this.houses[this.selectedBuildingIndex].data && !this.houses[this.selectedBuildingIndex].data.length) || !this.houses[this.selectedBuildingIndex].data){ - this.getBuildingInfo() + if(this.houses.length != 0){ + if((this.houses[this.selectedBuildingIndex].data && !this.houses[this.selectedBuildingIndex].data.length) || !this.houses[this.selectedBuildingIndex].data){ + this.getBuildingInfo() + } } + } //表格加一行 addline(ele){ @@ -660,11 +666,30 @@ export class BasicinfoComponent implements OnInit { image.src = reader.result } setTimeout(() => { - if(image.width>=4096 || image.height>=5000 ){ + if(this.file.type.indexOf('image') == -1){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请上传图片','确定',config); + if((document.getElementById('selectedfile'))){ + (document.getElementById('selectedfile')).value = null //清空input框缓存 + } + }else if(this.file.name.toLowerCase().indexOf('png') == -1 && this.file.name.toLowerCase().indexOf('jpg') == -1 && this.file.name.toLowerCase().indexOf('jpeg') == -1){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件','确定',config); + if((document.getElementById('selectedfile'))){ + (document.getElementById('selectedfile')).value = null //清空input框缓存 + } + }else if(image.width>=4096 || image.height>=5000 ){ const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('请选择分辨率小于4096*5000的图片','确定',config); + if((document.getElementById('selectedfile'))){ + (document.getElementById('selectedfile')).value = null //清空input框缓存 + } }else{ if(this.file){ this.startUploading() @@ -799,9 +824,9 @@ export class BasicinfoComponent implements OnInit { config.duration = 3000 this.snackBar.open('删除成功','确定',config); this.houses.splice(this.houses.findIndex(items=>items==item),1) - let obj ={index:key} this.selectedTabChange(obj) + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 }) } } @@ -856,15 +881,20 @@ export class BasicinfoComponent implements OnInit { } ] } - this.http.post("/api/Buildings",addbody).subscribe(data=>{//首先创建建筑成功了,需要刷出当前建筑类型的模板 + this.http.post("/api/Buildings",addbody,{params:{ + companyId : this.unitId + }}).subscribe(data=>{//首先创建建筑成功了,需要刷出当前建筑类型的模板 // alert('创建主体建筑成功') + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 this.getUnitAllBuildings() }) + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 }else{ const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('保存成功','确定',config); + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 } }), err=>{ @@ -1030,12 +1060,14 @@ export class BasicinfoComponent implements OnInit { config.verticalPosition = 'top'; config.duration = 3000 this.snackBar.open('建筑信息保存成功','确定',config); + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 }, err=>{ const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('请检查输入数据是否有误','确定',config); + this.snackBar.open('建筑信息保存失败','确定',config); + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 }) //保存建筑自定义信息 @@ -1044,7 +1076,7 @@ export class BasicinfoComponent implements OnInit { companyId :this.unitId, buildingId:item.id }}).subscribe(data=>{ - + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 }) }else{ item.customData.customProperties = [] @@ -1052,7 +1084,7 @@ export class BasicinfoComponent implements OnInit { companyId :this.unitId, buildingId:item.id }}).subscribe(data=>{ - + this.tabbarService.sendMessage('changeScore');//通知服务改变分数 }) } 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/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts index 4e4daa8..95188b0 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts @@ -478,6 +478,7 @@ export class KeyUnitManagementComponent implements OnInit { if(item.id == selectedunitArr[0]){ let companyName = item.name sessionStorage.setItem("companyName",companyName) + sessionStorage.setItem("companyId",item.id) } }); sessionStorage.setItem("editable","1") 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-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts index 1b6e0e6..fe08f8b 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.ts +++ b/src/app/ui/collection-tools-building/collection-tools.component.ts @@ -1502,7 +1502,7 @@ export class CollectionToolsBuildingComponent 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]) } } @@ -1706,19 +1706,26 @@ export class CollectionToolsBuildingComponent implements OnInit { //新增平面图 楼层/区域 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() + if (this.beforeOneCheckedBuilding.id) { + 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() + } + }) + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请选择建筑','确定',config); + } } //编辑平面图 楼层/区域 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 19f6408..5bd8a51 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -1513,7 +1513,7 @@ export class CollectionToolsPlanComponent 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]) // } // } diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 760e33e..4c19b08 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){//如果是单选 @@ -2320,10 +2320,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 @@ -2349,6 +2349,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