Browse Source

await

zhuzhou
chenjingyu 4 years ago
parent
commit
c883ff8f19
  1. 84
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  2. 9
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts
  3. 2
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts
  4. 2
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  5. 2
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  6. 68
      src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts
  7. 60
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
  8. 4
      src/app/statistic-analysis/compang-info/compang-info.component.ts
  9. 53
      src/app/statistic-analysis/echarts-data.service.ts
  10. 29
      src/app/statistic-analysis/state/page-one/page-one.component.ts
  11. 350
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
  12. 21
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
  13. 37
      src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts

84
src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts

@ -60,10 +60,8 @@ export class AddUnitOneComponent implements OnInit {
this.orData.push(this.tabledata[0].organizationStatistics.organizations[i]) this.orData.push(this.tabledata[0].organizationStatistics.organizations[i])
this.lengthOrData.push(this.tabledata[0].organizationStatistics.organizations[i].organizationName) this.lengthOrData.push(this.tabledata[0].organizationStatistics.organizations[i].organizationName)
} }
console.log(this.buildData)
this.buildData=this.buildData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}}) this.buildData=this.buildData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})
this.orData=this.orData.map(v=>{return {name: v.organizationName,value:v.count,id:v.organizationId}}) this.orData=this.orData.map(v=>{return {name: v.organizationName,value:v.count,id:v.organizationId}})
console.log(this.buildData)
this.indexBzt = echarts.init(document.getElementById(tid),'walden'); this.indexBzt = echarts.init(document.getElementById(tid),'walden');
let options={ let options={
title: { title: {
@ -78,7 +76,8 @@ export class AddUnitOneComponent implements OnInit {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
console.log(params) console.log(params)
return this.echartsData.tableTooltip(tid=="pieone"?this.echartsData.buildingType:this.echartsData.tableDataZhi,params.name) return tid=="pieone"?this.biaogeTishi(params.data,'one'):this.biaogeTishi(params.data,'two')
//return this.echartsData.tableTooltip(tid=="pieone"?this.echartsData.buildingType:this.echartsData.tableDataZhi,params.name)
}, },
position:this.echartsData.tableTooltipNoShow2 position:this.echartsData.tableTooltipNoShow2
}, },
@ -133,35 +132,60 @@ export class AddUnitOneComponent implements OnInit {
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);
} }
biaogeTishi(biaotou:string){ res
var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},' tishiData
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' biaogeTishi(datas,type){
shuju+='{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},' console.log(datas)
shuju+='{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},' this.res=''
shuju+='{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},' this.tishiData=''
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' if(type=='two'){
shuju+='{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},' for(var a in this.echartsData.obdata[0].buildingTypeStatistics.buildingTypes){
shuju+='{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]' if(this.echartsData.obdata[0].buildingTypeStatistics.buildingTypes[a].buildingTypeName==datas.name){
var jsonObj = JSON.parse(shuju); this.tishiData=this.echartsData.obdata[0].buildingTypeStatistics.buildingTypes[a].organizations
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#000000;font-size:30px;text-align: center;display:block;">'+biaotou+'</span></div>'
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px; background:#FFFFFF; color:#000000;border-collapse:collapse;"cellspacing="0"; >';
res+='<thead><tr>';
res+='<td style="text-align:center;width:30%;border:1px solid #000000">名称</td>';
res+='<td style="text-align:center;width:30%;border:1px solid #000000">数量</td>'
res+='<td style="text-align:center;width:30%;border:1px solid #000000">总占比</td>'
res+='</tr></thead>'
res+='<tbody>';
for(var i=0;i<jsonObj.length;i++){
res+='<tr>'
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].name+'</td>'
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].number+'</td>'
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].zhanbi+'</td></tr>'
} }
}
}else{
for(var a in this.echartsData.obdata[0].organizationStatistics.organizations){
if(this.echartsData.obdata[0].organizationStatistics.organizations[a].organizationId==datas.id){
this.tishiData=this.echartsData.obdata[0].organizationStatistics.organizations[a].buildingTypes
}
}
}
console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.tishiData.length;i++){
countall+=this.tishiData[i].count
}
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
if(type=='two'){
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>'
}
else{
this.res+='<td style="text-align:center;">'+this.tishiData[i].buildingTypeName+'</td>'
}
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
}
res+='</tbody>' this.res+='</tbody>'
res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
res+='</table></div></div>' this.res+='</table></div></div>'
return res return this.res
} }

9
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts

@ -148,7 +148,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.tableTooltip(params) return this.tiao==false? this.serviceData.biaogeTishida(params):this.tableTooltip(params)
}, },
position:this.serviceData.tableTooltipNoShowq position:this.serviceData.tableTooltipNoShowq
}, },
@ -193,16 +193,19 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
this.zhiNumData.push(this.tabledata[0].organizations[i].count) this.zhiNumData.push(this.tabledata[0].organizations[i].count)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId) this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
} }
this.option.title.text =this.option.xAxis.data[xIndex]+`:总数(${this.tabledata[0].totalCount})`
this.option.xAxis.data = this.zhiNameData this.option.xAxis.data = this.zhiNameData
this.option.series[0].data = this.zhiNumData this.option.series[0].data = this.zhiNumData
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData) this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.option.series[0].markPoint.data=this.tiaoshiPao this.option.series[0].markPoint.data=this.tiaoshiPao
this.option.xAxis.id=this.organizationId
this.detailPlanEchart.clear()
this.detailPlanEchart.setOption(this.option) this.detailPlanEchart.setOption(this.option)
},1000) },1000)
this.tiao=true this.tiao=true
}else{ }else{
console.log(this.organizationId,this.option.xAxis.id) console.log(this.organizationId,this.option.xAxis.id)
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1,'jsid':this.option.xAxis.id[xIndex]}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':this.option.xAxis.data[xIndex],'type':1,'jsid':this.option.xAxis.id[xIndex]}});
} }
} }
/* if(this.serviceData.level == "1"){// /* if(this.serviceData.level == "1"){//
@ -253,7 +256,7 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
} }
res+='</tbody>' res+='</tbody>'
res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">1356</td><td style="text-align:center;">19%</td></tfoot>' res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+this.tabledata[0].totalCount+'</td><td style="text-align:center;">100%</td></tfoot>'
res+='</table></div></div>' res+='</table></div></div>'
return res return res
} }

2
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts

@ -129,7 +129,7 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.tableTooltip(params) return this.echartsData.biaogeTishida(params)
} }
}, },
series: [{ series: [{

2
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -331,7 +331,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name) return this.data.zuzhiorBuilding=="zhi"?this.data.biaogeTishiZhi(params): this.data.biaogeTishida(params)
}, },
position: this.data.tableTooltipNoShow2 position: this.data.tableTooltipNoShow2
}, },

2
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -55,10 +55,8 @@ export class BuildingTypeOneComponent implements OnInit {
trigger: 'item', trigger: 'item',
position: this.echartsData.tableTooltipNoShow2, position: this.echartsData.tableTooltipNoShow2,
formatter: (params)=>{ formatter: (params)=>{
console.log(params)
this.echartsData.biaogeTishiZhi(params.data) this.echartsData.biaogeTishiZhi(params.data)
return this.echartsData.res return this.echartsData.res
} }
}, },
legend: { legend: {

68
src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts

@ -118,6 +118,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
} }
}, },
series: [{ series: [{
id:this.organizationId,
data: this.zhongNumData, data: this.zhongNumData,
type: 'bar', type: 'bar',
barWidth :'38', barWidth :'38',
@ -137,7 +138,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { if (this.detailPlanEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
if(this.echartsData.level=="0"&&this.tiao==false&&this.tabledata[0].organizations.length>1){ if(this.echartsData.level=="0"&&this.tiao==false&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){
//总队不跳转 //总队不跳转
console.log(params) console.log(params)
this.zhongNameData=[] this.zhongNameData=[]
@ -162,12 +163,17 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
option.series[0].data = this.zhongNumData option.series[0].data = this.zhongNumData
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData)
option.series[0].markPoint.data=this.tiaoshiPao option.series[0].markPoint.data=this.tiaoshiPao
//option.series[0].id=this.organizationId
option.xAxis.id=this.organizationId
this.detailPlanEchart.clear()
this.detailPlanEchart.setOption(option) this.detailPlanEchart.setOption(option)
//this.detailEcharts() //this.detailEcharts()
},1000) },1000)
this.tiao=true this.tiao=true
} }
else{ else{
console.log(option.series[0].id)
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex]}}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':option.xAxis.data[xIndex],'type':1,'jsid':option.xAxis.id[xIndex]}});
} }
@ -176,30 +182,42 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
} }
tiao=false tiao=false
tishiData
res
tableTooltip(datas:any){
console.log(datas)
for(var a in this.echartsData.obdata[0].organizations){
if(this.echartsData.obdata[0].organizations[a].organizationName==datas.name){
this.tishiData=this.echartsData.obdata[0].organizations[a].subOrganizations
}
}
console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.tishiData.length;i++){
countall+=this.tishiData[i].count
}
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
}
tableTooltip(params:any){ this.res+='</tbody>'
console.log(params) this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
var data = [ this.res+='</table></div></div>'
{name:params.name,number:params.value,zhanbi:((params.value/this.tabledata[0].totalCount) * 100).toFixed(2) + "%"} return this.res
]
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+params.name+'</span></div>'
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
res+='<thead style="font-size:18px;"><tr>';
res+='<td style="text-align:center;width:30%;">名称</td>';
res+='<td style="text-align:center;width:30%;">数量</td>'
res+='<td style="text-align:center;width:30%;">总占比</td>'
res+='</tr></thead>'
res+='<tbody>';
for(var i=0;i<data.length;i++){
res+='<tr>'
res+='<td style="text-align:center;">'+data[i].name+'</td>'
res+='<td style="text-align:center;">'+data[i].number+'</td>'
res+='<td style="text-align:center;">'+data[i].zhanbi+'</td></tr>'
}
res+='</tbody>'
// res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>'
res+='</table></div></div>'
return res
} }
} }

60
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts

@ -296,7 +296,8 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name) console.log(params)
return this.tableTooltip(params)
}, },
position: this.data.tableTooltipNoShow2 position: this.data.tableTooltipNoShow2
}, },
@ -337,27 +338,42 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
} }
//提示框表格 //提示框表格
tableTooltip(dataArr,title:string){ res
let data = dataArr tishiData
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+title+'</span></div>' tableTooltip(datas){
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; console.log(datas)
res+='<thead style="font-size:18px;"><tr>'; for(var a in this.data.obdata[0].organizations){
res+='<td style="text-align:center;width:30%;">名称</td>'; if(this.data.obdata[0].organizations[a].organizationName==datas.name){
res+='<td style="text-align:center;width:30%;">数量</td>' this.tishiData=this.data.obdata[0].organizations[a].subOrganizations
res+='<td style="text-align:center;width:30%;">总占比</td>' }
res+='</tr></thead>' }
res+='<tbody>'; console.log(this.tishiData)
//var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>' var countall=0//总计
for(var i=0;i<this.tableDataZhong.length;i++){ var countbi=0//站比
res+='<tr>' var allCountbi=0//总站比
res+='<td style="text-align:center;">'+this.tableDataZhong[i].name+'</td>' for(var i=0;i<this.tishiData.length;i++){
res+='<td style="text-align:center;">'+this.tableDataZhong[i].number+'</td>' countall+=this.tishiData[i].count
res+='<td style="text-align:center;">'+this.tableDataZhong[i].zhanbi+'</td></tr>' }
} this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
}
res+='</tbody>' this.res+='</tbody>'
res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">1356</td><td style="text-align:center;">19%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
res+='</table></div></div>' this.res+='</table></div></div>'
return res return this.res
} }
} }

4
src/app/statistic-analysis/compang-info/compang-info.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2021-03-05 15:57:08 * @Date: 2021-03-05 15:57:08
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-03-11 16:59:01 * @LastEditTime: 2021-03-12 10:05:29
*/ */
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
@ -66,7 +66,7 @@ export class CompangInfoComponent implements OnInit{
if(this.type==1){ if(this.type==1){
//重点单位 //重点单位
let paramsdata:any = { let paramsdata:any = {
//OrganizationId: this.jsId || '', OrganizationId: this.jsId || '',
PageNumber: this.PageNumber || '1', PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0], PageSize: this.pageSizeOptions[0],
IntegrityScoreMin:0, IntegrityScoreMin:0,

53
src/app/statistic-analysis/echarts-data.service.ts

@ -405,9 +405,11 @@ export class EchartsDataService {
*/ */
res res
tishiData tishiData
localData
biaogeTishiZhi(datas){ biaogeTishiZhi(datas){
console.log(datas)
for(var a in this.obdata[0].buildingTypes){ for(var a in this.obdata[0].buildingTypes){
if(this.obdata[0].buildingTypes[a].buildingTypeId==datas.id){ if(this.obdata[0].buildingTypes[a].buildingTypeName==datas.name){
this.tishiData=this.obdata[0].buildingTypes[a].organizations this.tishiData=this.obdata[0].buildingTypes[a].organizations
} }
} }
@ -444,9 +446,10 @@ export class EchartsDataService {
//支队表格提示 //支队表格提示
biaogeTishida(datas){ biaogeTishida(datas){
console.log(datas)
this.tishiData='' this.tishiData=''
for(var a in this.obdata[0].organizations){ for(var a in this.obdata[0].organizations){
if(this.obdata[0].organizations[a].organizationId==datas.id){ if(this.obdata[0].organizations[a].organizationName==datas.name){
this.tishiData=this.obdata[0].organizations[a].subOrganizations this.tishiData=this.obdata[0].organizations[a].subOrganizations
} }
} }
@ -478,6 +481,52 @@ export class EchartsDataService {
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='</table></div></div>' this.res+='</table></div></div>'
return this.res return this.res
}
//预案表格提示
apidata=[]
biaogeTishiyuan(datas){
//localStorage.setItem('tishi',this.tishiData)
let paramdata={
planStatus:datas.type
}
if(localStorage.getItem('tishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`).subscribe((data:any)=>{
this.tishiData=data.organizations
localStorage.setItem('tishi',JSON.stringify(this.tishiData))
})
}
this.localData=localStorage.getItem('tishi')
/* window.setTimeout(()=>{
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.tishiData.length;i++){
countall+=this.tishiData[i].count
}
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
}
this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='</table></div></div>'
return this.res
},1000) */
} }

29
src/app/statistic-analysis/state/page-one/page-one.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-01 15:24:39 * @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-03-10 14:50:23 * @LastEditTime: 2021-03-12 16:25:28
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@ -55,10 +55,10 @@ export class PageOneComponent implements OnInit {
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
/* formatter: (params)=>{ formatter: (params)=>{
console.log(params) this.echartsData.biaogeTishiyuan(params.data)
return this.echartsData.biaogeTishiZhi(params.data) return this.echartsData.res
} */ }
}, },
legend: { legend: {
orient: 'vertical', orient: 'vertical',
@ -94,11 +94,11 @@ export class PageOneComponent implements OnInit {
}, },
data: [ data: [
{value: 45, name: '预案新增'}, {value: this.tabledata[0].planningStatistics.newCount, name: '预案新增',type:1},
{value: this.tabledata[0].planningStatistics.approvedCount, name: '预案审核通过',itemStyle:{color:'#02A7F0'}}, {value: this.tabledata[0].planningStatistics.approvedCount, name: '预案审核通过',itemStyle:{color:'#02A7F0'},type:3},
{value: 37, name: '预案编制'}, {value: this.tabledata[0].planningStatistics.editingCount, name: '预案编制',type:5},
{value: this.tabledata[0].planningStatistics.rejectedCount, name: '预案审核退回'}, {value: this.tabledata[0].planningStatistics.rejectedCount, name: '预案审核退回',type:4},
{value: this.tabledata[0].planningStatistics.auditingCount, name: '预案审核中'} {value: this.tabledata[0].planningStatistics.auditingCount, name: '预案审核中',type:2}
], ],
emphasis: { emphasis: {
itemStyle: { itemStyle: {
@ -111,8 +111,13 @@ export class PageOneComponent implements OnInit {
] ]
}; };
this.indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name}}); if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){
console.log(params) this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}});
}
else if(this.echartsData.level=='3'){
//中队跳转
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
}
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);
} }

350
src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts

@ -15,18 +15,31 @@ export class PageTwoNameComponent implements OnInit {
@ViewChild('zhongDuiChild') zhongDuiChild:PageZhongDuiDetailsComponent; //父组件中获得子组件的引用 @ViewChild('zhongDuiChild') zhongDuiChild:PageZhongDuiDetailsComponent; //父组件中获得子组件的引用
ngOnInit(): void { ngOnInit(): void {
this.route.queryParams.subscribe(param=>{
this.headname=param.level
this.type=param.type
});
let paramdata={
planStatus:this.type
}
this.data.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`)
setTimeout(() => { setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.data.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)
this.zhiNumData.push(this.tabledata[0].organizations[i].count)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData) this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.route.queryParams.subscribe(param=>{
this.headname=param.level
});
this.planAdd() this.planAdd()
}, 0); },1000);
} }
ngOnDestroy(): void { ngOnDestroy(): void {
} }
headname//标题 headname//标题
type//预案类型
axisLabel = { axisLabel = {
interval: 0, interval: 0,
textStyle:{ textStyle:{
@ -67,8 +80,8 @@ export class PageTwoNameComponent implements OnInit {
} }
}//柱状图上方显示数值 }//柱状图上方显示数值
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] zhiNameData = []
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70] zhiNumData = []
tiaoshiPao:any tiaoshiPao:any
//气泡提示数据获取 //气泡提示数据获取
bianli(){ bianli(){
@ -82,13 +95,15 @@ export class PageTwoNameComponent implements OnInit {
//return tishiPao //return tishiPao
} }
addEchart addEchart
tabledata
organizationId=[]
//预案新增统计 //预案新增统计
planAdd () { planAdd () {
let _this = this let _this = this
this.addEchart = echarts.init(document.getElementById('pie'),'walden'); this.addEchart = echarts.init(document.getElementById('pie'),'walden');
var option = { var option = {
title: { title: {
text: _this.headname+"总数(102)", text: _this.headname+`总数(${this.tabledata[0].totalCount}`,
left: "center", left: "center",
top: "0", top: "0",
bottom: '100%', bottom: '100%',
@ -96,8 +111,12 @@ export class PageTwoNameComponent implements OnInit {
fontSize: 30 fontSize: 30
} }
}, },
grid: {
top: 110,
//bottom: 10
},
xAxis: { xAxis: {
id:this.organizationId,
type: 'category', type: 'category',
data: this.zhiNameData, data: this.zhiNameData,
axisLabel:{ axisLabel:{
@ -146,323 +165,18 @@ export class PageTwoNameComponent implements OnInit {
if (this.addEchart.containPixel('grid',pointInPixel)) { if (this.addEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.addEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=this.addEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':option.title.text}}); if(this.data.level=='0'||this.data.level=='1'){
} this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':_this.headname,'id':option.xAxis.id[xIndex],'type':this.type}});
}else{
}); this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
}
passPlanEchartObj
//预案审核通过
passPlanEchart (){
let _this = this
this.passPlanEchartObj = echarts.init(document.getElementById('passPlanEchart'),'walden');
var option = {
title: {
text: "预案审核通过:总数(1024)",
left: "center",
top: "0",
bottom: '100%',
textStyle: {
fontSize: 23
}
},
xAxis: {
type: 'category',
data: this.zhiNameData,
axisLabel: this.axisLabel
},
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.data.biaogeTishi(params.name)
}/* ,
position: this.data.tableTooltipNoShow2 */
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data: this.tiaoshiPao
},
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
barWidth :'28',
//label: this.topTextlabel
}]
};
this.passPlanEchartObj.setOption(option);
this.passPlanEchartObj.getZr().on('click', (params) => {
const pointInPixel= [params.offsetX, params.offsetY];
if (this.passPlanEchartObj.containPixel('grid',pointInPixel)) {
let xIndex=this.passPlanEchartObj.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':option.title.text}});
}
});
}
passMakeEchart
//预案编制
planMake (){
let _this = this
this.passMakeEchart = echarts.init(document.getElementById('planMake'),'walden');
var option = {
title: {
text: "预案编制:总数(1024)",
left: "center",
top: "0",
bottom: '100%',
textStyle: {
fontSize: 23
} }
},
xAxis: {
type: 'category',
data: this.zhiNameData,
axisLabel: this.axisLabel
},
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.data.biaogeTishi(params.name)
}/* ,
position: this.data.tableTooltipNoShow2 */
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data: this.tiaoshiPao
},
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
barWidth :'28',
//label: this.topTextlabel
}]
};
this.passMakeEchart.setOption(option);
this.passMakeEchart.getZr().on('click', (params) => {
const pointInPixel= [params.offsetX, params.offsetY];
if (this.passMakeEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.passMakeEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':option.title.text}});
} }
}); });
} }
passBackEchart passPlanEchartObj
//预案审核退回
planBack (){
let _this = this
this.passBackEchart = echarts.init(document.getElementById('planBack'),'walden');
var option = {
title: {
text: "预案审核退回:总数(1024)",
left: "center",
top: "0",
bottom: '100%',
textStyle: {
fontSize: 23
}
},
xAxis: {
type: 'category',
data: this.zhiNameData,
axisLabel: this.axisLabel
},
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.data.biaogeTishi(params.name)
}/* ,
position: this.data.tableTooltipNoShow2 */
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data: this.tiaoshiPao
},
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
barWidth :'28',
//label: this.topTextlabel
}]
};
this.passBackEchart.setOption(option);
this.passBackEchart.getZr().on('click', (params) => {
const pointInPixel= [params.offsetX, params.offsetY];
if (this.passBackEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.passBackEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':option.title.text}});
}
});
}
planAuditEchart
//预案审核中
planAudit (){
let _this = this
this.planAuditEchart = echarts.init(document.getElementById('planAudit'),'walden');
var option = {
title: {
text: "预案审核中:总数(1024)",
left: "center",
top: "0",
bottom: '100%',
textStyle: {
fontSize: 23
}
},
xAxis: {
type: 'category',
data: this.zhiNameData,
axisLabel: this.axisLabel
},
yAxis: {
type: 'value',
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.data.biaogeTishi(params.name)
}/* ,
position: this.data.tableTooltipNoShow2 */
},
series: [{
data: this.zhiNumData,
type: 'bar',
markPoint: {
data: this.tiaoshiPao
},
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
barWidth :'28',
//label: this.topTextlabel
}]
};
this.planAuditEchart.setOption(option);
this.planAuditEchart.getZr().on('click', (params) => {
const pointInPixel= [params.offsetX, params.offsetY];
if (this.planAuditEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.planAuditEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':option.title.text}});
}
});
}
topEchart
//预案状态统计
planState(){
this.topEchart = echarts.init(document.getElementById('pie'),'walden');
var option = {
title: {
text: '预案状态统计(7005份)',
left: 'center',
top: "6%",
textStyle: {
fontSize: 30
}
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.data.biaogeTishiZhi(params.name)
},
position: this.data.tableTooltipNoShow2
},
legend: {
orient: 'vertical',
right: '13%',
top: "26%",
textStyle:{
fontSize:18,
color:"#000000"
},
data: ['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中']
},
series: [
{
name: '访问来源',
type: 'pie',
radius: '75%',
center: ['50%', '60%'],
data: [
{value: 1585, name: '预案新增'},
{value: 2000, name: '预案审核通过'},
{value: 2600, name: '预案编制'},
{value: 1500, name: '预案审核退回'},
{value: 1800, name: '预案审核中'}
],
label: {
formatter: '{b}({c}份)\n{d|{d}%}',
fontSize :18,
rich: {
d: {
align: 'center',
fontSize :18
}
},
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}
this.topEchart.setOption(option);
}
tableTooltip(biaotou:string){ tableTooltip(biaotou:string){
var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},' var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},'

21
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -143,6 +143,7 @@ export class echartsComponent implements OnInit {
constructor(private router: Router,private activatedRoute: ActivatedRoute,public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { } constructor(private router: Router,private activatedRoute: ActivatedRoute,public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { }
type
tiaoshiPao:any tiaoshiPao:any
datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200] datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200]
datayuex=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'] datayuex=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月']
@ -159,18 +160,19 @@ export class echartsComponent implements OnInit {
this.tiaoshiPao=JSON.parse(arrshuzu) this.tiaoshiPao=JSON.parse(arrshuzu)
} }
ngOnInit(): void { ngOnInit(): void {
this.activatedRoute.queryParams.subscribe(param=>{
this.headtext=param.level
this.type=param.type
});
let paramdata={
planStatus:this.type
}
this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`)
window.setTimeout(()=>{ window.setTimeout(()=>{
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
this.activatedRoute.queryParams.subscribe(param=>{
this.headtext=param.level
});
//this.oneInit() //this.oneInit()
this.twoInit() this.twoInit()
/* this.threeInit() },1000)
this.fourInit()
this.fiveInit()
this.sixInit() */
},0)
} }
ngOnDestroy () { ngOnDestroy () {
@ -289,7 +291,10 @@ export class echartsComponent implements OnInit {
headtext headtext
twoExample:any; twoExample:any;
tabledata
twoInit (X=this.datayuex, Y=this.datayuey) { twoInit (X=this.datayuex, Y=this.datayuey) {
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
let that = this let that = this
this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp'); this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp');
var option = { var option = {

37
src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 13:50:45 * @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-11-10 14:36:51 * @LastEditTime: 2021-03-12 16:08:24
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
@ -19,23 +19,40 @@ export class PageZhongDuiDetailsComponent implements OnInit {
constructor( public route: ActivatedRoute,public data: EchartsDataService) { } constructor( public route: ActivatedRoute,public data: EchartsDataService) { }
zhongNameData = ["浦东中队","黄浦中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"] zhongNameData = []
zhongNumData = [200,190,180,170,160,150,140,130,120,110,100] zhongNumData = []
tiaoshiPao:any tiaoshiPao:any
headtext:string; headtext:string;
headName:string; headName:string;
type
lastid
tabledata
organizationId=[]
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(()=>{ let level:string;
let level:string;
this.route.queryParams.subscribe(param=>{ this.route.queryParams.subscribe(param=>{
this.headtext=param.headtext this.headtext=param.headtext
level=param.level level=param.level
this.headName=level+''+this.headtext; this.headName=level+''+this.headtext;
//console.log(headName) this.type=param.type
this.lastid=param.id
}); });
let paramdata={
planStatus:this.type,
OrganizationId:this.lastid
}
this.data.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhongNumData.push(this.tabledata[0].organizations[i].count)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData) this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData)
this.detailEcharts() this.detailEcharts()
}) },1000)
} }
ngOnDestroy(): void { ngOnDestroy(): void {
this.detailPlanEchart.clear() this.detailPlanEchart.clear()
@ -58,7 +75,12 @@ export class PageZhongDuiDetailsComponent implements OnInit {
fontSize: 30 fontSize: 30
} }
}, },
grid: {
top: 110,
//bottom: 10
},
xAxis: { xAxis: {
id:this.organizationId,
type: 'category', type: 'category',
data: this.zhongNameData, data: this.zhongNameData,
axisLabel:{ axisLabel:{
@ -101,6 +123,7 @@ export class PageZhongDuiDetailsComponent implements OnInit {
}] }]
}; };
this.detailPlanEchart.setOption(option); this.detailPlanEchart.setOption(option);
} }

Loading…
Cancel
Save