diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss
index 7ff4670..efabe3c 100644
--- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss
+++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss
@@ -36,11 +36,12 @@
}
}
.publicCss{
- height: 350px;
- width: 50%;
- display: inline-block;
- box-sizing: border-box;
- padding: 20px;
+ width: 100%;
+ height: 550px;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%,-50%);
}
.selectedBtn{
background-color: #2196f3;
diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
index 58fbedb..18bc1ee 100644
--- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
+++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service';
declare var echarts: any;
@Component({
@@ -9,27 +9,30 @@ declare var echarts: any;
})
export class AddUnitTwoTypeStatisticsComponent implements OnInit {
- constructor(private router: Router,public data:EchartsDataService) { }
+ constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { }
forward(){
- this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'])
+ this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname}})
}
reverse(){
- this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time'])
+ this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time'],{queryParams:{'level':this.headname}})
}
url = "/statisticanalysis/addUnit_one/addUnit_two_type" //当前路由地址
setTimeoutObj//延时器需要清除
+ headname
ngOnInit(): void {
+ this.route.queryParams.subscribe(param=>{
+ this.headname=param.level
+ });
this.setTimeoutObj = window.setTimeout(()=>{
this.bianli()
- this.initCharts()
+ //this.initCharts()
this.barEcharts()
},0)
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
- this.indexBzt.clear()
- this.indexBzt.dispose()
+
this.forArr.forEach(item => {
item.echart.clear()
item.echart.dispose()
@@ -261,31 +264,47 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
barEcharts(){
this.forArr.forEach(item=>{
let _this = this
- item.echart = echarts.init(document.getElementById(item.id),'walden');
+ item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = {
title: {
- text: item.name+':总数(1024)',
+ text: this.headname+':总数(1024)',
left: "center",
top: "0",
//bottom: '80%',
textStyle: {
- fontSize: 23
+ fontSize: 30
}
},
xAxis: {
type: 'category',
data:this.data.zuzhiorBuilding=="zhi"?this.buildingData: this.zhiNameData,
- axisLabel: this.axisLabel
+ axisLabel:{
+ //this.axisLabel,
+ interval: 0,
+ textStyle:{
+ fontSize :18,
+ color:'#000000'
+ }
+
+ }
},
yAxis: {
type: 'value',
- axisLabel:this.axisLabel,
+ axisLabel:{
+ //this.axisLabel,
+ textStyle:{
+ fontSize :16,
+ color:'#000000'
+ }
+
+ }
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name)
- }
+ },
+ position: this.data.tableTooltipNoShow2
},
series: [{
data: this.data.zuzhiorBuilding=="zhi"?this.buildnumData: this.zhiNumData,
@@ -296,13 +315,13 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
- barWidth :'28',
+ barWidth :'38',
//label: this.topTextlabel
}]
};
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}})
+ this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}})
});
})
@@ -331,5 +350,9 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
res+='
'
return res
}
+ //返回
+ backClick(){
+ this.router.navigateByUrl('/statisticanalysis/addUnit_one')
+ }
}
diff --git a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
index 9f48d2b..ab131e5 100644
--- a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
+++ b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
@@ -96,7 +96,7 @@ export class BuildingTypeOneComponent implements OnInit {
]
};
this.indexBzt.on('click', (params) => {
- this.router.navigateByUrl('/statisticanalysis/buildingType_one/buildingType_two_forward');
+ this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name}});
});
this.indexBzt.setOption(options);
}
diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html
index 9ab5e6e..b12d73e 100644
--- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html
+++ b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html
@@ -4,22 +4,23 @@
* @Author: sueRimn
* @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn
- * @LastEditTime: 2020-09-11 14:16:12
+ * @LastEditTime: 2021-01-04 14:27:33
-->
-
diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss
index 509d7ef..aa420af 100644
--- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss
+++ b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss
@@ -34,11 +34,12 @@
}
}
.publicCss{
- height: 350px;
- width: 50%;
- display: inline-block;
- box-sizing: border-box;
- padding: 20px;
+ width: 100%;
+ height: 550px;
+ position: absolute;
+ left: 50%;
+ top: 55%;
+ transform: translate(-50%,-50%);
}
.selectedBtn{
background-color: #2196f3;
diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
index 01bc388..9b2f0bc 100644
--- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
+++ b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service';
declare var echarts: any;
@Component({
@@ -9,7 +9,7 @@ declare var echarts: any;
})
export class BuildingTypeTwoReverseComponent implements OnInit {
- constructor(private router: Router,public data:EchartsDataService) { }
+ constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { }
forward(){
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward'])
@@ -17,16 +17,20 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
reverse(){
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'])
}
+ headname//标题
ngOnInit(): void {
+ this.route.queryParams.subscribe(param=>{
+ this.headname=param.level
+ });
window.setTimeout(()=>{
this.bianli()
- this.initCharts()
+ //this.initCharts()
this.barEcharts()
},0)
}
ngOnDestroy(): void {
- this.indexBzt.clear()
- this.indexBzt.dispose()
+ /* this.indexBzt.clear()
+ this.indexBzt.dispose() */
this.forArr.forEach(item => {
item.echart.clear()
item.echart.dispose()
@@ -136,6 +140,12 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
{id:'zhanlan',name:'展览建筑',echart:null},
{id:'suidao',name:'隧道',echart:null}]
+
+
+ //返回
+ goback(){
+ window.history.go(-1)
+ }
/* 顶部饼状图 */
indexBzt
initCharts(){
@@ -220,32 +230,47 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
barEcharts(){
this.forArr.forEach(item=>{
let _this = this
- item.echart = echarts.init(document.getElementById(item.id),'walden');
+ item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = {
title: {
- text: item.name+':总数(1024)',
+ text: this.headname+':总数(1024)',
left: "center",
top: "15",
- bottom: '80',
+ //bottom: '80',
textStyle: {
- fontSize: 23
+ fontSize: 30
}
},
xAxis: {
type: 'category',
data: this.zhiNameData,
- axisLabel: this.axisLabel
+ axisLabel:{
+ //this.axisLabel,
+ interval: 0,
+ textStyle:{
+ fontSize :18,
+ color:'#000000'
+ }
+
+ }
},
yAxis: {
type: 'value',
- axisLabel:this.axisLabel,
+ axisLabel:{
+ //this.axisLabel,
+ textStyle:{
+ fontSize :16,
+ color:'#000000'
+ }
+
+ }
},
tooltip: {
trigger: 'item',
formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name)
},
- //position: this.data.tableTooltipNoShow
+ position: this.data.tableTooltipNoShow2
},
series: [{
data: this.zhiNumData,
@@ -257,13 +282,13 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
- barWidth :'28',
+ barWidth :'38',
//label: this.topTextlabel
}]
};
item.echart.setOption(option);
item.echart.on('click', (params) => {
- this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':item.name}})
+ this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}})
});
})
}
diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts
index b262403..e7a9efc 100644
--- a/src/app/statistic-analysis/state/page-one/page-one.component.ts
+++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts
@@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn
- * @LastEditTime: 2020-11-10 14:35:31
+ * @LastEditTime: 2020-12-30 14:06:07
*/
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@@ -103,7 +103,8 @@ export class PageOneComponent implements OnInit {
]
};
this.indexBzt.on('click', (params) => {
- this.router.navigateByUrl('/statisticanalysis/statePageOne/time');
+ this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name}});
+ console.log(params)
});
this.indexBzt.setOption(options);
}
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 0bde65c..72e4dc9 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
@@ -10,32 +10,8 @@
-
-
-
+
+
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 08baac9..57d23cc 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
@@ -14,4 +14,17 @@
height: 330px;
}
}
-}
\ No newline at end of file
+}
+.echartsBox{
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ #pie{
+ width: 100%;
+ height: 550px;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%,-50%);
+ }
+ }
\ No newline at end of file
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 b9d768f..db54f9c 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
@@ -17,35 +17,16 @@ export class PageTwoNameComponent implements OnInit {
ngOnInit(): void {
setTimeout(() => {
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
- this.planState()
+ this.route.queryParams.subscribe(param=>{
+ this.headname=param.level
+ });
this.planAdd()
- this.passPlanEchart()
- this.planMake()
- this.planBack()
- this.planAudit()
}, 0);
}
ngOnDestroy(): void {
- this.addEchart.clear()
- this.addEchart.dispose()
-
- this.passPlanEchartObj.clear()
- this.passPlanEchartObj.dispose()
-
- this.passMakeEchart.clear()
- this.passMakeEchart.dispose()
-
- this.passBackEchart.clear()
- this.passBackEchart.dispose()
-
- this.planAuditEchart.clear()
- this.planAuditEchart.dispose()
-
- this.topEchart.clear()
- this.topEchart.dispose()
-
}
+ headname//标题
axisLabel = {
interval: 0,
textStyle:{
@@ -104,22 +85,29 @@ export class PageTwoNameComponent implements OnInit {
//预案新增统计
planAdd () {
let _this = this
- this.addEchart = echarts.init(document.getElementById('addEchart'),'walden');
+ this.addEchart = echarts.init(document.getElementById('pie'),'walden');
var option = {
title: {
- text: "预案新增:总数(1024)",
+ text: _this.headname+"总数(1024)",
left: "center",
top: "0",
bottom: '100%',
textStyle: {
- fontSize: 23
+ fontSize: 30
}
},
xAxis: {
type: 'category',
data: this.zhiNameData,
- axisLabel:this.axisLabel
+ axisLabel:{
+ //this.axisLabel,
+ textStyle:{
+ fontSize :18,
+ color:'#000000'
+ }
+
+ }
},
yAxis: {
type: 'value',
@@ -136,8 +124,8 @@ export class PageTwoNameComponent implements OnInit {
trigger: 'item',
formatter: (params)=>{
return this.data.biaogeTishi(params.name)
- }/* ,
- position: this.data.tableTooltipNoShow2 */
+ },
+ position: this.data.tableTooltipNoShow2
},
series: [{
data: this.zhiNumData,
@@ -148,7 +136,7 @@ export class PageTwoNameComponent implements OnInit {
backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)'
},
- barWidth :'28',
+ barWidth :'38',
//label: this.topTextlabel
}]
};
diff --git a/src/app/statistic-analysis/state/page-two-time/echarts.html b/src/app/statistic-analysis/state/page-two-time/echarts.html
index 22d2c00..cce5564 100644
--- a/src/app/statistic-analysis/state/page-two-time/echarts.html
+++ b/src/app/statistic-analysis/state/page-two-time/echarts.html
@@ -1,9 +1,17 @@
+
diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
index 758f8c8..7cbd5ce 100644
--- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
+++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
@@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn
- * @LastEditTime: 2020-09-10 10:19:33
+ * @LastEditTime: 2021-01-04 11:15:39
-->
@@ -66,7 +66,7 @@
-
+
diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss
index 9143544..b8b9d20 100644
--- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss
+++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss
@@ -47,12 +47,12 @@
//echarts div公有样式
.publicCss{
- height: 350px;
- width: 50%;
- display: inline-block;
- box-sizing: border-box;
- padding: 10px;
- margin: 10px 0;
+ width: 80%;
+ height: 550px;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%,-50%);
}
.publicOneLineCss{
height: 350px;
diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
index 13e32a8..496b628 100644
--- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
+++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDatepickerInputEvent } from '@angular/material/datepicker';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
import { FormControl } from '@angular/forms';
import { DateAdapter } from '@angular/material/core';
@@ -44,6 +44,7 @@ export class PageTwoTimeComponent implements OnInit {
//返回
goBack () {
this.echartsData.statefulInspectionToggle = true
+ window.history.go(-1)
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年
@@ -140,7 +141,7 @@ export class PageTwoTimeComponent implements OnInit {
})
export class echartsComponent implements OnInit {
- constructor(private router: Router,public snackBar: MatSnackBar,private adapter: DateAdapter
,public echartsData:EchartsDataService) { }
+ constructor(private router: Router,private activatedRoute: ActivatedRoute,public snackBar: MatSnackBar,private adapter: DateAdapter,public echartsData:EchartsDataService) { }
tiaoshiPao:any
datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200]
@@ -160,60 +161,39 @@ export class echartsComponent implements OnInit {
ngOnInit(): void {
window.setTimeout(()=>{
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
- this.oneInit()
+ this.activatedRoute.queryParams.subscribe(param=>{
+ this.headtext=param.level
+ });
+ //this.oneInit()
this.twoInit()
- this.threeInit()
+ /* this.threeInit()
this.fourInit()
this.fiveInit()
- this.sixInit()
+ this.sixInit() */
},0)
}
ngOnDestroy () {
- this.oneExample.clear()
- this.oneExample.dispose()
this.twoExample.clear()
this.twoExample.dispose()
- this.threeExample.clear()
- this.threeExample.dispose()
- this.fourExample.clear()
- this.fourExample.dispose()
- this.fiveExample.clear()
- this.fiveExample.dispose()
- this.sixExample.clear()
- this.sixExample.dispose()
+
}
changeTime (e) {
- this.oneExample.clear()
- this.oneExample.dispose()
this.twoExample.clear()
this.twoExample.dispose()
- this.threeExample.clear()
- this.threeExample.dispose()
- this.fourExample.clear()
- this.fourExample.dispose()
- this.fiveExample.clear()
- this.fiveExample.dispose()
- this.sixExample.clear()
- this.sixExample.dispose()
+
if (e=='year') {
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX)
- this.oneInit(this.dataYearX,this.dataYearY)
+ //this.oneInit(this.dataYearX,this.dataYearY)
this.twoInit(this.dataYearX,this.dataYearY)
- this.threeInit(this.dataYearX,this.dataYearY)
- this.fourInit(this.dataYearX,this.dataYearY)
- this.fiveInit(this.dataYearX,this.dataYearY)
- this.sixInit(this.dataYearX,this.dataYearY)
+
} else {
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
- this.oneInit()
+ //this.oneInit()
this.twoInit()
- this.threeInit()
- this.fourInit()
- this.fiveInit()
- this.sixInit()
+
}
}
@@ -307,31 +287,28 @@ export class echartsComponent implements OnInit {
this.oneExample.setOption(option);
}
+ headtext
twoExample:any;
twoInit (X=this.datayuex, Y=this.datayuey) {
let that = this
this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp');
var option = {
- grid: {
- top: 50,
- left:50,
- right: 20,
- bottom: 20,
- },
+
// 标题
title: {
- text: '预案新增'+':总数(1024)',
+ text: this.headtext+':总数(1024)',
top: -4,
left: 'center',
bottom: 100,
textStyle:{
//文字颜色
+ fontSize: 30,
color:'#000',
}
},
tooltip: {
trigger: 'axis',
-
+ position: this.echartsData.tableTooltipNoShowq,
formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案新增')
}
@@ -344,7 +321,7 @@ export class echartsComponent implements OnInit {
axisLabel: {
color: "#000", //刻度线标签颜色
textStyle:{
- fontSize :15,
+ fontSize :18,
color:'#000000'
},
},