From 0e753e40b109cdc61643a04f4b9ab408f86e828f Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Tue, 2 Mar 2021 10:39:50 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E5=8D=95=E4=BD=8D=E9=87=8D?= =?UTF-8?q?=E7=82=B9=E4=BF=A1=E6=81=AF=E5=8D=95=E4=B8=AA=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../key-unit-management.component.html | 2 + .../key-unit-management.component.ts | 31 +++- .../allaround/allaround.component.ts | 4 +- .../basic-info/basic-info.component.ts | 3 +- .../plan-audit/cad-draw/cad-draw.component.ts | 2 +- .../fire-facilities.component.ts | 4 +- .../function-partition.component.ts | 2 +- .../key-site-look/key-site.component.ts | 2 +- .../plan-list/plan-list.component.ts | 2 +- .../realistic-picture.component.ts | 2 +- .../wait-examineer.component.html | 87 +++++----- .../wait-examineer.component.scss | 1 + .../wait-examineer.component.ts | 148 +++++++++++------- .../entry-plan-look.component.ts | 5 + .../building-type-one.component.ts | 15 +- .../echarts-data.service.ts | 13 +- 16 files changed, 210 insertions(+), 113 deletions(-) diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.html b/src/app/key-unit/key-unit-management/key-unit-management.component.html index d849e3c..9d94004 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.html +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.html @@ -264,6 +264,8 @@ 操作 查看详情 + 提交审核 + 撤销审核 关注单位 取消关注 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 8d4441d..1c3fef6 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 @@ -353,7 +353,7 @@ export class KeyUnitManagementComponent implements OnInit { IntegrityScoreMax:this.integrityScoreMax/100||1 } this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{ - + console.log(data) this.length = data.totalCount this.allKeyUnitInfo = data // 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() + }) + } } diff --git a/src/app/plan-audit/allaround/allaround.component.ts b/src/app/plan-audit/allaround/allaround.component.ts index 65160a8..384cb55 100644 --- a/src/app/plan-audit/allaround/allaround.component.ts +++ b/src/app/plan-audit/allaround/allaround.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-11-26 17:10:54 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-03 15:29:11 + * @LastEditTime: 2021-03-02 09:32:08 */ import { Component, OnInit, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @@ -32,7 +32,7 @@ export class AllaroundComponent implements OnInit { AllAdjoining:any = []; //所有单位毗邻 AllBuilding:any = []; //所有建筑 + 建筑毗邻图片 //单位相关数据 - unitId:string = '5e9964caa760a059e84512e9' + unitId:string = sessionStorage.getItem('companyId') //5ee19fe06f91049f5e23e937 //5fb78554919f2b44e464017e //获取所有单位毗邻图片 diff --git a/src/app/plan-audit/basic-info/basic-info.component.ts b/src/app/plan-audit/basic-info/basic-info.component.ts index 485ad67..0437661 100644 --- a/src/app/plan-audit/basic-info/basic-info.component.ts +++ b/src/app/plan-audit/basic-info/basic-info.component.ts @@ -59,7 +59,8 @@ export class BasicInfoComponent implements OnInit { //每次初始化 加载 组件调用方法 everyInin () { //this.unitId = sessionStorage.getItem('unitId') - this.unitId='5e9964caa760a059e84512e9' + + this.unitId=sessionStorage.getItem('companyId') if (this.unitId) { this.getUnitInfo().then(()=>{ setTimeout(() => { diff --git a/src/app/plan-audit/cad-draw/cad-draw.component.ts b/src/app/plan-audit/cad-draw/cad-draw.component.ts index 288f7b1..9f0b777 100644 --- a/src/app/plan-audit/cad-draw/cad-draw.component.ts +++ b/src/app/plan-audit/cad-draw/cad-draw.component.ts @@ -17,7 +17,7 @@ export class CadDrawComponent implements OnInit { this.companyId = this.unitId this.getAllCAD() } - unitId:any = '5e9964caa760a059e84512e9' + unitId:any = sessionStorage.getItem('companyId') displayedColumns: string[] = ['checked', 'name', 'time', 'state','size']; diff --git a/src/app/plan-audit/fire-facilities/fire-facilities.component.ts b/src/app/plan-audit/fire-facilities/fire-facilities.component.ts index 0c6d5de..2e73659 100644 --- a/src/app/plan-audit/fire-facilities/fire-facilities.component.ts +++ b/src/app/plan-audit/fire-facilities/fire-facilities.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-11-23 09:28:54 * @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 {HttpClient, HttpHeaders} from '@angular/common/http' @@ -32,7 +32,7 @@ export class FireFacilitiesComponent implements OnInit { this.getAllBuilding() } - unitId:any = '5e9964caa760a059e84512e9' + unitId:any = sessionStorage.getItem('companyId') //定义属性数据 singleElection:Food[]=[ {value:'true', name: '有'}, diff --git a/src/app/plan-audit/function-partition/function-partition.component.ts b/src/app/plan-audit/function-partition/function-partition.component.ts index 9e8c35a..a5ccfd8 100644 --- a/src/app/plan-audit/function-partition/function-partition.component.ts +++ b/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']; - unitId:any = '5e9964caa760a059e84512e9' + unitId:any = sessionStorage.getItem('companyId') companyId:any; //单位编号 companyFunctionalZoning:any=[]; //所有单位功能分区属性 diff --git a/src/app/plan-audit/key-site-look/key-site.component.ts b/src/app/plan-audit/key-site-look/key-site.component.ts index 653a08c..371d6c6 100644 --- a/src/app/plan-audit/key-site-look/key-site.component.ts +++ b/src/app/plan-audit/key-site-look/key-site.component.ts @@ -23,7 +23,7 @@ export class KeySiteLookComponent implements OnInit { this.getCompanyTips() this.getAllBuilding() } - unitId:any = '5e9964caa760a059e84512e9' + unitId:any = sessionStorage.getItem('companyId') allCompanyPosition:any = []; //所有单位重点部位 companyTips:any; //所有单位重点提示 diff --git a/src/app/plan-audit/plan-list/plan-list.component.ts b/src/app/plan-audit/plan-list/plan-list.component.ts index 5dacf04..8dc7ae8 100644 --- a/src/app/plan-audit/plan-list/plan-list.component.ts +++ b/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) { } //单位相关数据 - unitId:any = '5e9964caa760a059e84512e9' + unitId:any = sessionStorage.getItem('companyId') ngOnInit(): void { this.getAllBuildings() diff --git a/src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts b/src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts index a75ae55..65431ec 100644 --- a/src/app/plan-audit/realistic-picture-look/realistic-picture.component.ts +++ b/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; //单位编号 allRealPicture:any=[]; //所有实景图文件 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 9719e05..0e61c67 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -89,48 +89,51 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
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 de3a49e..62d563e 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -71,6 +71,7 @@ } .boxright{ height: 100%; + width: 55%; flex: 1; background-color: #FFFFFF; margin-left: 10px; 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 ac87c81..8db9cca 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.ts +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-25 16:13:50 * @LastEditors: sueRimn - * @LastEditTime: 2021-02-22 10:49:28 + * @LastEditTime: 2021-03-02 10:29:47 */ import { Component, Inject, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; @@ -103,7 +103,7 @@ export class WaitExamineerComponent implements OnInit { chuorzhong//判断初审还是终审 radioid//选中的id shenheTable=[]//选中要审核的对象 - showtype//0:word,1:全景图,2:二维三维,3:重点单位 + showtype=-1//0:word,1:全景图,2:二维三维,3:重点单位 compantData={name:'',buildingTypes:[],address:''} organizationName planData @@ -122,7 +122,7 @@ export class WaitExamineerComponent implements OnInit { verifyState:[0,3] } this.http.get("/api/ContentVerifies",{params:paramsdata}).subscribe((data:any)=>{ - //console.log(data) + console.log(data) this.tableDate=data.items this.count=data.totalCount }) @@ -154,48 +154,55 @@ export class WaitExamineerComponent implements OnInit { //radio点击事件 viewer//全景图对象 radioClick(e,item){ + this.showtype=-1 //e.target.parentElement.bgColor='#2196F3' //console.log(e,item) this.organizationName='' this.id=item.id this.fetchUrl='' this.viewer={} - this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ - this.companyId=data.companyId - this.companyName=data.companyName - if(data.planType!=2&&data.planType!=1){ - this.fetchUrl=data.attachmentUrls[0] - var index=this.fetchUrl.indexOf("\/") - if(this.fetchUrl.substr(0,index)=='psw'){ - this.showtype=1 - var obj=document.getElementById('viewer') - if(obj!=null){ - obj.innerHTML='' + if(item.contentType==11){ + this.showtype=3 + sessionStorage.setItem('companyId',item.itemId) + }else{ + this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ + this.companyId=data.companyId + this.companyName=data.companyName + if(data.planType!=2&&data.planType!=1){ + this.fetchUrl=data.attachmentUrls[0] + var index=this.fetchUrl.indexOf("\/") + if(this.fetchUrl.substr(0,index)=='psw'){ + this.showtype=1 + var obj=document.getElementById('viewer') + if(obj!=null){ + obj.innerHTML='' + } + window.setTimeout(()=>{ + this.viewer = new Viewer({ + container: document.querySelector('#viewer'), + panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, + + }); + }) + + }else{ + this.lookWord() } - window.setTimeout(()=>{ - this.viewer = new Viewer({ - container: document.querySelector('#viewer'), - panorama:'/api/Objects/PlanPlatform/'+ this.fetchUrl, - - }); - }) - }else{ - this.lookWord() + this.organizationName=item.organizationName + this.planData = data + this.handleData() + return + + //this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` + //this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); + //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) } - }else{ - this.organizationName=item.organizationName - this.planData = data - this.handleData() - return - //this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` - //this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); - //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) - } - - - }) + + }) + } + if(e.checked){ this.shenheTable.push(item) @@ -307,26 +314,42 @@ export class WaitExamineerComponent implements OnInit { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; config.duration = 3000 - /* if(this.chuorzhong==2){ - this.snackBar.open('审核未通过,请修改后再来审核!','确定',config); - } */ - //console.log(this.shenheTable) + console.log(this.shenheTable) if(this.shenheTable.length==0){ this.snackBar.open('请选择要审核的预案!','确定',config); } + //单个审核 else if(this.shenheTable.length==1){ - if(this.shenheTable[0].verifyState==0){ - this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{ - this.snackBar.open('操作成功!','确定',config); - this.getAlltabledate() - }) - }else if(this.shenheTable[0].verifyState==3){ - this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:2}).subscribe(data=>{ + //重点单位审核 + 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){ + this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:16}).subscribe(data=>{ + this.snackBar.open('操作成功!','确定',config); + this.getAlltabledate() + }) + }else if(this.shenheTable[0].verifyState==3){ + this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:2}).subscribe(data=>{ + this.snackBar.open('操作成功!','确定',config); + this.getAlltabledate() + }) + } } + } + //批量审核 else{ for(var i=0;i{ - this.snackBar.open('操作成功!','确定',config); - this.getAlltabledate() - }) - }else if(this.shenheTable[0].verifyState==3){ - this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:4}).subscribe(data=>{ + //重点单位审核拒绝 + 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){ + this.http.put(`/api/PlanAudits/${this.shenheTable[0].itemId}/First`,{auditStatus:32}).subscribe(data=>{ + this.snackBar.open('操作成功!','确定',config); + this.getAlltabledate() + }) + }else if(this.shenheTable[0].verifyState==3){ + this.http.put(`/api/PlanAudits/${this.radioid}`,{auditStatus:4}).subscribe(data=>{ + this.snackBar.open('操作成功!','确定',config); + this.getAlltabledate() + }) + } } + } + //批量审核 else{ for(var i=0;i{ this.getAllPlanComponents() + },err => { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open(err,'确定',config); }) } } 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 76bcddd..68f7da8 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 @@ -16,7 +16,7 @@ export class BuildingTypeOneComponent implements OnInit { ngOnInit(): void { window.setTimeout(()=>{ this.initCharts() - },0) + },100) } ngOnDestroy(): void { this.indexBzt.clear() @@ -28,11 +28,14 @@ export class BuildingTypeOneComponent implements OnInit { count=0//总数 indexData=[]//所有数据 initCharts(){ - this.http.get("/api/StatisticsAnalysis").subscribe((data:any)=>{ - for(var i=0;i{ + 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/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index cee619d..bd53afe 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -409,7 +409,7 @@ export class EchartsDataService { BuildingTypeId:datas.id } //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 console.log(this.tishiData) this.res= '
'+datas.name+'
' @@ -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 + }) + } + + }