From 36f4e3f25bc53911c8f37e6b6f5d3a2d336a466e Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Wed, 2 Sep 2020 13:49:19 +0800
Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=B8=AD=E9=98=9F=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E5=B5=8C=E5=A5=97=E5=9C=A8=E6=94=AF=E9=98=9F=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=B8=AD=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BC=A0=E5=85=A5?=
=?UTF-8?q?title=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../page-two-name.component.html | 6 ++--
.../page-two-name.component.scss | 1 +
.../page-two-name/page-two-name.component.ts | 31 ++++++++++++-------
.../page-zhong-dui-details.component.ts | 20 ++----------
4 files changed, 28 insertions(+), 30 deletions(-)
diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html
index ca6a914..33aa5a4 100644
--- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html
+++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html
@@ -1,4 +1,4 @@
-
-
\ No newline at end of file
+
+
+
diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
index 93b47ee..6dccc68 100644
--- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
+++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
@@ -1,6 +1,7 @@
.echartsBox{
width: 100%;
height: 100%;
+ overflow-y: auto;
#pie{
width: 100%;
height: 450px;
diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
index 30706a1..3d60f7b 100644
--- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
+++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
@@ -1,5 +1,6 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router'
+import { PageZhongDuiDetailsComponent } from '../page-zhong-dui-details/page-zhong-dui-details.component';
declare var echarts: any;
@Component({
selector: 'app-page-two-name',
@@ -7,10 +8,13 @@ declare var echarts: any;
styleUrls: ['./page-two-name.component.scss']
})
export class PageTwoNameComponent implements OnInit {
-
+
constructor(private router:Router,private route:ActivatedRoute) { }
+ @ViewChild('zhongDuiChild') zhongDuiChild:PageZhongDuiDetailsComponent; //父组件中获得子组件的引用
+
ngOnInit(): void {
+
setTimeout(() => {
this.planState()
this.planAdd()
@@ -48,6 +52,7 @@ export class PageTwoNameComponent implements OnInit {
}//echarts两个字换行
zhiNameData = ["浦东支队","黄埔支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"]
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70]
+ isTrue = true
//预案新增统计
planAdd () {
let _this = this
@@ -82,10 +87,11 @@ export class PageTwoNameComponent implements OnInit {
};
addEchart.setOption(option);
addEchart.on('click', function (params) {
- _this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案新增"}})
+ _this.isTrue = !_this.isTrue
+ _this.zhongDuiChild.detailEcharts("预案新增")
});
}
- //审核通过
+ //预案审核通过
passPlanEchart (){
let _this = this
var passPlanEchart = echarts.init(document.getElementById('passPlanEchart'));
@@ -118,7 +124,8 @@ export class PageTwoNameComponent implements OnInit {
};
passPlanEchart.setOption(option);
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.on('click', function (params) {
- _this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案编制"}})
+ _this.isTrue = !_this.isTrue
+ _this.zhongDuiChild.detailEcharts("预案编制")
});
}
- //预案退回
+ //预案审核退回
planBack (){
let _this = this
var passBackEchart = echarts.init(document.getElementById('planBack'));
@@ -192,7 +200,8 @@ export class PageTwoNameComponent implements OnInit {
};
passBackEchart.setOption(option);
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.on('click', function (params) {
-
- _this.router.navigate(['/statisticanalysis/statePageTwo_details'],{queryParams:{'name':"预案审核中"}})
+ _this.isTrue = !_this.isTrue
+ _this.zhongDuiChild.detailEcharts("预案审核中")
});
}
//预案状态统计
@@ -258,7 +267,7 @@ export class PageTwoNameComponent implements OnInit {
res+='总占比 | '
res+=''
res+='';
- console.log(jsonObj)
+ // console.log(jsonObj)
for(var i=0;i'
res+=''+jsonObj[i].name+' | '
diff --git a/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts b/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts
index 8ac3bac..074163e 100644
--- a/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts
+++ b/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts
@@ -9,32 +9,18 @@ declare var echarts: any;
export class PageZhongDuiDetailsComponent implements OnInit {
constructor( public route: ActivatedRoute) { }
-
- title:String
+
zhongNameData = ["浦东中队","黄埔中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"]
zhongNumData = [200,190,180,170,160,150,140,130,120,110,100]
-
- setTitle (title:String) {
- this.title = title
- }
ngOnInit(): void {
-
- // this.route.queryParams.subscribe(params => {
- // this.title = params.name
- // })
-
- setTimeout(() => {
- this.detailEcharts()
- }, 0);
-
}
- detailEcharts(){
+ detailEcharts(title){
var detailPlanEchart = echarts.init(document.getElementById('detailBox'));
var option = {
title: {
- text: this.title,
+ text: title,
left: "center",
textStyle: {
fontSize: 28