Browse Source

[新增]单位重点信息单个审核

zhuzhou
chenjingyu 4 years ago
parent
commit
0e753e40b1
  1. 2
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  2. 31
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  3. 4
      src/app/plan-audit/allaround/allaround.component.ts
  4. 3
      src/app/plan-audit/basic-info/basic-info.component.ts
  5. 2
      src/app/plan-audit/cad-draw/cad-draw.component.ts
  6. 4
      src/app/plan-audit/fire-facilities/fire-facilities.component.ts
  7. 2
      src/app/plan-audit/function-partition/function-partition.component.ts
  8. 2
      src/app/plan-audit/key-site-look/key-site.component.ts
  9. 2
      src/app/plan-audit/plan-list/plan-list.component.ts
  10. 2
      src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts
  11. 3
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  12. 1
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  13. 56
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  14. 5
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  15. 15
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  16. 13
      src/app/statistic-analysis/echarts-data.service.ts

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

@ -264,6 +264,8 @@
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element" class="operation"> <td mat-cell *matCellDef="let element" class="operation">
<span (click)="unitdetails(element)" >查看详情</span> <span (click)="unitdetails(element)" >查看详情</span>
<span style="color: blue;margin-left: 4px;" *ngIf="element.contentVerify==null||element.contentVerify.verifyState==-1" (click)='submitAudit(element)'>提交审核</span>
<span style="color: blue;margin-left: 4px;" *ngIf="element.contentVerify!=null&&element.contentVerify.verifyState==3" (click)="cancelAudit(element)">撤销审核</span>
<span (click)="Follow(element)" *ngIf="!element.isFollowed">关注单位</span> <span (click)="Follow(element)" *ngIf="!element.isFollowed">关注单位</span>
<span (click)="unFollow(element)" *ngIf="element.isFollowed">取消关注</span> <span (click)="unFollow(element)" *ngIf="element.isFollowed">取消关注</span>
</td> </td>

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

@ -353,7 +353,7 @@ export class KeyUnitManagementComponent implements OnInit {
IntegrityScoreMax:this.integrityScoreMax/100||1 IntegrityScoreMax:this.integrityScoreMax/100||1
} }
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{ this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{
console.log(data)
this.length = data.totalCount this.length = data.totalCount
this.allKeyUnitInfo = data this.allKeyUnitInfo = data
// data.items.sort( (a,b) => { // data.items.sort( (a,b) => {
@ -641,6 +641,35 @@ export class KeyUnitManagementComponent implements OnInit {
} }
); );
} }
//提交审核
submitAudit(element){
console.log(element)
let body:any = {
title:element.name,
Operation:0,
itemId:element.id,
verifyState:3,
contentType:11
}
this.http.post(`/api/ContentVerifies`,body).subscribe(data=>{
this.getAllKeyUnit()
})
}
//撤销审核
cancelAudit(element){
let body:any = {
//title:element.name,
//Operation:0,
id:element.contentVerify.id,
itemId:element.id,
verifyState:-1,
contentType:11
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.getAllKeyUnit()
})
}
} }

4
src/app/plan-audit/allaround/allaround.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-11-26 17:10:54 * @Date: 2020-11-26 17:10:54
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-02-03 15:29:11 * @LastEditTime: 2021-03-02 09:32:08
*/ */
import { Component, OnInit, Inject } from '@angular/core'; import { Component, OnInit, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
@ -32,7 +32,7 @@ export class AllaroundComponent implements OnInit {
AllAdjoining:any = []; //所有单位毗邻 AllAdjoining:any = []; //所有单位毗邻
AllBuilding:any = []; //所有建筑 + 建筑毗邻图片 AllBuilding:any = []; //所有建筑 + 建筑毗邻图片
//单位相关数据 //单位相关数据
unitId:string = '5e9964caa760a059e84512e9' unitId:string = sessionStorage.getItem('companyId')
//5ee19fe06f91049f5e23e937 //5ee19fe06f91049f5e23e937
//5fb78554919f2b44e464017e //5fb78554919f2b44e464017e
//获取所有单位毗邻图片 //获取所有单位毗邻图片

3
src/app/plan-audit/basic-info/basic-info.component.ts

@ -59,7 +59,8 @@ export class BasicInfoComponent implements OnInit {
//每次初始化 加载 组件调用方法 //每次初始化 加载 组件调用方法
everyInin () { everyInin () {
//this.unitId = sessionStorage.getItem('unitId') //this.unitId = sessionStorage.getItem('unitId')
this.unitId='5e9964caa760a059e84512e9'
this.unitId=sessionStorage.getItem('companyId')
if (this.unitId) { if (this.unitId) {
this.getUnitInfo().then(()=>{ this.getUnitInfo().then(()=>{
setTimeout(() => { setTimeout(() => {

2
src/app/plan-audit/cad-draw/cad-draw.component.ts

@ -17,7 +17,7 @@ export class CadDrawComponent implements OnInit {
this.companyId = this.unitId this.companyId = this.unitId
this.getAllCAD() this.getAllCAD()
} }
unitId:any = '5e9964caa760a059e84512e9' unitId:any = sessionStorage.getItem('companyId')
displayedColumns: string[] = ['checked', 'name', 'time', 'state','size']; displayedColumns: string[] = ['checked', 'name', 'time', 'state','size'];

4
src/app/plan-audit/fire-facilities/fire-facilities.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-11-23 09:28:54 * @Date: 2020-11-23 09:28:54
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-02-03 10:12:45 * @LastEditTime: 2021-03-02 09:32:21
*/ */
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import {HttpClient, HttpHeaders} from '@angular/common/http' import {HttpClient, HttpHeaders} from '@angular/common/http'
@ -32,7 +32,7 @@ export class FireFacilitiesComponent implements OnInit {
this.getAllBuilding() this.getAllBuilding()
} }
unitId:any = '5e9964caa760a059e84512e9' unitId:any = sessionStorage.getItem('companyId')
//定义属性数据 //定义属性数据
singleElection:Food[]=[ singleElection:Food[]=[
{value:'true', name: '有'}, {value:'true', name: '有'},

2
src/app/plan-audit/function-partition/function-partition.component.ts

@ -20,7 +20,7 @@ export class FunctionPartitionComponent implements OnInit {
} }
displayedColumns: string[] = ['checked', 'region', 'measure', 'situation']; displayedColumns: string[] = ['checked', 'region', 'measure', 'situation'];
unitId:any = '5e9964caa760a059e84512e9' unitId:any = sessionStorage.getItem('companyId')
companyId:any; //单位编号 companyId:any; //单位编号
companyFunctionalZoning:any=[]; //所有单位功能分区属性 companyFunctionalZoning:any=[]; //所有单位功能分区属性

2
src/app/plan-audit/key-site-look/key-site.component.ts

@ -23,7 +23,7 @@ export class KeySiteLookComponent implements OnInit {
this.getCompanyTips() this.getCompanyTips()
this.getAllBuilding() this.getAllBuilding()
} }
unitId:any = '5e9964caa760a059e84512e9' unitId:any = sessionStorage.getItem('companyId')
allCompanyPosition:any = []; //所有单位重点部位 allCompanyPosition:any = []; //所有单位重点部位
companyTips:any; //所有单位重点提示 companyTips:any; //所有单位重点提示

2
src/app/plan-audit/plan-list/plan-list.component.ts

@ -12,7 +12,7 @@ export class PlanListComponent implements OnInit {
constructor(private http: HttpClient,public snackBar: MatSnackBar,public dialog: MatDialog) { } constructor(private http: HttpClient,public snackBar: MatSnackBar,public dialog: MatDialog) { }
//单位相关数据 //单位相关数据
unitId:any = '5e9964caa760a059e84512e9' unitId:any = sessionStorage.getItem('companyId')
ngOnInit(): void { ngOnInit(): void {
this.getAllBuildings() this.getAllBuildings()

2
src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts

@ -35,7 +35,7 @@ export class RealisticPictureLookComponent implements OnInit {
} }
unitId:any = '5e9964caa760a059e84512e9' unitId:any = sessionStorage.getItem('companyId')
companyId:any; //单位编号 companyId:any; //单位编号
allRealPicture:any=[]; //所有实景图文件 allRealPicture:any=[]; //所有实景图文件

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

@ -89,6 +89,7 @@
</div> </div>
<div id="company">
<mat-tab-group *ngIf="showtype==3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)"> <mat-tab-group *ngIf="showtype==3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息"> <mat-tab label="基本信息">
<ng-template matTabContent> <ng-template matTabContent>
@ -131,6 +132,8 @@
</ng-template> </ng-template>
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</div>
<div id="firefacilities" *ngIf="showtype==3 && !isallDate" style="margin: 10px;"> <div id="firefacilities" *ngIf="showtype==3 && !isallDate" style="margin: 10px;">
<mat-accordion class="tableContent" > <mat-accordion class="tableContent" >
<mat-expansion-panel expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;"> <mat-expansion-panel expanded style="box-shadow: 0 0 black;border: 1px solid #EEF1F5;">

1
src/app/plan-audit/wait-examineer/wait-examineer.component.scss

@ -71,6 +71,7 @@
} }
.boxright{ .boxright{
height: 100%; height: 100%;
width: 55%;
flex: 1; flex: 1;
background-color: #FFFFFF; background-color: #FFFFFF;
margin-left: 10px; margin-left: 10px;

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 16:13:50 * @Date: 2020-12-25 16:13:50
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-02-22 10:49:28 * @LastEditTime: 2021-03-02 10:29:47
*/ */
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
@ -103,7 +103,7 @@ export class WaitExamineerComponent implements OnInit {
chuorzhong//判断初审还是终审 chuorzhong//判断初审还是终审
radioid//选中的id radioid//选中的id
shenheTable=[]//选中要审核的对象 shenheTable=[]//选中要审核的对象
showtype//0:word,1:全景图,2:二维三维,3:重点单位 showtype=-1//0:word,1:全景图,2:二维三维,3:重点单位
compantData={name:'',buildingTypes:[],address:''} compantData={name:'',buildingTypes:[],address:''}
organizationName organizationName
planData planData
@ -122,7 +122,7 @@ export class WaitExamineerComponent implements OnInit {
verifyState:[0,3] verifyState:[0,3]
} }
this.http.get("/api/ContentVerifies",{params:paramsdata}).subscribe((data:any)=>{ this.http.get("/api/ContentVerifies",{params:paramsdata}).subscribe((data:any)=>{
//console.log(data) console.log(data)
this.tableDate=data.items this.tableDate=data.items
this.count=data.totalCount this.count=data.totalCount
}) })
@ -154,12 +154,17 @@ export class WaitExamineerComponent implements OnInit {
//radio点击事件 //radio点击事件
viewer//全景图对象 viewer//全景图对象
radioClick(e,item){ radioClick(e,item){
this.showtype=-1
//e.target.parentElement.bgColor='#2196F3' //e.target.parentElement.bgColor='#2196F3'
//console.log(e,item) //console.log(e,item)
this.organizationName='' this.organizationName=''
this.id=item.id this.id=item.id
this.fetchUrl='' this.fetchUrl=''
this.viewer={} this.viewer={}
if(item.contentType==11){
this.showtype=3
sessionStorage.setItem('companyId',item.itemId)
}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
this.companyName=data.companyName this.companyName=data.companyName
@ -196,6 +201,8 @@ export class WaitExamineerComponent implements OnInit {
}) })
}
if(e.checked){ if(e.checked){
this.shenheTable.push(item) this.shenheTable.push(item)
@ -307,14 +314,27 @@ export class WaitExamineerComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
/* if(this.chuorzhong==2){ console.log(this.shenheTable)
this.snackBar.open('审核未通过,请修改后再来审核!','确定',config);
} */
//console.log(this.shenheTable)
if(this.shenheTable.length==0){ if(this.shenheTable.length==0){
this.snackBar.open('请选择要审核的预案!','确定',config); this.snackBar.open('请选择要审核的预案!','确定',config);
} }
//单个审核
else if(this.shenheTable.length==1){ else if(this.shenheTable.length==1){
//重点单位审核
if(this.shenheTable[0].contentType==11){
let body:any = {
id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId,
verifyState:4,
contentType:11,
title:this.shenheTable[0].title+'基本信息'
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else{
//预案审核
if(this.shenheTable[0].verifyState==0){ if(this.shenheTable[0].verifyState==0){
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{ this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config); this.snackBar.open('操作成功!','确定',config);
@ -327,6 +347,9 @@ export class WaitExamineerComponent implements OnInit {
}) })
} }
} }
}
//批量审核
else{ else{
for(var i=0;i<this.shenheTable.length;i++){ for(var i=0;i<this.shenheTable.length;i++){
var cart={ var cart={
@ -352,7 +375,23 @@ export class WaitExamineerComponent implements OnInit {
if(this.shenheTable.length==0){ if(this.shenheTable.length==0){
this.snackBar.open('请选择要审核的预案!','确定',config); this.snackBar.open('请选择要审核的预案!','确定',config);
} }
//单个审核拒绝
else if(this.shenheTable.length==1){ else if(this.shenheTable.length==1){
//重点单位审核拒绝
if(this.shenheTable[0].contentType==11){
let body:any = {
id:this.shenheTable[0].id,
itemId:this.shenheTable[0].itemId,
verifyState:5,
contentType:11,
title:this.shenheTable[0].title+'基本信息'
}
this.http.put(`/api/ContentVerifies`,body).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config);
this.getAlltabledate()
})
}else{
//预案审核拒绝
if(this.shenheTable[0].verifyState==0){ if(this.shenheTable[0].verifyState==0){
this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:32}).subscribe(data=>{ this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:32}).subscribe(data=>{
this.snackBar.open('操作成功!','确定',config); this.snackBar.open('操作成功!','确定',config);
@ -365,6 +404,9 @@ export class WaitExamineerComponent implements OnInit {
}) })
} }
} }
}
//批量审核
else{ else{
for(var i=0;i<this.shenheTable.length;i++){ for(var i=0;i<this.shenheTable.length;i++){
var cart={ var cart={

5
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

@ -297,6 +297,11 @@ export class EntryPlanLookComponent implements OnInit {
}else{ }else{
this.http.put(`/api/PlanComponents/${element.id}/Cancel`,"").subscribe(data=>{ this.http.put(`/api/PlanComponents/${element.id}/Cancel`,"").subscribe(data=>{
this.getAllPlanComponents() this.getAllPlanComponents()
},err => {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open(err,'确定',config);
}) })
} }
} }

15
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -16,7 +16,7 @@ export class BuildingTypeOneComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(()=>{ window.setTimeout(()=>{
this.initCharts() this.initCharts()
},0) },100)
} }
ngOnDestroy(): void { ngOnDestroy(): void {
this.indexBzt.clear() this.indexBzt.clear()
@ -28,11 +28,14 @@ export class BuildingTypeOneComponent implements OnInit {
count=0//总数 count=0//总数
indexData=[]//所有数据 indexData=[]//所有数据
initCharts(){ initCharts(){
this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{ this.echartsData.getData(null)
for(var i=0;i<data.companyStatistics.buildingTypeStatistics.buildingTypes.length;i++){ console.log(this.echartsData.allDate)
this.lengthdata.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i].buildingTypeName) this.http.get("/api/StatisticsAnalysis/BuildingTypes").subscribe((data:any)=>{
this.count=this.count+data.companyStatistics.buildingTypeStatistics.buildingTypes[i].count console.log(data)
this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i]) for(var i=0;i<data.buildingTypeStatistics.buildingTypes.length;i++){
this.lengthdata.push(data.buildingTypeStatistics.buildingTypes[i].buildingTypeName)
this.count=this.count+data.buildingTypeStatistics.buildingTypes[i].count
this.indexData.push(data.buildingTypeStatistics.buildingTypes[i])
} }
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name')) //JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}}) this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})

13
src/app/statistic-analysis/echarts-data.service.ts

@ -409,7 +409,7 @@ export class EchartsDataService {
BuildingTypeId:datas.id BuildingTypeId:datas.id
} }
//var res //var res
this.http.get("/api/StatisticsAnalysis/Companies",{params:paramsdata}).subscribe((data:any)=>{ this.http.get("/api/StatisticsAnalysis/BuildingTypes",{params:paramsdata}).subscribe((data:any)=>{
this.tishiData=data this.tishiData=data
console.log(this.tishiData) console.log(this.tishiData)
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>' this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
@ -465,6 +465,17 @@ export class EchartsDataService {
} }
//获取所有数据
allDate=[]
getData(paramsdata){
this.http.get("/api/StatisticsAnalysis",{params:paramsdata}).subscribe((data:any)=>{
this.allDate.push(data)
console.log(this.allDate)
return this.allDate
})
}
} }

Loading…
Cancel
Save