diff --git a/src/app/data-collection/fire-force/fire-force.component.html b/src/app/data-collection/fire-force/fire-force.component.html index b421cd5..ef0323f 100644 --- a/src/app/data-collection/fire-force/fire-force.component.html +++ b/src/app/data-collection/fire-force/fire-force.component.html @@ -142,8 +142,17 @@ - save保存 - open_in_browser提交审核 + ( + 删除 + 新增 + 更新 + 待审核) + (审核通过) + (审核驳回) + + open_in_browser提交审核 + 撤销审核 + save保存 close关闭 diff --git a/src/app/data-collection/fire-force/fire-force.component.scss b/src/app/data-collection/fire-force/fire-force.component.scss index 7c301fa..597f4b6 100644 --- a/src/app/data-collection/fire-force/fire-force.component.scss +++ b/src/app/data-collection/fire-force/fire-force.component.scss @@ -345,10 +345,13 @@ } } span:hover{ - text-decoration: underline; + // text-decoration: underline; + } + .state{ + margin-right:30px; } .submitAudit{ - margin: 0 30px; + margin-right:30px; } .close{ margin-right: 30px; diff --git a/src/app/data-collection/fire-force/fire-force.component.ts b/src/app/data-collection/fire-force/fire-force.component.ts index a583f8c..2c5373a 100644 --- a/src/app/data-collection/fire-force/fire-force.component.ts +++ b/src/app/data-collection/fire-force/fire-force.component.ts @@ -6,7 +6,6 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; -import { NzTreeNode } from 'ng-zorro-antd/tree'; import { TreeService } from 'src/app/http-interceptors/tree.service'; import Viewer from 'viewerjs' declare var CryptoJS @@ -45,8 +44,8 @@ export class FireForceComponent implements OnInit { {id:3,name:'中队(消防站)',isChecked:false}, {id:4,name:'其他消防队伍',isChecked:false} ] - //勾选力量类型checkbox在地图上显示marker - checkBoxChange(){ + //勾选力量类型checkbox在地图上显示marker + checkBoxChange(){ let Levels = [] this.checkBoxList.forEach(item =>{ if(item.isChecked){ @@ -214,7 +213,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(node => node.level, node => node.expandable); @@ -230,6 +230,7 @@ export class FireForceComponent implements OnInit { code:'' } selectTreeNode(node){ + console.log(node) this.isGisTopBox = false if(this.selectedFireForceId != node.id){ this.clearData() @@ -257,6 +258,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 +363,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 +540,7 @@ export class FireForceComponent implements OnInit { {PropertyName :'灭火剂总量',PropertyValue:''} ] } - //新增水源 + //新增消防力量 selectedFireForceTypeIndex:any//新增消防力量名称 addFireForce(){ if(this.selectedFireForceId){ @@ -541,6 +558,7 @@ export class FireForceComponent implements OnInit { // this.positionLngLat.x = 0 // this.positionLngLat.y = 0 // this.map.setCity('上海市'); + this.selectedFireForce.contentVerify = null this.clearData() } } @@ -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', diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.html b/src/app/data-collection/linkage-forces/linkage-forces.component.html index 339d4a4..37882f1 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.html +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.html @@ -117,8 +117,17 @@ - save保存 - open_in_browser提交审核 + ( + 删除 + 新增 + 更新 + 待审核) + (审核通过) + (审核驳回) + + open_in_browser提交审核 + 撤销审核 + save保存 close关闭 diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.scss b/src/app/data-collection/linkage-forces/linkage-forces.component.scss index 4eb6f15..10ce7fe 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.scss +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.scss @@ -308,10 +308,13 @@ } } span:hover{ - text-decoration: underline; + // text-decoration: underline; + } + .state{ + margin-right:30px; } .submitAudit{ - margin: 0 30px; + margin-right:30px; } .close{ margin-right: 30px; diff --git a/src/app/data-collection/linkage-forces/linkage-forces.component.ts b/src/app/data-collection/linkage-forces/linkage-forces.component.ts index 197d740..a536e34 100644 --- a/src/app/data-collection/linkage-forces/linkage-forces.component.ts +++ b/src/app/data-collection/linkage-forces/linkage-forces.component.ts @@ -87,7 +87,7 @@ export class LinkageForcesComponent implements OnInit { image = '/assets/linkageForcesMarkers/安监.png' }else if(item.linkageForceType == 1){//消防水池 image = '/assets/linkageForcesMarkers/电力局.png' - }else if(item.linkageForceType == 2){//天然水源 + }else if(item.linkageForceType == 2){//天然联动力量 image = '/assets/linkageForcesMarkers/公安.png' }else if(item.linkageForceType == 3){//天然水源 image = '/assets/linkageForcesMarkers/海事.png' @@ -225,6 +225,7 @@ export class LinkageForcesComponent implements OnInit { //选择要显示的联动力量 selectedLinkageForce(item){ + console.log(123,item) this.isGisTopBox = false if(this.LinkageForceDetailInfo.id != item.id){ this.clearData() @@ -301,15 +302,33 @@ export class LinkageForcesComponent implements OnInit { e.stopPropagation() let isDelete = window.confirm(`确定要删除${item.name}吗`) 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(); config.verticalPosition = 'top'; config.duration = 3000 - this.snackBar.open('删除成功','确定',config); - if(item.id == this.LinkageForceDetailInfo.id){ - this.LinkageForceDetailInfo.linkageForceType = null - } - this.getAllFireForce() + this.snackBar.open('删除审核提交成功','确定',config); + this.allLinkageForceObj.items.forEach(element => { + if(element.id == item.id){ + element.contentVerify = data + } + }); }) } } @@ -382,11 +401,47 @@ export class LinkageForcesComponent implements OnInit { this.LinkageForceDetailInfo.linkageForceType = data this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null this.map.setCity('上海市'); - + this.LinkageForceDetailInfo.contentVerify = null } } ) } + //提交审核 + 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(){ if(!this.LinkageForceDetailInfo.name){ diff --git a/src/app/data-collection/water-collection/water-collection.component.html b/src/app/data-collection/water-collection/water-collection.component.html index 2782ab8..f46cd80 100644 --- a/src/app/data-collection/water-collection/water-collection.component.html +++ b/src/app/data-collection/water-collection/water-collection.component.html @@ -79,13 +79,17 @@
- (待审核) - (审核通过) - (审核驳回) + ( + 删除 + 新增 + 更新 + 待审核) + (审核通过) + (审核驳回) - open_in_browser提交审核 - 撤销审核 - save保存 + open_in_browser提交审核 + 撤销审核 + save保存 close关闭
diff --git a/src/app/data-collection/water-collection/water-collection.component.scss b/src/app/data-collection/water-collection/water-collection.component.scss index 37f7a20..b8caeac 100644 --- a/src/app/data-collection/water-collection/water-collection.component.scss +++ b/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; diff --git a/src/app/data-collection/water-collection/water-collection.component.ts b/src/app/data-collection/water-collection/water-collection.component.ts index 08cec7f..1a250d3 100644 --- a/src/app/data-collection/water-collection/water-collection.component.ts +++ b/src/app/data-collection/water-collection/water-collection.component.ts @@ -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 + } + }); }) } } @@ -384,6 +402,7 @@ export class WaterCollectionComponent implements OnInit { this.positionLngLat.y = 0 this.map.setCity('上海市'); this.clearData() + this.waterData.contentVerify = null } } ); @@ -435,24 +454,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(){ diff --git a/src/app/key-unit/basicinfo/basicinfo.component.html b/src/app/key-unit/basicinfo/basicinfo.component.html index bd4b66c..6f90418 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.html +++ b/src/app/key-unit/basicinfo/basicinfo.component.html @@ -112,7 +112,7 @@
- +
diff --git a/src/app/key-unit/basicinfo/basicinfo.component.ts b/src/app/key-unit/basicinfo/basicinfo.component.ts index f3a523d..0bd7844 100644 --- a/src/app/key-unit/basicinfo/basicinfo.component.ts +++ b/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((document.getElementById('selectedfile'))){ + (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((document.getElementById('selectedfile'))){ + (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((document.getElementById('selectedfile'))){ + (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');//通知服务改变分数 }) } diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts index 205f437..95188b0 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts @@ -361,7 +361,7 @@ export class KeyUnitManagementComponent implements OnInit { data.items.forEach( (item,index) => { item.integrity = this.wanzhengduArr[index] }) - console.log(789,data.items) + //console.log(789,data.items) this.tabledataSource = new MatTableDataSource(data.items); }) } @@ -670,7 +670,7 @@ export class KeyUnitManagementComponent implements OnInit { } //提交审核 submitAudit(element){ - console.log(element) + //console.log(element) let body:any = { title:element.name, Operation:0, @@ -680,21 +680,24 @@ export class KeyUnitManagementComponent implements OnInit { } this.http.post(`/api/ContentVerifies`,body).subscribe(data=>{ this.getAllKeyUnit() + },err=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open(err,'确定',config); }) } //撤销审核 cancelAudit(element){ - let body:any = { - //title:element.name, - //Operation:0, - id:element.contentVerify.id, - itemId:element.id, - verifyState:-1, - contentType:11 - } this.http.delete(`/api/ContentVerifies/${element.contentVerify.id}`).subscribe(data=>{ this.getAllKeyUnit() + }, + err=>{ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open(err,'确定',config); }) } //审核结果 @@ -749,7 +752,6 @@ export class CreateUnit { this.jsId = node.id } onSubmit(value){ - // console.log(value) let myDate = new Date(); let body = { id: "", diff --git a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts index f118381..fd531cc 100644 --- a/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts +++ b/src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts @@ -1,5 +1,5 @@ import { HttpClient } from '@angular/common/http'; -import { Component, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import Viewer from 'viewerjs' @@ -12,36 +12,10 @@ declare var AMap: any; styleUrls: ['./fireforce-audit.component.scss'] }) export class FireforceAuditComponent implements OnInit { - + @Input() public FireForceDetailInfo: any;//data名字根据引用场景自定义 + @Input() public level: any;//data名字根据引用场景自定义 constructor(public snackBar: MatSnackBar,private http:HttpClient,public dialog: MatDialog) { } - selectedFireForceLevel:any = 0 - - FireForceDetailInfo:any = { - id: "600144ffe7036e11b8121684", - stationName: "上海总队", - isIndependentAlarm: true, - phoneNumber: "13864340193", - faxNumber: "120", - jurisdictionArea: 999, - remark: "暂无备注", - address: "齐鲁树谷", - location: { - x:0, - y:0 - }, - personCountData: "[{\"PropertyName\":\"现役官兵人数\",\"PropertyValue\":\"1\"},{\"PropertyName\":\"政府专职消防员数\",\"PropertyValue\":\"2\"},{\"PropertyName\":\"消防文员数\",\"PropertyValue\":\"3\"}]", - personCountItems: null, - contactData: "[{\"PropertyName\":\"总队长名称\",\"PropertyValue\":\"4\"},{\"PropertyName\":\"总队长联系方式\",\"PropertyValue\":\"5\"},{\"PropertyName\":\"总队政委名称\",\"PropertyValue\":\"6\"},{\"PropertyName\":\"总队政委联系方式\",\"PropertyValue\":\"7\"}]", - contactItems: null, - dutyForceData: null, - dutyForceItems: null, - relevantInfomationData: null, - integrityScore: 0, - integrityTotalCount: 0, - integrityNotEmptyCount: 0, - RelevantInfomationData:"[{\"objectName\":\"FireForce/1/601b69697cea2c03587c4c6d.png\",\"fileName\":\"楼层区域.png\",\"fileLength\":4079},{\"objectName\":\"FireForce/1/601b696e7cea2c03587c4c6e.mp4\",\"fileName\":\"李志 《天空之城》.mp4\",\"fileLength\":56362628},{\"objectName\":\"FireForce/1/601b69867cea2c03587c4c6f.docx\",\"fileName\":\"完整度规划20200724.docx\",\"fileLength\":16480}]" - } - + selectedFireForceLevel:any ZongpersonCountData ZongcontactData ZhicontactData @@ -51,15 +25,17 @@ export class FireforceAuditComponent implements OnInit { otherpersonCountData AttachmentArr ngOnInit(): void { - this.ZongpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData) - this.ZongcontactData = JSON.parse(this.FireForceDetailInfo.contactData) - this.ZhicontactData = JSON.parse(this.FireForceDetailInfo.contactData) - this.DaZhongpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData) - this.DaZhongcontactData = JSON.parse(this.FireForceDetailInfo.contactData) - this.othercontactData = JSON.parse(this.FireForceDetailInfo.contactData) - this.otherpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData) - this.AttachmentArr = JSON.parse(this.FireForceDetailInfo.RelevantInfomationData) - + // console.log(12345,this.FireForceDetailInfo) + this.selectedFireForceLevel = this.level + this.FireForceDetailInfo.personCountData ? this.ZongpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData): null + this.FireForceDetailInfo.contactData ? this.ZongcontactData = JSON.parse(this.FireForceDetailInfo.contactData): null + this.FireForceDetailInfo.contactData ? this.ZhicontactData = JSON.parse(this.FireForceDetailInfo.contactData): null + this.FireForceDetailInfo.personCountData ? this.DaZhongpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData): null + this.FireForceDetailInfo.contactData ? this.DaZhongcontactData = JSON.parse(this.FireForceDetailInfo.contactData): null + this.FireForceDetailInfo.contactData ? this.othercontactData = JSON.parse(this.FireForceDetailInfo.contactData): null + this.FireForceDetailInfo.personCountData ? this.otherpersonCountData = JSON.parse(this.FireForceDetailInfo.personCountData): null + this.FireForceDetailInfo.RelevantInfomationData ? this.AttachmentArr = JSON.parse(this.FireForceDetailInfo.RelevantInfomationData) : null + console.log(789,this.ZongcontactData) setTimeout(() => { this.map = new AMap.Map('container', { zoom:18 diff --git a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts index 50970b0..72f092b 100644 --- a/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts +++ b/src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts @@ -1,5 +1,5 @@ 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 Viewer from 'viewerjs' import { MatSnackBar } from '@angular/material/snack-bar'; @@ -12,31 +12,8 @@ declare var AMap: any; styleUrls: ['./linkageforces-audit.component.scss'] }) export class LinkageforcesAuditComponent implements OnInit { - + @Input() public LinkageForceDetailInfo: any;//data名字根据引用场景自定义 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[] = [ {id:0,name:'安监',imgUrl:'/assets/linkageForces/安监.png',isChecked:false}, @@ -64,6 +41,7 @@ export class LinkageforcesAuditComponent implements OnInit { '
' ngOnInit(): void { this.AttachmentArr = JSON.parse(this.LinkageForceDetailInfo.relevantInfomationData) + this.LinkageForceDetailInfo.location ? null : this.LinkageForceDetailInfo.location={x:null,y:null} setTimeout(() => { this.map = new AMap.Map('container', { zoom:18 diff --git a/src/app/plan-audit/plan-record/plan-record.component.html b/src/app/plan-audit/plan-record/plan-record.component.html index edae64d..6991fe5 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.html +++ b/src/app/plan-audit/plan-record/plan-record.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-25 10:19:31 * @LastEditors: sueRimn - * @LastEditTime: 2021-03-03 13:54:44 + * @LastEditTime: 2021-03-06 16:56:07 -->
@@ -88,7 +88,8 @@ - + + @@ -97,12 +98,13 @@
类型操作名称操作 所属组织 审核状态 提交人
- + - + + diff --git a/src/app/plan-audit/plan-record/plan-record.component.scss b/src/app/plan-audit/plan-record/plan-record.component.scss index 958df3b..0c950d1 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.scss +++ b/src/app/plan-audit/plan-record/plan-record.component.scss @@ -33,18 +33,21 @@ } .tablediv{ width: 100%; - height: 70%; + height: 100%; + padding-bottom: 20px; .tbodycss{ overflow-y: auto; - height: 600px; + height:550px; width: 100%; + .selectedTr{ + background-color: #b3d3ee; + } } table{ //margin: 20px 20px; margin-left: 10px; margin-right: 10px; width: 97.5%; - //border: 1px solid #2196F3; thead{ height:48px; diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index fbfe6c5..a627a7c 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -45,7 +45,8 @@
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'? 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':'消防车辆'}}{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}{{item.title}}{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}} {{item.verifyOrganizationName}} {{item.verifyState=='0'?'待初审':item.verifyState=='1'? '初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}
- + + @@ -59,7 +60,8 @@ {{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'? 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}} - + + @@ -272,11 +274,11 @@
- +
- +
diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index 5f58468..a0244fa 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -45,10 +45,10 @@ } .tablediv{ width: 100%; - height: 70%; + height: 100%; .tbodycss{ overflow-y: auto; - height: 700px; + height: 650px; width: 100%; .selectedTr{ background-color: #b3d3ee; @@ -58,6 +58,7 @@ margin-left:10px; margin-right: 10px; width: 97.5%; + //margin-bottom: 10px; thead{ height:48px; color: #FFFFFF; diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts index 01921d1..9f6da9a 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -154,10 +154,11 @@ export class WaitExamineerComponent implements OnInit { //radio点击事件 viewer//全景图对象 waterData:any//需要传递给子组件的水源信息 + LinkageForceDetailInfo:any//需要传递给子组件的联动力量信息 + fireForceDetailInfo:any//需要传递给子组件的消防力量信息 + postlevel:any radioClick(e,item){ this.showtype = -1 - //e.target.parentElement.bgColor='#2196F3' - console.log(item) this.organizationName='' this.id=item.id this.fetchUrl='' @@ -169,20 +170,31 @@ export class WaitExamineerComponent implements OnInit { },0) }else if(item.contentType == 12){ //水源 - - // console.log(item.itemId) this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data)=>{ - - console.log('水源',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',this.postlevel) + 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 @@ -355,12 +367,13 @@ export class WaitExamineerComponent implements OnInit { this.snackBar.open('操作成功!','确定',config); 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){ + console.log(1111,this.shenheTable[0]) let body:any = { id:this.shenheTable[0].id, itemId:this.shenheTable[0].itemId, verifyState:4, - contentType:12, + contentType:this.shenheTable[0].contentType, title:this.shenheTable[0].title } this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ @@ -368,10 +381,6 @@ export class WaitExamineerComponent implements OnInit { this.showtype = -1 this.getAlltabledate() }) - }else if(this.shenheTable[0].contentType == 13){ - - }else if(this.shenheTable[0].contentType == 14){ - }else{ //预案审核 if(this.shenheTable[0].verifyState==0){ @@ -452,12 +461,12 @@ export class WaitExamineerComponent implements OnInit { this.snackBar.open('操作成功!','确定',config); 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 = { id:this.shenheTable[0].id, itemId:this.shenheTable[0].itemId, verifyState:5, - contentType:12, + contentType:this.shenheTable[0].contentType, title:this.shenheTable[0].title } this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{ @@ -465,10 +474,6 @@ export class WaitExamineerComponent implements OnInit { this.snackBar.open('操作成功!','确定',config); this.getAlltabledate() }) - }else if(this.shenheTable[0].contentType == 13){ - - }else if(this.shenheTable[0].contentType == 14){ - }else{ //预案审核拒绝 if(this.shenheTable[0].verifyState==0){ diff --git a/src/app/plan-management/entry-plan-look/auditresult.html b/src/app/plan-management/entry-plan-look/auditresult.html index 415d0ef..0ba2252 100644 --- a/src/app/plan-management/entry-plan-look/auditresult.html +++ b/src/app/plan-management/entry-plan-look/auditresult.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 10:59:48 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-07 13:58:53 + * @LastEditTime: 2021-03-06 09:14:55 -->
审批结果 @@ -18,7 +18,7 @@

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

-

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

+

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}

终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

终审机构:{{data.element.auditorOrganizationName}}

diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index ab4927a..c23bacc 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -244,16 +244,17 @@ export class EntryPlanLookComponent implements OnInit { } //删除预案 deletePlan(plandata){ - + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 let isTrue = confirm('您确定要删除吗') if (isTrue) { if(plandata.planType == 1){//如果删除的是二维预案 this.http.delete(`/api/PlanComponents2D/${plandata.id}`).subscribe(data=>{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 this.snackBar.open('删除成功!','确定',config); this.getAllPlanComponents() + },err => { + this.snackBar.open(err,'确定',config); }) }else{ this.http.delete(`/api/PlanComponents/${plandata.id}`).subscribe(data=>{ @@ -262,6 +263,8 @@ export class EntryPlanLookComponent implements OnInit { config.duration = 3000 this.snackBar.open('删除成功!','确定',config); this.getAllPlanComponents() + },err => { + this.snackBar.open(err,'确定',config); }) } } @@ -269,20 +272,23 @@ export class EntryPlanLookComponent implements OnInit { } //提交审核 submitAudit(element){ - // console.log(element) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 if(element.auditStatus == 4){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); }else{ if(element.planType == 1){//如果提交审核的是二维预案 this.http.put(`/api/PlanComponents2D/${element.id}/Commit`,"").subscribe(data=>{ this.getAllPlanComponents() + },err => { + this.snackBar.open(err,'确定',config); }) }else{ this.http.put(`/api/PlanComponents/${element.id}/Commit`,"").subscribe(data=>{ this.getAllPlanComponents() + },err => { + this.snackBar.open(err,'确定',config); }) } } diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index 0f15262..af8ed46 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/src/app/plan-management/meet-plan/meet-plan.component.ts @@ -143,22 +143,29 @@ export class MeetPlanComponent implements OnInit { //提交审核 submitAudit(element){ // console.log(element) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 if(element.auditStatus == 4){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); }else{ this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`,"").subscribe(data=>{ this.getAlltabledate() + },err => { + this.snackBar.open(err,'确定',config); }) } } //撤销审核 cancelAudit(element){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 this.http.put(`/api/PlanComponentsMajor/${element.id}/Cancel`,"").subscribe(data=>{ this.getAlltabledate() + },err => { + this.snackBar.open(err,'确定',config); }) } diff --git a/src/app/plan-management/meet-plan/resultmeetPlan.html b/src/app/plan-management/meet-plan/resultmeetPlan.html index 6916a79..a337f4e 100644 --- a/src/app/plan-management/meet-plan/resultmeetPlan.html +++ b/src/app/plan-management/meet-plan/resultmeetPlan.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-20 09:31:24 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-07 13:58:01 + * @LastEditTime: 2021-03-06 09:03:34 -->
审批结果 @@ -18,7 +18,7 @@

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

-

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

+

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}

终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

终审机构:{{data.element.auditorOrganizationName}}

diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index 9c9e94f..4e518aa 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 14:15:10 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-20 16:34:35 + * @LastEditTime: 2021-03-06 09:14:22 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -170,7 +170,9 @@ export class OnetwoEntryPlanComponent implements OnInit { //提交审核 submitAudit(element){ - // console.log(element) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 if(element.auditStatus == 4){ const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -179,14 +181,21 @@ export class OnetwoEntryPlanComponent implements OnInit { }else{ this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`,"").subscribe(data=>{ this.getAlltabledate() + },err => { + this.snackBar.open(err,'确定',config); }) } } //撤销审核 cancelAudit(element){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 this.http.put(`/api/PlanComponentsMajor/${element.id}/Cancel`,"").subscribe(data=>{ this.getAlltabledate() + },err => { + this.snackBar.open(err,'确定',config); }) } //查看预案 diff --git a/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html b/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html index 3c68db2..4a3a9d1 100644 --- a/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html +++ b/src/app/plan-management/onetwo-entry-plan/resultPlanonetwo.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-20 09:31:24 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-07 13:58:29 + * @LastEditTime: 2021-03-06 09:13:25 -->
审批结果 @@ -18,7 +18,7 @@

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

-

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

+

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}

终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

终审机构:{{data.element.auditorOrganizationName}}

diff --git a/src/app/plan-management/type-plan/resulttypePlan.html b/src/app/plan-management/type-plan/resulttypePlan.html index fd65981..5859f75 100644 --- a/src/app/plan-management/type-plan/resulttypePlan.html +++ b/src/app/plan-management/type-plan/resulttypePlan.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-20 09:31:24 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-07 13:58:16 + * @LastEditTime: 2021-03-06 09:11:10 -->
审批结果 @@ -18,7 +18,7 @@

初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

初审机构:{{data.element.firstAuditorOrganizationName}}

初审意见:{{data.element.firstAuditOpinion}}

-

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':''}}

+

初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||4?'初审通过':''}}

终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}

终审机构:{{data.element.auditorOrganizationName}}

diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index cda585b..2bfd47b 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/src/app/plan-management/type-plan/type-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-01-06 09:47:43 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-07 16:13:27 + * @LastEditTime: 2021-03-06 09:12:59 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -154,23 +154,29 @@ export class TypePlanComponent implements OnInit { //提交审核 submitAudit(element){ - // console.log(element) + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 if(element.auditStatus == 4){ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!','确定',config); }else{ this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`,"").subscribe(data=>{ this.getAlltabledate() + },err => { + this.snackBar.open(err,'确定',config); }) } } //撤销审核 cancelAudit(element){ + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 this.http.put(`/api/PlanComponentsMajor/${element.id}/Cancel`,"").subscribe(data=>{ this.getAlltabledate() + },err => { + this.snackBar.open(err,'确定',config); }) } //查看预案 diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts index 01ded3e..788ca67 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts @@ -163,10 +163,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit { this.option.series[0].data = this.zhongNumData this.detailPlanEchart.setOption(this.option) }else{ - const config = new MatSnackBarConfig(); - config.verticalPosition = 'top'; - config.duration = 3000 - this.snackBar.open('已到达最底层','确定',config); + this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}}); } }) } diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts index c2ac6d1..31d3d8e 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts @@ -2,6 +2,8 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { ActivatedRoute } from '@angular/router'; import {EchartsDataService} from '../../echarts-data.service'; +import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { CompangInfoComponent } from '../../compang-info/compang-info.component' declare var echarts: any; @Component({ selector: 'app-add-unit-two-type-details', @@ -10,7 +12,7 @@ declare var echarts: any; }) export class AddUnitTwoTypeDetailsComponent implements OnInit { - constructor(public route: ActivatedRoute,private router: Router,public echartsData:EchartsDataService) { } + constructor(public route: ActivatedRoute,private router: Router,public dialog: MatDialog,public echartsData:EchartsDataService) { } forward(){ this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type']) } @@ -122,6 +124,12 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit { }] }; this.detailPlanEchart.setOption(option); + this.detailPlanEchart.on('click', (params) => { + this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}}); + /* const dialogRef = this.dialog.open(CompangInfoComponent, { + width:"400px", + }); */ + }); } diff --git a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts index 68f7da8..8cdbed5 100644 --- a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts +++ b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts @@ -30,12 +30,12 @@ export class BuildingTypeOneComponent implements OnInit { initCharts(){ this.echartsData.getData(null) console.log(this.echartsData.allDate) - this.http.get("/api/StatisticsAnalysis/BuildingTypes").subscribe((data:any)=>{ + this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{ console.log(data) - for(var i=0;i{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}}) diff --git a/src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts b/src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts index 5ca8635..6a9e16c 100644 --- a/src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts +++ b/src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts @@ -109,6 +109,9 @@ export class BuildingTypeThreeDetailsComponent implements OnInit { }] }; this.detailPlanEchart.setOption(option); + this.detailPlanEchart.on('click', (params) => { + this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}}); + }); } diff --git a/src/app/statistic-analysis/compang-info/compang-info.component.html b/src/app/statistic-analysis/compang-info/compang-info.component.html new file mode 100644 index 0000000..557c6fd --- /dev/null +++ b/src/app/statistic-analysis/compang-info/compang-info.component.html @@ -0,0 +1,53 @@ + +
+
+
+ +
+
+
+ {{titlename}} +
+
+
类型操作名称操作 所属组织 审核状态 提交人{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}{{item.title}}{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}} {{item.verifyOrganizationName}} {{item.verifyState=='0'?'待初审':item.verifyState=='1'? '初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}
+ + + + + + + + + + + + + + + + + + + + + + +
名称{{element.name}}修改时间{{element.modifiedTime|date:'yyyy-MM-dd'}}消防救援站{{element.organizationName}}类型{{element.buildingTypes.length != 0 ? element.buildingTypes[0].name : ''}}操作 + 详情 +
+ + + + +
+
diff --git a/src/app/statistic-analysis/compang-info/compang-info.component.scss b/src/app/statistic-analysis/compang-info/compang-info.component.scss new file mode 100644 index 0000000..dceb5cf --- /dev/null +++ b/src/app/statistic-analysis/compang-info/compang-info.component.scss @@ -0,0 +1,73 @@ +.body{ + display: flex; + flex-direction: column; + .topbox{ + width: 100%; + height: 80px; + min-height: 80px; + border-bottom: 1px gray solid; + .btnbox{ + display: flex; + flex-direction:row-reverse; + float: right; + justify-content: center; + align-items: center; + height: 100%; + button{ + width: 88px; + height: 36px; + } + margin-right:4%; + + } + } + .title{ + width: 100%; + text-align: center; + margin-top: 2%; + span{ + text-align: center; + font-size: 28px; + } + } + .buttonbox{ + padding-left: 50px; + button{ + margin:0 10px + } + } + .tablebox{ + width: 100%; + text-align: center; + table{ + width: 50%; + text-align: center; + margin-left: 25%; + margin-top:20px; + th,td{ + text-align: center; + font-size: 15px; + color: #000000; + } + } + mat-paginator{ + width: 100%; + margin-left: 0%; + } + .mat-column-unitname{ + width: 15%; + } + .mat-column-integrity{ + width: 13%; + } + .mat-column-operation{ + width: 5%; + } + .mat-column-jurisdictionsquadron{ + width: 10%; + } + span:hover{ + text-decoration:underline + } + } +} \ No newline at end of file diff --git a/src/app/statistic-analysis/compang-info/compang-info.component.spec.ts b/src/app/statistic-analysis/compang-info/compang-info.component.spec.ts new file mode 100644 index 0000000..317730b --- /dev/null +++ b/src/app/statistic-analysis/compang-info/compang-info.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CompangInfoComponent } from './compang-info.component'; + +describe('CompangInfoComponent', () => { + let component: CompangInfoComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CompangInfoComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CompangInfoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/statistic-analysis/compang-info/compang-info.component.ts b/src/app/statistic-analysis/compang-info/compang-info.component.ts new file mode 100644 index 0000000..73a020b --- /dev/null +++ b/src/app/statistic-analysis/compang-info/compang-info.component.ts @@ -0,0 +1,92 @@ +/* + * @Descripttion: + * @version: + * @Author: sueRimn + * @Date: 2021-03-05 15:57:08 + * @LastEditors: sueRimn + * @LastEditTime: 2021-03-06 11:35:04 + */ +import { Component, OnInit, ViewChild, Inject } from '@angular/core'; +import { HttpClient } from '@angular/common/http' +import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; +import { MatPaginator } from '@angular/material/paginator'; +import { FlatTreeControl } from '@angular/cdk/tree'; +import { FormControl } from '@angular/forms'; +import { Router,ActivatedRoute } from '@angular/router' +import { PageEvent } from '@angular/material/paginator'; +import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; +import { TreeService } from '../../http-interceptors/tree.service' +import { MatTableDataSource } from '@angular/material/table'; +declare var CryptoJS + +@Component({ + selector: 'app-compang-info', + templateUrl: './compang-info.component.html', + styleUrls: ['./compang-info.component.scss'] +}) +export class CompangInfoComponent implements OnInit{ + + constructor(private http: HttpClient,public snackBar: MatSnackBar,public route: ActivatedRoute,private router: Router) {} + + ngOnInit(): void { + this.route.queryParams.subscribe(params => { + this.titlename = params['name']; + this.type = params['type']; + }); + this.getAlltabledate() + } + displayedColumns: string[] = ['unitname','modifiedTime','organizationName','buildingTypes','operation']; + tabledataSource + titlename //上个页面传过来的名称 + type //上个页面传过来:1重点单位 2预案 + jsId=1 //组织机构id + //分页 + @ViewChild(MatPaginator, {static: true}) + pageEvent: PageEvent; + paginator: MatPaginator; + length:any; //共多少条数据 + pageSize:any; //每页条数 + pageSizeOptions: number[] = [10] //设置每页条数 + PageNumber:any; //第几页 + //分页事件 + changePage(e){ + this.PageNumber = e.pageIndex+1 + this.getAlltabledate() + } + //返回 + goBack () { + history.go(-1) + //this.echartsData.statefulInspectionToggle = true + } + + //获取表格数据 + getAlltabledate(){ + if(this.type==1){ + //重点单位 + let paramsdata:any = { + OrganizationId: this.jsId || '', + PageNumber: this.PageNumber || '1', + PageSize: this.pageSizeOptions[0], + IntegrityScoreMin:0, + IntegrityScoreMax:1 + } + this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{ + this.length = data.totalCount + //console.log(789,data.items) + this.tabledataSource = new MatTableDataSource(data.items); + }) + } + } + //跳转查看基本信息页面 + unitdetails(element){ + if(this.type==1){ + sessionStorage.setItem("editable","0") + sessionStorage.setItem("companyName",element.name) + sessionStorage.setItem("companyId",element.id) + sessionStorage.setItem(element.id,JSON.stringify(element.companyIntegrityScore)) + window.open(`/keyUnit/viewunitinfo?id=${element.id}&usci=${element.usci}`,'_blank'); + } + + } +} diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index bd53afe..f8fa6fa 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -409,35 +409,36 @@ export class EchartsDataService { BuildingTypeId:datas.id } //var res - this.http.get("/api/StatisticsAnalysis/BuildingTypes",{params:paramsdata}).subscribe((data:any)=>{ + this.http.get("/api/StatisticsAnalysis",{params:paramsdata}).subscribe((data:any)=>{ this.tishiData=data console.log(this.tishiData) - this.res= '
'+datas.name+'
' + + }) + this.res= '
'+datas.name+'
' this.res+='
'; this.res+=''; - this.res+=''; + this.res+='' this.res+='' this.res+='' this.res+=''; var countall=0 - for(var i=0;i' - for(var i=0;i' - this.res+='' - this.res+='' + this.res+='' + this.res+='' + this.res+='' } this.res+='' - this.res+='' + this.res+='' this.res+='
名称数量总占比
'+this.tishiData.organizationStatistics.organizations[i].count+''+Math.round(this.tishiData.organizationStatistics.organizations[i].count/countall* 10000)/ 100.00 +'%
'+this.tishiData.companyStatistics.organizationStatistics.organizations[i].organizationName+''+this.tishiData.companyStatistics.organizationStatistics.organizations[i].count+''+Math.round(this.tishiData.companyStatistics.organizationStatistics.organizations[i].count/countall* 10000)/ 100.00 +'%
总计'+this.tishiData.totalCount+'100%
总计'+this.tishiData.companyStatistics.totalCount+'100%
' return this.res - }) } zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] diff --git a/src/app/statistic-analysis/statistic-analysis-routing.module.ts b/src/app/statistic-analysis/statistic-analysis-routing.module.ts index 51f4226..ed3ef96 100644 --- a/src/app/statistic-analysis/statistic-analysis-routing.module.ts +++ b/src/app/statistic-analysis/statistic-analysis-routing.module.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-02 16:57:00 * @LastEditors: sueRimn - * @LastEditTime: 2020-11-05 11:07:16 + * @LastEditTime: 2021-03-06 09:50:16 */ import { Component, NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; @@ -33,6 +33,7 @@ import { AddUnitThreeLineDetailsComponent } from './addUnit/add-unit-three-line- import { AddUnitThreeBarDetailsComponent } from './addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component'; import { HomeComponent } from './home/home.component'; import { yueDateComponent }from './scheduled-updates/scheduled-updates.component' +import { CompangInfoComponent }from './compang-info/compang-info.component' import { from } from 'rxjs'; @@ -65,7 +66,8 @@ const routes: Routes = [ { path: 'scheduledUpdates', component: ScheduledUpdatesComponent}, { path: 'scheduledUpdates/yueDate', component: yueDateComponent}, { path: 'scheduledUpdates/PublicEcharts', component: publicEchartsComponent}, - { path: 'home', component: HomeComponent} + { path: 'home', component: HomeComponent}, + { path: 'CompangInfo',component:CompangInfoComponent} ]; @NgModule({ diff --git a/src/app/statistic-analysis/statistic-analysis.module.ts b/src/app/statistic-analysis/statistic-analysis.module.ts index c80a769..b8229e8 100644 --- a/src/app/statistic-analysis/statistic-analysis.module.ts +++ b/src/app/statistic-analysis/statistic-analysis.module.ts @@ -68,11 +68,12 @@ import { DeleteThereLineDetailsComponent } from './deleteUnit/delete-there-line- import { PageThereComponent } from './state/page-there/page-there.component'; import { PageThereYearComponent } from './state/page-there-year/page-there-year.component'; import { DeleteTwoNewaddComponent } from './deleteUnit/delete-two-newadd/delete-two-newadd.component'; +import { CompangInfoComponent } from './compang-info/compang-info.component'; @NgModule({ - declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent], + declarations: [PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent], imports: [ CommonModule, StatisticAnalysisRoutingModule,