Browse Source

[修改]统计分析维护更新统计根据不同级别显示不同数据

tangshan
chenjingyu 4 years ago
parent
commit
576566c4ea
  1. 7
      src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.ts
  2. 9
      src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts
  3. 2
      src/app/statistic-analysis/echarts-data.service.ts
  4. 10
      src/app/statistic-analysis/scheduled-updates/publicEcharts.html
  5. 75
      src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
  6. 2
      src/app/statistic-analysis/scheduled-updates/verified.html

7
src/app/statistic-analysis/deleteUnit/delete-two-newadd/delete-two-newadd.component.ts

@ -185,7 +185,12 @@ export class DeleteTwoNewaddComponent implements OnInit {
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { if (this.detailPlanEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1'}}); if(this.serviceData.level=='0'){
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1'}});
}else if(this.serviceData.level=='1'){
this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.option.xAxis.data[xIndex]+this.buildingTypeName}});
}
} }
}); });
} }

9
src/app/statistic-analysis/deleteUnit/delete-two/delete-two.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-02 16:21:18 * @Date: 2020-09-02 16:21:18
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-04-30 15:51:42 * @LastEditTime: 2021-06-24 15:27:13
*/ */
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@ -312,7 +312,12 @@ export class DeleteTwoComponent implements OnInit {
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
//this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{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}});
if(this.echartsData.dezhiorBuinding=="zhi"){ if(this.echartsData.dezhiorBuinding=="zhi"){
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}}); if(this.echartsData.level=='0'){
this.router.navigate(['/statisticanalysis/delete_one/delete_there'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
}else if(this.echartsData.level=='1'){
this.router.navigate(['/statisticanalysis/delete_one/delete_four'],{queryParams:{'level':this.options.xAxis.data[xIndex]+headtext}});
}
}else{ }else{
this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}}); this.router.navigate(['/statisticanalysis/delete_two_newadd'],{queryParams:{'level':this.options.xAxis.data[xIndex],'headtext':headtext}});
} }

2
src/app/statistic-analysis/echarts-data.service.ts

@ -14,7 +14,7 @@ export class EchartsDataService {
this.allEcharts=this.http.get("/api/StatisticsAnalysis") this.allEcharts=this.http.get("/api/StatisticsAnalysis")
//return this.allEcharts.data //return this.allEcharts.data
} }
level = sessionStorage.getItem("level"); level =String(sessionStorage.getItem("level"));
allEcharts allEcharts
//计划首页 //计划首页
tableShow=false//控制首页表格显隐 tableShow=false//控制首页表格显隐

10
src/app/statistic-analysis/scheduled-updates/publicEcharts.html

@ -4,13 +4,13 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 08:59:24 * @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-04-08 16:12:48 * @LastEditTime: 2021-06-24 16:43:49
--> -->
<div class="content"> <div class="content">
<div class="header"> <div class="header">
<div style="padding-right: 150px;" *ngIf="echartsData.findShow"> <div style="padding-right: 150px;" *ngIf="echartsData.scheduledUpdatesToggle==1">
<button mat-raised-button (click)="zhiFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='zhi'}" style="margin:0 10px;" >队查询</button> <button mat-raised-button (click)="zhiFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='zhi'}" style="margin:0 10px;" >查询</button>
<button mat-raised-button (click)="buildingFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='building'}" >建筑类型查询</button> <button mat-raised-button (click)="buildingFind()" [ngClass]="{'selectButton': echartsData.zhiorBuinding=='building'}" >建筑类型查询</button>
</div> </div>
@ -76,8 +76,8 @@
<div class="fixedCss"> <div class="fixedCss">
<button mat-raised-button (click)='goBack()' >返回</button> <button mat-raised-button (click)='goBack()' >返回</button>
<button mat-raised-button (click)='verified()' [ngClass]="{'selectButton': isToggle}" style="margin:0 10px;" *ngIf="echartsData.scheduledUpdatesToggle">已核查</button> <button mat-raised-button (click)='verified()' [ngClass]="{'selectButton': isToggle}" style="margin:0 10px;" *ngIf="echartsData.scheduledUpdatesToggle!=3">已核查</button>
<button mat-raised-button (click)='notVerified()' [ngClass]="{'selectButton': !isToggle}" *ngIf="echartsData.scheduledUpdatesToggle">未核查</button> <button mat-raised-button (click)='notVerified()' [ngClass]="{'selectButton': !isToggle}" *ngIf="echartsData.scheduledUpdatesToggle!=3">未核查</button>
</div> </div>
</div> </div>

75
src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts

@ -127,9 +127,25 @@ export class ScheduledUpdatesComponent implements OnInit {
if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');} if(params.name=="维护删除"){this.router.navigateByUrl('/statisticanalysis/delete_one/delete_two');}
else{ else{
if(pieid=="pie"){ if(pieid=="pie"){
this.echartsData.scheduledUpdatesToggle = 1
this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"] this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"]
}else{this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]} this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
}else{
this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
if(this.echartsData.level=='0'){
//总队跳转
this.echartsData.scheduledUpdatesToggle = 2
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
this.echartsData.findShow=false
}else if(this.echartsData.level=='1'){
this.echartsData.scheduledUpdatesToggle = 3
this.echartsData.findShow=false
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
}
}
} }
//console.log(this.echartsData.scheduledUpdatesToggle) //console.log(this.echartsData.scheduledUpdatesToggle)
}); });
@ -180,7 +196,7 @@ export class publicEchartsComponent implements OnInit {
@ViewChild('verified')verifieds :verifiedComponent; //父组件中获得子组件的引用 @ViewChild('verified')verifieds :verifiedComponent; //父组件中获得子组件的引用
ngOnInit(): void { ngOnInit(): void {
this.echartsData.scheduledUpdatesToggle = 1 //this.echartsData.scheduledUpdatesToggle = 1
this.dateInit() this.dateInit()
} }
@ -257,9 +273,10 @@ export class publicEchartsComponent implements OnInit {
//已核查 //已核查
verified () { verified () {
this.isToggle = true this.isToggle = true
this.echartsData.findShow=true this.echartsData.level=='1'? this.echartsData.findShow=true:this.echartsData.findShow=false
//this.echartsData.scheduledUpdatesToggle ="one"
this.echartsData.scheduledUpdatesToggle =1 this.echartsData.scheduledUpdatesToggle =1
//this.echartsData.scheduledUpdatesToggle ="one"
//this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle =1:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle =3:''
} }
//未核查 //未核查
@ -272,7 +289,7 @@ export class publicEchartsComponent implements OnInit {
//返回 //返回
goBack () { goBack () {
if(this.echartsData.scheduledUpdatesToggle==1||this.echartsData.scheduledUpdatesToggle==-3){ /* if(this.echartsData.scheduledUpdatesToggle==1||this.echartsData.scheduledUpdatesToggle==-3){
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates'); this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
}else{ }else{
this.echartsData.scheduledUpdatesToggle-- this.echartsData.scheduledUpdatesToggle--
@ -280,7 +297,8 @@ export class publicEchartsComponent implements OnInit {
this.echartsData.findShow=true this.echartsData.findShow=true
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates'); //this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
} }
} } */
window.history.go(-1)
} }
//更多 窗口 //更多 窗口
@ -311,7 +329,7 @@ export class publicEchartsComponent implements OnInit {
}) })
export class verifiedComponent implements OnInit { export class verifiedComponent implements OnInit {
constructor(private router: Router,public echartsData:EchartsDataService) { } constructor(private router: Router,public echartsData:EchartsDataService,public snackBar: MatSnackBar) { }
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(()=>{ window.setTimeout(()=>{
@ -460,6 +478,7 @@ export class verifiedComponent implements OnInit {
], ],
}; };
this.oneEcharts.getZr().on('click', (params) => { this.oneEcharts.getZr().on('click', (params) => {
if(this.echartsData.scheduledUpdatesToggle == 1){
/* const pointInPixel= [params.offsetX, params.offsetY]; /* const pointInPixel= [params.offsetX, params.offsetY];
if (this.oneEcharts.containPixel('grid',pointInPixel)) { if (this.oneEcharts.containPixel('grid',pointInPixel)) {
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
@ -472,12 +491,32 @@ export class verifiedComponent implements OnInit {
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
this.echartsData.scheduledUpdatesType = 0 this.echartsData.scheduledUpdatesType = 0
//this.echartsData.scheduledUpdatesName = "ff" //this.echartsData.scheduledUpdatesName = "ff"
this.echartsData.zhiorBuinding=="zhi"?this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.scheduledUpdatesToggle = -2 this.echartsData.zhiorBuinding!="zhi"?this.echartsData.scheduledUpdatesToggle = -2:this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle = 3:''
if(this.echartsData.zhiorBuinding!="zhi"){
this.echartsData.findShow=false
this.echartsData.scheduledUpdatesToggle = -2
if(this.echartsData.level=='0'){
this.echartsData.scheduledUpdatesToggle = 2
}else if(this.echartsData.level=='1'){
this.echartsData.scheduledUpdatesToggle = 3
}
}else{
this.echartsData.findShow=true
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if(this.echartsData.level=='2'){
this.snackBar.open('已经是最后一层!','确定',config);
}
}
//this.echartsData.scheduledUpdatesToggle = 2 //this.echartsData.scheduledUpdatesToggle = 2
this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex] this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex]
this.echartsData.findShow=false
}
} }
}); });
this.oneEcharts.setOption(option); this.oneEcharts.setOption(option);
} }
@ -698,7 +737,8 @@ export class notVerifiedComponent implements OnInit {
color: "#000", //刻度线标签颜色 color: "#000", //刻度线标签颜色
formatter: '{value}' formatter: '{value}'
}, },
data: ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队'], data: this.echartsData.level=='0'? ['浦东支队','黄浦支队','徐汇支队','长宁支队','静安支队','普陀支队','虹口支队','杨浦支队','闵行支队','宝山支队','嘉定支队','崇明支队','金山支队']
:['浦东中队','黄浦中队','徐汇中队','长宁中队','静安中队','普陀中队','虹口中队','杨浦中队','闵行中队','宝山中队','嘉定中队','崇明中队','金山中队'],
}, },
series: [ series: [
{ {
@ -789,6 +829,7 @@ export class yueDateComponent implements OnInit {
} }
}, },
legend: { legend: {
right:10,
data: this.echartsData.zhuXname, data: this.echartsData.zhuXname,
textStyle: { fontSize :16,color: '#000' } textStyle: { fontSize :16,color: '#000' }
}, },
@ -1103,7 +1144,12 @@ export class yuebuildingDateComponent implements OnInit {
this.echartsData.scheduledUpdatesType = 0 this.echartsData.scheduledUpdatesType = 0
//console.log(option.xAxis[0].data[xIndex]) //console.log(option.xAxis[0].data[xIndex])
this.echartsData.scheduledUpdatesXName+= option.xAxis[0].data[xIndex] this.echartsData.scheduledUpdatesXName+= option.xAxis[0].data[xIndex]
this.echartsData.scheduledUpdatesToggle = 2
if(this.echartsData.level=='0'){
this.echartsData.scheduledUpdatesToggle = 2
}else if(this.echartsData.level=='1'){
this.echartsData.scheduledUpdatesToggle = 3
}
//this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex] //this.echartsData.scheduledUpdatesXName=option.xAxis.data[xIndex]
} }
@ -1145,7 +1191,7 @@ export class detailedInformationComponent implements OnInit {
if (this.echartsData.scheduledUpdatesType ===0) { //已核查 if (this.echartsData.scheduledUpdatesType ===0) { //已核查
var option = { var option = {
title: { title: {
text: `${this.echartsData.scheduledUpdatesName}${this.echartsData.scheduledUpdatesXName}总数(0)`, text: `总数(0)`,//${this.echartsData.scheduledUpdatesName}${this.echartsData.scheduledUpdatesXName}
top: -2, top: -2,
right: 655, right: 655,
textStyle:{ textStyle:{
@ -1163,7 +1209,8 @@ export class detailedInformationComponent implements OnInit {
legend: { legend: {
//data: ['平均值','维护无需修改', '维护修改', '维护通过审核'], //data: ['平均值','维护无需修改', '维护修改', '维护通过审核'],
data:this.echartsData.zhuXname, data:this.echartsData.zhuXname,
textStyle: { color: '#000',fontSize: 16 } textStyle: { color: '#000',fontSize: 16 },
right:20
}, },
xAxis: [{ xAxis: [{
axisLabel: { axisLabel: {

2
src/app/statistic-analysis/scheduled-updates/verified.html

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 08:59:24 * @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-11-14 15:06:08 * @LastEditTime: 2021-06-24 10:42:22
--> -->
<app-yueDate *ngIf="echartsData.scheduledUpdatesToggle==2"></app-yueDate> <app-yueDate *ngIf="echartsData.scheduledUpdatesToggle==2"></app-yueDate>
<app-detailedInformation *ngIf="echartsData.scheduledUpdatesToggle==3"></app-detailedInformation> <app-detailedInformation *ngIf="echartsData.scheduledUpdatesToggle==3"></app-detailedInformation>

Loading…
Cancel
Save