|
|
|
@ -16,7 +16,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
|
|
|
|
|
reverse(){ |
|
|
|
|
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time']) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
url = "/statisticanalysis/addUnit_one/addUnit_two_type" //当前路由地址
|
|
|
|
|
setTimeoutObj//延时器需要清除
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.setTimeoutObj = window.setTimeout(()=>{ |
|
|
|
@ -26,6 +26,12 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
ngOnDestroy(){ |
|
|
|
|
window.clearTimeout(this.setTimeoutObj); |
|
|
|
|
this.indexBzt.clear() |
|
|
|
|
this.indexBzt.dispose() |
|
|
|
|
this.forArr.forEach(item => { |
|
|
|
|
item.echart.clear() |
|
|
|
|
item.echart.dispose() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
axisLabel = { |
|
|
|
@ -99,26 +105,26 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
|
|
|
|
|
{name:"崇明中队",number:"55",zhanbi:"0.3%"} ] |
|
|
|
|
zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] |
|
|
|
|
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70] |
|
|
|
|
forArr = [{id:'gaoceng',name:'高层'}, |
|
|
|
|
{id:'dixia',name:'地下'}, |
|
|
|
|
{id:'guidao',name:'轨道交通'}, |
|
|
|
|
{id:'huagong',name:'化工生产'}, |
|
|
|
|
{id:'chuguan',name:'储罐类'}, |
|
|
|
|
{id:'changfang',name:'厂房'}, |
|
|
|
|
{id:'gujianzhu',name:'古建筑'}, |
|
|
|
|
{id:'shichang',name:'商市场'}, |
|
|
|
|
{id:'yiyuan',name:'医院'}, |
|
|
|
|
{id:'xuexiao',name:'学校'}, |
|
|
|
|
{id:'binguan',name:'宾馆'}, |
|
|
|
|
{id:'yule',name:'娱乐场所'}, |
|
|
|
|
{id:'canyin',name:'餐饮业'}, |
|
|
|
|
{id:'yingyuan',name:'影剧院'}, |
|
|
|
|
{id:'zhanlan',name:'展览建筑'}, |
|
|
|
|
{id:'suidao',name:'隧道'}] |
|
|
|
|
|
|
|
|
|
forArr = [{id:'gaoceng',name:'高层',echart:null}, |
|
|
|
|
{id:'dixia',name:'地下',echart:null}, |
|
|
|
|
{id:'guidao',name:'轨道交通',echart:null}, |
|
|
|
|
{id:'huagong',name:'化工生产',echart:null}, |
|
|
|
|
{id:'chuguan',name:'储罐类',echart:null}, |
|
|
|
|
{id:'changfang',name:'厂房',echart:null}, |
|
|
|
|
{id:'gujianzhu',name:'古建筑',echart:null}, |
|
|
|
|
{id:'shichang',name:'商市场',echart:null}, |
|
|
|
|
{id:'yiyuan',name:'医院',echart:null}, |
|
|
|
|
{id:'xuexiao',name:'学校',echart:null}, |
|
|
|
|
{id:'binguan',name:'宾馆',echart:null}, |
|
|
|
|
{id:'yule',name:'娱乐场所',echart:null}, |
|
|
|
|
{id:'canyin',name:'餐饮业',echart:null}, |
|
|
|
|
{id:'yingyuan',name:'影剧院',echart:null}, |
|
|
|
|
{id:'zhanlan',name:'展览建筑',echart:null}, |
|
|
|
|
{id:'suidao',name:'隧道',echart:null}] |
|
|
|
|
indexBzt //顶部饼状图
|
|
|
|
|
/* 顶部饼状图 */ |
|
|
|
|
initCharts(){ |
|
|
|
|
let indexBzt = echarts.init(document.getElementById('pie')); |
|
|
|
|
this.indexBzt = echarts.init(document.getElementById('pie')); |
|
|
|
|
let options={ |
|
|
|
|
title: { |
|
|
|
|
text: '新增单位统计(8900家)', |
|
|
|
@ -221,16 +227,16 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}; |
|
|
|
|
indexBzt.on('click', (params) => { |
|
|
|
|
this.indexBzt.on('click', (params) => { |
|
|
|
|
// this.router.navigateByUrl('/statisticanalysis/buildingType_two_forward');
|
|
|
|
|
}); |
|
|
|
|
indexBzt.setOption(options); |
|
|
|
|
this.indexBzt.setOption(options); |
|
|
|
|
} |
|
|
|
|
//柱状图
|
|
|
|
|
barEcharts(){ |
|
|
|
|
this.forArr.forEach(item=>{ |
|
|
|
|
let _this = this |
|
|
|
|
let addEchart = echarts.init(document.getElementById(item.id)); |
|
|
|
|
item.echart = echarts.init(document.getElementById(item.id)); |
|
|
|
|
let option = { |
|
|
|
|
title: { |
|
|
|
|
text: item.name, |
|
|
|
@ -268,8 +274,8 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
|
|
|
|
|
label: this.topTextlabel |
|
|
|
|
}] |
|
|
|
|
}; |
|
|
|
|
addEchart.setOption(option); |
|
|
|
|
addEchart.on('click', (params) => { |
|
|
|
|
item.echart.setOption(option); |
|
|
|
|
item.echart.on('click', (params) => { |
|
|
|
|
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':params.name,'buildingTypeName':item.name}}) |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|