chenjingyu 4 years ago
parent
commit
5e69d29f5f
  1. 4
      src/app/data-collection/fire-force/fire-force.component.html
  2. 4
      src/app/data-collection/linkage-forces/linkage-forces.component.html
  3. 4
      src/app/data-collection/water-collection/water-collection.component.html
  4. 3
      src/app/key-unit/basicinfo-look/basicinfo.component.html
  5. 9
      src/app/key-unit/basicinfo-look/basicinfo.component.ts
  6. 3
      src/app/key-unit/basicinfo/basicinfo.component.html
  7. 30
      src/app/key-unit/basicinfo/basicinfo.component.ts
  8. 4
      src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html
  9. 4
      src/app/key-unit/key-unit.module.ts
  10. 16
      src/app/plan-audit/plan-record/plan-record.component.html
  11. 10
      src/app/plan-audit/plan-record/plan-record.component.scss
  12. 28
      src/app/plan-audit/plan-record/plan-record.component.ts
  13. 2
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  14. 4
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  15. 2
      src/app/plan-management/entry-plan/entry-plan.component.ts
  16. 4
      src/app/ui/collection-tools-building/collection-tools.component.html
  17. 1
      src/app/ui/collection-tools-building/collection-tools.component.ts
  18. 31
      src/app/ui/collection-tools/changeOr.html
  19. 15
      src/app/ui/collection-tools/collection-tools.component.html
  20. 33
      src/app/ui/collection-tools/collection-tools.component.scss
  21. 121
      src/app/ui/collection-tools/collection-tools.component.ts
  22. 24
      src/app/ui/collection-tools/viewdetails.html
  23. 4
      src/app/ui/ui.module.ts
  24. 5
      src/styles.scss

4
src/app/data-collection/fire-force/fire-force.component.html

@ -150,9 +150,9 @@
<span class="state" style="color: rgb(92, 214, 78);" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 4">(审核通过)</span>
<span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 5">(审核驳回)</span>
<span class="submitAudit" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="submitAudit" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="save state" *ngIf="!selectedFireForce.contentVerify || selectedFireForce.contentVerify.verifyState == 5 || selectedFireForce.contentVerify.verifyState == 4" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>

4
src/app/data-collection/linkage-forces/linkage-forces.component.html

@ -125,9 +125,9 @@
<span class="state" style="color: rgb(92, 214, 78);" *ngIf="LinkageForceDetailInfo.contentVerify && LinkageForceDetailInfo.contentVerify.verifyState == 4">(审核通过)</span>
<span class="state" *ngIf="LinkageForceDetailInfo.contentVerify && LinkageForceDetailInfo.contentVerify.verifyState == 5">(审核驳回)</span>
<span class="submitAudit" *ngIf="!LinkageForceDetailInfo.contentVerify || LinkageForceDetailInfo.contentVerify.verifyState == 5" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="submitAudit" *ngIf="!LinkageForceDetailInfo.contentVerify || LinkageForceDetailInfo.contentVerify.verifyState == 5 || LinkageForceDetailInfo.contentVerify.verifyState == 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="LinkageForceDetailInfo.contentVerify && LinkageForceDetailInfo.contentVerify.verifyState == 3" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="!LinkageForceDetailInfo.contentVerify || LinkageForceDetailInfo.contentVerify.verifyState == 5" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="save state" *ngIf="!LinkageForceDetailInfo.contentVerify || LinkageForceDetailInfo.contentVerify.verifyState == 5 || LinkageForceDetailInfo.contentVerify.verifyState == 4" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>

4
src/app/data-collection/water-collection/water-collection.component.html

@ -87,9 +87,9 @@
<span class="state" style="color: rgb(92, 214, 78);" *ngIf="waterData.contentVerify && waterData.contentVerify.verifyState == 4">(审核通过)</span>
<span class="state" *ngIf="waterData.contentVerify && waterData.contentVerify.verifyState == 5">(审核驳回)</span>
<span class="submitAudit" *ngIf="!waterData.contentVerify || waterData.contentVerify.verifyState == 5" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="submitAudit" *ngIf="!waterData.contentVerify || waterData.contentVerify.verifyState == 5 || waterData.contentVerify.verifyState == 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="waterData.contentVerify && waterData.contentVerify.verifyState == 3" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="!waterData.contentVerify || waterData.contentVerify.verifyState == 5" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="save state" *ngIf="!waterData.contentVerify || waterData.contentVerify.verifyState == 5 || waterData.contentVerify.verifyState == 4" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>

3
src/app/key-unit/basicinfo-look/basicinfo.component.html

@ -1,11 +1,12 @@
<div style="height: 100%;display: flex; flex-direction: column;overflow: hidden;">
<!-- header -->
<mat-accordion>
<mat-accordion id="unitBasicInfo">
<mat-expansion-panel expanded>
<mat-expansion-panel-header style="color: black;">
<mat-panel-title>
单位信息
</mat-panel-title>
<button type="button" color="primary" mat-button mat-raised-button style="height: 35px; margin-right: 25px;" (click)="seeFirfightingDevice($event)">查看消防设施统计</button>
</mat-expansion-panel-header>
<div class="topbox">
<form (ngSubmit)="onSubmit(form.value,form.invalid,form)" #form="ngForm" class="example-container">

9
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: '', //单位信息名字

3
src/app/key-unit/basicinfo/basicinfo.component.html

@ -1,11 +1,12 @@
<div style="height: 100%;display: flex; flex-direction: column;overflow: hidden;">
<!-- header -->
<mat-accordion>
<mat-accordion id="unitBasicInfo">
<mat-expansion-panel expanded>
<mat-expansion-panel-header style="color: black;">
<mat-panel-title>
单位信息
</mat-panel-title>
<button type="button" color="primary" mat-button mat-raised-button style="height: 35px; margin-right: 25px;" (click)="seeFirfightingDevice($event)">查看消防设施统计</button>
</mat-expansion-panel-header>
<div class="topbox">
<form (ngSubmit)="onSubmit(form.value,form.invalid,form)" #form="ngForm" class="example-container">

30
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 = []
}

4
src/app/key-unit/basicinfo/statisticsOfFireFightingFacilities.html

@ -0,0 +1,4 @@
<div mat-dialog-title>消防设施统计</div>
<div>
<p style="margin: 5px 0; font-size: 14px;" *ngFor="let item of allFireList">{{item}}</p>
</div>

4
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,

16
src/app/plan-audit/plan-record/plan-record.component.html

@ -102,7 +102,7 @@
<td style="width: 15%;">
<!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> -->
{{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'?'重点单位':'消防车辆'}}</td>
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}</td>
<td style="width: 15%;">{{item.title}}</td>
<td style="width: 10%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.verifyOrganizationName}}</td>
@ -162,7 +162,7 @@
</ng-template>
</mat-tab>
</mat-tab-group>
<div class="word" *ngIf="showtype==0">
<div class="word" *ngIf="showtype==0">
<iframe [src]='iframeSrc'></iframe>
</div>
<div id="viewer" *ngIf="showtype==1"></div>
@ -187,5 +187,17 @@
<span style="color: #2196F3;cursor:pointer;" (click)='oopen3Dshow()'>查看详情</span>
</div>
</div>
<!-- 水源审核 -->
<div class="waterAudit" *ngIf="showtype == 12">
<app-water-audit [waterData]="waterData"></app-water-audit>
</div>
<!-- 消防力量审核 -->
<div class="fireForceAudit" *ngIf="showtype == 13">
<app-fireforce-audit [FireForceDetailInfo]="fireForceDetailInfo" [level]="postlevel"></app-fireforce-audit>
</div>
<!-- 联动力量审核 -->
<div class="LinkageForcesAudit" *ngIf="showtype == 14">
<app-linkageforces-audit [LinkageForceDetailInfo]="LinkageForceDetailInfo"></app-linkageforces-audit>
</div>
</div>
</div>

10
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{

28
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

2
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

4
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 //所有预案组件

2
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) {

4
src/app/ui/collection-tools-building/collection-tools.component.html

@ -185,9 +185,9 @@
<div *ngIf="canvasAssetObj.InteractiveMode == 0">
<p>宽度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
<input type="number" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
<p>高度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetHeight" (input)="assetHeightIunput()" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
<input type="number" class="biginput" [(ngModel)]="assetHeight" (input)="assetHeightIunput()" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
<p>角度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValue"

1
src/app/ui/collection-tools-building/collection-tools.component.ts

@ -1410,6 +1410,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
}
//所有消防要素模板变化islook值
console.log(node)
if(node.isTemplate){
this.allFireElements.forEach(item=>{
if(item.id == node.id){ item.isLook = !item.isLook }

31
src/app/ui/collection-tools/changeOr.html

@ -0,0 +1,31 @@
<div class="orBox" (mousewheel)="$event.stopPropagation()">
<div class="treebox">
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl" >
<mat-tree-node [ngClass]="{'selectedNode': node.id == selectedNodeId}" *matTreeNodeDef="let node;" matTreeNodePadding (click)="selectedNode(node)">
<button mat-icon-button disabled ></button>
{{node.name}}
</mat-tree-node>
<mat-tree-node [ngClass]="{'selectedNode': node.id == selectedNodeId}" *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)="selectedNode(node)">
<button mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
{{node.name}}
</mat-tree-node>
</mat-tree>
</div>
<div mat-dialog-actions class="btnbox" style="justify-content: center;">
<button mat-raised-button color="primary" (click)="ok()">
确定
</button>
<button mat-raised-button mat-dialog-close>
取消
</button>
</div>
</div>

15
src/app/ui/collection-tools/collection-tools.component.html

@ -308,17 +308,26 @@
</div>
<div *ngFor="let item of PropertyInfos;index as key ">
<!-- 单行文本 -->
<div *ngIf="item.PropertyType == 0">
<div *ngIf="item.PropertyType == 0 && item.PropertyName != '所属单位'">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<input type="text" class="biginput" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
</div>
<div *ngIf="item.PropertyName == '所属单位'">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<div class="orInput">
<input readonly type="text" class="biginput" [value]="item.PropertyValue" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
<div class="changeOr" (click)="changeOr()">
更换
</div>
</div>
</div>
<!-- 多行文本 -->
<div *ngIf="item.PropertyType == 1">
<div *ngIf="item.PropertyType == 1 && item.PropertyName != '所属单位'">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<textarea class="textarea" name="" id="" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)"></textarea>
</div>
<!-- 数值 -->
<div *ngIf="item.PropertyType == 2">
<div *ngIf="item.PropertyType == 2 && item.PropertyName != '所属单位'">
<p>{{item.PropertyName}}<span style="font-size: 14px;" *ngIf="item.PhysicalUnit">({{item.PhysicalUnit}})</span></p>
<input type="number" class="biginput" [value]="item.PropertyValue" (input)="assetInputChange(item,$event)" [disabled]="!isEditPattern || (canvasAssetObj.GameMode == 0 && !pattern)">
</div>

33
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;
@ -400,7 +400,7 @@ div:focus {
width: 18px;
height: 18px;
vertical-align: middle;
margin-left: 9px;
margin-left: 12px;
margin-right: 3px;
}
@ -506,4 +506,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;
}
}

121
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)
@ -2668,50 +2682,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<ViewDetails>,@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<Organization>,@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<any>(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
})
}
}
}

24
src/app/ui/collection-tools/viewdetails.html

@ -1,24 +0,0 @@
<div style="position: relative;width: 1400px;height: 800px;line-height: 800px;" class="swiper-container">
<div style="position: absolute;right: -2px;top: -392px;cursor: pointer;z-index: 999;width: 24px;height: 24px;" (click)="closeDialog()">
<span><mat-icon>clear</mat-icon></span>
</div>
<div class="swiper-wrapper">
<div class="swiper-slide" style="text-align: center;" *ngFor="let img of imagesArr">
<img id="bigimg" (mousewheel)="zoomimg($event)" style="
max-width: 96%;
max-height: 100%;
min-width: 1px;
min-height: 1px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;" [src]="img.PropertyValue" alt="">
</div>
</div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>

4
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,

5
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;
}
}
Loading…
Cancel
Save