|
|
|
@ -214,7 +214,8 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
division:node.division, |
|
|
|
|
fireForceDetailId:node.fireForceDetailId, |
|
|
|
|
forceType:node.forceType, |
|
|
|
|
fireForceDetailInfo:node.fireForceDetailInfo |
|
|
|
|
fireForceDetailInfo:node.fireForceDetailInfo, |
|
|
|
|
contentVerify:node.contentVerify, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable); |
|
|
|
@ -230,6 +231,7 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
code:'' |
|
|
|
|
} |
|
|
|
|
selectTreeNode(node){ |
|
|
|
|
console.log(node) |
|
|
|
|
this.isGisTopBox = false |
|
|
|
|
if(this.selectedFireForceId != node.id){ |
|
|
|
|
this.clearData() |
|
|
|
@ -257,6 +259,7 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data:any) => { |
|
|
|
|
this.isMasklayer = false |
|
|
|
|
this.FireForceDetailInfo = data |
|
|
|
|
console.log(888,data) |
|
|
|
|
if(data.location && data.location.x){//如果已经标注单位坐标
|
|
|
|
|
this.positionLngLat = data.location |
|
|
|
|
this.map.setCenter([data.location.x,data.location.y]); |
|
|
|
@ -361,17 +364,32 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
//删除某条消防队
|
|
|
|
|
deleteFireForce(item,e){ |
|
|
|
|
e.stopPropagation() |
|
|
|
|
console.log(this.dataSource.data) |
|
|
|
|
let isDelete = window.confirm(`确定要删除${item.name}吗`) |
|
|
|
|
if(isDelete){ |
|
|
|
|
this.http.delete(`/api/CustomFireForce/${item.id}`).subscribe(data => { |
|
|
|
|
// this.http.delete(`/api/CustomFireForce/${item.id}`).subscribe(data => {
|
|
|
|
|
// let config = new MatSnackBarConfig();
|
|
|
|
|
// config.verticalPosition = 'top';
|
|
|
|
|
// config.duration = 3000
|
|
|
|
|
// this.snackBar.open('删除成功','确定',config);
|
|
|
|
|
// this.upDateAllFireForce()
|
|
|
|
|
// if(item.id == this.selectedFireForce.id){
|
|
|
|
|
// this.selectedFireForceLevel = null
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
let body = { |
|
|
|
|
title: item.name, |
|
|
|
|
operation: 2,//删除操作方式
|
|
|
|
|
contentType: 13,//消防力量类型
|
|
|
|
|
itemId: item.id, |
|
|
|
|
verifyState: 3, |
|
|
|
|
} |
|
|
|
|
this.http.post('/api/ContentVerifies',body).subscribe((data) => { |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('删除成功','确定',config); |
|
|
|
|
this.upDateAllFireForce() |
|
|
|
|
if(item.id == this.selectedFireForce.id){ |
|
|
|
|
this.selectedFireForceLevel = null |
|
|
|
|
} |
|
|
|
|
this.snackBar.open('删除审核提交成功','确定',config); |
|
|
|
|
item.contentVerify = data |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -523,7 +541,7 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
{PropertyName :'灭火剂总量',PropertyValue:''} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
//新增水源
|
|
|
|
|
//新增消防力量
|
|
|
|
|
selectedFireForceTypeIndex:any//新增消防力量名称
|
|
|
|
|
addFireForce(){ |
|
|
|
|
if(this.selectedFireForceId){ |
|
|
|
@ -665,6 +683,42 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//提交审核
|
|
|
|
|
submitAudit(){ |
|
|
|
|
let isTrue = window.confirm('请确认保存后提交审核,否则将无法审核最新内容,是否继续?') |
|
|
|
|
if(isTrue){ |
|
|
|
|
console.log('提交审核的消防力量',this.FireForceDetailInfo) |
|
|
|
|
let body = { |
|
|
|
|
title: this.FireForceDetailInfo.stationName, |
|
|
|
|
operation: this.selectedFireForce.contentVerify ? 1 : 0,//操作方式
|
|
|
|
|
contentType: 13,//消防力量类型
|
|
|
|
|
itemId: this.selectedFireForce.id, |
|
|
|
|
verifyState: 3, |
|
|
|
|
} |
|
|
|
|
this.http.post('/api/ContentVerifies',body).subscribe((data) => { |
|
|
|
|
this.selectedFireForce.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.selectedFireForce.contentVerify.id}`).subscribe((data) => { |
|
|
|
|
this.selectedFireForce.contentVerify = null |
|
|
|
|
let config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
this.snackBar.open('撤销成功','确定',config); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
close(){ |
|
|
|
|
this.selectedFireForceLevel = null |
|
|
|
@ -1025,7 +1079,7 @@ export class FireForceComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//新增水源弹出框
|
|
|
|
|
//新增消防力量弹出框
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'addwater', |
|
|
|
|
templateUrl: './addFireForce.html', |
|
|
|
|