|
|
@ -4,7 +4,7 @@ |
|
|
|
* @Author: sueRimn |
|
|
|
* @Author: sueRimn |
|
|
|
* @Date: 2020-09-01 15:24:39 |
|
|
|
* @Date: 2020-09-01 15:24:39 |
|
|
|
* @LastEditors: sueRimn |
|
|
|
* @LastEditors: sueRimn |
|
|
|
* @LastEditTime: 2021-07-07 14:07:26 |
|
|
|
* @LastEditTime: 2021-07-14 14:31:47 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
@ -55,31 +55,55 @@ export class PageOneComponent implements OnInit { |
|
|
|
this.initCharts("pieone") |
|
|
|
this.initCharts("pieone") |
|
|
|
this.initCharts("pietwo") |
|
|
|
this.initCharts("pietwo") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//级别和类型转换
|
|
|
|
|
|
|
|
pieonetype=true//级别
|
|
|
|
|
|
|
|
clickhuan(){ |
|
|
|
|
|
|
|
this.pieonetype=!this.pieonetype |
|
|
|
|
|
|
|
this.initCharts("pieone") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 首页饼状图 */ |
|
|
|
/* 首页饼状图 */ |
|
|
|
indexBzt |
|
|
|
indexBzt |
|
|
|
tabledata |
|
|
|
tabledata |
|
|
|
count |
|
|
|
count |
|
|
|
indexData |
|
|
|
indexData |
|
|
|
planCategoriesData=[] |
|
|
|
planCategoriesData=[]//预案级别
|
|
|
|
planStatusesData=[] |
|
|
|
planStatusesData=[]//预案状态
|
|
|
|
|
|
|
|
planTypeStatisticsdata=[]//预案类型
|
|
|
|
initCharts(tid){ |
|
|
|
initCharts(tid){ |
|
|
|
|
|
|
|
this.planTypeStatisticsdata=[] |
|
|
|
|
|
|
|
this.planCategoriesData=[] |
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) |
|
|
|
if(tid=='pieone') |
|
|
|
if(tid=='pieone') |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.tabledata[0].planCategoryStatistics.planCategories.forEach((value,index,array) => { |
|
|
|
if(this.pieonetype){ |
|
|
|
if(array[index].planCategoryName=='LevelOne'){ |
|
|
|
this.tabledata[0].planCategoryStatistics.planCategories.forEach((value,index,array) => { |
|
|
|
this.planCategoriesData.push({name:'Ⅰ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1}) |
|
|
|
if(array[index].planCategoryName=='LevelOne'){ |
|
|
|
}else if(array[index].planCategoryName=='LevelTwo'){ |
|
|
|
this.planCategoriesData.push({name:'Ⅰ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1}) |
|
|
|
this.planCategoriesData.push({name:'Ⅱ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2}) |
|
|
|
}else if(array[index].planCategoryName=='LevelTwo'){ |
|
|
|
}else if(array[index].planCategoryName=='LevelThree'){ |
|
|
|
this.planCategoriesData.push({name:'Ⅱ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2}) |
|
|
|
this.planCategoriesData.push({name:'Ⅲ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3}) |
|
|
|
}else if(array[index].planCategoryName=='LevelThree'){ |
|
|
|
}else if(array[index].planCategoryName=='LevelFour'){ |
|
|
|
this.planCategoriesData.push({name:'Ⅲ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3}) |
|
|
|
this.planCategoriesData.push({name:'Ⅳ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4}) |
|
|
|
}else if(array[index].planCategoryName=='LevelFour'){ |
|
|
|
}else if(array[index].planCategoryName=='LevelFive'){ |
|
|
|
this.planCategoriesData.push({name:'Ⅳ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4}) |
|
|
|
this.planCategoriesData.push({name:'Ⅴ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:5}) |
|
|
|
}else if(array[index].planCategoryName=='LevelFive'){ |
|
|
|
} |
|
|
|
this.planCategoriesData.push({name:'Ⅴ级预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:5}) |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.tabledata[0].planTypeStatistics.planTypes.forEach((value,index,array) => { |
|
|
|
|
|
|
|
if(array[index].planTypeName=='Plan2D'){ |
|
|
|
|
|
|
|
this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1}) |
|
|
|
|
|
|
|
}else if(array[index].planTypeName=='Plan3D'){ |
|
|
|
|
|
|
|
this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2}) |
|
|
|
|
|
|
|
}else if(array[index].planTypeName=='Other'){ |
|
|
|
|
|
|
|
this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3}) |
|
|
|
|
|
|
|
}else if(array[index].planTypeName=='PlanText'){ |
|
|
|
|
|
|
|
this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.tabledata[0].planStatusStatistics.planStatuses.forEach((value,index,array) => { |
|
|
|
this.tabledata[0].planStatusStatistics.planStatuses.forEach((value,index,array) => { |
|
|
|
if(array[index].planStatusName=='New'){ |
|
|
|
if(array[index].planStatusName=='New'){ |
|
|
@ -101,7 +125,7 @@ export class PageOneComponent implements OnInit { |
|
|
|
this.indexBzt = ec.init(document.getElementById(tid),'walden'); |
|
|
|
this.indexBzt = ec.init(document.getElementById(tid),'walden'); |
|
|
|
var options={ |
|
|
|
var options={ |
|
|
|
title: { |
|
|
|
title: { |
|
|
|
text:tid=='pieone'?`预案级别统计(${this.tabledata[0].planCategoryStatistics.totalCount}份)` :`预案状态统计(${this.tabledata[0].planStatusStatistics.totalCount}份)`, |
|
|
|
text:tid=='pieone'&&this.pieonetype?`预案级别统计(${this.tabledata[0].planCategoryStatistics.totalCount}份)` :tid=='pieone'&&!this.pieonetype?`预案类型统计(${this.tabledata[0].planTypeStatistics.totalCount}份)`:`预案状态统计(${this.tabledata[0].planStatusStatistics.totalCount}份)`, |
|
|
|
top: "7%", |
|
|
|
top: "7%", |
|
|
|
left: 'center', |
|
|
|
left: 'center', |
|
|
|
textStyle:{ |
|
|
|
textStyle:{ |
|
|
@ -125,7 +149,7 @@ export class PageOneComponent implements OnInit { |
|
|
|
fontSize:this.padHw?15: 18, |
|
|
|
fontSize:this.padHw?15: 18, |
|
|
|
color:"#000000" |
|
|
|
color:"#000000" |
|
|
|
}, |
|
|
|
}, |
|
|
|
data:tid=='pieone'?['Ⅰ级预案', 'Ⅱ级预案', 'Ⅲ级预案', 'Ⅳ级预案', 'Ⅴ级预案'] :['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中'] |
|
|
|
data:tid=='pieone'&&this.pieonetype?['Ⅰ级预案', 'Ⅱ级预案', 'Ⅲ级预案', 'Ⅳ级预案', 'Ⅴ级预案']:tid=='pieone'&&!this.pieonetype?['二维预案', '三维预案', '其它预案', '文本预案'] :['预案新增', '预案审核通过', '预案编制', '预案审核退回', '预案审核中'] |
|
|
|
}, |
|
|
|
}, |
|
|
|
series: [ |
|
|
|
series: [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -147,7 +171,7 @@ export class PageOneComponent implements OnInit { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
data:tid=='pieone'?this.planCategoriesData:this.planStatusesData, |
|
|
|
data:tid=='pieone'&&this.pieonetype?this.planCategoriesData:tid=='pieone'&&!this.pieonetype?this.planTypeStatisticsdata:this.planStatusesData, |
|
|
|
emphasis: { |
|
|
|
emphasis: { |
|
|
|
itemStyle: { |
|
|
|
itemStyle: { |
|
|
|
shadowBlur: 10, |
|
|
|
shadowBlur: 10, |
|
|
|