|
|
|
@ -32,25 +32,38 @@ export class PageThereComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
if(window.matchMedia("(max-width: 1400px)").matches){ |
|
|
|
|
this.padHw=true |
|
|
|
|
//this.padjt=
|
|
|
|
|
}else{ |
|
|
|
|
this.padHw=false |
|
|
|
|
} |
|
|
|
|
this.dateInit(); |
|
|
|
|
let datayuex:string; |
|
|
|
|
let headName:string; |
|
|
|
|
this.activatedRoute.queryParams.subscribe(param=>{ |
|
|
|
|
this.lastid=param.id |
|
|
|
|
this.type=param.type |
|
|
|
|
this.headtext=param.headtext |
|
|
|
|
datayuex=param.level |
|
|
|
|
this.zhong=param.zhong |
|
|
|
|
headName=datayuex+'月'+this.headtext; |
|
|
|
|
this.headName=datayuex+'月'+this.headtext; |
|
|
|
|
//console.log(headName)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.getechartsdata() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
padHw |
|
|
|
|
headName |
|
|
|
|
selectType:string = 'month'; //选择当前的 查询类型 按月/年
|
|
|
|
|
async getechartsdata(){ |
|
|
|
|
let paramdata={ |
|
|
|
|
planStatus:this.type, |
|
|
|
|
OrganizationId:this.lastid |
|
|
|
|
} |
|
|
|
|
this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`) |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`) |
|
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
|
console.log(this.tabledata) |
|
|
|
|
for(var i=0;i<this.tabledata[0].organizations.length;i++){ |
|
|
|
|
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName) |
|
|
|
@ -58,13 +71,9 @@ export class PageThereComponent implements OnInit {
|
|
|
|
|
this.organizationId.push(this.tabledata[0].organizations[i].organizationId) |
|
|
|
|
} |
|
|
|
|
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData) |
|
|
|
|
this.zhuzhuangtu(headName) |
|
|
|
|
},1000) |
|
|
|
|
this.zhuzhuangtu(this.headName) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
selectType:string = 'month'; //选择当前的 查询类型 按月/年
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询数据
|
|
|
|
|
years:any = [] |
|
|
|
|
selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12] |
|
|
|
@ -121,9 +130,10 @@ export class PageThereComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
axisLabel = { |
|
|
|
|
interval: 0,
|
|
|
|
|
interval: 0, |
|
|
|
|
//rotate:-30,
|
|
|
|
|
textStyle:{ |
|
|
|
|
fontSize :18, |
|
|
|
|
fontSize :15, |
|
|
|
|
color:'#000000' |
|
|
|
|
}, |
|
|
|
|
formatter:function(value)
|
|
|
|
@ -147,7 +157,7 @@ export class PageThereComponent implements OnInit {
|
|
|
|
|
else {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} |
|
|
|
|
}//echarts两个字换行
|
|
|
|
|
/* 柱状图 */ |
|
|
|
|
zhuzhuangtu(headName:string){ |
|
|
|
@ -157,13 +167,15 @@ export class PageThereComponent implements OnInit {
|
|
|
|
|
title: { |
|
|
|
|
text: headName, |
|
|
|
|
left: "center", |
|
|
|
|
top:0, |
|
|
|
|
//bottom: "540",
|
|
|
|
|
textStyle: { |
|
|
|
|
fontSize: 30 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
grid: { |
|
|
|
|
top: 110, |
|
|
|
|
top: this.padHw?90:110, |
|
|
|
|
containLabel:true, |
|
|
|
|
//bottom: 10
|
|
|
|
|
}, |
|
|
|
|
xAxis: { |
|
|
|
|