chenjingyu 4 years ago
parent
commit
e350bb4ef5
  1. 6
      src/app/statistic-analysis/home/home.component.html
  2. 10
      src/app/statistic-analysis/home/home.component.ts
  3. 2
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
  4. 86
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

6
src/app/statistic-analysis/home/home.component.html

@ -2,7 +2,7 @@
<div class="main-top">
<!-- 左侧 -->
<div class="main-left">
<div class="panel panel04" style="flex: 2.3; max-height: 400px;">
<div class="panel panel04" style="flex: 2.3; max-height: 410px;">
<div class="panel-hd">
<a href="javascript:;" class="panel-more"><svg width="18" height="12" xmlns="http://www.w3.org/2000/svg"><g fill="#93FCFF" fill-rule="evenodd" opacity=".6"><path d="M0 0h18v2H0zM0 5h18v2H0zM0 10h18v2H0z"/></g></svg></a>
</div>
@ -77,7 +77,7 @@
</div>
<!-- 右侧 -->
<div class="main-right">
<div class="box-wrap" style="flex: 0.7;">
<div class="box-wrap" style="flex: 0.7">
<div class="panel-bd" style="padding-top: 13px;">
<div class="total-box">
<div class="total-item" (click)="threePlan()">
@ -99,7 +99,7 @@
</div>
</div>
</div>
<div class="box-wrap mt" style="flex: 2.3; max-height: 400px;">
<div class="box-wrap mt" style="flex: 2.3; max-height: 410px;">
<div class="panel-bd">
<div id="chartZdgzqy" class="chart-item" style="height: 100%;"></div>
</div>

10
src/app/statistic-analysis/home/home.component.ts

@ -310,8 +310,8 @@ export class HomeComponent implements OnInit {
{
name: '访问来源',
type: 'pie',
radius: '65%',
center: ['50%', '67%'],
radius: '60%',
center: ['50%', '58%'],
label:{
show:true,
//fontSize:10,
@ -354,8 +354,8 @@ export class HomeComponent implements OnInit {
{
name: '访问来源',
type: 'pie',
radius: '65%',
center: ['50%', '67%'],
radius: '60%',
center: ['50%', '58%'],
label:{
show:true,
formatter:'{b}\n{d|{c}份}',
@ -395,7 +395,6 @@ export class HomeComponent implements OnInit {
//新增、删除单位统计
chartDwsjcj
chartDwsjcjOptionsZhi = {
// color: ['#FB33C2', '#00CFF0', '#2C3DE0'],
// 标题
title: {
text: '新增、删除单位统计',
@ -405,6 +404,7 @@ export class HomeComponent implements OnInit {
grid: {
left: 30,
right: 0,
bottom:20
},
//图例
legend: {

2
src/app/statistic-analysis/state/page-two-time/page-two-time.component.html

@ -11,7 +11,7 @@
<div class="header">
<div class="queryField" *ngIf="!isQuery && echartsData.statefulInspectionToggle">
<mat-radio-group [(ngModel)]="selectType">
<mat-radio-group [(ngModel)]="selectType" (change)='changeTime($event)'>
<mat-radio-button value="month"></mat-radio-button>
<mat-radio-button value="year" style="margin-left: 10px;"></mat-radio-button>
</mat-radio-group>

86
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -37,6 +37,7 @@ export class PageTwoTimeComponent implements OnInit {
toggleFalse () {
this.isQuery = false
this.echartsData.statefulInspectionToggle = true
this.selectType = 'month'
}
//返回
@ -46,12 +47,18 @@ export class PageTwoTimeComponent implements OnInit {
selectType:string = 'month'; //选择当前的 查询类型 按月/年
changeTime (e) {
let data = e.value
this.appEcharts.changeTime(data)
}
//查询数据
years:any = []
selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12]
tiaoshiPao:any
datayuey=[270, 253, 244, 199, 189, 173, 160, 198,200]
datayuex=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月']
//气泡提示数据获取
bianli(){
var arrshuzu='[';
@ -61,8 +68,6 @@ export class PageTwoTimeComponent implements OnInit {
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1)
arrshuzu+=']'
this.tiaoshiPao=JSON.parse(arrshuzu)
console.log(this.tiaoshiPao)
//return tishiPao
}
//日期初始化
@ -137,8 +142,10 @@ export class echartsComponent implements OnInit {
constructor(public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { }
tiaoshiPao:any
datayuey=[270, 253, 244, 199, 189, 173, 160, 198,200]
datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200]
datayuex=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月']
dataYearX = ['2020','2020']
dataYearY = [1078, 936]
//气泡提示数据获取
bianli(){
var arrshuzu='[';
@ -148,8 +155,6 @@ export class echartsComponent implements OnInit {
arrshuzu=arrshuzu.substring(0,arrshuzu.length-1)
arrshuzu+=']'
this.tiaoshiPao=JSON.parse(arrshuzu)
console.log(this.tiaoshiPao)
//return tishiPao
}
ngOnInit(): void {
window.setTimeout(()=>{
@ -178,15 +183,47 @@ export class echartsComponent implements OnInit {
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.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.twoInit()
this.threeInit()
this.fourInit()
this.fiveInit()
this.sixInit()
}
}
oneExample:any;
oneInit () {
oneInit (X=this.datayuex, Y=this.datayuey) {
this.oneExample = echarts.init(document.getElementById('one'),'walden');
var option = {
grid: {
top: 50,
left:40,
right: 20,
},
tooltip: {
trigger: 'axis',
@ -214,7 +251,7 @@ export class echartsComponent implements OnInit {
// x轴
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'],
data: X,
boundaryGap: true,
axisLabel: {
color: "#000", //刻度线标签颜色
@ -259,11 +296,10 @@ export class echartsComponent implements OnInit {
name: '单位预案编制数量',
type: 'line',
markPoint: {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: [270, 253, 244, 199, 189, 173, 160, 198,200],
data: Y,
}
],
};
@ -271,7 +307,7 @@ export class echartsComponent implements OnInit {
}
twoExample:any;
twoInit () {
twoInit (X=this.datayuex, Y=this.datayuey) {
let that = this
this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp');
var option = {
@ -302,7 +338,7 @@ export class echartsComponent implements OnInit {
// x轴
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'],
data: X,
boundaryGap: true,
axisLabel: {
color: "#000", //刻度线标签颜色
@ -351,7 +387,7 @@ export class echartsComponent implements OnInit {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: [270, 253, 244, 199, 189, 173, 160, 198,200],
data: Y,
}
],
};
@ -363,7 +399,7 @@ export class echartsComponent implements OnInit {
}
threeExample:any;
threeInit () {
threeInit (X=this.datayuex, Y=this.datayuey) {
let that = this
this.threeExample = echarts.init(document.getElementById('three'), 'skinUpp');
var option = {
@ -393,7 +429,7 @@ export class echartsComponent implements OnInit {
// x轴
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'],
data: X,
boundaryGap: true,
axisLabel: {
textStyle:{
@ -442,7 +478,7 @@ export class echartsComponent implements OnInit {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: [270, 253, 244, 199, 189, 173, 160, 198,200],
data: Y,
}
],
};
@ -454,7 +490,7 @@ export class echartsComponent implements OnInit {
}
fourExample:any;
fourInit () {
fourInit (X=this.datayuex, Y=this.datayuey) {
let that = this
this.fourExample = echarts.init(document.getElementById('four'), 'skinUpp');
var option = {
@ -485,7 +521,7 @@ export class echartsComponent implements OnInit {
// x轴
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'],
data: X,
boundaryGap: true,
axisLabel: {
textStyle:{
@ -534,7 +570,7 @@ export class echartsComponent implements OnInit {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: [270, 253, 244, 199, 189, 173, 160, 198,200],
data: Y,
}
],
};
@ -546,7 +582,7 @@ export class echartsComponent implements OnInit {
}
fiveExample:any;
fiveInit () {
fiveInit (X=this.datayuex, Y=this.datayuey) {
let that = this
this.fiveExample = echarts.init(document.getElementById('five'), 'skinUpp');
var option = {
@ -578,7 +614,7 @@ export class echartsComponent implements OnInit {
// x轴
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'],
data: X,
boundaryGap: true,
axisLabel: {
textStyle:{
@ -627,7 +663,7 @@ export class echartsComponent implements OnInit {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: [270, 253, 244, 199, 189, 173, 160, 198,200],
data: Y,
}
],
};
@ -639,7 +675,7 @@ export class echartsComponent implements OnInit {
}
sixExample:any;
sixInit () {
sixInit (X=this.datayuex, Y=this.datayuey) {
let that = this
this.sixExample = echarts.init(document.getElementById('six'), 'skinUpp');
var option = {
@ -670,7 +706,7 @@ export class echartsComponent implements OnInit {
// x轴
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月'],
data: X,
boundaryGap: true,
axisLabel: {
textStyle:{
@ -719,7 +755,7 @@ export class echartsComponent implements OnInit {
symbolSize:[65, 65],
data: this.tiaoshiPao
},
data: [270, 253, 244, 199, 189, 173, 160, 198,200],
data: Y,
}
],
};

Loading…
Cancel
Save