|
|
@ -1,5 +1,6 @@ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Component, OnInit, ViewChild } from '@angular/core'; |
|
|
|
import { Router,ActivatedRoute } from '@angular/router' |
|
|
|
import { Router,ActivatedRoute } from '@angular/router' |
|
|
|
|
|
|
|
import { PageZhongDuiDetailsComponent } from '../page-zhong-dui-details/page-zhong-dui-details.component'; |
|
|
|
declare var echarts: any; |
|
|
|
declare var echarts: any; |
|
|
|
@Component({ |
|
|
|
@Component({ |
|
|
|
selector: 'app-page-two-name', |
|
|
|
selector: 'app-page-two-name', |
|
|
@ -7,10 +8,13 @@ declare var echarts: any; |
|
|
|
styleUrls: ['./page-two-name.component.scss'] |
|
|
|
styleUrls: ['./page-two-name.component.scss'] |
|
|
|
}) |
|
|
|
}) |
|
|
|
export class PageTwoNameComponent implements OnInit { |
|
|
|
export class PageTwoNameComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
|
|
constructor(private router:Router,private route:ActivatedRoute) { } |
|
|
|
constructor(private router:Router,private route:ActivatedRoute) { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ViewChild('zhongDuiChild') zhongDuiChild:PageZhongDuiDetailsComponent; //父组件中获得子组件的引用
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
this.planState() |
|
|
|
this.planState() |
|
|
|
this.planAdd() |
|
|
|
this.planAdd() |
|
|
@ -48,6 +52,7 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
}//echarts两个字换行
|
|
|
|
}//echarts两个字换行
|
|
|
|
zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] |
|
|
|
zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] |
|
|
|
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70] |
|
|
|
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70] |
|
|
|
|
|
|
|
isTrue = true |
|
|
|
//预案新增统计
|
|
|
|
//预案新增统计
|
|
|
|
planAdd () { |
|
|
|
planAdd () { |
|
|
|
let _this = this |
|
|
|
let _this = this |
|
|
@ -82,10 +87,11 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
}; |
|
|
|
}; |
|
|
|
addEchart.setOption(option); |
|
|
|
addEchart.setOption(option); |
|
|
|
addEchart.on('click', function (params) { |
|
|
|
addEchart.on('click', function (params) { |
|
|
|
_this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案新增"}}) |
|
|
|
_this.isTrue = !_this.isTrue |
|
|
|
|
|
|
|
_this.zhongDuiChild.detailEcharts("预案新增") |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
//审核通过
|
|
|
|
//预案审核通过
|
|
|
|
passPlanEchart (){ |
|
|
|
passPlanEchart (){ |
|
|
|
let _this = this |
|
|
|
let _this = this |
|
|
|
var passPlanEchart = echarts.init(document.getElementById('passPlanEchart'));
|
|
|
|
var passPlanEchart = echarts.init(document.getElementById('passPlanEchart'));
|
|
|
@ -118,7 +124,8 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
}; |
|
|
|
}; |
|
|
|
passPlanEchart.setOption(option); |
|
|
|
passPlanEchart.setOption(option); |
|
|
|
passPlanEchart.on('click', function (params) { |
|
|
|
passPlanEchart.on('click', function (params) { |
|
|
|
_this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案审核通过"}}) |
|
|
|
_this.isTrue = !_this.isTrue |
|
|
|
|
|
|
|
_this.zhongDuiChild.detailEcharts("预案审核通过") |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -155,11 +162,12 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
}; |
|
|
|
}; |
|
|
|
passMakeEchart.setOption(option); |
|
|
|
passMakeEchart.setOption(option); |
|
|
|
passMakeEchart.on('click', function (params) { |
|
|
|
passMakeEchart.on('click', function (params) { |
|
|
|
_this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案编制"}}) |
|
|
|
_this.isTrue = !_this.isTrue |
|
|
|
|
|
|
|
_this.zhongDuiChild.detailEcharts("预案编制") |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//预案退回
|
|
|
|
//预案审核退回
|
|
|
|
planBack (){ |
|
|
|
planBack (){ |
|
|
|
let _this = this |
|
|
|
let _this = this |
|
|
|
var passBackEchart = echarts.init(document.getElementById('planBack'));
|
|
|
|
var passBackEchart = echarts.init(document.getElementById('planBack'));
|
|
|
@ -192,7 +200,8 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
}; |
|
|
|
}; |
|
|
|
passBackEchart.setOption(option); |
|
|
|
passBackEchart.setOption(option); |
|
|
|
passBackEchart.on('click', function (params) { |
|
|
|
passBackEchart.on('click', function (params) { |
|
|
|
_this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案审核退回"}}) |
|
|
|
_this.isTrue = !_this.isTrue |
|
|
|
|
|
|
|
_this.zhongDuiChild.detailEcharts("预案审核退回") |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -229,8 +238,8 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
}; |
|
|
|
}; |
|
|
|
planAuditEchart.setOption(option); |
|
|
|
planAuditEchart.setOption(option); |
|
|
|
planAuditEchart.on('click', function (params) { |
|
|
|
planAuditEchart.on('click', function (params) { |
|
|
|
|
|
|
|
_this.isTrue = !_this.isTrue |
|
|
|
_this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案审核中"}}) |
|
|
|
_this.zhongDuiChild.detailEcharts("预案审核中") |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
//预案状态统计
|
|
|
|
//预案状态统计
|
|
|
@ -258,7 +267,7 @@ export class PageTwoNameComponent implements OnInit { |
|
|
|
res+='<td style="border:1px solid #000000">总占比</td>' |
|
|
|
res+='<td style="border:1px solid #000000">总占比</td>' |
|
|
|
res+='</tr></thead>' |
|
|
|
res+='</tr></thead>' |
|
|
|
res+='<tbody>'; |
|
|
|
res+='<tbody>'; |
|
|
|
console.log(jsonObj) |
|
|
|
// console.log(jsonObj)
|
|
|
|
for(var i=0;i<jsonObj.length;i++){ |
|
|
|
for(var i=0;i<jsonObj.length;i++){ |
|
|
|
res+='<tr>' |
|
|
|
res+='<tr>' |
|
|
|
res+='<td style="border:1px solid #000000">'+jsonObj[i].name+'</td>' |
|
|
|
res+='<td style="border:1px solid #000000">'+jsonObj[i].name+'</td>' |
|
|
|