From 73862855d3ca84be1efb9530ac1a82257bfd3a32 Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Wed, 2 Sep 2020 14:33:54 +0800
Subject: [PATCH 1/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=B8=AD=E9=98=9F?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=98=BE=E9=9A=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../state/page-two-name/page-two-name.component.html | 2 +-
.../state/page-two-name/page-two-name.component.scss | 1 -
2 files changed, 1 insertion(+), 2 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 33aa5a4..969dc20 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
@@ -30,4 +30,4 @@
-
+
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 6dccc68..93b47ee 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,7 +1,6 @@
.echartsBox{
width: 100%;
height: 100%;
- overflow-y: auto;
#pie{
width: 100%;
height: 450px;
From 347f9e7bdaef0295be25c4954fa30091e0f6e43f Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Wed, 2 Sep 2020 14:52:42 +0800
Subject: [PATCH 2/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20echarts=E5=9B=BE?=
=?UTF-8?q?=E8=A1=A8=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../statistic-analysis/echarts-data.service.ts | 15 +++++++++++++++
.../page-two-name/page-two-name.component.ts | 13 +++++++------
.../page-zhong-dui-details.component.ts | 10 +++++++---
3 files changed, 29 insertions(+), 9 deletions(-)
create mode 100644 src/app/statistic-analysis/echarts-data.service.ts
diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts
new file mode 100644
index 0000000..829e562
--- /dev/null
+++ b/src/app/statistic-analysis/echarts-data.service.ts
@@ -0,0 +1,15 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class EchartsDataService {
+
+ constructor() { }
+
+ //预案状态分析
+ statefulInspectionName:string;
+
+
+
+}
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 3d60f7b..bfebea3 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,6 +1,7 @@
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';
+import {EchartsDataService} from '../../echarts-data.service'
declare var echarts: any;
@Component({
selector: 'app-page-two-name',
@@ -9,7 +10,7 @@ declare var echarts: any;
})
export class PageTwoNameComponent implements OnInit {
- constructor(private router:Router,private route:ActivatedRoute) { }
+ constructor(private router:Router,private route:ActivatedRoute,public data:EchartsDataService) { }
@ViewChild('zhongDuiChild') zhongDuiChild:PageZhongDuiDetailsComponent; //父组件中获得子组件的引用
@@ -87,8 +88,8 @@ export class PageTwoNameComponent implements OnInit {
};
addEchart.setOption(option);
addEchart.on('click', function (params) {
+ _this.data.statefulInspectionName = '预案新增'
_this.isTrue = !_this.isTrue
- _this.zhongDuiChild.detailEcharts("预案新增")
});
}
//预案审核通过
@@ -124,8 +125,8 @@ export class PageTwoNameComponent implements OnInit {
};
passPlanEchart.setOption(option);
passPlanEchart.on('click', function (params) {
+ _this.data.statefulInspectionName = '预案审核通过'
_this.isTrue = !_this.isTrue
- _this.zhongDuiChild.detailEcharts("预案审核通过")
});
}
@@ -162,8 +163,8 @@ export class PageTwoNameComponent implements OnInit {
};
passMakeEchart.setOption(option);
passMakeEchart.on('click', function (params) {
+ _this.data.statefulInspectionName = '预案编制'
_this.isTrue = !_this.isTrue
- _this.zhongDuiChild.detailEcharts("预案编制")
});
}
@@ -200,8 +201,8 @@ export class PageTwoNameComponent implements OnInit {
};
passBackEchart.setOption(option);
passBackEchart.on('click', function (params) {
+ _this.data.statefulInspectionName = '预案审核退回'
_this.isTrue = !_this.isTrue
- _this.zhongDuiChild.detailEcharts("预案审核退回")
});
}
@@ -238,8 +239,8 @@ export class PageTwoNameComponent implements OnInit {
};
planAuditEchart.setOption(option);
planAuditEchart.on('click', function (params) {
+ _this.data.statefulInspectionName = '预案审核中'
_this.isTrue = !_this.isTrue
- _this.zhongDuiChild.detailEcharts("预案审核中")
});
}
//预案状态统计
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 074163e..ff89e8b 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
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
+import {EchartsDataService} from '../../echarts-data.service'
declare var echarts: any;
@Component({
selector: 'app-page-zhong-dui-details',
@@ -8,19 +9,22 @@ declare var echarts: any;
})
export class PageZhongDuiDetailsComponent implements OnInit {
- constructor( public route: ActivatedRoute) { }
+ constructor( public route: ActivatedRoute,public data: EchartsDataService) { }
zhongNameData = ["浦东中队","黄埔中队","徐汇中队","长宁中队","静安中队","普陀中队","虹口中队","杨浦中队","闵行中队","宝山中队","嘉定中队"]
zhongNumData = [200,190,180,170,160,150,140,130,120,110,100]
ngOnInit(): void {
+ window.setTimeout(()=>{
+ this.detailEcharts()
+ })
}
- detailEcharts(title){
+ detailEcharts(){
var detailPlanEchart = echarts.init(document.getElementById('detailBox'));
var option = {
title: {
- text: title,
+ text: this.data.statefulInspectionName,
left: "center",
textStyle: {
fontSize: 28