|
|
|
@ -3,8 +3,10 @@ import { Router } from '@angular/router';
|
|
|
|
|
import { ActivatedRoute } from '@angular/router'; |
|
|
|
|
import {EchartsDataService} from '../echarts-data.service' |
|
|
|
|
import { MatDialog } from '@angular/material/dialog'; |
|
|
|
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; |
|
|
|
|
declare var echarts: any; |
|
|
|
|
|
|
|
|
|
//首页图形查询
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-scheduled-updates', |
|
|
|
|
templateUrl: './scheduled-updates.component.html', |
|
|
|
@ -12,7 +14,7 @@ declare var echarts: any;
|
|
|
|
|
}) |
|
|
|
|
export class ScheduledUpdatesComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(private router: Router,public echartsData:EchartsDataService) { } |
|
|
|
|
constructor(private router: Router,public snackBar: MatSnackBar,public echartsData:EchartsDataService) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
@ -23,10 +25,34 @@ export class ScheduledUpdatesComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
ngOnDestroy () { |
|
|
|
|
this.example.clear() |
|
|
|
|
this.example.dispose() |
|
|
|
|
//this.example.dispose()
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
example:any; |
|
|
|
|
buildingShow:boolean=false //控制查询条件的显隐
|
|
|
|
|
selectedBtn="tu" //两个查询按钮颜色控制
|
|
|
|
|
chaxun:string="" |
|
|
|
|
//图形查询点击事件
|
|
|
|
|
tuClick(){ |
|
|
|
|
this.buildingShow=false |
|
|
|
|
this.selectedBtn="tu" |
|
|
|
|
} |
|
|
|
|
//条件查询
|
|
|
|
|
tiaojianClick(){ |
|
|
|
|
this.buildingShow=true |
|
|
|
|
this.selectedBtn="tiaojian" |
|
|
|
|
} |
|
|
|
|
//查询按钮点击事件
|
|
|
|
|
findClick(){ |
|
|
|
|
const config = new MatSnackBarConfig(); |
|
|
|
|
config.verticalPosition = 'top'; |
|
|
|
|
config.duration = 3000 |
|
|
|
|
if(this.chaxun==""){this.snackBar.open('未选择单位','确定',config)} |
|
|
|
|
else{ |
|
|
|
|
this.echartsData.buildingName=this.chaxun |
|
|
|
|
this.echartsData.tableShow=true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/* 首页饼状图 */ |
|
|
|
|
initCharts(pieid){ |
|
|
|
|
this.example= echarts.init(document.getElementById(pieid),'walden'); |
|
|
|
@ -98,14 +124,50 @@ export class ScheduledUpdatesComponent implements OnInit {
|
|
|
|
|
this.example.setOption(options); |
|
|
|
|
this.example.on('click', (params) => { |
|
|
|
|
if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');} |
|
|
|
|
else{this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');}
|
|
|
|
|
else{ |
|
|
|
|
if(pieid=="pie"){ |
|
|
|
|
this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"] |
|
|
|
|
}else{this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]} |
|
|
|
|
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts'); |
|
|
|
|
} |
|
|
|
|
console.log(this.echartsData.scheduledUpdatesToggle)
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//首页条件查询
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-indexCondition', |
|
|
|
|
templateUrl: './indexCondition.html', |
|
|
|
|
styleUrls: ['../state/page-two-time/page-two-time.component.scss'] |
|
|
|
|
}) |
|
|
|
|
export class indexConditionComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(public router: ActivatedRoute,public echartsData:EchartsDataService,public route:Router) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
window.setTimeout(()=>{ |
|
|
|
|
|
|
|
|
|
},0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ngOnDestroy () { |
|
|
|
|
/* this.oneEcharts.dispose() |
|
|
|
|
this.oneEcharts.clear() */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
oneEcharts:any; |
|
|
|
|
displayedColumns: string[] = ['name', 'weight', 'symbol']; |
|
|
|
|
//点击支队名称跳转事件
|
|
|
|
|
zhiClick(item){ |
|
|
|
|
this.route.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':item+this.echartsData.buildingName}}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//所有页面头部
|
|
|
|
|
@Component({ |
|
|
|
|
selector: 'app-publicEcharts', |
|
|
|
|
templateUrl: './publicEcharts.html', |
|
|
|
@ -116,26 +178,29 @@ export class publicEchartsComponent implements OnInit {
|
|
|
|
|
constructor(private router: Router,public echartsData:EchartsDataService,public dialog: MatDialog,) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = true |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isToggle:boolean = true; // 已核查/未核查
|
|
|
|
|
|
|
|
|
|
//已核查
|
|
|
|
|
verified () { |
|
|
|
|
this.isToggle = false |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = false |
|
|
|
|
this.isToggle = true |
|
|
|
|
//this.echartsData.scheduledUpdatesToggle ="one"
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle =1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//未核查
|
|
|
|
|
notVerified () { |
|
|
|
|
this.isToggle = false |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = true |
|
|
|
|
//this.echartsData.scheduledUpdatesToggle = "three"
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle =1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//返回
|
|
|
|
|
goBack () { |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = true |
|
|
|
|
this.echartsData.scheduledUpdatesToggle-- |
|
|
|
|
console.log(this.echartsData.scheduledUpdatesToggle) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//更多 窗口
|
|
|
|
@ -185,7 +250,7 @@ export class verifiedComponent implements OnInit {
|
|
|
|
|
this.oneEcharts = echarts.init(document.getElementById('center'),'walden'); |
|
|
|
|
var option = { |
|
|
|
|
grid: { |
|
|
|
|
top: 50, |
|
|
|
|
top: 100, |
|
|
|
|
left:40, |
|
|
|
|
right: 20, |
|
|
|
|
//bottom: 20,
|
|
|
|
@ -266,21 +331,22 @@ export class verifiedComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
}; |
|
|
|
|
this.oneEcharts.getZr().on('click', (params) => { |
|
|
|
|
// console.log(params.name)
|
|
|
|
|
/* this.echartsData.statefulInspectionName =params.name+headtext; |
|
|
|
|
this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_there`); */ |
|
|
|
|
const pointInPixel= [params.offsetX, params.offsetY]; |
|
|
|
|
/* const pointInPixel= [params.offsetX, params.offsetY]; |
|
|
|
|
if (this.oneEcharts.containPixel('grid',pointInPixel)) { |
|
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
|
//this.echartsData.scheduledUpdatesToggle = false
|
|
|
|
|
this.router.navigate(['/statisticanalysis/scheduledUpdates/yueDate'],{queryParams:{'level':option.xAxis.data[xIndex]}}); |
|
|
|
|
//this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
|
|
|
|
|
|
|
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
|
//this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
|
|
|
|
|
//this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':option.xAxis.data[xIndex]}});
|
|
|
|
|
} */ |
|
|
|
|
//let xIndex=this.items[index].echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
|
|
|
|
|
const pointInPixel= [params.offsetX, params.offsetY]; |
|
|
|
|
if (this.oneEcharts.containPixel('grid',pointInPixel)) { |
|
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
|
//this.echartsData.scheduledUpdatesName = "ff"
|
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 2 |
|
|
|
|
this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
this.oneEcharts.setOption(option); |
|
|
|
|
} |
|
|
|
@ -410,7 +476,7 @@ export class verifiedComponent implements OnInit {
|
|
|
|
|
let xIndex=this.items[index].echart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
|
this.echartsData.scheduledUpdatesName = this.months[index] |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = false |
|
|
|
|
//this.echartsData.scheduledUpdatesToggle = false
|
|
|
|
|
this.echartsData.scheduledUpdatesXName=params.name |
|
|
|
|
console.log(this.echartsData.scheduledUpdatesXName) |
|
|
|
|
}); |
|
|
|
@ -534,7 +600,7 @@ export class notVerifiedComponent implements OnInit {
|
|
|
|
|
this.oneEcharts.on('click', (params) => { |
|
|
|
|
this.echartsData.scheduledUpdatesType = 1 |
|
|
|
|
this.echartsData.scheduledUpdatesName = params.name |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = false |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -549,7 +615,7 @@ export class notVerifiedComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
export class yueDateComponent implements OnInit { |
|
|
|
|
|
|
|
|
|
constructor(public router: ActivatedRoute,public echartsData:EchartsDataService) { } |
|
|
|
|
constructor(public router: ActivatedRoute,public echartsData:EchartsDataService,public route:Router) { } |
|
|
|
|
|
|
|
|
|
level:string; |
|
|
|
|
ngOnInit(): void { |
|
|
|
@ -572,7 +638,7 @@ export class yueDateComponent implements OnInit {
|
|
|
|
|
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp'); |
|
|
|
|
var option = { |
|
|
|
|
title: { |
|
|
|
|
text: this.level+'总数:(500)', |
|
|
|
|
text: this.echartsData.scheduledUpdatesXName+'已核查总数:(500)', |
|
|
|
|
top: -4, |
|
|
|
|
left: '35%', |
|
|
|
|
textStyle:{ |
|
|
|
@ -588,7 +654,7 @@ export class yueDateComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
legend: { |
|
|
|
|
data: ['平均值','平均值2倍','平均值3倍', '已核查无需修改', '已核查修改中', '已核查提交审核'], |
|
|
|
|
data: this.echartsData.zhuXname, |
|
|
|
|
textStyle: { fontSize :16,color: '#000' } |
|
|
|
|
}, |
|
|
|
|
xAxis: [{ |
|
|
|
@ -640,34 +706,34 @@ export class yueDateComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: '已核查无需修改', |
|
|
|
|
name: this.echartsData.zhuXname[1], |
|
|
|
|
type: 'bar', |
|
|
|
|
stack: '总数', |
|
|
|
|
data: [68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45], |
|
|
|
|
barWidth :'38', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '已核查修改中', |
|
|
|
|
name: this.echartsData.zhuXname[2], |
|
|
|
|
type: 'bar', |
|
|
|
|
stack: '总数', |
|
|
|
|
data: [39, 3, 4, 7, 3, 2, 3, 4, 29, 40, 40, 2, 4], |
|
|
|
|
itemStyle:{color: '#626c91'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '已核查提交审核', |
|
|
|
|
name: this.echartsData.zhuXname[3], |
|
|
|
|
type: 'bar', |
|
|
|
|
stack: '总数', |
|
|
|
|
data: [48, 2, 3, 3, 4, 3, 2, 26, 4, 3, 3, 24, 14], |
|
|
|
|
itemStyle:{color:'#c4ebad'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '平均值', |
|
|
|
|
name: this.echartsData.zhuXname[0], |
|
|
|
|
type: 'line', |
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37], |
|
|
|
|
itemStyle:{color: '#FFDC35'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
/* { |
|
|
|
|
name: '平均值2倍', |
|
|
|
|
type: 'line', |
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
@ -680,7 +746,7 @@ export class yueDateComponent implements OnInit {
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
data: [143, 135, 159, 143, 127, 144, 144, 123, 114, 117, 124, 129, 111], |
|
|
|
|
itemStyle:{color: '#999'} |
|
|
|
|
}, |
|
|
|
|
}, */ |
|
|
|
|
] |
|
|
|
|
}; |
|
|
|
|
this.oneEcharts.setOption(option); |
|
|
|
@ -692,6 +758,21 @@ export class yueDateComponent implements OnInit {
|
|
|
|
|
this.echartsData.scheduledUpdatesXName=params.name |
|
|
|
|
console.log(this.echartsData.scheduledUpdatesXName) |
|
|
|
|
}); */ |
|
|
|
|
this.oneEcharts.getZr().on('click', (params) => { |
|
|
|
|
|
|
|
|
|
const pointInPixel= [params.offsetX, params.offsetY]; |
|
|
|
|
if (this.oneEcharts.containPixel('grid',pointInPixel)) { |
|
|
|
|
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; |
|
|
|
|
/*事件处理代码书写位置*/ |
|
|
|
|
this.echartsData.scheduledUpdatesType = 0 |
|
|
|
|
console.log(option.xAxis) |
|
|
|
|
this.echartsData.scheduledUpdatesName = option.xAxis[0].data[xIndex] |
|
|
|
|
this.echartsData.scheduledUpdatesToggle = 3 |
|
|
|
|
//this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex]
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -743,7 +824,8 @@ export class detailedInformationComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
legend: { |
|
|
|
|
data: ['平均值','平均值2倍','平均值3倍', '已核查无需修改', '已核查修改中', '已核查提交审核'], |
|
|
|
|
//data: ['平均值','维护无需修改', '维护修改', '维护通过审核'],
|
|
|
|
|
data:this.echartsData.zhuXname, |
|
|
|
|
textStyle: { color: '#000',fontSize: 16 } |
|
|
|
|
}, |
|
|
|
|
xAxis: [{ |
|
|
|
@ -781,34 +863,34 @@ export class detailedInformationComponent implements OnInit {
|
|
|
|
|
], |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: '已核查无需修改', |
|
|
|
|
name: this.echartsData.zhuXname[1], |
|
|
|
|
type: 'bar', |
|
|
|
|
stack: '总数', |
|
|
|
|
barWidth :'38', |
|
|
|
|
data: [68, 56, 69, 57, 43, 79, 78, 66, 49, 34, 49, 78, 45], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '已核查修改中', |
|
|
|
|
name: this.echartsData.zhuXname[2], |
|
|
|
|
type: 'bar', |
|
|
|
|
stack: '总数', |
|
|
|
|
data: [39, 43, 49, 27, 53, 29, 38, 49, 29, 40, 40, 27, 54], |
|
|
|
|
itemStyle:{color: '#626c91'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '已核查提交审核', |
|
|
|
|
name: this.echartsData.zhuXname[3], |
|
|
|
|
type: 'bar', |
|
|
|
|
stack: '总数', |
|
|
|
|
data: [48, 42, 43, 53, 47, 39, 25, 26, 54, 34, 39, 24, 14], |
|
|
|
|
itemStyle:{color:'#c4ebad'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '平均值', |
|
|
|
|
name: this.echartsData.zhuXname[0], |
|
|
|
|
type: 'line', |
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
data: [49, 45, 53, 47, 49, 43, 48, 41, 38, 39, 41, 43, 37], |
|
|
|
|
itemStyle:{color: '#FFDC35'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
/* { |
|
|
|
|
name: '平均值2倍', |
|
|
|
|
type: 'line', |
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
@ -821,7 +903,7 @@ export class detailedInformationComponent implements OnInit {
|
|
|
|
|
// yAxisIndex: 1,
|
|
|
|
|
data: [143, 135, 159, 143, 127, 144, 144, 123, 114, 117, 124, 129, 111], |
|
|
|
|
itemStyle:{color: '#999'} |
|
|
|
|
}, |
|
|
|
|
}, */ |
|
|
|
|
] |
|
|
|
|
}; |
|
|
|
|
this.example.setOption(option); |
|
|
|
|