Browse Source

[修改]右侧饼图预案下钻接口修改

tangshan
陈敬瑜 3 years ago
parent
commit
0853c06dcb
  1. 26
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

26
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

@ -349,8 +349,8 @@ export class publicEchartsComponent implements OnInit {
if (e.selectEndYear >= e.selectStartYear) { if (e.selectEndYear >= e.selectStartYear) {
let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
e.selectStartYear+='-01-01' e.selectStartYear+='-01'
e.selectEndYear+='-12-31' e.selectEndYear+='-12'
this.verifieds.getechartsdata(e.selectStartYear,e.selectStartMonth,e.selectEndYear,e.selectEndMonth) this.verifieds.getechartsdata(e.selectStartYear,e.selectStartMonth,e.selectEndYear,e.selectEndMonth)
} else { } else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
@ -407,14 +407,14 @@ export class publicEchartsComponent implements OnInit {
this.verifieds.oneEcharts.clear() this.verifieds.oneEcharts.clear()
this.verifieds.oneEcharts.dispose() this.verifieds.oneEcharts.dispose()
this.echartsData.zhiorBuinding="zhi" this.echartsData.zhiorBuinding="zhi"
this.verifieds.getechartsdata(this.echartsData.time,'1',this.echartsData.time,'12') this.verifieds.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12')
} }
//建筑类型查询 //建筑类型查询
buildingFind(){ buildingFind(){
this.verifieds.oneEcharts.clear() this.verifieds.oneEcharts.clear()
this.verifieds.oneEcharts.dispose() this.verifieds.oneEcharts.dispose()
this.echartsData.zhiorBuinding="building" this.echartsData.zhiorBuinding="building"
this.verifieds.getechartsdata(this.echartsData.time,'1',this.echartsData.time,'12') this.verifieds.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12')
} }
@ -436,7 +436,7 @@ export class verifiedComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(()=>{ window.setTimeout(()=>{
if(this.echartsData.scheduledUpdatesToggle==1){ if(this.echartsData.scheduledUpdatesToggle==1){
this.getechartsdata('2021','1','2022','12') this.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12')
} }
},0) },0)
@ -457,9 +457,9 @@ export class verifiedComponent implements OnInit {
this.qipaotishi='' this.qipaotishi=''
if(e=='year'){ if(e=='year'){
this.echartsData.TimeType=1 this.echartsData.TimeType=1
this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydataYear,this.xdataYear) this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue)
selectOneYear=selectOneYear+'-01-01' selectOneYear=selectOneYear+'-01'
selectTwoYear+='-12-31' selectTwoYear+='-12'
this.getechartsdata(selectOneYear,nselectStartMoth,selectTwoYear,selectEndMonth) this.getechartsdata(selectOneYear,nselectStartMoth,selectTwoYear,selectEndMonth)
}else{ }else{
this.echartsData.TimeType=0 this.echartsData.TimeType=0
@ -480,8 +480,8 @@ export class verifiedComponent implements OnInit {
let Parameters={ let Parameters={
MaintainedState:this.route.snapshot.queryParams.type, MaintainedState:this.route.snapshot.queryParams.type,
TimeType:this.echartsData.TimeType, TimeType:this.echartsData.TimeType,
TimeStart:this.echartsData.TimeType==0?selectStartYear+'-'+selectStartMonth:selectStartYear, TimeStart:this.echartsData.TimeType==0?selectStartYear+'-'+selectStartMonth:this.echartsData.dateYear+'-'+selectStartMonth,
TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear, TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:this.echartsData.dateYear+'-'+selectEndMonth,
//OrganizationId //OrganizationId
} }
console.log(this.echartsData.zhiorBuinding) console.log(this.echartsData.zhiorBuinding)
@ -852,8 +852,8 @@ export class yueDateComponent implements OnInit {
let Parameters={ let Parameters={
MaintainedState:this.router.snapshot.queryParams.type, MaintainedState:this.router.snapshot.queryParams.type,
TimeType:this.echartsData.TimeType, TimeType:this.echartsData.TimeType,
TimeStart:this.echartsData.scheduledUpdatesXName, TimeStart:this.echartsData.scheduledUpdatesXName+'-01',
//TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear, TimeEnd:this.echartsData.scheduledUpdatesXName+'-12',
OrganizationId:this.OrganizationIds OrganizationId:this.OrganizationIds
} }
//console.log(this.echartsData.zhiorBuinding) //console.log(this.echartsData.zhiorBuinding)
@ -861,6 +861,8 @@ export class yueDateComponent implements OnInit {
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata) console.log(this.tabledata)
this.zhiNameData=[] this.zhiNameData=[]
this.ynum=[]
this.organizationId=[]
this.tabledata[0].items[0].organizations.forEach(element => { this.tabledata[0].items[0].organizations.forEach(element => {
this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName) this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName)
this.ynum.push(element.count) this.ynum.push(element.count)

Loading…
Cancel
Save