From 6d9c3ccc3bebf2b18f53c69e8e5a4d6bdfe2ab27 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 15 Mar 2021 09:17:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E6=B6=88=E9=98=B2?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=E7=BB=9F=E8=AE=A1=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicinfo-look/basicinfo.component.html | 1 + .../basicinfo-look/basicinfo.component.ts | 9 ++++++ .../basicinfo/basicinfo.component.html | 1 + .../key-unit/basicinfo/basicinfo.component.ts | 30 +++++++++++++++++++ .../statisticsOfFireFightingFacilities.html | 4 +++ src/app/key-unit/key-unit.module.ts | 4 +-- 6 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html diff --git a/src/app/key-unit/basicinfo-look/basicinfo.component.html b/src/app/key-unit/basicinfo-look/basicinfo.component.html index 52a1c4e..1d9bfe4 100644 --- a/src/app/key-unit/basicinfo-look/basicinfo.component.html +++ b/src/app/key-unit/basicinfo-look/basicinfo.component.html @@ -6,6 +6,7 @@ 单位信息 +
diff --git a/src/app/key-unit/basicinfo-look/basicinfo.component.ts b/src/app/key-unit/basicinfo-look/basicinfo.component.ts index 03a70aa..80e56d5 100644 --- a/src/app/key-unit/basicinfo-look/basicinfo.component.ts +++ b/src/app/key-unit/basicinfo-look/basicinfo.component.ts @@ -18,6 +18,7 @@ import * as _ from 'lodash'; import Swiper from 'swiper'; import { LookMaster2 } from './lookmaster.component' import { ActivatedRoute } from '@angular/router'; +import { StatisticsOfFireFightingFacilities } from '../basicinfo/basicinfo.component'; declare var AMap: any; @Component({ @@ -26,6 +27,14 @@ declare var AMap: any; styleUrls: ['./basicinfo.component.scss'] }) export class BasicinfoLookComponent implements OnInit { + + //查看消防设施统计 + seeFirfightingDevice (e) { + e.stopPropagation() + let dialogRef = this.dialog.open(StatisticsOfFireFightingFacilities); + dialogRef.afterClosed().subscribe(); + } + unitinfo:any={ id: '', name: '', //单位信息名字 diff --git a/src/app/key-unit/basicinfo/basicinfo.component.html b/src/app/key-unit/basicinfo/basicinfo.component.html index 6f90418..dad7ced 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.html +++ b/src/app/key-unit/basicinfo/basicinfo.component.html @@ -6,6 +6,7 @@ 单位信息 +
diff --git a/src/app/key-unit/basicinfo/basicinfo.component.ts b/src/app/key-unit/basicinfo/basicinfo.component.ts index 0bd7844..c446ffc 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.ts +++ b/src/app/key-unit/basicinfo/basicinfo.component.ts @@ -28,6 +28,14 @@ declare var AMap: any; styleUrls: ['./basicinfo.component.scss'] }) export class BasicinfoComponent implements OnInit { + + //查看消防设施统计 + seeFirfightingDevice (e) { + e.stopPropagation() + let dialogRef = this.dialog.open(StatisticsOfFireFightingFacilities); + dialogRef.afterClosed().subscribe(); + } + unitinfo:any={ id: '', name: '', //单位信息名字 @@ -1154,4 +1162,26 @@ export class BasicinfoComponent implements OnInit { this.houses[key].data = data }) } +} + + + +//消防设施统计 +@Component({ + selector: 'app-StatisticsOfFireFightingFacilities', + templateUrl: './statisticsOfFireFightingFacilities.html', + styleUrls: ['./basicinfo.component.scss'] +}) +export class StatisticsOfFireFightingFacilities implements OnInit { + + constructor(private http: HttpClient, public dialog: MatDialog,public snackBar: MatSnackBar) { } + + ngOnInit(): void { + let params = { companyId: sessionStorage.getItem('companyId'),buildingType: sessionStorage.getItem('buildingTypeId') } + this.http.get(`/api/CompanyFacilities/GetAllFacilities`,{params}).subscribe(data=>{ + Object.keys(data).forEach(key => { this.allFireList.push(`${key} ${data[key]}`) }) + }) + } + allFireList = [] + } \ No newline at end of file diff --git a/src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html b/src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html new file mode 100644 index 0000000..e24e0ab --- /dev/null +++ b/src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html @@ -0,0 +1,4 @@ +
消防设施统计
+
+

{{item}}

+
\ No newline at end of file diff --git a/src/app/key-unit/key-unit.module.ts b/src/app/key-unit/key-unit.module.ts index 93d6b60..07f1796 100644 --- a/src/app/key-unit/key-unit.module.ts +++ b/src/app/key-unit/key-unit.module.ts @@ -48,7 +48,7 @@ import { ViewUnitDetailsComponent } from './view-unit-details/view-unit-details. import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { AddHouseInfo } from './basicinfo/addhouseinfo.component'; import { LookMaster } from './basicinfo/lookmaster.component'; -import { BasicinfoComponent } from './basicinfo/basicinfo.component'; +import { BasicinfoComponent, StatisticsOfFireFightingFacilities } from './basicinfo/basicinfo.component'; import { EditPlanInfoComponent } from './edit-plan-info/edit-plan-info.component'; import { CountdownModule } from 'ngx-countdown'; import { BasicinfoLookComponent } from './basicinfo-look/basicinfo.component'; @@ -88,7 +88,7 @@ import { upname } from './key-unit-management/key-unit-management.component'; import { companyAuditResult } from './key-unit-management/key-unit-management.component' @NgModule({ - declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult], + declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeyImgDetail,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,LookMaster2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult,StatisticsOfFireFightingFacilities], exports:[ViewUnitDetailsPlanComponent], imports: [ CommonModule, From 393fb32382bb3fd989f2ab5a416a54cbcaa65e63 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Mon, 15 Mar 2021 10:06:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E4=BA=BA=E8=BD=A6?= =?UTF-8?q?=E7=B4=A0=E6=9D=90=E6=89=80=E5=B1=9E=E5=8D=95=E4=BD=8D=20?= =?UTF-8?q?=EF=BC=8C=E9=87=87=E9=9B=86=E5=AE=A1=E6=A0=B8=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fire-force/fire-force.component.html | 4 +- .../linkage-forces.component.html | 4 +- .../water-collection.component.html | 4 +- .../basicinfo-look/basicinfo.component.html | 2 +- .../basicinfo/basicinfo.component.html | 2 +- .../plan-record/plan-record.component.html | 16 ++- .../plan-record/plan-record.component.scss | 10 +- .../plan-record/plan-record.component.ts | 28 +++- .../wait-examineer.component.ts | 4 +- .../entry-plan-look.component.ts | 4 +- .../entry-plan/entry-plan.component.ts | 2 +- .../collection-tools.component.html | 4 +- .../collection-tools.component.ts | 1 + src/app/ui/collection-tools/changeOr.html | 31 +++++ .../collection-tools.component.html | 15 ++- .../collection-tools.component.scss | 33 ++++- .../collection-tools.component.ts | 121 ++++++++++-------- src/app/ui/collection-tools/viewdetails.html | 24 ---- src/app/ui/ui.module.ts | 4 +- src/styles.scss | 5 + 20 files changed, 211 insertions(+), 107 deletions(-) create mode 100644 src/app/ui/collection-tools/changeOr.html delete mode 100644 src/app/ui/collection-tools/viewdetails.html diff --git a/src/app/data-collection/fire-force/fire-force.component.html b/src/app/data-collection/fire-force/fire-force.component.html index ef0323f..b20ef31 100644 --- a/src/app/data-collection/fire-force/fire-force.component.html +++ b/src/app/data-collection/fire-force/fire-force.component.html @@ -150,9 +150,9 @@ (审核通过) (审核驳回) - open_in_browser提交审核 + open_in_browser提交审核 撤销审核 - save保存 + save保存 close关闭
diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.html b/src/app/data-collection/linkage-forces/linkage-forces.component.html index 37882f1..9a22f4c 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.html +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.html @@ -125,9 +125,9 @@ (审核通过) (审核驳回) - open_in_browser提交审核 + open_in_browser提交审核 撤销审核 - save保存 + save保存 close关闭 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 f46cd80..143ed99 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -87,9 +87,9 @@ (审核通过) (审核驳回) - open_in_browser提交审核 + open_in_browser提交审核 撤销审核 - save保存 + save保存 close关闭 diff --git a/src/app/key-unit/basicinfo-look/basicinfo.component.html b/src/app/key-unit/basicinfo-look/basicinfo.component.html index 52a1c4e..7310882 100644 --- a/src/app/key-unit/basicinfo-look/basicinfo.component.html +++ b/src/app/key-unit/basicinfo-look/basicinfo.component.html @@ -1,6 +1,6 @@
- + diff --git a/src/app/key-unit/basicinfo/basicinfo.component.html b/src/app/key-unit/basicinfo/basicinfo.component.html index 6f90418..cf96114 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.html +++ b/src/app/key-unit/basicinfo/basicinfo.component.html @@ -1,6 +1,6 @@
- + diff --git a/src/app/plan-audit/plan-record/plan-record.component.html b/src/app/plan-audit/plan-record/plan-record.component.html index 6991fe5..34a1613 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.html +++ b/src/app/plan-audit/plan-record/plan-record.component.html @@ -102,7 +102,7 @@ {{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'? - 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':'消防车辆'}} + 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}} {{item.title}} {{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}} {{item.verifyOrganizationName}} @@ -162,7 +162,7 @@ -
+
@@ -187,5 +187,17 @@ 查看详情
+ +
+ +
+ +
+ +
+ +
+ +
diff --git a/src/app/plan-audit/plan-record/plan-record.component.scss b/src/app/plan-audit/plan-record/plan-record.component.scss index 0c950d1..7fc0c71 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.scss +++ b/src/app/plan-audit/plan-record/plan-record.component.scss @@ -66,12 +66,14 @@ .boxright{ height: 100%; width: 55%; + flex: 1; background-color: #FFFFFF; margin-left: 10px; + display: flex; + flex-direction: column; .word{ width: 100%; height: 100%; - //margin: 10px 10px 0 10px; iframe{ height: 94%; width: 97%; @@ -85,6 +87,12 @@ width: 97%; height: 94%; } + .waterAudit,.fireForceAudit,.LinkageForcesAudit{ + flex: 1; + width: 100%; + height: 100%; + box-sizing: border-box; + } } } th,td{ diff --git a/src/app/plan-audit/plan-record/plan-record.component.ts b/src/app/plan-audit/plan-record/plan-record.component.ts index 47b1516..5133df8 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.ts +++ b/src/app/plan-audit/plan-record/plan-record.component.ts @@ -132,6 +132,10 @@ export class PlanRecordComponent implements OnInit { } //表格点击事件 viewer//全景图对象 + waterData:any//需要传递给子组件的水源信息 + LinkageForceDetailInfo:any//需要传递给子组件的联动力量信息 + fireForceDetailInfo:any//需要传递给子组件的消防力量信息 + postlevel:any tableClick(e,item){ this.showtype = -1 //e.target.parentElement.bgColor='#2196F3' @@ -147,13 +151,31 @@ export class PlanRecordComponent implements OnInit { },0) }else if(item.contentType == 12){ //水源 - this.showtype = 12 + this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data)=>{ + this.waterData = data + this.showtype = 12 + }) }else if(item.contentType == 13){ //消防力量 - this.showtype = 13 + this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data:any)=>{ + if(data.forceType != 0){//如果是其他消防力量 + this.postlevel = 4 + }else{ + this.postlevel = data.level + } + console.log('xxx',data) + data.fireForceDetailInfo.location ? null : data.fireForceDetailInfo.location={x:null,y:null} + this.fireForceDetailInfo = data.fireForceDetailInfo + this.showtype = 13 + }) }else if(item.contentType == 14){ //联动力量 - this.showtype = 14 + this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data:any)=>{ + + data.location ? null : data.location={x:null,y:null} + this.LinkageForceDetailInfo = data + this.showtype = 14 + }) }else{ this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ this.companyId=data.companyId diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 9f6da9a..4d4238f 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -182,7 +182,7 @@ export class WaitExamineerComponent implements OnInit { }else{ this.postlevel = data.level } - console.log('xxx',this.postlevel) + console.log('xxx',data) data.fireForceDetailInfo.location ? null : data.fireForceDetailInfo.location={x:null,y:null} this.fireForceDetailInfo = data.fireForceDetailInfo this.showtype = 13 @@ -432,7 +432,7 @@ export class WaitExamineerComponent implements OnInit { } } - this.shenheTable=[] + this.shenheTable = [] } //拒绝操作 refuse(){ 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 c23bacc..cc4d7f7 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 @@ -162,7 +162,7 @@ export class EntryPlanLookComponent implements OnInit { sessionStorage.setItem("editable","0") sessionStorage.setItem("planName",e.name) let companyId = sessionStorage.getItem("companyId") - window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`); + window.open(`/keyUnit/viewunitinfoplan?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`); } if(e.planMode == 3){ //如果是跳转网页 sessionStorage.setItem("url",e.url) @@ -179,7 +179,7 @@ export class EntryPlanLookComponent implements OnInit { sessionStorage.setItem("editable","1") sessionStorage.setItem("planName",e.name) let companyId = sessionStorage.getItem("companyId") - window.open(`/keyUnit/editunitinfo?id=${companyId}`); + window.open(`/keyUnit/editunitinfo?id=${companyId}&orName=${this.route.snapshot.queryParams.orName}&orId=${this.route.snapshot.queryParams.orId}`); } } allPlanComponents:any //所有预案组件 diff --git a/src/app/plan-management/entry-plan/entry-plan.component.ts b/src/app/plan-management/entry-plan/entry-plan.component.ts index d5d4151..e00c887 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.ts +++ b/src/app/plan-management/entry-plan/entry-plan.component.ts @@ -322,7 +322,7 @@ export class EntryPlanComponent implements OnInit { routerTo(element){ this.level=='0'?this.operation=false:true sessionStorage.setItem("companyName",element.company.name) - window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}&usci=${element.company.usci}`); + window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&orId=${element.company.organizationId}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}&usci=${element.company.usci}`); } //查询 onSubmit (value) { diff --git a/src/app/ui/collection-tools-building/collection-tools.component.html b/src/app/ui/collection-tools-building/collection-tools.component.html index d253c0f..9011508 100644 --- a/src/app/ui/collection-tools-building/collection-tools.component.html +++ b/src/app/ui/collection-tools-building/collection-tools.component.html @@ -173,9 +173,9 @@

宽度(像素)

- +

高度(像素)

- +

角度

{ if(item.id == node.id || item.name == "其他"){ diff --git a/src/app/ui/collection-tools/changeOr.html b/src/app/ui/collection-tools/changeOr.html new file mode 100644 index 0000000..9a92ebc --- /dev/null +++ b/src/app/ui/collection-tools/changeOr.html @@ -0,0 +1,31 @@ +
+
+ + + + {{node.name}} + + + + + + {{node.name}} + + +
+ +
+ + +
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html index 921ba69..169b3b2 100644 --- a/src/app/ui/collection-tools/collection-tools.component.html +++ b/src/app/ui/collection-tools/collection-tools.component.html @@ -296,17 +296,26 @@
-
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+
+

{{item.PropertyName}}({{item.PhysicalUnit}})

+
+ +
+ 更换 +
+
+
-
+

{{item.PropertyName}}({{item.PhysicalUnit}})

-
+

{{item.PropertyName}}({{item.PhysicalUnit}})

diff --git a/src/app/ui/collection-tools/collection-tools.component.scss b/src/app/ui/collection-tools/collection-tools.component.scss index c7c80a4..8df231d 100644 --- a/src/app/ui/collection-tools/collection-tools.component.scss +++ b/src/app/ui/collection-tools/collection-tools.component.scss @@ -285,7 +285,7 @@ .smallinput{ display: block; width: 19%; - margin-left: 8px; + margin-left: 12px; } .textarea{ display: block; @@ -390,7 +390,7 @@ div:focus { width: 18px; height: 18px; vertical-align: middle; - margin-left: 9px; + margin-left: 12px; margin-right: 3px; } @@ -496,4 +496,33 @@ div:focus { border-radius: 0px; } } +} + +//人或车所属单位输入框 +.orInput{ + position: relative; + .changeOr{ + position: absolute; + right: 14px; + font-size: 12px; + bottom: 2px; + border-radius: 3px; + background: #279FFF; + color: white; + padding: 1px 4px; + cursor: pointer; + } +} +.orBox{ + width: 500px; + height: 600px; + .treebox{ + width: 100%; + height: 552px; + overflow-y: auto; + } + .selectedNode{ + background-color: #6BC2FF; + color: #fff; + } } \ No newline at end of file diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts index 4c19b08..d5a1ca8 100644 --- a/src/app/ui/collection-tools/collection-tools.component.ts +++ b/src/app/ui/collection-tools/collection-tools.component.ts @@ -2,11 +2,11 @@ import { Component, OnInit, Inject, ViewChild,ElementRef,Renderer2, ViewContaine import { HttpClient, HttpHeaders } from '@angular/common/http'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; -import {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeComponent,addDisposalNodeComponent, addBGCDisposalNodeComponent} from './leftFunctionalDomain' +import {leftFunctionalDomainComponent,editPlaneFigureComponent,editDisposalNodeComponent,addDisposalNodeComponent, addBGCDisposalNodeComponent} from './leftFunctionalDomain'; import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; import {FlatTreeControl} from '@angular/cdk/tree'; -import {WorkingAreaComponent} from '../../working-area/working-area.component' -import {CanvasShareDataService, DisposalNodeData} from '../../canvas-share-data.service' //引入服务 +import {WorkingAreaComponent} from '../../working-area/working-area.component'; +import {CanvasShareDataService, DisposalNodeData} from '../../canvas-share-data.service'; //引入服务 import Viewer from 'viewerjs'; import Swiper from 'swiper'; import { saveOneDialog } from './save'; @@ -17,6 +17,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { MaskLayerService } from 'src/app/mask-layer.service'; import * as ObjectID from 'bson-objectid'; import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem'; +import { TreeService } from 'src/app/http-interceptors/tree.service'; @Component({ selector: 'app-collection-tools', templateUrl: './collection-tools.component.html', @@ -119,6 +120,12 @@ export class CollectionToolsComponent implements OnInit { if(item.PropertyType == 4){//图片数值上线 this.imagesArrNum = item.PropertyValue } + if(item.PropertyName == '所属单位'){ + if(!item.PropertyValue){ + item.PropertyValue = this.organizationName + item.Tag = this.organizationId + } + } }) //如果存在图片则加载轮播图 @@ -147,9 +154,24 @@ export class CollectionToolsComponent implements OnInit { this.isImgNumCss = false } } - pattern:boolean = false//默认为基本信息编辑 - + //人或车选择所属单位 + changeOr(){ + let dialogRef = this.dialog.open(Organization); + dialogRef.afterClosed().subscribe(data=>{ + if(data && data.name){ + this.PropertyInfos.forEach(item => { + if(item.PropertyName == '所属单位'){ + item.PropertyValue = data.name + item.Tag = data.id + } + }) + } + }); + } + + + pattern:boolean = false//默认为基本信息编辑 //基本信息编辑模式 baseInfo(){ if (!this.pattern) { @@ -476,14 +498,6 @@ export class CollectionToolsComponent implements OnInit { this.canvas.refreshIcon(this.canvasAssetObj.Id) } - //查看图片详情 - lookImg(){ - const dialogRef = this.dialog.open(ViewDetails, {//调用open方法打开对话框并且携带参数过去 - data: {imagesArr:this.imagesArr,index:this.clickedIndex} - }); - dialogRef.afterClosed().subscribe(data=>{ }); - } - //上传素材图片 selectFile(e){ let imgFile = e.target.files[0] || null //上传的文件 @@ -639,11 +653,11 @@ export class CollectionToolsComponent implements OnInit { }//多个素材共同属性 multipleAssetData:any//当前多选的素材 firstMultipleAssetData:any//当前多选的第一个素材 + organizationName:any = this.route.snapshot.queryParams.orName//当前预案单位所属机构名称 + organizationId:any = this.route.snapshot.queryParams.orId//当前预案单位所属机构名称 ngOnInit(): void { - this.canvasData.isInheritSky = { weather:'', airTemperature:'', windDirection:'', windScale:'', }; //缓存 节点 天气 AxMessageSystem.addListener('selectionChanged', ()=>{ - if(this.canvas.selection.size() == 1){//如果是单选 this.isMultipleAsset = false // console.log('单选',this.canvas.selection.first().assetData) @@ -2635,50 +2649,47 @@ export class EditBuilding { } } -//查看图片大图 +//选择所属单位 @Component({ - selector: 'viewdetails', - templateUrl: './viewdetails.html', + selector: 'app-organization', + templateUrl: './changeOr.html', styleUrls: ['./collection-tools.component.scss'] }) -export class ViewDetails { - // myControl = new FormControl(); - //注入MatDialogRef,可以用来关闭对话框 - //要访问对话框组件中的数据,必须使用MAT_DIALOG_DATA注入令牌 - constructor(private http: HttpClient,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data,private element: ElementRef) {} - imagesArr = this.data.imagesArr - onNoClick(): void { - this.dialogRef.close(); +export class Organization { + + constructor(private tree:TreeService,private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef,@Inject(MAT_DIALOG_DATA) public data) { } + + private _transformer = (node, level: number) => {//要给渲染节点传那些属性参数 + return { + expandable: !!node.children && node.children.length > 0, + name: node.name, + level: level, + id: node.id, + }; } + treeControl = new FlatTreeControl(node => node.level, node => node.expandable); + treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); + dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); + hasChild = (_: number, node: any) => node.expandable; ngOnInit(): void { - setTimeout(() => { - var mySwiper = new Swiper('.swiper-container',{ - loop: false, - initialSlide :this.data.index,//默认索引 - // 如果需要前进后退按钮 - navigation: { - nextEl: '.swiper-button-next', - prevEl: '.swiper-button-prev', - } - //其他设置 - }); - }, 0); - } - closeDialog(){ - this.dialogRef.close(); + this.getAllOrganization() + } + selectedNodeId:any + selectedNodeName:any + selectedNode(node){ + this.selectedNodeId = node.id + this.selectedNodeName = node.name + } + getAllOrganization(){ + this.http.get('/api/Organizations').subscribe(data => { + this.dataSource.data = this.tree.toTree(data); + this.treeControl.expand(this.treeControl.dataNodes[0]); + }) } - count = 10 - zoomimg(e) { - if(this.count != 1 || e.wheelDelta >= 120){ - if(e.wheelDelta >= 120){ - this.count++ - }else{ - this.count-- - } - } - e.srcElement.style.zoom = this.count + '0%' - e.srcElement.style.maxWidth = null - e.srcElement.style.maxHeight = null + ok(){ + this.dialogRef.close({ + id:this.selectedNodeId, + name:this.selectedNodeName + }) } - -} +} \ No newline at end of file diff --git a/src/app/ui/collection-tools/viewdetails.html b/src/app/ui/collection-tools/viewdetails.html deleted file mode 100644 index 76638c2..0000000 --- a/src/app/ui/collection-tools/viewdetails.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
- clear -
- -
-
- -
-
- -
-
-
\ No newline at end of file diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index c3c5fcd..81d6c1c 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -76,7 +76,7 @@ import { EditGroup } from './unit-information/editgroup.component'; import { EnterpriseuserComponent,seeenterpriseuser,editenterpriseuser } from './enterpriseuser/enterpriseuser.component'; import { AddEnterpriserUser } from './enterpriseuser/addenterpriseuser.component'; import { FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent } from './fire-fighting-facilities-formwork/fire-fighting-facilities-formwork.component'; -import { CollectionToolsComponent, CreateBuilding, EditBuilding, ViewDetails } from './collection-tools/collection-tools.component'; +import { CollectionToolsComponent, CreateBuilding, EditBuilding, Organization } from './collection-tools/collection-tools.component'; import { WorkingAreaComponent } from '../working-area/working-area.component'; import {leftFunctionalDomainComponent,editPlaneFigureComponent,addDisposalNodeComponent,editDisposalNodeComponent,addBGCDisposalNodeComponent} from './collection-tools/leftFunctionalDomain' import { saveOneDialog, saveTwoDialog } from './collection-tools/save'; @@ -85,7 +85,7 @@ import { editPlaneFigureComponentPlan, leftFunctionalDomainComponentPlan } from import {CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding} from './collection-tools-building/collection-tools.component' import {leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent} from './collection-tools-building/leftFunctionalDomain' @NgModule({ - declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,ViewDetails,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent], + declarations: [UiComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,TimePipe,CreateNewUser,EditNewUser,allRoles,EditRole,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, EnterpriseuserComponent,AddEnterpriserUser,addUnitAttributeComponent,editUnitAttribute,seeenterpriseuser,editenterpriseuser, FireFightingFacilitiesFormworkComponent,addFireFightingFacilitiesFormworkComponent,editFireFightingFacilitiesFormworkComponent,addBuiltInComponent,addBuiltInAttributeComponent,addOptionalComponent,addOptionalAttributeComponent,editBuiltInAttributeComponent,editOptionalAttributeComponent, CollectionToolsComponent,WorkingAreaComponent,CreateBuilding,EditBuilding,leftFunctionalDomainComponent,editPlaneFigureComponent,saveOneDialog,saveTwoDialog,addDisposalNodeComponent,editDisposalNodeComponent,CollectionToolsPlanComponent,CreateBuildingPlan,EditBuildingPlan,leftFunctionalDomainComponentPlan,editPlaneFigureComponentPlan,addOffices,editOffices,addBGCDisposalNodeComponent,CollectionToolsBuildingComponent,CreateBuildingBuilding,EditBuildingBuilding,leftFunctionalDomainBuildingComponent,editPlaneFigureBuildingComponent,Organization], imports: [ CommonModule, diff --git a/src/styles.scss b/src/styles.scss index 1c8dd97..91fa3f2 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -206,4 +206,9 @@ table td.mat-footer-cell:last-of-type{ .clusterImgCollection{ width:30px; height:30px; +} +#unitBasicInfo{ + .mat-expansion-indicator::after{ + color: black; + } } \ No newline at end of file