From 99c099ac5d739614f3195483ae2e94391e581661 Mon Sep 17 00:00:00 2001 From: chenjingyu <1148019379@qq.com> Date: Mon, 17 Jan 2022 17:13:29 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E7=BB=9F=E8=AE=A1=E5=88=86?= =?UTF-8?q?=E6=9E=90=E4=BC=A0=E5=8F=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry-plan-look.component.ts | 26 +++++++++++++++++++ .../add-unit-two-time.component.ts | 3 ++- .../add-unit-two-type-statistics.component.ts | 2 +- .../scheduled-updates.component.ts | 6 ++++- .../state/page-one/page-one.component.ts | 6 ++--- 5 files changed, 37 insertions(+), 6 deletions(-) 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 58fb14f..b807e20 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 @@ -180,6 +180,18 @@ export class EntryPlanLookComponent implements OnInit { if (e.auditStatus == 8) { if (e.planType == 1) { //如果是在线编辑 let id = e.id + let body = {}; + let resetAudit = true + let headers = new HttpHeaders({ + 'Content-Type': 'text/json' + }); + let options = { + headers + }; + this.http.put(`/api/PlanComponents/${e.id}?resetAudit=${resetAudit}`, body, options).subscribe(data => { + this.getAllPlanComponents() + // this.lookPlan(e) + }) sessionStorage.setItem("planId", id) sessionStorage.setItem("companyId", this.companyId) sessionStorage.setItem("buildingTypeId", this.unittypeId) @@ -239,6 +251,20 @@ export class EntryPlanLookComponent implements OnInit { //let isTrue = confirm('编辑后审核状态会成为未审核状态,您确定要编辑吗') if (e.planType == 1) { //如果是在线编辑 let id = e.id + let body = {}; + let resetAudit = true + let headers = new HttpHeaders({ + 'Content-Type': 'text/json' + }); + let options = { + headers + }; + this.http.put(`/api/PlanComponents/${e.id}?resetAudit=${resetAudit}`, body, options).subscribe(data => { + this.getAllPlanComponents() + // this.lookPlan(e) + }/* ,err => { + this.snackBar.open(err,'确定',config); + } */) sessionStorage.setItem("planId", id) sessionStorage.setItem("companyId", this.companyId) sessionStorage.setItem("buildingTypeId", this.unittypeId) diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts index 371ffa8..73e40ab 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts @@ -189,7 +189,8 @@ export class AddUnitTwoTimeComponent implements OnInit { this.date2.push(this.tabledata[0][i].year) this.dateNum2.push(this.tabledata[0][i].count) this.zongcount=this.zongcount+this.tabledata[0][i].count - this.years.push(this.tabledata[0][i].year) + //this.years.push(this.tabledata[0][i].year) + this.years=['2020','2021','2022'] } //this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date) this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2) diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts index 0c678c5..15815ea 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts @@ -78,7 +78,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { this.data.addMonth=this.month } - await this.data.getData(this.zhiorbuild=="zhi"?paramsdata:null,this.zhiorbuild=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`) + await this.data.getData(this.zhiorbuild=="zhi"?paramsdata:paramsdata,this.zhiorbuild=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`) this.tabledata=JSON.parse(JSON.stringify(this.data.allDate)) //console.log(this.tabledata) if(this.zhiorbuild=="zhi"){ diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts index 70ea367..4d5e122 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts @@ -444,7 +444,9 @@ export class verifiedComponent implements OnInit { },0) console.log(this.echartsData.scheduledUpdatesToggle) this.pieid=this.route.snapshot.queryParams.pieid + this.typelast=this.route.snapshot.queryParams.type } + typelast ngOnDestroy () { //this.oneEcharts.dispose() @@ -825,10 +827,12 @@ export class yueDateComponent implements OnInit { constructor(public router: ActivatedRoute,public echartsData:EchartsDataService,public route:Router) { } level:string; + lasttype ngOnInit(): void { //console.log(this.echartsData.scheduledUpdatesToggle) this.router.queryParams.subscribe(param=>{ this.level=param.level + this.lasttype=param.type }); window.setTimeout(()=>{ @@ -942,7 +946,7 @@ export class yueDateComponent implements OnInit { this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); var option = { title: { - text:this.router.snapshot.queryParams.pieid=='pieTwo'?`已核查总数:(${this.tabledata[0].totalCount})`: this.echartsData.scheduledUpdatesXName+`已核查总数:(${this.tabledata[0].totalCount})`, + text:this.router.snapshot.queryParams.pieid=='pieTwo'?`已核查总数:(${this.lasttype=='1'? this.tabledata[0].unMaintainCount.totalCount:this.lasttype=='3'?this.tabledata[0].maintainingCount.totalCount:this.tabledata[0].maintainedCount.totalCount})`: this.echartsData.scheduledUpdatesXName+`已核查总数:(${this.tabledata[0].totalCount})`, top: -4, left: '35%', textStyle:{ diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts index deb5e63..8c5774b 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.ts +++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts @@ -109,13 +109,13 @@ export class PageOneComponent implements OnInit { if(array[index].planStatusName=='New'){ this.planStatusesData.push({name:'预案新增',value:array[index].count,type:1,planStatusName:array[index].planStatusName}) }else if(array[index].planStatusName=='Auditing'){ - this.planStatusesData.push({name:'预案审核中',value:array[index].count,type:3,planStatusName:array[index].planStatusName}) + this.planStatusesData.push({name:'预案审核中',value:array[index].count,type:2,planStatusName:array[index].planStatusName}) }else if(array[index].planStatusName=='Approved'){ - this.planStatusesData.push({name:'预案审核通过',value:array[index].count,type:5,planStatusName:array[index].planStatusName}) + this.planStatusesData.push({name:'预案审核通过',value:array[index].count,type:3,planStatusName:array[index].planStatusName}) }else if(array[index].planStatusName=='Rejected'){ this.planStatusesData.push({name:'预案审核退回',value:array[index].count,type:4,planStatusName:array[index].planStatusName}) }else if(array[index].planStatusName=='Editing'){ - this.planStatusesData.push({name:'预案编制',value:array[index].count,type:2,planStatusName:array[index].planStatusName}) + this.planStatusesData.push({name:'预案编制',value:array[index].count,type:5,planStatusName:array[index].planStatusName}) } }); }