chenjingyu 4 years ago
parent
commit
f4d4f41418
  1. 19
      src/app/canvas-share-data.service.ts
  2. 2
      src/app/data-collection/fire-force/fire-force.component.ts
  3. 2
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  4. 16
      src/app/data-collection/water-collection/water-collection.component.html
  5. 2
      src/app/data-collection/water-collection/water-collection.component.scss
  6. 59
      src/app/data-collection/water-collection/water-collection.component.ts
  7. 4
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  8. 36
      src/app/key-unit/allaround/allaround.component.html
  9. 2
      src/app/key-unit/allaround/allaround.component.ts
  10. 2
      src/app/key-unit/basicinfo/basicinfo.component.html
  11. 54
      src/app/key-unit/basicinfo/basicinfo.component.ts
  12. 2
      src/app/key-unit/edit-plan-info/edit-plan-info.component.html
  13. 95
      src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html
  14. 1
      src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts
  15. 95
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html
  16. 1
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts
  17. 1
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  18. 2
      src/app/key-unit/view-unit-details/view-unit-details.component.html
  19. 33
      src/app/ui/collection-tools-building/collection-tools.component.ts
  20. 2
      src/app/ui/collection-tools-plan/collection-tools.component.ts
  21. 10
      src/app/ui/collection-tools/collection-tools.component.ts
  22. 46
      src/app/ui/collection-tools/save.ts
  23. 2
      src/app/ui/collection-tools/saveTwo.html
  24. 4
      src/styles.scss

19
src/app/canvas-share-data.service.ts

@ -23,23 +23,24 @@ export class CanvasShareDataService {
selectTemplateData: any; // 选择当前 模板数据
// 总平面图/建筑 楼层
selectStorey: any = { area: '', details: '' }; // 选择当前 楼层 数据
originalcompanyBuildingData: any; // 单位/建筑 数据
originaleveryStoreyData: any; // 总平面图/楼层/区域 楼层数据
selectStorey:any = {area: '', details: ''}; // 选择当前 楼层 数据
originalcompanyBuildingData:any; // 单位/建筑 数据
originaleveryStoreyData:any; // 总平面图/楼层/区域 楼层数据
// 总平面图/建筑 楼层
// 处置 节点
allDisposalNode: any = []; // 所有 处置节点
allNodeMarkers: any = { highlightMarkers: {}, markers: {} }; // 灾情 标签信息
selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点
selectPanelPointBaseData: any = { description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: '' }; // 当前 数据节点 对应 父级节点
customizeDisposalNode: any; // 新建 自定义数据节点 底图+名称
allDisposalNode:any = []; // 所有 处置节点
allNodeMarkers:any = { highlightMarkers:{}, markers:{} }; // 灾情 标签信息
selectPanelPoint:DisposalNodeData = new DisposalNodeData(); // 当前数据节点
selectPanelPointBaseData:any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 对应 父级节点
isInheritSky:any; //缓存 节点 天气
customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称
// 处置 节点
/**
*
*/
gameMode: GameMode = GameMode.BasicInformation;
gameMode:GameMode = GameMode.BasicInformation;
facilityAssetsName = new Map<string, string>([
['消防水池', '消防水池'],

2
src/app/data-collection/fire-force/fire-force.component.ts

@ -118,7 +118,7 @@ export class FireForceComponent implements OnInit {
};
var _renderMarker = (context)=> {
var content = `<img class='clusterImgCollection' src="${context.data[0].image}" alt="">`;
var offset = new AMap.Pixel(-12.5, -12.5);
var offset = new AMap.Pixel(-15, -15);
context.marker.setContent(content)
context.marker.setOffset(offset)
}

2
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -148,7 +148,7 @@ export class LinkageForcesComponent implements OnInit {
};
var _renderMarker = (context)=> {
var content = `<img class='clusterImgCollection' src="${context.data[0].image}" alt="">`;
var offset = new AMap.Pixel(-12.5, -12.5);
var offset = new AMap.Pixel(-15, -15);
context.marker.setContent(content)
context.marker.setOffset(offset)
}

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

@ -79,13 +79,17 @@
</div>
</div>
<div class="btnbox">
<span class="state" *ngIf="waterData.verifyState == 3">(待审核)</span>
<span class="state" style="color: rgb(92, 214, 78);" *ngIf="waterData.verifyState == 4">(审核通过)</span>
<span class="state" *ngIf="waterData.verifyState == 5">(审核驳回)</span>
<span class="state" *ngIf="waterData.contentVerify && waterData.contentVerify.verifyState == 3">(
<span *ngIf="waterData.contentVerify.operation == 2" style="color: red;">删除</span>
<span *ngIf="waterData.contentVerify.operation == 0" >新增</span>
<span *ngIf="waterData.contentVerify.operation == 1" >更新</span>
待审核)</span>
<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.verifyState != 3 && waterData.verifyState != 4" (click)="submitAudit()"><mat-icon>open_in_browser</mat-icon>提交审核</span>
<span class="state" *ngIf="waterData.verifyState == 3 || waterData.verifyState == 4" (click)="cancelAudit()">撤销审核</span>
<span class="save state" *ngIf="waterData.verifyState == 5 || waterData.verifyState != 3 && waterData.verifyState != 4" (click)="save()"><mat-icon>save</mat-icon>保存</span>
<span class="submitAudit" *ngIf="!waterData.contentVerify || waterData.contentVerify.verifyState == 5" (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="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div>
</div>

2
src/app/data-collection/water-collection/water-collection.component.scss

@ -252,7 +252,7 @@
}
}
span:hover{
text-decoration: underline;
// text-decoration: underline;
}
.state{
margin-right:30px;

59
src/app/data-collection/water-collection/water-collection.component.ts

@ -106,7 +106,7 @@ export class WaterCollectionComponent implements OnInit {
var _renderMarker = (context)=> {
var content = `<img class='clusterImgCollection' src="${context.data[0].image}" alt="">`;
context.marker.setContent(content)
var offset = new AMap.Pixel(-12.5, -12.5);
var offset = new AMap.Pixel(-15, -15);
context.marker.setOffset(offset)
}
this.cluster = new AMap.MarkerCluster(this.map, markerArrcluster, {
@ -244,16 +244,34 @@ export class WaterCollectionComponent implements OnInit {
e.stopPropagation()
let isDelete = window.confirm('确定要删除此条水源信息吗')
if(isDelete){
this.http.delete(`/api/WaterSources/${item.id}`).subscribe(data => {
const config = new MatSnackBarConfig();
// this.http.delete(`/api/WaterSources/${item.id}`).subscribe(data => {
// const config = new MatSnackBarConfig();
// config.verticalPosition = 'top';
// config.duration = 3000
// this.addWaterListData.items = this.addWaterListData.items.filter(x => {
// return item.id != x.id
// })
// this.dataLength = this.dataLength - 1
// this.snackBar.open('删除成功','确定',config);
// })
let body = {
title: item.name,
operation: 2,//删除操作方式
contentType: 12,//水源类型
itemId: item.id,
verifyState: 3,
}
this.http.post('/api/ContentVerifies',body).subscribe((data) => {
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.addWaterListData.items = this.addWaterListData.items.filter(x => {
return item.id != x.id
})
this.dataLength = this.dataLength - 1
// this.getAllWaterData()
this.snackBar.open('删除成功','确定',config);
this.snackBar.open('删除审核提交成功','确定',config);
this.addWaterListData.items.forEach(element => {
if(element.id == item.id){
element.contentVerify = data
}
});
})
}
}
@ -435,24 +453,37 @@ export class WaterCollectionComponent implements OnInit {
submitAudit(){
let isTrue = window.confirm('请确认保存后提交审核,否则将无法审核最新内容,是否继续?')
if(isTrue){
console.log('提交审核的水源',this.waterData)
// console.log('提交审核的水源',this.waterData)
let body = {
title: this.waterData.name,
operation: this.waterData.verifyState == -1 ? 0 : 1,//操作方式
operation: this.waterData.contentVerify ? 1 : 0,//操作方式
contentType: 12,//水源类型
itemId: this.waterData.id,
verifyState: 3,
}
this.http.post('/api/ContentVerifies',body).subscribe((data) => {
console.log('提交成功',data)
this.waterData.verifyState = 3
this.waterData.contentVerify = data
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('提交成功','确定',config);
})
}
}
//撤销审核
cancelAudit(){
let isTrue = window.confirm('您确认要撤销该审核吗?')
if(isTrue){
// console.log('撤销审核的水源',this.waterData)
this.http.delete(`/api/ContentVerifies/${this.waterData.contentVerify.id}`).subscribe((data) => {
this.waterData.contentVerify = null
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('撤销成功','确定',config);
})
}
}
//关闭
close(){

4
src/app/gis-management/gis-labeling/gis-labeling.component.ts

@ -274,7 +274,7 @@ export class GisLabelingComponent implements OnInit {
};
var _renderMarker = (context)=> {
var content = `<img class='clusterImg' src="${context.data[0].image}" alt="">`;
var offset = new AMap.Pixel(-15, -25);
var offset = new AMap.Pixel(-15, -15);
context.marker.setContent(content)
context.marker.setOffset(offset)
}
@ -480,7 +480,7 @@ export class GisLabelingComponent implements OnInit {
};
var _renderMarker = (context)=> {
var content = `<img class='clusterImgCollection' src="${context.data[0].image}" alt="">`;
var offset = new AMap.Pixel(-12.5, -12.5);
var offset = new AMap.Pixel(-15, -15);
context.marker.setContent(content)
context.marker.setOffset(offset)
}

36
src/app/key-unit/allaround/allaround.component.html

@ -1,39 +1,41 @@
<div class="content">
<mat-tab-group style="height: 100%;">
<mat-tab label="{{item.name}}" *ngFor="let item of AllBuilding">
<mat-tab label="单位毗邻">
<div class="allImgs">
<div class="imgBox" *ngFor="let items of item.allImgs">
<div class="fixedImg" *ngIf="items.imageUrls.length">
<img [src]="items.imgURL" onerror="javascript:this.src='../../../assets/images/upload.png'" (click)='imgdetails(items.imageUrls)'>
<div class="imgBox" *ngFor="let item of AllAdjoining" >
<div class="fixedImg" *ngIf="item.imageUrls.length">
<img [src]="item.imgURL" onerror="javascript:this.src='../../../assets/images/upload.png'" (click)='imgdetails(item.imageUrls)'>
</div>
<div class="fixedImg" *ngIf="!item.imageUrls.length">
<img src="../../../assets/images/upload.png" (click)='imgdetails(item.imageUrls)'>
</div>
<div class="fixedImg" *ngIf="!items.imageUrls.length"><img src="../../../assets/images/upload.png" (click)='imgdetails(items.imageUrls)'></div>
<div style="margin-top: 5px;">
<label style="margin-left: 25px;">建筑物名称:</label>
<label style="margin-left: 25px;">{{items.name}}</label>
<label style="margin-left: 25px;">{{item.name}}</label>
</div>
<div style="margin-top: 5px;">
<label style="margin-left: 25px;">建筑物方向:</label>
<label style="margin-left: 25px;">
<label *ngIf="items.direction==0"></label>
<label *ngIf="items.direction==1">西</label>
<label *ngIf="items.direction==2"></label>
<label *ngIf="items.direction==3"></label>
<label *ngIf="items.direction==4">东南</label>
<label *ngIf="items.direction==5">西南</label>
<label *ngIf="items.direction==6">东北</label>
<label *ngIf="items.direction==7">西北</label>
<label *ngIf="item.direction==0"></label>
<label *ngIf="item.direction==1">西</label>
<label *ngIf="item.direction==2"></label>
<label *ngIf="item.direction==3"></label>
<label *ngIf="item.direction==4">东南</label>
<label *ngIf="item.direction==5">西南</label>
<label *ngIf="item.direction==6">东北</label>
<label *ngIf="item.direction==7">西北</label>
</label>
</div>
<div style="margin-top: 5px;">
<label style="margin-left: 25px;">图片数量:</label>
<label style="margin-left: 25px;" *ngIf="items.imageUrls.length">{{items.imageUrls.length}}张</label>
<label style="margin-left: 25px;" *ngIf="!items.imageUrls.length">0张</label>
<label style="margin-left: 25px;" *ngIf="item.imageUrls.length">{{item.imageUrls.length}}张</label>
<label style="margin-left: 25px;" *ngIf="!item.imageUrls.length">0张</label>
</div>
</div>
<p style="width: 100%;text-align: center;margin-top: 25px;" *ngIf="!item.allImgs.length">暂无数据,请前往平面图进行相关数据录入</p>
<p style="width: 100%;text-align: center;margin-top: 25px;" *ngIf="!AllAdjoining.length">暂无数据,请前往平面图进行相关数据录入</p>
</div>
</mat-tab>

2
src/app/key-unit/allaround/allaround.component.ts

@ -17,7 +17,7 @@ export class AllaroundComponent implements OnInit {
constructor(private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,private route:ActivatedRoute,) { }
ngOnInit(): void {
this.getAllBuilding()
this.getAllCompany()
}
AllAdjoining:any = []; //所有单位毗邻

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

@ -112,7 +112,7 @@
<mat-spinner *ngIf="isspinner" diameter= 50></mat-spinner>
</div>
<div class="image" (click)="closeorganizationbox()">
<input id="selectedfile" type="file" ng2FileSelect [uploader]="uploader" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
<input id="selectedfile" type="file" ng2FileSelect [uploader]="uploader" (change)="filechange($event)" name="imgFile" accept=".jpg,.png,.jpeg">
</div>
<div class="addbtn">
<button type="submit" color="primary" class="submit1" mat-button mat-raised-button>保存</button>

54
src/app/key-unit/basicinfo/basicinfo.component.ts

@ -19,6 +19,7 @@ import * as _ from 'lodash';
import Swiper from 'swiper';
import { LookMaster } from './lookmaster.component'
import { ActivatedRoute } from '@angular/router';
import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service';
declare var AMap: any;
@Component({
@ -81,7 +82,7 @@ export class BasicinfoComponent implements OnInit {
buildingCustomData:any //存储当前建筑的自定义信息
allunittype: any //所有单位类型
allorganizing:any = [] //所有组织机构
constructor(private route:ActivatedRoute,private elementRef: ElementRef,public renderer2: Renderer2,private http: HttpClient, private tree: TreeService, private sanitizer: DomSanitizer, public dialog: MatDialog,public snackBar: MatSnackBar) { }
constructor(private tabbarService: TabbarAndScoreService,private route:ActivatedRoute,private elementRef: ElementRef,public renderer2: Renderer2,private http: HttpClient, private tree: TreeService, private sanitizer: DomSanitizer, public dialog: MatDialog,public snackBar: MatSnackBar) { }
houses: any = [] //存储当前单位的建筑信息
unitId : any //当前单位id
@ -103,7 +104,9 @@ export class BasicinfoComponent implements OnInit {
element.data = []
});
this.houses = data
this.getBuildingInfo()
if(this.houses.length != 0){
this.getBuildingInfo()
}
})
}
@ -408,7 +411,7 @@ export class BasicinfoComponent implements OnInit {
async data => {
if(data){
this.houses.push(data)
// console.log('新增了',this.houses)
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
}
}
);
@ -513,9 +516,12 @@ export class BasicinfoComponent implements OnInit {
selectedTabChange(e){
// console.log(e)
this.selectedBuildingIndex = e.index
if((this.houses[this.selectedBuildingIndex].data && !this.houses[this.selectedBuildingIndex].data.length) || !this.houses[this.selectedBuildingIndex].data){
this.getBuildingInfo()
if(this.houses.length != 0){
if((this.houses[this.selectedBuildingIndex].data && !this.houses[this.selectedBuildingIndex].data.length) || !this.houses[this.selectedBuildingIndex].data){
this.getBuildingInfo()
}
}
}
//表格加一行
addline(ele){
@ -660,11 +666,30 @@ export class BasicinfoComponent implements OnInit {
image.src = reader.result
}
setTimeout(() => {
if(image.width>=4096 || image.height>=5000 ){
if(this.file.type.indexOf('image') == -1){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请上传图片','确定',config);
if((<HTMLInputElement>document.getElementById('selectedfile'))){
(<HTMLInputElement>document.getElementById('selectedfile')).value = null //清空input框缓存
}
}else if(this.file.name.toLowerCase().indexOf('png') == -1 && this.file.name.toLowerCase().indexOf('jpg') == -1 && this.file.name.toLowerCase().indexOf('jpeg') == -1){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请上传图片后缀为png,jpg,jpeg的文件','确定',config);
if((<HTMLInputElement>document.getElementById('selectedfile'))){
(<HTMLInputElement>document.getElementById('selectedfile')).value = null //清空input框缓存
}
}else if(image.width>=4096 || image.height>=5000 ){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择分辨率小于4096*5000的图片','确定',config);
if((<HTMLInputElement>document.getElementById('selectedfile'))){
(<HTMLInputElement>document.getElementById('selectedfile')).value = null //清空input框缓存
}
}else{
if(this.file){
this.startUploading()
@ -799,9 +824,9 @@ export class BasicinfoComponent implements OnInit {
config.duration = 3000
this.snackBar.open('删除成功','确定',config);
this.houses.splice(this.houses.findIndex(items=>items==item),1)
let obj ={index:key}
this.selectedTabChange(obj)
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
})
}
}
@ -856,15 +881,20 @@ export class BasicinfoComponent implements OnInit {
}
]
}
this.http.post("/api/Buildings",addbody).subscribe(data=>{//首先创建建筑成功了,需要刷出当前建筑类型的模板
this.http.post("/api/Buildings",addbody,{params:{
companyId : this.unitId
}}).subscribe(data=>{//首先创建建筑成功了,需要刷出当前建筑类型的模板
// alert('创建主体建筑成功')
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
this.getUnitAllBuildings()
})
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
}else{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('保存成功','确定',config);
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
}
}),
err=>{
@ -1030,12 +1060,14 @@ export class BasicinfoComponent implements OnInit {
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('建筑信息保存成功','确定',config);
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
},
err=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请检查输入数据是否有误','确定',config);
this.snackBar.open('建筑信息保存失败','确定',config);
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
})
//保存建筑自定义信息
@ -1044,7 +1076,7 @@ export class BasicinfoComponent implements OnInit {
companyId :this.unitId,
buildingId:item.id
}}).subscribe(data=>{
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
})
}else{
item.customData.customProperties = []
@ -1052,7 +1084,7 @@ export class BasicinfoComponent implements OnInit {
companyId :this.unitId,
buildingId:item.id
}}).subscribe(data=>{
this.tabbarService.sendMessage('changeScore');//通知服务改变分数
})
}

2
src/app/key-unit/edit-plan-info/edit-plan-info.component.html

@ -12,7 +12,7 @@
<app-collection-tools-plan></app-collection-tools-plan>
</ng-template>
</mat-tab>
<mat-tab label="3.平面图">
<mat-tab label="3.平面图">
<ng-template matTabContent>
<app-collection-tools-building></app-collection-tools-building>
</ng-template>

95
src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html

@ -1,6 +1,101 @@
<div class="content">
<mat-tab-group>
<mat-tab label="单位消防设施">
<div class="contentBox">
<p style="width: 100%; margin: 30px auto; text-align: center;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyBuiltInGrouping;let key = index">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;">
<!-- <mat-icon title="创建" (click)='addCompanyGrouping(item)'>add_circle_outline</mat-icon>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyGrouping(item)'>description</mat-icon>
<mat-icon title="删除" style="margin-left: 25px;" (click)='deleteCompanyGrouping(item)'>delete</mat-icon> -->
</div>
<div>
<mat-accordion multi>
<mat-expansion-panel disabled>
<mat-expansion-panel-header>
<label class="firstContent"></label>
<label class="textContent">项目</label>
<label class="textContent">照片</label>
<label class="totalContent">总数</label>
<label class="lastTextContent">主要情况</label>
</mat-expansion-panel-header>
</mat-expansion-panel>
<mat-expansion-panel *ngFor="let items of item.facilityItems" disabled [expanded]=items.expanded>
<mat-expansion-panel-header>
<label class="firstContent">
<mat-checkbox (change)='checkedCompany($event,item,items)' [disabled]='items.isBuiltin'></mat-checkbox>
</label>
<label class="textContent">{{items.name}}</label>
<label class="textContent"><a href="javascript:void(0)" (click)='previewImg(items)'>查看图片</a></label>
<label class="totalContent">{{items.total ? items.total : '总数: 0'}}</label>
<label class="lastTextContent">
<textarea readonly maxlength="250" [(ngModel)]="items.details" style="width: 80%;"></textarea>
</label>
<label><mat-icon (click)='SwitchBoard(items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label>
</mat-expansion-panel-header>
<div class="overflowTable">
<div class="detailsTable">
<table>
<tr>
<th *ngFor="let header of items.header">{{header}}</th>
</tr>
<tr *ngFor="let body of items.body">
<td *ngFor="let header of items.header">{{body[header]? body[header] : '暂无数据'}}</td>
</tr>
</table>
</div>
<div *ngFor="let tableMsg of items.loopTable" class="detailsTable">
<p style="text-align: center; font-size: 16px; margin: 5px 0;">楼层/区域名称: {{tableMsg.name? tableMsg.name: '暂无名称'}}</p>
<table>
<tr>
<th *ngFor="let header of tableMsg.header">{{header}}</th>
</tr>
<tr *ngFor="let body of tableMsg.body">
<td *ngFor="let header of tableMsg.header">{{body[header]? body[header] : '暂无数据'}}</td>
</tr>
</table>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyOptionalGrouping;let key = index">
<mat-accordion multi>
<mat-expansion-panel>
<mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<!-- <mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyOptional($event,item)'>description</mat-icon> -->
</mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField">
<label>{{items.propertyName}}:</label>
<input readonly type="text" *ngIf="items.propertyType!=1&&items.propertyType!=2&&items.propertyType!=4&&items.propertyType!=6"
[(ngModel)]="items.propertyValue" name="propertyValue">
<textarea readonly maxlength="250" *ngIf="items.propertyType==1" [(ngModel)]="items.propertyValue" name="propertyValue"></textarea>
<input readonly type="number" *ngIf="items.propertyType==2 ||items.propertyType==4" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-group *ngIf="items.propertyType==6" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-button style="margin-left: 5px;" [value]='radio.value' *ngFor="let radio of singleElection">{{radio.name}}</mat-radio-button>
</mat-radio-group>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
</mat-tab>
<mat-tab label="{{newItem.name}}" *ngFor="let newItem of allBuildingGrouping">
<div class="contentBox">

1
src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts

@ -21,6 +21,7 @@ export class FireFightingDeviceLookComponent implements OnInit {
constructor(private router:Router,private route:ActivatedRoute,public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
this.getCompanyInformation()
this.getAllBuilding()
}

95
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.html

@ -1,6 +1,101 @@
<div class="content">
<mat-tab-group>
<mat-tab label="单位消防设施">
<div class="contentBox">
<p style="width: 100%; margin: 30px auto; text-align: center;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyBuiltInGrouping;let key = index">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;">
<mat-icon title="创建" (click)='addCompanyGrouping(item)'>add_circle_outline</mat-icon>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyGrouping(item)'>description</mat-icon>
<mat-icon title="删除" style="margin-left: 25px;" (click)='deleteCompanyGrouping(item)'>delete</mat-icon>
</div>
<div>
<mat-accordion multi>
<mat-expansion-panel disabled>
<mat-expansion-panel-header>
<label class="firstContent"></label>
<label class="textContent">项目</label>
<label class="textContent">照片</label>
<label class="totalContent">总数</label>
<label class="lastTextContent">主要情况</label>
</mat-expansion-panel-header>
</mat-expansion-panel>
<mat-expansion-panel *ngFor="let items of item.facilityItems" disabled [expanded]=items.expanded>
<mat-expansion-panel-header>
<label class="firstContent">
<mat-checkbox (change)='checkedCompany($event,item,items)' [disabled]='items.isBuiltin'></mat-checkbox>
</label>
<label class="textContent">{{items.name}}</label>
<label class="textContent"><a href="javascript:void(0)" (click)='previewImg(items)'>查看图片</a></label>
<label class="totalContent">{{items.total ? items.total : '总数: 0'}}</label>
<label class="lastTextContent">
<textarea maxlength="250" [(ngModel)]="items.details" style="width: 80%;"></textarea>
</label>
<label><mat-icon (click)='SwitchBoard(items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label>
</mat-expansion-panel-header>
<div class="overflowTable">
<div class="detailsTable">
<table>
<tr>
<th *ngFor="let header of items.header">{{header}}</th>
</tr>
<tr *ngFor="let body of items.body">
<td *ngFor="let header of items.header">{{body[header]? body[header] : '暂无数据'}}</td>
</tr>
</table>
</div>
<div *ngFor="let tableMsg of items.loopTable" class="detailsTable">
<p style="text-align: center; font-size: 16px; margin: 5px 0;">楼层/区域名称: {{tableMsg.name? tableMsg.name: '暂无名称'}}</p>
<table>
<tr>
<th *ngFor="let header of tableMsg.header">{{header}}</th>
</tr>
<tr *ngFor="let body of tableMsg.body">
<td *ngFor="let header of tableMsg.header">{{body[header]? body[header] : '暂无数据'}}</td>
</tr>
</table>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyOptionalGrouping;let key = index">
<mat-accordion multi>
<mat-expansion-panel>
<mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<mat-icon title="保存" style="margin-left: 25px;" (click)='editCompanyOptional($event,item)'>description</mat-icon>
</mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField">
<label>{{items.propertyName}}:</label>
<input type="text" *ngIf="items.propertyType!=1&&items.propertyType!=2&&items.propertyType!=4&&items.propertyType!=6"
[(ngModel)]="items.propertyValue" name="propertyValue">
<textarea maxlength="250" *ngIf="items.propertyType==1" [(ngModel)]="items.propertyValue" name="propertyValue"></textarea>
<input type="number" *ngIf="items.propertyType==2 ||items.propertyType==4" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-group *ngIf="items.propertyType==6" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-button style="margin-left: 5px;" [value]='radio.value' *ngFor="let radio of singleElection">{{radio.name}}</mat-radio-button>
</mat-radio-group>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
</mat-tab>
<mat-tab label="{{newItem.name}}" *ngFor="let newItem of allBuildingGrouping">
<div class="contentBox">

1
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts

@ -22,6 +22,7 @@ export class FireFightingDeviceComponent implements OnInit {
constructor(private tabbarService: TabbarAndScoreService,private router:Router,private route:ActivatedRoute,public http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
this.getCompanyInformation()
this.getAllBuilding()
}

1
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -478,6 +478,7 @@ export class KeyUnitManagementComponent implements OnInit {
if(item.id == selectedunitArr[0]){
let companyName = item.name
sessionStorage.setItem("companyName",companyName)
sessionStorage.setItem("companyId",item.id)
}
});
sessionStorage.setItem("editable","1")

2
src/app/key-unit/view-unit-details/view-unit-details.component.html

@ -9,7 +9,7 @@
<app-collection-tools-plan></app-collection-tools-plan>
</ng-template>
</mat-tab>
<mat-tab label="3.平面图">
<mat-tab label="3.平面图">
<ng-template matTabContent>
<app-collection-tools-building></app-collection-tools-building>
</ng-template>

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

@ -1502,7 +1502,7 @@ export class CollectionToolsBuildingComponent implements OnInit {
// }
for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组
let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId )
if (!noMatch) {
if (!noMatch && storeyData.data[key].Id != "图例") {
this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key])
}
}
@ -1706,19 +1706,26 @@ export class CollectionToolsBuildingComponent implements OnInit {
//新增平面图 楼层/区域
foundPanel (e) {
e.stopPropagation()
let data = {
isBuilding: this.checkedBuildingIndex==-1? false:true,
Panel: this.beforeOneCheckedBuilding,
order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0,
}
let dialogRef = this.dialog.open(leftFunctionalDomainBuildingComponent,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
this.renovateSitePlan()
} else if (data =='建筑') {
this.renovateBuilding()
if (this.beforeOneCheckedBuilding.id) {
let data = {
isBuilding: this.checkedBuildingIndex==-1? false:true,
Panel: this.beforeOneCheckedBuilding,
order: this.sitePlanData.length? this.sitePlanData[this.sitePlanData.length-1].order+1:0,
}
})
let dialogRef = this.dialog.open(leftFunctionalDomainBuildingComponent,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data =='总平面图') {
this.renovateSitePlan()
} else if (data =='建筑') {
this.renovateBuilding()
}
})
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择建筑','确定',config);
}
}
//编辑平面图 楼层/区域

2
src/app/ui/collection-tools-plan/collection-tools.component.ts

@ -1513,7 +1513,7 @@ export class CollectionToolsPlanComponent implements OnInit {
// }
// for(let key in storeyData.data){ //筛选数据 没有匹配全部放入到 其他 数组
// let noMatch = this.allFireElements.find( every=> every.id===storeyData.data[key].FireElementId )
// if (!noMatch) {
// if (!noMatch && storeyData.data[key].Id != "图例") {
// this.allFireElements[this.allFireElements.length-1].children.push(storeyData.data[key])
// }
// }

10
src/app/ui/collection-tools/collection-tools.component.ts

@ -641,7 +641,7 @@ export class CollectionToolsComponent implements OnInit {
firstMultipleAssetData:any//当前多选的第一个素材
ngOnInit(): void {
let _this = this
this.canvasData.isInheritSky = { weather:'', airTemperature:'', windDirection:'', windScale:'', }; //缓存 节点 天气
AxMessageSystem.addListener('selectionChanged', ()=>{
if(this.canvas.selection.size() == 1){//如果是单选
@ -2320,10 +2320,10 @@ export class CollectionToolsComponent implements OnInit {
e.stopPropagation()
let dialogRef = this.dialog.open(addBGCDisposalNodeComponent);
dialogRef.afterClosed().subscribe(data=>{
if (data) {
if (data) {
this.canvasData.customizeDisposalNode = data //自定义数据节点
let imgURL = window.URL.createObjectURL(data.file) //将图片生成 url地址
this.canvasData.selectPanelPointBaseData = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''} //更新 当前数据节点对应父级节点
// this.canvasData.selectPanelPointBaseData = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''} //更新 当前数据节点对应父级节点
this.selectDisposalNode = ''
this.canvasData.selectPanelPoint = new DisposalNodeData() //更新 当前数据节点
this.canvasData.selectPanelPoint.BackgroundImageUrl = imgURL
@ -2349,6 +2349,10 @@ export class CollectionToolsComponent implements OnInit {
disasterId: this.allFirePlan[0].id || '',
parentId: item? item.id : null,
planComponentId: sessionStorage.getItem('planId') || '',
weather: this.canvasData.isInheritSky.weather,
airTemperature: Number(this.canvasData.isInheritSky.airTemperature),
windDirection: Number(this.canvasData.isInheritSky.windDirection),
windScale: Number(this.canvasData.isInheritSky.windScale),
}
let dialogRef = this.dialog.open(addDisposalNodeComponent,{data});
dialogRef.afterClosed().subscribe(data=>{

46
src/app/ui/collection-tools/save.ts

@ -85,10 +85,18 @@ export class saveOneDialog {
}
})
})
//保存到已有节点 自动选择父节点
if (this.data.type == 'old' && this.canvasData.selectPanelPointBaseData.id) {
this.selectedOld = this.canvasData.selectPanelPointBaseData.id
let item = this.allPlanDisposalNode.find(item=>{ return item.id === this.canvasData.selectPanelPointBaseData.id })
this.clickNode(item)
}
}
onNoClick(): void {
this.dialogRef.close();
}
selectedOld:any; //当前选中的要保存到的父节点ID
nodeItem:any//当前选中的要保存到的父节点
itemChildNum = 0 //点击处置节点子数据节点的数量(赋值order)
clickNode(item){
@ -140,12 +148,18 @@ export class saveOneDialog {
if(type == 'old'){
let istrue = this.canvasData.findDisposalNode(this.nodeItem.id,name)
let putdata = this.nodeItem
putdata.weather = this.canvasData.selectPanelPointBaseData.weather
putdata.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
putdata.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
putdata.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
putdata.description = this.canvasData.selectPanelPointBaseData.description
putdata.notes = this.canvasData.selectPanelPointBaseData.notes
if (!this.canvasData.selectPanelPointBaseData.weather && !this.canvasData.selectPanelPointBaseData.airTemperature && !this.canvasData.selectPanelPointBaseData.windScale && !this.canvasData.selectPanelPointBaseData.windDirection) { //继承 天气
this.canvasData.selectPanelPointBaseData.weather = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.weather))
this.canvasData.selectPanelPointBaseData.airTemperature = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.airTemperature))
this.canvasData.selectPanelPointBaseData.windScale = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windScale))
this.canvasData.selectPanelPointBaseData.windDirection = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windDirection))
}
putdata.weather = this.canvasData.selectPanelPointBaseData.weather
putdata.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
putdata.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
putdata.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
putdata.description = this.canvasData.selectPanelPointBaseData.description
putdata.notes = this.canvasData.selectPanelPointBaseData.notes
if(istrue){//如果该处置节点下已有同名数据节点 则只修改 2个接口
new Promise((resolve,reject)=>{
@ -178,6 +192,7 @@ export class saveOneDialog {
config.duration = 3000
this.snackBar.open('保存失败','确定',config)
})
this.cacheWeather()
this.dialogRef.close();
this.canvasData.sendMessage('send a message');//发布一条消息
}) //imgURL
@ -219,6 +234,7 @@ export class saveOneDialog {
config.duration = 3000
this.snackBar.open('保存失败','确定',config)
})
this.cacheWeather()
this.dialogRef.close();
this.canvasData.sendMessage('send a message');//发布一条消息
}) //imgURL
@ -272,10 +288,15 @@ export class saveOneDialog {
buildingId: null,
buildingAreaId: null
}
if (!this.canvasData.selectPanelPointBaseData.weather && !this.canvasData.selectPanelPointBaseData.airTemperature && !this.canvasData.selectPanelPointBaseData.windScale && !this.canvasData.selectPanelPointBaseData.windDirection) { //继承 天气
this.canvasData.selectPanelPointBaseData.weather = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.weather))
this.canvasData.selectPanelPointBaseData.airTemperature = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.airTemperature))
this.canvasData.selectPanelPointBaseData.windScale = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windScale))
this.canvasData.selectPanelPointBaseData.windDirection = JSON.parse(JSON.stringify(this.canvasData.isInheritSky.windDirection))
}
dispositionNodeData.weather = this.canvasData.selectPanelPointBaseData.weather
dispositionNodeData.airTemperature = Number(this.canvasData.selectPanelPointBaseData.airTemperature)
dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
dispositionNodeData.windScale = Number(this.canvasData.selectPanelPointBaseData.windScale)
dispositionNodeData.windDirection = Number(this.canvasData.selectPanelPointBaseData.windDirection)
dispositionNodeData.description = this.canvasData.selectPanelPointBaseData.description
dispositionNodeData.notes = this.canvasData.selectPanelPointBaseData.notes
@ -319,6 +340,7 @@ export class saveOneDialog {
config.duration = 3000
this.snackBar.open('保存失败','确定',config)
})
this.cacheWeather()
this.dialogRef.close();
this.canvasData.sendMessage("send a message")
}) //imgURL
@ -327,6 +349,14 @@ export class saveOneDialog {
}
}
//缓存节点 天气
cacheWeather () {
this.canvasData.isInheritSky.weather = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.weather))
this.canvasData.isInheritSky.airTemperature = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.airTemperature))
this.canvasData.isInheritSky.windDirection = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.windDirection))
this.canvasData.isInheritSky.windScale = JSON.parse(JSON.stringify(this.canvasData.selectPanelPointBaseData.windScale))
}
//封装方法 上传 自定义底图
uploadBGC () {
return new Promise((resolve,reject)=>{

2
src/app/ui/collection-tools/saveTwo.html

@ -34,7 +34,7 @@
<form (ngSubmit)="onSubmit(form.value,'old')" #form="ngForm" class="example-container">
<div mat-dialog-content>
<mat-form-field>
<mat-select required ngModel placeholder="父节点名称" name="nodeId">
<mat-select required [(ngModel)]="selectedOld" placeholder="父节点名称" name="nodeId">
<mat-option *ngFor="let item of allPlanDisposalNode" [value]="item.id" (click)="clickNode(item)">
{{item.name}}
</mat-option>

4
src/styles.scss

@ -204,6 +204,6 @@ table td.mat-footer-cell:last-of-type{
}
//水源采集点聚合
.clusterImgCollection{
width:25px;
height:25px;
width:30px;
height:30px;
}
Loading…
Cancel
Save