|
|
|
@ -3,6 +3,8 @@ import { MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
|
|
|
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar'; |
|
|
|
|
import { FormControl } from '@angular/forms'; |
|
|
|
|
import { DateAdapter } from '@angular/material/core'; |
|
|
|
|
import { PageTwoNameComponent } from '../page-two-name/page-two-name.component'; |
|
|
|
|
import {EchartsDataService} from '../../echarts-data.service' |
|
|
|
|
declare var echarts: any; |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
@ -12,28 +14,34 @@ declare var echarts: any;
|
|
|
|
|
}) |
|
|
|
|
export class PageTwoTimeComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(public snackBar: MatSnackBar,private adapter: DateAdapter<any>,) { } |
|
|
|
|
constructor(public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { } |
|
|
|
|
|
|
|
|
|
@ViewChild('echarts') echarts:echartsComponent; //父组件中获得子组件的引用
|
|
|
|
|
@ViewChild('appEcharts')appEcharts :echartsComponent; //父组件中获得子组件的引用
|
|
|
|
|
@ViewChild('pageTwoName')pageTwoName :PageTwoNameComponent; //父组件中获得子组件的引用
|
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.startTime = new FormControl( (new Date()).getFullYear()+ '-' + '01' + '-' + '01' ) |
|
|
|
|
this.endTime = new FormControl( new Date() ) |
|
|
|
|
this.startTime = new FormControl( (new Date()).getFullYear()-10 ) |
|
|
|
|
this.endTime = new FormControl( (new Date()).getFullYear() ) |
|
|
|
|
this.adapter.setLocale('CH') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isQuery:boolean = true; //横纵向查询
|
|
|
|
|
|
|
|
|
|
//查询
|
|
|
|
|
query () { |
|
|
|
|
this.echarts.toggleEcharts() |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//shao
|
|
|
|
|
toggleTrue () {
|
|
|
|
|
this.isQuery = true |
|
|
|
|
this.echartsData.statefulInspectionToggle = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//chen
|
|
|
|
|
toggleFalse () {
|
|
|
|
|
this.isQuery = false |
|
|
|
|
this.echartsData.statefulInspectionToggle = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
startTime:any; //查询开始时间
|
|
|
|
@ -95,7 +103,7 @@ export class PageTwoTimeComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
export class echartsComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(public snackBar: MatSnackBar,private adapter: DateAdapter<any>,) { } |
|
|
|
|
constructor(public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
@ -108,11 +116,7 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
},0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
toggle:boolean = true;//切换
|
|
|
|
|
|
|
|
|
|
toggleEcharts () { |
|
|
|
|
this.toggle = !this.toggle |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
oneInit () { |
|
|
|
|
var chartQusj = echarts.init(document.getElementById('one'), 'skinUpp'); |
|
|
|
@ -191,6 +195,7 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
twoInit () { |
|
|
|
|
let that = this |
|
|
|
|
var chartQusj = echarts.init(document.getElementById('two'), 'skinUpp'); |
|
|
|
|
var option = { |
|
|
|
|
grid: { |
|
|
|
@ -257,9 +262,14 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
chartQusj.setOption(option); |
|
|
|
|
chartQusj.on('click', function (params) { |
|
|
|
|
that.echartsData.statefulInspectionName = '预案新增' |
|
|
|
|
that.echartsData.statefulInspectionToggle = false |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
threeInit () { |
|
|
|
|
let that = this |
|
|
|
|
var chartQusj = echarts.init(document.getElementById('three'), 'skinUpp'); |
|
|
|
|
var option = { |
|
|
|
|
grid: { |
|
|
|
@ -326,9 +336,14 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
chartQusj.setOption(option); |
|
|
|
|
chartQusj.on('click', function (params) { |
|
|
|
|
that.echartsData.statefulInspectionName = '预案审核通过' |
|
|
|
|
that.echartsData.statefulInspectionToggle = false |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fourInit () { |
|
|
|
|
let that = this |
|
|
|
|
var chartQusj = echarts.init(document.getElementById('four'), 'skinUpp'); |
|
|
|
|
var option = { |
|
|
|
|
grid: { |
|
|
|
@ -395,9 +410,14 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
chartQusj.setOption(option); |
|
|
|
|
chartQusj.on('click', function (params) { |
|
|
|
|
that.echartsData.statefulInspectionName = '预案编制' |
|
|
|
|
that.echartsData.statefulInspectionToggle = false |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fiveInit () { |
|
|
|
|
let that = this |
|
|
|
|
var chartQusj = echarts.init(document.getElementById('five'), 'skinUpp'); |
|
|
|
|
var option = { |
|
|
|
|
grid: { |
|
|
|
@ -464,9 +484,14 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
chartQusj.setOption(option); |
|
|
|
|
chartQusj.on('click', function (params) { |
|
|
|
|
that.echartsData.statefulInspectionName = '预案审核退回' |
|
|
|
|
that.echartsData.statefulInspectionToggle = false |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sixInit () { |
|
|
|
|
let that = this |
|
|
|
|
var chartQusj = echarts.init(document.getElementById('six'), 'skinUpp'); |
|
|
|
|
var option = { |
|
|
|
|
grid: { |
|
|
|
@ -533,6 +558,10 @@ export class echartsComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
chartQusj.setOption(option); |
|
|
|
|
chartQusj.on('click', function (params) { |
|
|
|
|
that.echartsData.statefulInspectionName = '预案审核中' |
|
|
|
|
that.echartsData.statefulInspectionToggle = false |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|