From d96406084ddd55d0e1723896cc93fea21d04ac88 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 24 Jun 2021 16:25:38 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=88=B6=E4=BD=9C?= =?UTF-8?q?=E9=A2=84=E6=A1=88=E4=BA=A4=E9=80=9A=E6=B0=B4=E6=BA=90=E9=83=A8?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/key-unit/key-unit.module.ts | 2 +- .../water-road/water-road.component.html | 8 +- .../water-road/water-road.component.scss | 6 + .../water-road/water-road.component.ts | 276 ++++++++++-------- .../create-plan-online-five.component.html | 43 ++- .../create-plan-online-five.component.scss | 36 +-- .../create-plan-online-five.component.ts | 21 +- .../create-plan-online-five/openPlanTool.html | 13 +- .../entry-plan/entry-plan.component.html | 2 +- .../plan-management/plan-management.module.ts | 4 +- src/app/tabbar/tabbar.component.html | 4 +- .../collection-tools.component.ts | 68 ++--- 12 files changed, 283 insertions(+), 200 deletions(-) diff --git a/src/app/key-unit/key-unit.module.ts b/src/app/key-unit/key-unit.module.ts index 500edd3..c5e5041 100644 --- a/src/app/key-unit/key-unit.module.ts +++ b/src/app/key-unit/key-unit.module.ts @@ -88,7 +88,7 @@ import { SpecialWarningComponent } from './special-warning/special-warning.compo @NgModule({ declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult,StatisticsOfFireFightingFacilities, SpecialWarningComponent], - exports:[ViewUnitDetailsPlanComponent], + exports:[ViewUnitDetailsPlanComponent,WaterRoadComponent], imports: [ CommonModule, KeyUnitRoutingModule, diff --git a/src/app/key-unit/water-road/water-road.component.html b/src/app/key-unit/water-road/water-road.component.html index ac01340..7ad14a9 100644 --- a/src/app/key-unit/water-road/water-road.component.html +++ b/src/app/key-unit/water-road/water-road.component.html @@ -1,7 +1,7 @@
- +
@@ -39,7 +39,11 @@
- + + +
\ No newline at end of file diff --git a/src/app/key-unit/water-road/water-road.component.scss b/src/app/key-unit/water-road/water-road.component.scss index a9378a2..41b2331 100644 --- a/src/app/key-unit/water-road/water-road.component.scss +++ b/src/app/key-unit/water-road/water-road.component.scss @@ -135,4 +135,10 @@ } } } +} + +.createImg{ + position: absolute; + right: 30px; + top: 15px; } \ No newline at end of file diff --git a/src/app/key-unit/water-road/water-road.component.ts b/src/app/key-unit/water-road/water-road.component.ts index c20f9fd..fa24d5e 100644 --- a/src/app/key-unit/water-road/water-road.component.ts +++ b/src/app/key-unit/water-road/water-road.component.ts @@ -5,7 +5,7 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dial import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; declare var AMap: any; - +declare var html2canvas: any; @Component({ selector: 'app-water-road', templateUrl: './water-road.component.html', @@ -13,46 +13,48 @@ declare var AMap: any; }) export class WaterRoadComponent implements OnInit { - constructor(private http: HttpClient,public renderer2: Renderer2,public snackBar: MatSnackBar,public dialog: MatDialog,private fb: FormBuilder,private route:ActivatedRoute) { } + constructor(private http: HttpClient, public renderer2: Renderer2, public snackBar: MatSnackBar, public dialog: MatDialog, private fb: FormBuilder, private route: ActivatedRoute) { } //获得单位信息 - unitData:any - - async getUnitData(){ - await new Promise((resolve, reject) =>{ - this.http.get(`/api/Companies/${this.route.snapshot.queryParams.id}`).subscribe(data => { + unitData: any + + async getUnitData() { + await new Promise((resolve, reject) => { + let id + this.route.snapshot.queryParams.id ? id = this.route.snapshot.queryParams.id : id = this.route.snapshot.queryParams.companyId + this.http.get(`/api/Companies/${id}`).subscribe(data => { this.unitData = data resolve(data) }) - }) + }) } - map:any //地图 - watertForm:FormGroup //gis右上角水源表单 - waterList = [ - {id:'0',name:'消火栓',selected:true}, - {id:'1',name:'消防水池',selected:true}, - {id:'2',name:'天然水源',selected:true}, - {id:'3',name:'总队',selected:true}, - {id:'4',name:'支队',selected:true}, - {id:'5',name:'大队',selected:true}, - {id:'6',name:'中队(消防站)',selected:true}, - {id:'7',name:'其他消防队伍',selected:true} + map: any //地图 + watertForm: FormGroup //gis右上角水源表单 + waterList = [ + { id: '0', name: '消火栓', selected: true }, + { id: '1', name: '消防水池', selected: true }, + { id: '2', name: '天然水源', selected: true }, + { id: '3', name: '总队', selected: true }, + { id: '4', name: '支队', selected: true }, + { id: '5', name: '大队', selected: true }, + { id: '6', name: '中队(消防站)', selected: true }, + { id: '7', name: '其他消防队伍', selected: true } ] - fireForceList:any[] = [ - + fireForceList: any[] = [ + ] - waterAreaDefault:any = '5000' //默认水源范围 - selectedWaterList:any = [] //选择提交的水源 + waterAreaDefault: any = '5000' //默认水源范围 + selectedWaterList: any = [] //选择提交的水源 //地图范围圆圈---水源 circleofwater = new AMap.Circle({ center: null, radius: 0, //半径 - strokeOpacity: 1, + strokeOpacity: 1, fillOpacity: 0.4, strokeStyle: 'dashed', - strokeDasharray: [10, 10], + strokeDasharray: [10, 10], // 线样式还支持 'dashed' fillColor: '#1791fc', zIndex: 50, @@ -60,19 +62,19 @@ export class WaterRoadComponent implements OnInit { async ngOnInit(): Promise { this.watertForm = this.fb.group({ - waters:this.waterUnits(), - allSelectedWater:new FormControl(), - areaWater:new FormControl() + waters: this.waterUnits(), + allSelectedWater: new FormControl(), + areaWater: new FormControl() }) this.waters.valueChanges.subscribe(values => { - let selects:string[] = [] - values.forEach((selected:boolean,i:number) => { + let selects: string[] = [] + values.forEach((selected: boolean, i: number) => { selected === true && selects.push(this.waterList[i].id) }); this.selectedWaterList = selects }) this.waterList.forEach(item => { - if(item.selected){ + if (item.selected) { this.selectedWaterList.push(item.id) } }) @@ -82,56 +84,56 @@ export class WaterRoadComponent implements OnInit { }, 0); } - get waters():any{ + get waters(): any { return this.watertForm.get('waters') } //全选水源 - selectedAllWater(event){ - if(event.checked){ - this.waters.controls.forEach(item => {item.setValue(true)}) - }else{ - this.watertForm.reset() + selectedAllWater(event) { + if (event.checked) { + this.waters.controls.forEach(item => { item.setValue(true) }) + } else { + this.watertForm.reset() this.watertForm.controls.areaWater.setValue('0') } } //水源提交 - waterSubmit(value){ - if(!this.unitMarker){ + waterSubmit(value) { + if (!this.unitMarker) { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('请前往基本信息标注单位坐标','确定',config); - }else{ + this.snackBar.open('请前往基本信息标注单位坐标', '确定', config); + } else { this.circleofwater.setRadius(Number(this.waterAreaDefault)) this.circleofwater.setCenter(this.unitMarker._position) this.circleofwater.setMap(this.map) let Distance let lnglat = new AMap.LngLat(this.unitData.location.x, this.unitData.location.y) // lng, lat 替换成传入的坐标 - + //如果选择当前的视野范围算出查询半径 - if(this.waterAreaDefault == '0'){ - this.circleofwater.setRadius(this.Calculationofdistance(this.map.getBounds())/2) - Distance = Math.abs(lnglat.offset(0, this.Calculationofdistance(this.map.getBounds())/2).lat - this.unitData.location.y) - }else{ - Distance = Math.abs(lnglat.offset(0, this.waterAreaDefault).lat - this.unitData.location.y) + if (this.waterAreaDefault == '0') { + this.circleofwater.setRadius(this.Calculationofdistance(this.map.getBounds()) / 2) + Distance = Math.abs(lnglat.offset(0, this.Calculationofdistance(this.map.getBounds()) / 2).lat - this.unitData.location.y) + } else { + Distance = Math.abs(lnglat.offset(0, this.waterAreaDefault).lat - this.unitData.location.y) } this.getWaterData(Distance) } } //获得水源列表 - getWaterData(Distance){ - if(this.selectedWaterList.length == 0){ + getWaterData(Distance) { + if (this.selectedWaterList.length == 0) { let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('请选择要显示的类型','确定',config); - }else{ - - console.log('选中的内容',this.selectedWaterList) + this.snackBar.open('请选择要显示的类型', '确定', config); + } else { + + // console.log('选中的内容', this.selectedWaterList) function checkAdult(item) { return item <= 2; } @@ -140,88 +142,88 @@ export class WaterRoadComponent implements OnInit { } const water = this.selectedWaterList.filter(checkAdult); const power = this.selectedWaterList.filter(checkAdult2); - console.log('water',water) - console.log('power',power) - let waterparamsdata:any = { - PageSize:99999, - Lon : this.unitData.location.x, - Lat : this.unitData.location.y, - Distance : Distance, - WaterSourceTypes :water + // console.log('water', water) + // console.log('power', power) + let waterparamsdata: any = { + PageSize: 99999, + Lon: this.unitData.location.x, + Lat: this.unitData.location.y, + Distance: Distance, + WaterSourceTypes: water } - let powerparamsdata:any = { - PageSize:99999, - Lon : this.unitData.location.x, - Lat : this.unitData.location.y, - Distance : Distance, - WaterSourceTypes :power + let powerparamsdata: any = { + PageSize: 99999, + Lon: this.unitData.location.x, + Lat: this.unitData.location.y, + Distance: Distance, + WaterSourceTypes: power } - if( water.length == 0 ){ - this.http.get("/api/CustomFireForce",{params:powerparamsdata}).subscribe((data2:any) => { + if (water.length == 0) { + this.http.get("/api/CustomFireForce", { params: powerparamsdata }).subscribe((data2: any) => { this.createwaterMarker(data2) }) - }else if( power.length == 0 ){ - this.http.get("/api/WaterSources",{params:waterparamsdata}).subscribe((data:any) => { + } else if (power.length == 0) { + this.http.get("/api/WaterSources", { params: waterparamsdata }).subscribe((data: any) => { this.createwaterMarker(data.items) }) - }else{ - this.http.get("/api/WaterSources",{params:waterparamsdata}).subscribe((data:any) => { - this.http.get("/api/CustomFireForce",{params:powerparamsdata}).subscribe((data2:any) => { - let allData = [...data.items,...data2] + } else { + this.http.get("/api/WaterSources", { params: waterparamsdata }).subscribe((data: any) => { + this.http.get("/api/CustomFireForce", { params: powerparamsdata }).subscribe((data2: any) => { + let allData = [...data.items, ...data2] this.createwaterMarker(allData) }) }) } - + } - + } //循环渲染出所有水源markers - waterCluster:any //水源聚合实例 - createwaterMarker(list){ + waterCluster: any //水源聚合实例 + createwaterMarker(list) { let waterMarkerArrcluster = [] this.waterCluster ? this.waterCluster.setData([]) : null list.forEach((item) => { let image - if(item.waterSourceType == 0 || item.waterSourceType == 1 || item.waterSourceType == 2){ - if(item.waterSourceType == 0){//消火栓 + if (item.waterSourceType == 0 || item.waterSourceType == 1 || item.waterSourceType == 2) { + if (item.waterSourceType == 0) {//消火栓 image = '/assets/waterMarkers/szxhs.png' - }else if(item.waterSourceType == 1){//消防水池 + } else if (item.waterSourceType == 1) {//消防水池 image = '/assets/waterMarkers/fxcsc.png' - }else if(item.waterSourceType == 2){//天然水源 + } else if (item.waterSourceType == 2) {//天然水源 image = '/assets/waterMarkers/trsy.png' } // 用于点集合的数组 item.location ? waterMarkerArrcluster.push({ - lnglat : [item.location.x,item.location.y], - image : image, - data : item + lnglat: [item.location.x, item.location.y], + image: image, + data: item }) : null - }else{ - if(item.forceType == 2){ + } else { + if (item.forceType == 2) { image = '/assets/fireForcesMarkers/qita.png' - }else if(item.level == 0){ + } else if (item.level == 0) { image = '/assets/fireForcesMarkers/zongdui.png' - }else if(item.level == 1){ + } else if (item.level == 1) { image = '/assets/fireForcesMarkers/zhidui.png' - }else if(item.level == 2){ + } else if (item.level == 2) { image = '/assets/fireForcesMarkers/dadui.png' - }else if(item.level == 3){ + } else if (item.level == 3) { image = '/assets/fireForcesMarkers/zhongdui.png' } // 用于点集合的数组 - item.fireForceDetailInfo.location ? - waterMarkerArrcluster.push({ - lnglat : [item.fireForceDetailInfo.location.x,item.fireForceDetailInfo.location.y], - image : image, - data : item - }) : null + item.fireForceDetailInfo.location ? + waterMarkerArrcluster.push({ + lnglat: [item.fireForceDetailInfo.location.x, item.fireForceDetailInfo.location.y], + image: image, + data: item + }) : null } - + }) - this.map.plugin(["AMap.MarkerClusterer"],() => { + this.map.plugin(["AMap.MarkerClusterer"], () => { var gridSize = 60 var count = waterMarkerArrcluster.length; var _renderClusterMarker = function (context) { @@ -237,7 +239,7 @@ export class WaterRoadComponent implements OnInit { div.style.width = div.style.height = size + 'px'; div.style.border = 'solid 1px ' + borderColor; div.style.borderRadius = size / 2 + 'px'; - div.style.boxShadow = '0 0 5px ' + shadowColor; + // div.style.boxShadow = '0 0 5px ' + shadowColor; div.innerHTML = context.count; div.style.lineHeight = size + 'px'; div.style.color = fontColor; @@ -246,7 +248,7 @@ export class WaterRoadComponent implements OnInit { context.marker.setOffset(new AMap.Pixel(-size / 2, -size / 2)); context.marker.setContent(div) }; - var _renderMarker = (context)=> { + var _renderMarker = (context) => { var content = ``; var offset = new AMap.Pixel(-12.5, -12.5); context.marker.setContent(content) @@ -257,17 +259,17 @@ export class WaterRoadComponent implements OnInit { renderClusterMarker: _renderClusterMarker, // 自定义聚合点样式 renderMarker: _renderMarker, // 自定义非聚合点样式 }); - this.waterCluster.on('click',(e)=>{ - if(e.clusterData.length == 1){ - + this.waterCluster.on('click', (e) => { + if (e.clusterData.length == 1) { + } }) }); - + } //取消显示水源 - resetWater(){ + resetWater() { this.watertForm.reset() this.watertForm.controls.areaWater.setValue('0') this.map.remove(this.circleofwater) @@ -275,7 +277,7 @@ export class WaterRoadComponent implements OnInit { } //计算两地距离 - Calculationofdistance(bounds){ + Calculationofdistance(bounds) { let p1 = [bounds.northEast.lng, bounds.northEast.lat]; let p2 = [bounds.northEast.lng, bounds.southWest.lat]; // 返回 p1 到 p2 间的地面距离,单位:米 @@ -292,35 +294,67 @@ export class WaterRoadComponent implements OnInit { } //地图初始化 - unitMarker:any//单位标点 - newPositionMarkerContent:any = - '
' + - ' ' + - '
' - creatMap(){ - this.map = new AMap.Map('center',{ + unitMarker: any//单位标点 + newPositionMarkerContent: any = + '
' + + ' ' + + '
' + creatMap() { + this.map = new AMap.Map('center', { zoom: 13, //初始地图级别 + WebGLParams: { + preserveDrawingBuffer: true + } }); - if(this.unitData.location && this.unitData.location.x){ - this.map.setCenter([this.unitData.location.x,this.unitData.location.y]); + if (this.unitData.location && this.unitData.location.x) { + this.map.setCenter([this.unitData.location.x, this.unitData.location.y]); this.unitMarker = new AMap.Marker({ - position: [this.unitData.location.x,this.unitData.location.y], + position: [this.unitData.location.x, this.unitData.location.y], content: this.newPositionMarkerContent, offset: new AMap.Pixel(-10, -13) }) // 将 markers 添加到地图 this.map.add(this.unitMarker); this.waterSubmit(1) - }else{ + } else { this.map.setCity('上海市'); let config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('请先前往基本信息标注单位位置','确定',config); + this.snackBar.open('请先前往基本信息标注单位位置', '确定', config); } - + } + canvasImg + takeScreenshotGis() { + // console.log(666666, this.selectingSitePlan) + // 使用html2canvas插件,将数据源中的数据转换成画布。 + html2canvas(document.querySelector("#center"), { + useCORS: true, // 【重要】开启跨域配置, + allowTaint: true,//允许跨域图片 + taintTest: false,//是否在渲染前测试图片 + onrendered: function (canvas) { + var dataUrl = canvas.toDataURL("image/png"); + } + }).then(canvas => { + // 修改生成的宽度 + this.canvasImg = canvas.toDataURL("image/png"); + // console.log(this.canvasImg) + }).then(() => { + this.downloadFile('水源图', this.canvasImg); + }) + } + downloadFile(filename, content) { + var base64Img = content; + var oA = document.createElement('a'); + oA.href = base64Img; + oA.download = filename; + var event = document.createEvent('MouseEvents'); + event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + oA.dispatchEvent(event); + } + } diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 21d7449..ba0458b 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -112,6 +112,35 @@ +
+
+ 交通水源 +
+
+
+ + + + + 水源 + + +
+
+
+ +
+

交通水源

+
+
+
+
+
+
+
建筑列表 @@ -227,7 +256,7 @@
- +
@@ -284,7 +313,7 @@
-
+
@@ -330,6 +359,16 @@
+
+
+
+ +
+
+ +
+
+
{{buildingName}} diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 056f324..17fb3f2 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -171,24 +171,24 @@ } } } - .leftBuilding{ + .leftBuilding { width: 100%; height: 100%; display: flex; flex-direction: column; } - .buildingHead{ + .buildingHead { height: 40px; width: 100%; background-color: #e8f4fe; text-align: center; - span{ + span { line-height: 40px; color: #2196f3; font-size: 16px; } } - .buildingBody{ + .buildingBody { width: 100%; height: 100%; display: flex; @@ -196,11 +196,11 @@ .selectedTr { background-color: #b3d3ee; } - .buildName{ + .buildName { cursor: pointer; height: 40px; width: 100%; - border-bottom: 1px solid #F2F4F5; + border-bottom: 1px solid #f2f4f5; .example-margin { width: 14px; height: 14px; @@ -209,7 +209,7 @@ position: relative; bottom: 1px; } - span{ + span { line-height: 40px; font-size: 16px; margin-left: 5px; @@ -455,13 +455,13 @@ margin: 10px 0; } } - .unit{ + .unit { width: 100%; height: 100%; display: flex; flex-direction: column; overflow-y: auto; - .unithead{ + .unithead { height: 40px; width: 100%; background-color: #e8f4fe; @@ -475,22 +475,22 @@ line-height: 40px; } } - .unitbody{ + .unitbody { height: 100%; width: 100%; display: flex; flex-direction: column; - .unitbodyHead{ + .unitbodyHead { width: 100%; height: 40px; - background-color: #2196F3; + background-color: #2196f3; text-align: center; span { font-size: 16px; text-align: center; height: 40px; line-height: 40px; - color: #FFFFFF; + color: #ffffff; } img { cursor: pointer; @@ -501,13 +501,13 @@ margin-right: 10px; } } - .body{ + .body { width: 100%; height: 100%; - .attack{ + .attack { width: 100%; height: 100%; - .attackhead{ + .attackhead { width: 100%; height: 40px; background-color: #ffd91d; @@ -528,7 +528,7 @@ margin-right: 10px; } } - .attackbody{ + .attackbody { width: 100%; height: 100%; thead { @@ -575,6 +575,7 @@ } } } + } .disposalPoint { div { width: 100%; @@ -626,4 +627,3 @@ } } } -} \ No newline at end of file diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index 929d283..6744d58 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -136,11 +136,21 @@ export class CreatePlanOnlineFiveComponent implements OnInit { element.attribute = [{ name: '', imgArr: [] }] } } + if (element.groupName == '交通水源') { + if (!element.attribute) { + element.attribute = [{ name: '', imgArr: [] }] + } + } if (element.groupName == '处置要点') { if (!element.attribute) { element.attribute = [{ name: '', content: '' }] } } + if (element.groupName == '特别警示') { + if (!element.attribute) { + element.attribute = [{ name: '特别警示', content: '' }] + } + } }); }) } @@ -250,11 +260,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) } //打开采集工具 - openPlan(item, index) { + openPlan(item, index,type?:string) { sessionStorage.setItem("gisplan", 'look') sessionStorage.setItem("companyId", this.unitId) // console.log(item) - let data = { select: item, key: index, allBuildings: this.allBuildings } + let data = { select: item, key: index, allBuildings: this.allBuildings,type: type} let width = Math.round(document.body.clientWidth * 0.8) + 'px' let height = Math.round(document.body.clientHeight * 0.9) + 'px' // console.log('宽度',width) @@ -389,12 +399,15 @@ export class OpenPlanToolDialog { @ViewChild('plan') plan: any //子组件 + type:any//打开的类型 是平面图还是水源 ngOnInit() { - + this.type = this.data.type } ngAfterViewInit(): void { - this.noticePlan() + if(this.type != '水源'){ + this.noticePlan() + } } //通知 子组件 传递参数 diff --git a/src/app/plan-management/create-plan-online-five/openPlanTool.html b/src/app/plan-management/create-plan-online-five/openPlanTool.html index 2c411a2..944912b 100644 --- a/src/app/plan-management/create-plan-online-five/openPlanTool.html +++ b/src/app/plan-management/create-plan-online-five/openPlanTool.html @@ -1,3 +1,10 @@ -
- -
+ +
+ +
+
+ +
+ +
+
\ No newline at end of file diff --git a/src/app/plan-management/entry-plan/entry-plan.component.html b/src/app/plan-management/entry-plan/entry-plan.component.html index 7ee59f9..a708170 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.html +++ b/src/app/plan-management/entry-plan/entry-plan.component.html @@ -142,7 +142,7 @@
- {{(element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed()}}分 + {{(element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed()}}%
diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 5030a40..4037c81 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/src/app/plan-management/plan-management.module.ts @@ -68,6 +68,7 @@ import { CreatePlanOnlineFiveComponent, OpenPlanToolDialog } from './create-plan import { CreatePlanOnlineThreeComponent } from './create-plan-online-three/create-plan-online-three.component' import { UiModule } from '../ui/ui.module'; import { TreeDiagramModule } from '../ui/ng-tree-diagram/src/ng-tree-diagram'; +import { KeyUnitModule } from '../key-unit/key-unit.module'; @NgModule({ declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent, AddPlanone, PlanType, AuditSatus, PlanLevel, DownloadFile, AuditResult, ChangeName, @@ -121,7 +122,8 @@ import { TreeDiagramModule } from '../ui/ng-tree-diagram/src/ng-tree-diagram'; MatTooltipModule, MatTreeModule, UiModule, - TreeDiagramModule + TreeDiagramModule, + KeyUnitModule ], exports: [PlanType, AuditSatus, PlanLevel, state] }) diff --git a/src/app/tabbar/tabbar.component.html b/src/app/tabbar/tabbar.component.html index 2e7f14f..26fecba 100644 --- a/src/app/tabbar/tabbar.component.html +++ b/src/app/tabbar/tabbar.component.html @@ -154,7 +154,7 @@ - + @@ -194,7 +194,7 @@ - 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 263ce37..e836a91 100644 --- a/src/app/ui/collection-tools-plan/collection-tools.component.ts +++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts @@ -233,7 +233,6 @@ export class CollectionToolsPlanComponent implements OnInit { if (!this.isGis) { this.canvas.refreshIcon(this.canvasAssetObj.Id) } - } //素材高度输入框改变 assetHeightIunput() { @@ -705,7 +704,6 @@ export class CollectionToolsPlanComponent implements OnInit { let buildingId = this.beforeOneCheckedBuilding.id let floorId = this.selectingSitePlan.id this.canvas.paste(companyId, buildingId, floorId) - // this.renovateTreeData(false) } //截图 takeScreenshot() { @@ -781,6 +779,7 @@ export class CollectionToolsPlanComponent implements OnInit { saveNum: any = [] saveSite() { //更新用于统计的数据 + this.canvasData.updateBuildingData() if (this.selectingSitePlan && this.selectingSitePlan.id) { @@ -793,12 +792,11 @@ export class CollectionToolsPlanComponent implements OnInit { CompanyData.data = JSON.stringify(CompanyData.data) let object = this.canvasData.originalcompanyBuildingData.data + console.log('建筑数据',object) let adjoinArr = [] //毗邻数组 - if (this.pattern) {//如果是基本信息编辑模式 for (const key in object) { if (object[key].Name == "毗邻") {//如果是相同楼层,则筛选出毗邻 - object[key].PropertyInfos.forEach(element => { if (element.PropertyName == "方向") { adjoinArr.push(element.PropertyValue) @@ -806,6 +804,7 @@ export class CollectionToolsPlanComponent implements OnInit { }); } } + console.log('adjoinArr',adjoinArr) if ((new Set(adjoinArr)).size != adjoinArr.length) { this.maskLayerService.sendMessage(false) let config = new MatSnackBarConfig(); @@ -816,7 +815,6 @@ export class CollectionToolsPlanComponent implements OnInit { } else { //如果是单位 总平面图 if (this.checkedBuildingIndex == -1) { - if (this.isGis) { let data = JSON.parse(JSON.stringify(this.selectingSitePlan)) data.zoomLevel = this.map.getZoom(), @@ -865,6 +863,9 @@ export class CollectionToolsPlanComponent implements OnInit { }) //保存建筑数据 + // console.log('CompanyData',CompanyData) + // CompanyData.data = "{\"图例\":{\"Id\":\"图例\",\"Name\":\"图例\",\"Angle\":0,\"Color\":\"#066EED80\",\"Point\":{\"x\":200,\"y\":200},\"Scale\":1,\"Width\":32,\"Border\":null,\"Height\":32,\"PivotX\":0,\"PivotY\":0,\"Enabled\":true,\"FloorId\":\"60d42db743d691776496cf7c\",\"DrawMode\":null,\"FillMode\":null,\"GameMode\":0,\"ImageUrl\":null,\"FixedSize\":null,\"Thickness\":null,\"MultiPoint\":null,\"TemplateId\":null,\"FireElementId\":null,\"PropertyInfos\":[{\"Tag\":\"\",\"Order\":0,\"Enabled\":true,\"Visible\":true,\"Required\":false,\"RuleName\":\"\",\"RuleValue\":\"\",\"PhysicalUnit\":\"\",\"PropertyName\":\"列\",\"PropertyType\":2,\"PropertyValue\":\"2\"}],\"IsFromBuilding\":null,\"InteractiveMode\":null}}" + this.http.post("/api/CompanyData", CompanyData, { params: { companyId: this.params.companyId @@ -954,7 +955,6 @@ export class CollectionToolsPlanComponent implements OnInit { }).subscribe(data => { this.saveNum.push("1") if (this.saveNum.length == 5) { - this.maskLayerService.sendMessage(false) this.maskLayerService.sendMessage(false) this.canvasData.isChange = false let config = new MatSnackBarConfig(); @@ -1239,7 +1239,6 @@ export class CollectionToolsPlanComponent implements OnInit { storeyData //将建筑素材和当前楼层素材合二为一 //处理 tree 数据结构 handleTreeData(storeyData) { - this.storeyData = storeyData let data = this.allFireElements //所有消防要素模板 let treeData = [] //tree型 处理完成后的数据 @@ -1387,8 +1386,6 @@ export class CollectionToolsPlanComponent implements OnInit { //封装 刷新 tree 数据 async renovateTreeData(isRefresh: boolean = true) { - // this.allFireElements[this.allFireElements.length-1].children = [] - console.log(888, this.selectingSitePlan) if (!this.selectingSitePlan.isGis) { isRefresh ? await this.canvas.refresh() : null this.canvas.setNameVisible(this.basicInfo, 0) @@ -1421,7 +1418,6 @@ export class CollectionToolsPlanComponent implements OnInit { } map: any toLoadGis() { - console.log(666666, this.isGis) this.map = new AMap.Map('planContainer', { viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D', zoom: 11, //初始化地图层级 @@ -1490,12 +1486,6 @@ export class CollectionToolsPlanComponent implements OnInit { } - - - - - - //陈鹏飞↓↓↓ //陈鹏飞↓↓↓ //陈鹏飞↓↓↓ @@ -1837,29 +1827,13 @@ export class CollectionToolsPlanComponent implements OnInit { const isDelete = confirm('您确定要删除吗'); if (isDelete) { if (this.checkedBuildingIndex == -1) { //总平面图 - let isHave = this.canvasData.allDisposalNode.find(items => { return items.sitePlanId === item.id }) - if (isHave == undefined) { - this.http.delete(`/api/SitePlans/${item.id}`).subscribe(data => { - this.deleteShareData(item, -1) - }) - } else { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('含有数据节点的楼层不允许删除', '确定', config); - } + this.http.delete(`/api/SitePlans/${item.id}`).subscribe(data => { + this.deleteShareData(item, -1) + }) } else { //楼层/区域 - let isHave = this.canvasData.allDisposalNode.find(items => { return items.buildingAreaId === item.id }) - if (isHave == undefined) { - this.http.delete(`/api/BuildingAreas/${item.id}`).subscribe(data => { - this.deleteShareData(item, 1) - }) - } else { - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('含有数据节点的楼层不允许删除', '确定', config); - } + this.http.delete(`/api/BuildingAreas/${item.id}`).subscribe(data => { + this.deleteShareData(item, 1) + }) } } } @@ -1878,13 +1852,17 @@ export class CollectionToolsPlanComponent implements OnInit { delete data.data[key] } } + console.log('删除e',e) + console.log('删除建筑数据',data) let newData = JSON.parse(JSON.stringify(this.canvasData.originalcompanyBuildingData)); newData.data = JSON.stringify(newData.data) // 转换JSON 数据格式 this.selectingSitePlan = this.sitePlanData[0] || {} + this.sitePlanData[0] ? this.isGis = this.sitePlanData[0].isGis : null this.canvasData.selectStorey = this.sitePlanData[0] || {} //服务中 存一份数据 this.selectSitePlanIndex = 0 this.canvasData.isChange = false if (isCompany === -1) { + console.log('保存建筑数据',newData) this.http.post("/api/CompanyData", newData).subscribe(data => { }) this.getSitePlanStorey(this.selectingSitePlan) //获取 平面图 楼层数据 } else { @@ -2217,8 +2195,7 @@ export class CollectionToolsPlanComponent implements OnInit { // console.log('选中图片',this.selectImage) this.selectImageIndex = index if (this.isGis) { - console.log(this.map) - + // console.log(this.map) } else { this.canvasData.selectTemplateData = items this.canvas.beginPaint() @@ -2272,6 +2249,7 @@ export class CollectionToolsPlanComponent implements OnInit { let itemData = JSON.parse(JSON.stringify(this.selectImage)) itemData.id = id itemData.point = { x: e.lnglat.lng, y: e.lnglat.lat } + itemData.floorId = this.selectingSitePlan.id itemData = this.canvasData.deserialize(JSON.stringify(itemData))//反序列化为大写 // 添加楼层数据 this.canvasData.originaleveryStoreyData.data[id] = itemData; @@ -2291,7 +2269,7 @@ export class CollectionToolsPlanComponent implements OnInit { seekPanelPoint(paramsData) { this.checkedBuildingIndex = paramsData.buildingIndex if (paramsData.buildingIndex == -1) { //总平面图时 - console.log('走了1') + // console.log('走了1') this.beforeOneCheckedBuilding = { name: "总平面图" } let fireData = this.getFireElements(sessionStorage.getItem('buildingTypeId')) //获取单位下 消防要素 let planData = this.getSitePlanCompanyData() //获取 单位 数据 @@ -2306,15 +2284,15 @@ export class CollectionToolsPlanComponent implements OnInit { }) }) //get } else { //建筑时 - console.log('走了2') - console.log('allBuildings', this.allBuildings) - console.log('paramsData', paramsData) + // console.log('走了2') + // console.log('allBuildings', this.allBuildings) + // console.log('paramsData', paramsData) this.beforeOneCheckedBuilding = this.allBuildings[paramsData.buildingIndex] let params = { buildingId: this.beforeOneCheckedBuilding.id } let fireData = this.getFireElements(this.beforeOneCheckedBuilding.buildingTypes[0].id || '') //获取建筑下 消防要素 let planData = this.getBuildingData(params) //获取 建筑 数据 this.http.get('/api/BuildingAreas', { params }).subscribe(data => { - console.log('BuildingAreas', data) + // console.log('BuildingAreas', data) this.sitePlanData = data let index = this.sitePlanData.findIndex(item => { return item.id === paramsData.storeyId }) this.selectingSitePlan = this.sitePlanData[index] || {} From ce9006c475f8534395bbf0a7637b6ed323a6a418 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 25 Jun 2021 11:13:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E8=BE=85=E5=8A=A9?= =?UTF-8?q?=E6=A5=BC=E5=B1=82=E4=BF=AE=E6=94=B9=E7=B4=A0=E6=9D=90=E7=9A=84?= =?UTF-8?q?=E6=A5=BC=E5=B1=82ID=EF=BC=9B=E4=BF=AE=E5=A4=8D=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=9C=B0=E5=9B=BE=E5=A4=A7=E4=BA=8E10M=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry-plan-look/AddPlanone.html | 2 +- .../collection-tools.component.ts | 14 ++++++++++++++ .../collection-tools.component.ts | 14 +++++++++++++- .../collection-tools-plan/leftFunctionalDomain.ts | 2 +- .../collection-tools/collection-tools.component.ts | 12 ++++++++++++ 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/app/plan-management/entry-plan-look/AddPlanone.html b/src/app/plan-management/entry-plan-look/AddPlanone.html index d32cdd5..3668d9a 100644 --- a/src/app/plan-management/entry-plan-look/AddPlanone.html +++ b/src/app/plan-management/entry-plan-look/AddPlanone.html @@ -62,7 +62,7 @@ (已上传)
- 在线编制 +
-
+ *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='特别警示'&&item.groupName!='处置要点'">
{{item.groupName}}
@@ -313,7 +341,7 @@
-
+
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 17fb3f2..1306561 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -42,6 +42,9 @@ box-sizing: border-box; padding: 0 10px; font-size: 14px; + overflow: hidden; /*超出部分隐藏*/ + white-space: nowrap; /*不换行*/ + text-overflow: ellipsis; /*超出部分文字以...显示*/ } .item:hover { background: #e8f4fe; diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index f666237..697d2a7 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -78,11 +78,32 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.getAllBuildings() this.getSitePlan() this.getRealPicture() - }else if(this.selectedItem == '单位概况'){ + } else if (this.selectedItem == '单位概况') { //this.getAllBuildings() + } else if (this.selectedItem == '预案附件') { + this.getTwoDPlanList() } } + //获取当前单位的二维预案 + TwoDPlanList: any + getTwoDPlanList() { + let paramsData = { + companyId: this.route.snapshot.queryParams.companyId, + pageSize: "999" + } + this.http.get("/api/PlanComponents", { params: paramsData }).subscribe((data: any) => { + this.TwoDPlanList = data.items.filter((item) => { + return item.planType == 1 + }) + console.log(this.TwoDPlanList) + }) + } + + + + + //获取实景图 allRealPicture getRealPicture() { @@ -125,10 +146,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { planTemplateData: any //获得模板信息 getTemplateData() { - this.http.get('/api/PlanTemplate').subscribe(data => { - this.planTemplateData = JSON.parse(data[2].data).filter(item => - item.completed == true - ) + this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe(data => { + console.log('预案内容',data) + // this.planTemplateData = JSON.parse(data.webdata).filter(item => + // item.completed == true + // ) console.log(this.planTemplateData) this.planTemplateData.forEach(element => { if (element.groupName == '重点图示') { @@ -141,6 +163,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { element.attribute = [{ name: '', imgArr: [] }] } } + if (element.groupName == '预案附件') { + if (!element.attribute) { + element.attribute = [{ name: '', imgArr: [] }] + } + } if (element.groupName == '处置要点') { if (!element.attribute) { element.attribute = [{ name: '', content: '' }] @@ -153,6 +180,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } }); }) + } @@ -166,7 +194,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } //通过左侧查看实景图 gallery - lookkeyImgItemLeft(key1, key2,i) { + lookkeyImgItemLeft(key1, key2, i) { let dom = document.getElementById(`viewerjs`) let pObjs = dom.childNodes; let node = document.createElement("img") @@ -243,12 +271,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) }) this.allBuildings = data - this.planTemplateData[0].building=[] - for(var i=0;i -
- -
- - -
- -
-
\ No newline at end of file +
+ +
+
+ +
+
+ +
\ No newline at end of file diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index 9eb53dc..e90a214 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -94,7 +94,7 @@ export class EntryPlanLookComponent implements OnInit { ngOnInit(): void { this.tabledataSource = [ ] - // this.getCompanyData() + this.getCompanyData() this.isoperation = this.route.snapshot.queryParams.operation this.unitdata.unitname = this.route.snapshot.queryParams.unitName this.unitdata.organizationName = this.route.snapshot.queryParams.orName @@ -207,7 +207,8 @@ export class EntryPlanLookComponent implements OnInit { } else if (e.planType == 16) { if (e.attachmentUrls == null) { - window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}`) + console.log(this.compantData) + window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${this.companyId}&planName=${e.name}&unitName=${this.unitdata.unitname}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${this.compantData.buildingTypes[0].id}&orName=${this.compantData.organizationName}&orId=${this.compantData.organizationId}`) } else { let body = {}; diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 7771edd..5cd37cb 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -662,8 +662,8 @@ export class CollectionToolsComponent implements OnInit { }//多个素材共同属性 multipleAssetData: any//当前多选的素材 firstMultipleAssetData: any//当前多选的第一个素材 - organizationName: any = this.route.snapshot.queryParams.orName//当前预案单位所属机构名称 - organizationId: any = this.route.snapshot.queryParams.orId//当前预案单位所属机构名称 + organizationName: any = this.route.snapshot.queryParams.orName || sessionStorage.getItem('orName')//当前预案单位所属机构名称 + organizationId: any = this.route.snapshot.queryParams.orId || sessionStorage.getItem('orId')//当前预案单位所属机构名称 ngOnInit(): void { this.canvasData.isInheritSky = { weather: '', airTemperature: '', windDirection: '', windScale: '', }; //缓存 节点 天气 AxMessageSystem.addListener('selectionChanged', () => { diff --git a/src/assets/images/2Dplan.png b/src/assets/images/2Dplan.png new file mode 100644 index 0000000000000000000000000000000000000000..d3ff80e155de0f51e9099ba146c0312872a8cc73 GIT binary patch literal 8045 zcmV-zAClmSP)*iB}u#XknG03%-F{|!!W~`G21sEX84#H##o02r4ec~FHv(Ff zjC}>XZUS1yb^z>k8Xov?7 z9gwvUzXk>dC@3gk14Mn&v9`80o;-QN&Y||No787qem*@7P^Ah$pQ}{^ zw6$ONb08rh0e9})LEE-%5gs0n^XJbqMmae-vES;}t&7KxA2TMHnVI3@#fxa%xG}P_ zvKZs8T)Bc)ty=aw{U%Ld za_pG$T2WEB(z7QL0hj==c65YoWF(-Y!_JwBnOJ;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 From b6f8b3191bc8aa53796e86f0871ec996f904c3ed Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Tue, 29 Jun 2021 16:45:07 +0800 Subject: [PATCH 5/5] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-fighting-device.component.ts | 16 +- .../create-plan-online-five.component.html | 280 ++++++++++-------- .../create-plan-online-five.component.scss | 22 +- .../create-plan-online-five.component.ts | 74 +++-- 4 files changed, 231 insertions(+), 161 deletions(-) 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 a07ce50..4189176 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 @@ -478,15 +478,13 @@ export class FireFightingDeviceComponent implements OnInit { for (const key in object) { if (Object.prototype.hasOwnProperty.call(object, key)) { const element = object[key]; - if(element.total || element.details){ - body.push({ - buildingId: item.buildingId, - groupName: groupName, - facilityName: element.name, - count: element.total, - description: element.details - }) - } + body.push({ + buildingId: item.buildingId, + groupName: groupName, + facilityName: element.name, + count: element.total || '', + description: element.details || '' + }) } } return body diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html index 6009892..154cded 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html @@ -1,16 +1,13 @@
-
+
-
- 1.封面 -
- {{key + 2}}.{{item.groupName}} + {{key + 1}}.{{item.groupName}}
-
-
-
+ +
+
重点图示 @@ -129,9 +130,7 @@
- +

交通水源

@@ -158,8 +157,7 @@
-

{{TwoDPlan.name}}

@@ -170,12 +168,13 @@
-
-
+
+
建筑列表
-
+
{{item.name}}
@@ -183,111 +182,114 @@
- -
-

- 预案编号: -

-

{{planName}}

-
    -
  • -
    - 对象名称: -
    -
    - {{unitData.name}} -
    -
  • -
  • -
    - 单位性质: -
    -
    - {{unitData.buildingTypes[0].name}} -
    -
  • -
  • -
    - *预案级别: -
    -
    - - Ⅴ级 - - - Ⅲ级 - -
    -
  • -
  • -
    - *灾害类型: -
    -
    - -
    -
  • -
  • -
    - 防火级别: -
    -
    - -
    -
  • -
  • -
    - 防火管辖: -
    -
    - {{unitData.organizationName}} -
    -
  • -
  • -
    - 灭火责任队站: -
    -
    - -
    -
  • -
  • -
    - 制作人职务/姓名: -
    -
    - - -
    -
  • -
  • -
    - 审核人职务/姓名: -
    -
    - -
    -
  • -
  • -
    - 审核时间: -
    -
    - -
    -
  • -
-
-
+
+ +
+

+ 预案编号: +

+

{{item.attribute.planName}}

+
    +
  • +
    + 对象名称: +
    +
    + {{item.attribute.objName}} +
    +
  • +
  • +
    + 单位性质: +
    +
    + {{item.attribute.unitNature}} +
    +
  • +
  • +
    + *预案级别: +
    +
    + + Ⅴ级 + + + Ⅲ级 + +
    +
  • +
  • +
    + *灾害类型: +
    +
    + +
    +
  • +
  • +
    + 防火级别: +
    +
    + +
    +
  • +
  • +
    + 防火管辖: +
    +
    + {{item.attribute.fireproofingAdminister}} +
    +
  • +
  • +
    + 灭火责任队站: +
    +
    + +
    +
  • +
  • +
    + 制作人职务/姓名: +
    +
    + + +
    +
  • +
  • +
    + 审核人职务/姓名: +
    +
    + + +
    +
  • +
  • +
    + 审核时间: +
    +
    + +
    +
  • +
+
-
+ *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='特别警示'&&item.groupName!='处置要点'&&item.groupName!='封面'"> +
{{item.groupName}}
@@ -341,7 +343,11 @@
-
+
+
+ {{item.groupName}} +
@@ -354,7 +360,7 @@
-
+
@@ -363,13 +369,16 @@
-
+
+
+ {{item.groupName}} +
@@ -377,7 +386,8 @@
- +
@@ -388,16 +398,23 @@
+
+ {{item.groupName}} +
- +
+
+ 单位基本信息 +
{{buildingName}}
@@ -412,13 +429,16 @@
{{attack.head}} - - + +
名称分值占比 规则说明
实景图 10%外观,保证有2张照片(占30%); 室内,保证有外观,保证有2张照片(占30%); 重点部位,保证有2张照片(占30%);安全出口,保证有2张照片(占40%
- @@ -433,17 +453,17 @@ -
+
+
- - + +
- +
diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss index 1306561..16d6a3b 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss @@ -69,12 +69,12 @@ } } } + .contentbox { height: 100%; box-sizing: border-box; padding-top: 66px; overflow-y: auto; - .leftbox { position: fixed; width: 14%; @@ -229,6 +229,7 @@ padding: 10px 10px 0; .cover { width: 100%; + min-height: 780px; input, select { border: 1px solid #ebebeb; @@ -236,6 +237,9 @@ height: 28px; line-height: 28px; } + input{ + width: 140px; + } p { height: 28px; line-height: 28px; @@ -627,6 +631,22 @@ margin: 10px 0; } } + .titleItem{ + width: 100%; + height: 36px; + line-height: 36px; + background-color: #2196F3; + text-align: center; + color: white; + } } } + .noPadding{ + padding-top: 10px; + } + .quitPreview{ + position: fixed; + top: 10px; + right: 15px; + } } diff --git a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts index 697d2a7..16d14fa 100644 --- a/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts +++ b/src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts @@ -22,13 +22,9 @@ export class CreatePlanOnlineFiveComponent implements OnInit { constructor(private http: HttpClient, private route: ActivatedRoute, public snackBar: MatSnackBar, public dialog: MatDialog) { } - planName: string //预案名称 planLevel: string//预案级别 ngOnInit(): void { - this.planName = this.route.snapshot.queryParams.planName this.planLevel = this.route.snapshot.queryParams.planCategory - console.log('级别', this.planLevel) - this.getTemplateData() this.getUnitData() this.getAllBuildings() this.tree = { @@ -64,7 +60,8 @@ export class CreatePlanOnlineFiveComponent implements OnInit { data.items.forEach(element => { if (element.id == this.route.snapshot.queryParams.companyId) { this.unitData = element - console.log('单位列表信息', this.unitData) + // console.log('单位列表信息', this.unitData) + this.getTemplateData() } }); }) @@ -73,7 +70,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { selectedItem: string = '封面' clickTitleItem(item) { this.addNumber = -1 - item == '封面' ? this.selectedItem = '封面' : this.selectedItem = item.groupName + this.selectedItem = item.groupName if (this.selectedItem == '重点图示') { this.getAllBuildings() this.getSitePlan() @@ -96,7 +93,6 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.TwoDPlanList = data.items.filter((item) => { return item.planType == 1 }) - console.log(this.TwoDPlanList) }) } @@ -110,12 +106,12 @@ export class CreatePlanOnlineFiveComponent implements OnInit { let companyId = this.unitId this.http.get('/api/RealityImageGroups', { params: { - companyId: '5e9964caa760a059e84512e9' + companyId: this.route.snapshot.queryParams.companyId } }).subscribe((data: any) => { this.allRealPicture = data this.getAllRealPicture().then(() => { - console.log('实景图', this.allRealPicture) + // console.log('实景图', this.allRealPicture) }) }) } @@ -146,12 +142,39 @@ export class CreatePlanOnlineFiveComponent implements OnInit { planTemplateData: any //获得模板信息 getTemplateData() { - this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe(data => { - console.log('预案内容',data) - // this.planTemplateData = JSON.parse(data.webdata).filter(item => - // item.completed == true - // ) - console.log(this.planTemplateData) + this.http.get(`/api/PlanComponents/${this.route.snapshot.queryParams.planId}/WebText`).subscribe((data: any) => { + // console.log('预案内容', data) + this.planTemplateData = JSON.parse(data.webTextData).filter(item => + item.completed == true + ) + // console.log(this.planTemplateData) + if (this.planTemplateData[0].groupName != '封面') { + let obj = { + completed: true, + groupName: "封面", + attribute: { + planNumber: '', + planName: this.route.snapshot.queryParams.planName, + objName: this.unitData.name, + unitNature: this.unitData.buildingTypes[0].name, + planLevel: '', + disasterType: '0', + fireproofingLevel: '', + fireproofingAdminister: this.unitData.organizationName, + putOutFireAdminister: '', + producer: { + name: '', + duty: '' + }, + verifier: { + name: '', + duty: '' + }, + auditTime: '' + } + } + this.planTemplateData.unshift(obj) + } this.planTemplateData.forEach(element => { if (element.groupName == '重点图示') { if (!element.attribute) { @@ -277,7 +300,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } this.buildingName = this.allBuildings[0].name this.group = this.planTemplateData[0].building[this.clicki].body - console.log(this.planTemplateData) + // console.log(this.planTemplateData) }) } //获取总平面图 @@ -292,11 +315,11 @@ export class CreatePlanOnlineFiveComponent implements OnInit { openPlan(item, index, type?: string) { sessionStorage.setItem("gisplan", 'look') sessionStorage.setItem("companyId", this.unitId) - console.log(item) - if(type == '预案'){ + // console.log(item) + if (type == '预案') { sessionStorage.setItem("planId", item.id) sessionStorage.setItem("companyId", this.route.snapshot.queryParams.companyId) - sessionStorage.setItem("buildingTypeId",this.route.snapshot.queryParams.unitTypeId) + sessionStorage.setItem("buildingTypeId", this.route.snapshot.queryParams.unitTypeId) sessionStorage.setItem("editable", "0") sessionStorage.setItem("planName", item.name) sessionStorage.setItem("orName", item.name) @@ -346,7 +369,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { this.planTemplateData[key].attribute[i].tabletr[this.addNumber].tabletd.push('') } } - console.log(this.planTemplateData) + // console.log(this.planTemplateData) } //灾情设定表格删除一行 delTd(key, i) { @@ -391,7 +414,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit { } } - console.log(this.planTemplateData) + // console.log(this.planTemplateData) } } //单位概况删除一行 @@ -454,6 +477,15 @@ export class CreatePlanOnlineFiveComponent implements OnInit { }) }) } + + //预览 + pattern:string = 'edit' + preview(){ + this.pattern = 'look' + } + quitPreview(){ + this.pattern = 'edit' + } }