chenjingyu 4 years ago
parent
commit
b067ccf5f6
  1. 13
      src/app/data-collection/fire-force/fire-force.component.html
  2. 7
      src/app/data-collection/fire-force/fire-force.component.scss
  3. 72
      src/app/data-collection/fire-force/fire-force.component.ts
  4. 13
      src/app/data-collection/linkage-forces/linkage-forces.component.html
  5. 7
      src/app/data-collection/linkage-forces/linkage-forces.component.scss
  6. 69
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  7. 28
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
  8. 2
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  9. 32
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts

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

@ -142,8 +142,17 @@
</a> </a>
</div> </div>
<span class="save" (click)="save()"><mat-icon>save</mat-icon>保存</span> <span class="state" *ngIf="selectedFireForce.contentVerify && selectedFireForce.contentVerify.verifyState == 3">(
<span class="submitAudit"><mat-icon>open_in_browser</mat-icon>提交审核</span> <span *ngIf="selectedFireForce.contentVerify.operation == 2" style="color: red;">删除</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 0" >新增</span>
<span *ngIf="selectedFireForce.contentVerify.operation == 1" >更新</span>
待审核)</span>
<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="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="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span> <span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div> </div>
</div> </div>

7
src/app/data-collection/fire-force/fire-force.component.scss

@ -345,10 +345,13 @@
} }
} }
span:hover{ span:hover{
text-decoration: underline; // text-decoration: underline;
}
.state{
margin-right:30px;
} }
.submitAudit{ .submitAudit{
margin: 0 30px; margin-right:30px;
} }
.close{ .close{
margin-right: 30px; margin-right: 30px;

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

@ -214,7 +214,8 @@ export class FireForceComponent implements OnInit {
division:node.division, division:node.division,
fireForceDetailId:node.fireForceDetailId, fireForceDetailId:node.fireForceDetailId,
forceType:node.forceType, forceType:node.forceType,
fireForceDetailInfo:node.fireForceDetailInfo fireForceDetailInfo:node.fireForceDetailInfo,
contentVerify:node.contentVerify,
}; };
} }
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable); treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable);
@ -230,6 +231,7 @@ export class FireForceComponent implements OnInit {
code:'' code:''
} }
selectTreeNode(node){ selectTreeNode(node){
console.log(node)
this.isGisTopBox = false this.isGisTopBox = false
if(this.selectedFireForceId != node.id){ if(this.selectedFireForceId != node.id){
this.clearData() this.clearData()
@ -257,6 +259,7 @@ export class FireForceComponent implements OnInit {
this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data:any) => { this.http.get(`/api/FireForceDetail/${type}/${node.id}`).subscribe((data:any) => {
this.isMasklayer = false this.isMasklayer = false
this.FireForceDetailInfo = data this.FireForceDetailInfo = data
console.log(888,data)
if(data.location && data.location.x){//如果已经标注单位坐标 if(data.location && data.location.x){//如果已经标注单位坐标
this.positionLngLat = data.location this.positionLngLat = data.location
this.map.setCenter([data.location.x,data.location.y]); this.map.setCenter([data.location.x,data.location.y]);
@ -361,17 +364,32 @@ export class FireForceComponent implements OnInit {
//删除某条消防队 //删除某条消防队
deleteFireForce(item,e){ deleteFireForce(item,e){
e.stopPropagation() e.stopPropagation()
console.log(this.dataSource.data)
let isDelete = window.confirm(`确定要删除${item.name}`) let isDelete = window.confirm(`确定要删除${item.name}`)
if(isDelete){ 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(); let config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('删除成功','确定',config); this.snackBar.open('删除审核提交成功','确定',config);
this.upDateAllFireForce() item.contentVerify = data
if(item.id == this.selectedFireForce.id){
this.selectedFireForceLevel = null
}
}) })
} }
} }
@ -523,7 +541,7 @@ export class FireForceComponent implements OnInit {
{PropertyName :'灭火剂总量',PropertyValue:''} {PropertyName :'灭火剂总量',PropertyValue:''}
] ]
} }
//新增水源 //新增消防力量
selectedFireForceTypeIndex:any//新增消防力量名称 selectedFireForceTypeIndex:any//新增消防力量名称
addFireForce(){ addFireForce(){
if(this.selectedFireForceId){ 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(){ close(){
this.selectedFireForceLevel = null this.selectedFireForceLevel = null
@ -1025,7 +1079,7 @@ export class FireForceComponent implements OnInit {
//新增水源弹出框 //新增消防力量弹出框
@Component({ @Component({
selector: 'addwater', selector: 'addwater',
templateUrl: './addFireForce.html', templateUrl: './addFireForce.html',

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

@ -117,8 +117,17 @@
</a> </a>
</div> </div>
<span class="save" (click)="save()"><mat-icon>save</mat-icon>保存</span> <span class="state" *ngIf="LinkageForceDetailInfo.contentVerify && LinkageForceDetailInfo.contentVerify.verifyState == 3">(
<span class="submitAudit"><mat-icon>open_in_browser</mat-icon>提交审核</span> <span *ngIf="LinkageForceDetailInfo.contentVerify.operation == 2" style="color: red;">删除</span>
<span *ngIf="LinkageForceDetailInfo.contentVerify.operation == 0" >新增</span>
<span *ngIf="LinkageForceDetailInfo.contentVerify.operation == 1" >更新</span>
待审核)</span>
<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="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="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span> <span class="close" (click)="close()"><mat-icon>close</mat-icon>关闭</span>
</div> </div>
</div> </div>

7
src/app/data-collection/linkage-forces/linkage-forces.component.scss

@ -308,10 +308,13 @@
} }
} }
span:hover{ span:hover{
text-decoration: underline; // text-decoration: underline;
}
.state{
margin-right:30px;
} }
.submitAudit{ .submitAudit{
margin: 0 30px; margin-right:30px;
} }
.close{ .close{
margin-right: 30px; margin-right: 30px;

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

@ -87,7 +87,7 @@ export class LinkageForcesComponent implements OnInit {
image = '/assets/linkageForcesMarkers/安监.png' image = '/assets/linkageForcesMarkers/安监.png'
}else if(item.linkageForceType == 1){//消防水池 }else if(item.linkageForceType == 1){//消防水池
image = '/assets/linkageForcesMarkers/电力局.png' image = '/assets/linkageForcesMarkers/电力局.png'
}else if(item.linkageForceType == 2){//天然水源 }else if(item.linkageForceType == 2){//天然联动力量
image = '/assets/linkageForcesMarkers/公安.png' image = '/assets/linkageForcesMarkers/公安.png'
}else if(item.linkageForceType == 3){//天然水源 }else if(item.linkageForceType == 3){//天然水源
image = '/assets/linkageForcesMarkers/海事.png' image = '/assets/linkageForcesMarkers/海事.png'
@ -225,6 +225,7 @@ export class LinkageForcesComponent implements OnInit {
//选择要显示的联动力量 //选择要显示的联动力量
selectedLinkageForce(item){ selectedLinkageForce(item){
console.log(123,item)
this.isGisTopBox = false this.isGisTopBox = false
if(this.LinkageForceDetailInfo.id != item.id){ if(this.LinkageForceDetailInfo.id != item.id){
this.clearData() this.clearData()
@ -301,15 +302,33 @@ export class LinkageForcesComponent implements OnInit {
e.stopPropagation() e.stopPropagation()
let isDelete = window.confirm(`确定要删除${item.name}`) let isDelete = window.confirm(`确定要删除${item.name}`)
if(isDelete){ if(isDelete){
this.http.delete(`/api/LinkageForces/${item.id}`).subscribe(data => { // this.http.delete(`/api/LinkageForces/${item.id}`).subscribe(data => {
// let config = new MatSnackBarConfig();
// config.verticalPosition = 'top';
// config.duration = 3000
// this.snackBar.open('删除成功','确定',config);
// if(item.id == this.LinkageForceDetailInfo.id){
// this.LinkageForceDetailInfo.linkageForceType = null
// }
// this.getAllFireForce()
// })
let body = {
title: item.name,
operation: 2,//删除操作方式
contentType: 14,//联动力量类型
itemId: item.id,
verifyState: 3,
}
this.http.post('/api/ContentVerifies',body).subscribe((data) => {
let config = new MatSnackBarConfig(); let config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('删除成功','确定',config); this.snackBar.open('删除审核提交成功','确定',config);
if(item.id == this.LinkageForceDetailInfo.id){ this.allLinkageForceObj.items.forEach(element => {
this.LinkageForceDetailInfo.linkageForceType = null if(element.id == item.id){
} element.contentVerify = data
this.getAllFireForce() }
});
}) })
} }
} }
@ -387,6 +406,42 @@ export class LinkageForcesComponent implements OnInit {
} }
) )
} }
//提交审核
submitAudit(){
let isTrue = window.confirm('请确认保存后提交审核,否则将无法审核最新内容,是否继续?')
if(isTrue){
// console.log('提交审核的联动力量',this.waterData)
let body = {
title: this.LinkageForceDetailInfo.name,
operation: this.LinkageForceDetailInfo.contentVerify ? 1 : 0,//操作方式
contentType: 14,//联动力量类型
itemId: this.LinkageForceDetailInfo.id,
verifyState: 3,
}
this.http.post('/api/ContentVerifies',body).subscribe((data) => {
this.LinkageForceDetailInfo.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.LinkageForceDetailInfo)
this.http.delete(`/api/ContentVerifies/${this.LinkageForceDetailInfo.contentVerify.id}`).subscribe((data) => {
this.LinkageForceDetailInfo.contentVerify = null
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('撤销成功','确定',config);
})
}
}
//保存 //保存
save(){ save(){
if(!this.LinkageForceDetailInfo.name){ if(!this.LinkageForceDetailInfo.name){

28
src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts

@ -1,5 +1,5 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { ViewDetailsComponent } from '../view-details/view-details.component'; import { ViewDetailsComponent } from '../view-details/view-details.component';
import Viewer from 'viewerjs' import Viewer from 'viewerjs'
import { MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBar } from '@angular/material/snack-bar';
@ -12,31 +12,8 @@ declare var AMap: any;
styleUrls: ['./linkageforces-audit.component.scss'] styleUrls: ['./linkageforces-audit.component.scss']
}) })
export class LinkageforcesAuditComponent implements OnInit { export class LinkageforcesAuditComponent implements OnInit {
@Input() public LinkageForceDetailInfo: any;//data名字根据引用场景自定义
constructor(public snackBar: MatSnackBar,private http:HttpClient,public dialog: MatDialog) { } constructor(public snackBar: MatSnackBar,private http:HttpClient,public dialog: MatDialog) { }
LinkageForceDetailInfo:any = {
id: "600a736de10e6bf0ec592522",
linkageForceType: 5,
createTime: "2021-01-22T14:40:45.258345",
creatorId: "5e8eced2aaca5f7c1025309b",
name: "交通",
phoneNumber: "13864340193",
faxNumber: "110",
remark: "这是备注",
address: "小高",
location: {
x: 117.913928,
y: 36.457997
},
administrativeRegion: "淄博",
contactName: "张三",
contactTitle: "119",
contactPhone: "112",
serviceContent: "为人民服务",
resourceRemark: "宇宙资源",
relevantInfomationData: "[{\"fileName\":\"楼层区域.png\",\"fileLength\":4079,\"objectName\":\"LinkageForce/undefined/601e3f957cea2c03587c4c78.png\"},{\"fileName\":\"完整度规划20200724.docx\",\"fileLength\":16480,\"objectName\":\"LinkageForce/undefined/601e3f997cea2c03587c4c79.docx\"},{\"fileName\":\"李志 《天空之城》.mp4\",\"fileLength\":56362628,\"objectName\":\"LinkageForce/undefined/601e3f9d7cea2c03587c4c7a.mp4\"}]",
integrityScore: 0.16666667
}
checkBoxList:any[] = [ checkBoxList:any[] = [
{id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png',isChecked:false}, {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png',isChecked:false},
@ -64,6 +41,7 @@ export class LinkageforcesAuditComponent implements OnInit {
'</div>' '</div>'
ngOnInit(): void { ngOnInit(): void {
this.AttachmentArr = JSON.parse(this.LinkageForceDetailInfo.relevantInfomationData) this.AttachmentArr = JSON.parse(this.LinkageForceDetailInfo.relevantInfomationData)
this.LinkageForceDetailInfo.location ? null : this.LinkageForceDetailInfo.location={x:null,y:null}
setTimeout(() => { setTimeout(() => {
this.map = new AMap.Map('container', { this.map = new AMap.Map('container', {
zoom:18 zoom:18

2
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -278,7 +278,7 @@
</div> </div>
<!-- 联动力量审核 --> <!-- 联动力量审核 -->
<div class="LinkageForcesAudit" *ngIf="showtype == 14"> <div class="LinkageForcesAudit" *ngIf="showtype == 14">
<app-linkageforces-audit></app-linkageforces-audit> <app-linkageforces-audit [LinkageForceDetailInfo]="LinkageForceDetailInfo"></app-linkageforces-audit>
</div> </div>
</div> </div>
</div> </div>

32
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -154,9 +154,9 @@ export class WaitExamineerComponent implements OnInit {
//radio点击事件 //radio点击事件
viewer//全景图对象 viewer//全景图对象
waterData:any//需要传递给子组件的水源信息 waterData:any//需要传递给子组件的水源信息
LinkageForceDetailInfo:any//需要传递给子组件的联动力量信息
radioClick(e,item){ radioClick(e,item){
this.showtype = -1 this.showtype = -1
//e.target.parentElement.bgColor='#2196F3'
console.log(item) console.log(item)
this.organizationName='' this.organizationName=''
this.id=item.id this.id=item.id
@ -169,20 +169,24 @@ export class WaitExamineerComponent implements OnInit {
},0) },0)
}else if(item.contentType == 12){ }else if(item.contentType == 12){
//水源 //水源
// console.log(item.itemId)
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data)=>{ this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data)=>{
console.log('水源',data) console.log('水源',data)
this.waterData = data this.waterData = data
this.showtype = 12 this.showtype = 12
}) })
}else if(item.contentType == 13){ }else if(item.contentType == 13){
//消防力量 //消防力量
this.showtype = 13 this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data)=>{
console.log('消防力量',data)
})
}else if(item.contentType == 14){ }else if(item.contentType == 14){
//联动力量 //联动力量
this.showtype = 14 this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data:any)=>{
console.log('联动力量',data)
data.location ? null : data.location={x:null,y:null}
this.LinkageForceDetailInfo = data
this.showtype = 14
})
}else{ }else{
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
this.companyId=data.companyId this.companyId=data.companyId
@ -355,12 +359,12 @@ export class WaitExamineerComponent implements OnInit {
this.snackBar.open('操作成功!','确定',config); this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate() this.getAlltabledate()
}) })
}else if(this.shenheTable[0].contentType == 12){ }else if(this.shenheTable[0].contentType == 12 || this.shenheTable[0].contentType == 13 || this.shenheTable[0].contentType == 14){
let body:any = { let body:any = {
id:this.shenheTable[0].id, id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId, itemId:this.shenheTable[0].itemId,
verifyState:4, verifyState:4,
contentType:12, contentType:this.shenheTable[0].contentType,
title:this.shenheTable[0].title title:this.shenheTable[0].title
} }
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
@ -368,10 +372,6 @@ export class WaitExamineerComponent implements OnInit {
this.showtype = -1 this.showtype = -1
this.getAlltabledate() this.getAlltabledate()
}) })
}else if(this.shenheTable[0].contentType == 13){
}else if(this.shenheTable[0].contentType == 14){
}else{ }else{
//预案审核 //预案审核
if(this.shenheTable[0].verifyState==0){ if(this.shenheTable[0].verifyState==0){
@ -452,12 +452,12 @@ export class WaitExamineerComponent implements OnInit {
this.snackBar.open('操作成功!','确定',config); this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate() this.getAlltabledate()
}) })
}else if(this.shenheTable[0].contentType == 12){ }else if(this.shenheTable[0].contentType == 12 || this.shenheTable[0].contentType == 13 || this.shenheTable[0].contentType == 14){
let body:any = { let body:any = {
id:this.shenheTable[0].id, id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId, itemId:this.shenheTable[0].itemId,
verifyState:5, verifyState:5,
contentType:12, contentType:this.shenheTable[0].contentType,
title:this.shenheTable[0].title title:this.shenheTable[0].title
} }
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
@ -465,10 +465,6 @@ export class WaitExamineerComponent implements OnInit {
this.snackBar.open('操作成功!','确定',config); this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate() this.getAlltabledate()
}) })
}else if(this.shenheTable[0].contentType == 13){
}else if(this.shenheTable[0].contentType == 14){
}else{ }else{
//预案审核拒绝 //预案审核拒绝
if(this.shenheTable[0].verifyState==0){ if(this.shenheTable[0].verifyState==0){

Loading…
Cancel
Save