Browse Source

[修改]统计分析传参修改

tangshan
陈敬瑜 3 years ago
parent
commit
99c099ac5d
  1. 26
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  2. 3
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  3. 2
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  4. 6
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  5. 6
      src/app/statistic-analysis/state/page-one/page-one.component.ts

26
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)

3
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)

2
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"){

6
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:{

6
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})
}
});
}

Loading…
Cancel
Save