From e323530c1e3fe92b7a457e7decdd8fade4557d14 Mon Sep 17 00:00:00 2001
From: chenjingyu <1148019379@qq.com>
Date: Fri, 24 Dec 2021 16:09:55 +0800
Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E7=BB=B4=E6=8A=A4=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E7=BB=9F=E8=AE=A1=E5=8F=B3=E4=BE=A7=E9=A5=BC=E7=8A=B6?=
=?UTF-8?q?=E5=9B=BE=E4=B8=8B=E9=92=BB=E5=AF=B9=E6=8E=A5=E5=90=8E=E7=AB=AF?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../entry-plan/entry-plan.component.html | 2 +-
.../echarts-data.service.ts | 45 ++++-
.../scheduled-updates/publicEcharts.html | 4 +-
.../scheduled-updates.component.ts | 186 ++++++++++++------
4 files changed, 172 insertions(+), 65 deletions(-)
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.html b/src/app/plan-management/entry-plan/entry-plan.component.html
index 76e1b0f..d5dac5c 100644
--- a/src/app/plan-management/entry-plan/entry-plan.component.html
+++ b/src/app/plan-management/entry-plan/entry-plan.component.html
@@ -140,7 +140,7 @@
- 预案状态 |
+ 单位状态 |
新增
维护更新
diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts
index 37fbe58..1992916 100644
--- a/src/app/statistic-analysis/echarts-data.service.ts
+++ b/src/app/statistic-analysis/echarts-data.service.ts
@@ -563,7 +563,7 @@ export class EchartsDataService {
this.tishiData=this.obdata[0].updatedCount.organizationCounts
}
- console.log(this.tishiData)
+ //console.log(this.tishiData)
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
@@ -592,7 +592,7 @@ export class EchartsDataService {
return this.res
}
- //维护更新内部提示框
+ //维护更新左侧内部提示框
weihuTooltip(datas){
this.tishiData=this.obdata[0].items[0].organizations
var countall=0//总计
@@ -626,6 +626,47 @@ export class EchartsDataService {
this.res+=' |
'
return this.res
}
+ //维护更新右侧内部提示框
+ weihuTooltipRight(datas,type){
+ if(type=='1'){
+ this.tishiData=this.obdata[0].unMaintainCount.organizationCounts
+ }else if(type=='2'){
+ this.tishiData=this.obdata[0].maintainedCount.organizationCounts
+ }else if(type=='3'){
+ this.tishiData=this.obdata[0].maintainingCount.organizationCounts
+ }
+
+ var countall=0//总计
+ var countbi=0//站比
+ var allCountbi=0//总站比
+ for(var i=0;i'
+ this.res+='';
+ this.res+='';
+ this.res+='名称 | ';
+ this.res+='数量 | '
+ this.res+='总占比 | '
+ this.res+='
'
+ this.res+='';
+ for(var i=0;i'
+ if(this.zhiorBuinding=='zhi'){
+ this.res+=''+ this.tishiData[i].organizationName+' | '
+ }else{
+ this.res+=''+ this.tishiData[i].buildingTypeName+' | '
+ }
+ this.res+=''+this.tishiData[i].count+' | '
+ this.res+=''+countbi+'% | '
+ }
+ this.res+=''
+ this.res+='总计 | '+countall+' | 100% | '
+ this.res+='
'
+ return this.res
+ }
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"]
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70]
diff --git a/src/app/statistic-analysis/scheduled-updates/publicEcharts.html b/src/app/statistic-analysis/scheduled-updates/publicEcharts.html
index 99f3f49..0f8e363 100644
--- a/src/app/statistic-analysis/scheduled-updates/publicEcharts.html
+++ b/src/app/statistic-analysis/scheduled-updates/publicEcharts.html
@@ -76,8 +76,8 @@
-
-
+
diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
index adfd18f..4bf5374 100644
--- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
+++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts
@@ -152,18 +152,17 @@ export class ScheduledUpdatesComponent implements OnInit {
this.example.setOption(options);
this.example.on('click', (params) => {
this.echartsData.findShow=true
- if(params.name=="维护删除"){this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_two?dwOryuan=${this.dwOryuan}&type=3`);}
- else{
+ //if(params.name=="维护删除"){this.router.navigateByUrl(`/statisticanalysis/delete_one/delete_two?dwOryuan=${this.dwOryuan}&type=3`);}
+
if(pieid=="pie"){
this.echartsData.scheduledUpdatesToggle = 1
- this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"]
- this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?type=${params.data.name=='维护修改'?2:1}&dwOryuan=${this.dwOryuan}`);
+ //this.echartsData.zhuXname=["平均值","维护无需修改","维护修改","维护删除"]
+ this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?type=${params.data.name=='维护修改'?2:params.data.name=='维护无需修改'?1:3}&dwOryuan=${this.dwOryuan}&pieid=pie`);
}else{
- this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]
+ //this.echartsData.zhuXname=["平均值","维护中","维护通过审核","未维护"]
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
- if(this.echartsData.level=='0'){
- //总队跳转
+ /* if(this.echartsData.level=='0'){
this.echartsData.scheduledUpdatesToggle = 2
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
this.echartsData.findShow=false
@@ -171,10 +170,14 @@ export class ScheduledUpdatesComponent implements OnInit {
this.echartsData.scheduledUpdatesToggle = 3
this.echartsData.findShow=false
this.router.navigateByUrl('/statisticanalysis/scheduledUpdates/PublicEcharts');
- }
+ } */
+ this.echartsData.scheduledUpdatesToggle = 2
+ this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?pieid=pieTwo&type=${params.data.name=='维护通过审核'?2:params.data.name=='未维护'?1:3}&dwOryuan=${this.dwOryuan}`);
+ this.echartsData.findShow=false
+
}
- }
+
//console.log(this.echartsData.scheduledUpdatesToggle)
});
}
@@ -385,7 +388,13 @@ export class publicEchartsComponent implements OnInit {
//this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
}
} */
- window.history.go(-1)
+ if(this.verifieds.pieid=='pie'&& this.echartsData.scheduledUpdatesToggle>1){
+ this.echartsData.scheduledUpdatesToggle--
+ }else{
+ this.router.navigateByUrl('/statisticanalysis/scheduledUpdates');
+ //window.history.go(-1)
+ }
+
}
//更多 窗口
@@ -398,14 +407,14 @@ export class publicEchartsComponent implements OnInit {
this.verifieds.oneEcharts.clear()
this.verifieds.oneEcharts.dispose()
this.echartsData.zhiorBuinding="zhi"
- this.verifieds.getechartsdata('2021','1','2022','12')
+ this.verifieds.getechartsdata(this.echartsData.time,'1',this.echartsData.time,'12')
}
//建筑类型查询
buildingFind(){
this.verifieds.oneEcharts.clear()
this.verifieds.oneEcharts.dispose()
this.echartsData.zhiorBuinding="building"
- this.verifieds.getechartsdata('2021','1','2022','12')
+ this.verifieds.getechartsdata(this.echartsData.time,'1',this.echartsData.time,'12')
}
@@ -426,18 +435,20 @@ export class verifiedComponent implements OnInit {
ngOnInit(): void {
window.setTimeout(()=>{
- this.getechartsdata('2021','1','2022','12')
+ if(this.echartsData.scheduledUpdatesToggle==1){
+ this.getechartsdata('2021','1','2022','12')
+ }
+
},0)
+ console.log(this.echartsData.scheduledUpdatesToggle)
+ this.pieid=this.route.snapshot.queryParams.pieid
}
- /* ngOnDestroy () {
- this.oneEcharts.dispose()
- this.oneEcharts.clear()
- this.items.forEach((element,index) => {
- element.echart.dispose()
- element.echart.clear()
- });
- } */
+ ngOnDestroy () {
+ //this.oneEcharts.dispose()
+ //this.oneEcharts.clear()
+ }
+ pieid=this.route.snapshot.queryParams.pieid
//TimeType=0//按月查询还是按年查询
async changeTime (e,selectOneYear,nselectStartMoth,selectTwoYear,selectEndMonth){
console.log(e)
@@ -486,7 +497,8 @@ export class verifiedComponent implements OnInit {
this.ydatayue.push(element.count)
});
}else{
- await this.echartsData.getData(Parameters,`/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`)
+ await this.echartsData.getData(Parameters,this.route.snapshot.queryParams.dwOryuan=='danwei'?
+ `/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`:`/api/StatisticsAnalysis/Plans/Maintained/BuildingTypeTrend`)
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
this.xdatayue=[]
@@ -634,17 +646,19 @@ export class verifiedComponent implements OnInit {
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.echartsData.scheduledUpdatesType = 0
+ this.echartsData.scheduledUpdatesToggle = 2
//this.echartsData.scheduledUpdatesName = "ff"
- this.echartsData.zhiorBuinding!="zhi"?this.echartsData.scheduledUpdatesToggle = -2:this.echartsData.level=='0'? this.echartsData.scheduledUpdatesToggle = 2:this.echartsData.level=='1'?this.echartsData.scheduledUpdatesToggle = 3:''
+ //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
+ //this.echartsData.scheduledUpdatesToggle = -2
+
if(this.echartsData.level=='0'&&this.tabledata[0].items[xIndex].organizations.length>=1){
this.echartsData.scheduledUpdatesToggle = 2
//this.echartsData.time=xIndex
//this.router.navigateByUrl(`/statisticanalysis/scheduledUpdates/PublicEcharts?type=${this.route.snapshot.queryParams.type}&TimeType=${this.TimeType}`);
}else if(this.echartsData.level=='1' &&this.tabledata[0].items[xIndex].organizations.length>=1){
- this.echartsData.scheduledUpdatesToggle = 3
+ this.echartsData.scheduledUpdatesToggle = 2//原来是3
}
}else{
this.echartsData.findShow=true
@@ -810,6 +824,7 @@ export class yueDateComponent implements OnInit {
level:string;
ngOnInit(): void {
+ //console.log(this.echartsData.scheduledUpdatesToggle)
this.router.queryParams.subscribe(param=>{
this.level=param.level
});
@@ -833,32 +848,64 @@ export class yueDateComponent implements OnInit {
ynum=[]
OrganizationIds=''//点击的组织
async getechartsdata(){
- let Parameters={
- MaintainedState:this.router.snapshot.queryParams.type,
- TimeType:this.echartsData.TimeType,
- TimeStart:this.echartsData.scheduledUpdatesXName,
- //TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear,
- OrganizationId:this.OrganizationIds
+ if(this.router.snapshot.queryParams.pieid!='pieTwo'){
+ let Parameters={
+ MaintainedState:this.router.snapshot.queryParams.type,
+ TimeType:this.echartsData.TimeType,
+ TimeStart:this.echartsData.scheduledUpdatesXName,
+ //TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear,
+ OrganizationId:this.OrganizationIds
+ }
+ //console.log(this.echartsData.zhiorBuinding)
+ await this.echartsData.getData(Parameters,this.echartsData.zhiorBuinding=='zhi'? `/api/StatisticsAnalysis/Companies/Maintained/OrganizationTrend`:`/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`)
+ this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
+ console.log(this.tabledata)
+ this.zhiNameData=[]
+ this.tabledata[0].items[0].organizations.forEach(element => {
+ this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName)
+ this.ynum.push(element.count)
+ this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId)
+ //this.ydatayue.push(element.count)
+ });
+ this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.ynum,this.zhiNameData)
+ this.twoInit()
+ }else{
+ let Parameters={
+ MaintenanceState:this.router.snapshot.queryParams.type,
+ //TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:selectEndYear,
+ OrganizationId:this.OrganizationIds
+ }
+ await this.echartsData.getData(Parameters,this.echartsData.zhiorBuinding=='zhi'? `/api/StatisticsAnalysis/Companies/Maintenance`:`/api/StatisticsAnalysis/Plans/Maintenance`)
+ this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
+ console.log(this.tabledata)
+ this.zhiNameData=[]
+ if(this.router.snapshot.queryParams.type=='1'){
+ this.tabledata[0].unMaintainCount.organizationCounts.forEach(element => {
+ this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName)
+ this.ynum.push(element.count)
+ this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId)
+ //this.ydatayue.push(element.count)
+ });
+ }else if(this.router.snapshot.queryParams.type=='2'){
+ this.tabledata[0].maintainedCount.organizationCounts.forEach(element => {
+ this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName)
+ this.ynum.push(element.count)
+ this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId)
+ //this.ydatayue.push(element.count)
+ });
+ }else if(this.router.snapshot.queryParams.type=='3'){
+ this.tabledata[0].maintainingCount.organizationCounts.forEach(element => {
+ this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName)
+ this.ynum.push(element.count)
+ this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId)
+ //this.ydatayue.push(element.count)
+ });
+ }
+
+ this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.ynum,this.zhiNameData)
+ this.twoInit()
}
- console.log(this.echartsData.zhiorBuinding)
- await this.echartsData.getData(Parameters,this.echartsData.zhiorBuinding=='zhi'? `/api/StatisticsAnalysis/Companies/Maintained/OrganizationTrend`:`/api/StatisticsAnalysis/Companies/Maintained/BuildingTypeTrend`)
- this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
- console.log(this.tabledata)
- this.zhiNameData=[]
- this.tabledata[0].items[0].organizations.forEach(element => {
- this.zhiNameData.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationName:element.buildingTypeName)
- this.ynum.push(element.count)
- this.organizationId.push(this.echartsData.zhiorBuinding=='zhi'? element.organizationId:element.buildingTypeId)
- //this.ydatayue.push(element.count)
- });
- /* this.ydatayue=[]
- this.tabledata[0].items.forEach(element => {
- this.zhiNameData.push(element.date)
- this.ydatayue.push(element.count)
- }); */
- this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.ynum,this.zhiNameData)
- this.twoInit()
- //this.oneInit(this.xdatayue,this.ydatayue)
+
}
tiaoshiPao:any
//气泡提示数据获取
@@ -879,7 +926,7 @@ export class yueDateComponent implements OnInit {
this.oneEcharts = echarts.init(document.getElementById("center"), 'skinUpp');
var option = {
title: {
- text: this.echartsData.scheduledUpdatesXName+`已核查总数:(${this.tabledata[0].totalCount})`,
+ text:this.router.snapshot.queryParams.pieid=='pieTwo'?'': this.echartsData.scheduledUpdatesXName+`已核查总数:(${this.tabledata[0].totalCount})`,
top: -4,
left: '35%',
textStyle:{
@@ -899,7 +946,12 @@ export class yueDateComponent implements OnInit {
fontSize :18
},
formatter: (params)=>{
- return this.echartsData.zhiorBuinding=='zhi'? this.echartsData.weihuTooltip(params):''
+ if(this.router.snapshot.queryParams.pieid=='pieTwo'){
+ return this.echartsData.zhiorBuinding=='zhi'? this.echartsData.weihuTooltipRight(params,this.router.snapshot.queryParams.type):''
+ }else{
+ return this.echartsData.zhiorBuinding=='zhi'? this.echartsData.weihuTooltip(params):''
+ }
+
//return this.echartsData.zhiorBuinding=="zhi"?this.echartsData.tableTooltip(this.echartsData.tableDataZhi,params[0].name):this.echartsData.tableTooltip(this.echartsData.buildingType,params[0].name)
},
position:this.echartsData.tableTooltipNoShow2
@@ -991,17 +1043,31 @@ export class yueDateComponent implements OnInit {
if (this.oneEcharts.containPixel('grid',pointInPixel)) {
let xIndex=this.oneEcharts.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
- if(this.echartsData.zhiorBuinding=='zhi'){
+ if(this.echartsData.zhiorBuinding=='zhi'&&this.router.snapshot.queryParams.pieid=='pie'){
this.OrganizationIds=option.xAxis.id[xIndex]
- this.getechartsdata()
+ this.getechartsdata()
+ if(this.tabledata[0].items.length>=1){
+ this.oneEcharts.dispose()
+ this.oneEcharts.clear()
+ //this.getechartsdata()
+ }
- this.echartsData.scheduledUpdatesType = 0
- //console.log(option.xAxis)
- this.echartsData.scheduledUpdatesName = option.xAxis.data[xIndex]
- this.echartsData.scheduledUpdatesToggle = 3
- console.log(option.xAxis.id[xIndex])
+ /* this.echartsData.scheduledUpdatesType = 0
+ this.echartsData.scheduledUpdatesName = option.xAxis.data[xIndex]
+ this.echartsData.scheduledUpdatesToggle = 3
+ console.log(option.xAxis.id[xIndex]) */
+ }else if(this.echartsData.zhiorBuinding=='zhi'&&this.router.snapshot.queryParams.pieid=='pieTwo'){
+ this.OrganizationIds=option.xAxis.id[xIndex]
+ this.getechartsdata()
+ if((this.router.snapshot.queryParams.type=='1'&&this.tabledata[0].unMaintainCount.organizationCounts.length>=1)
+ ||(this.router.snapshot.queryParams.type=='2'&&this.tabledata[0].maintainedCount.organizationCounts.length>=1)
+ ||(this.router.snapshot.queryParams.type=='3'&&this.tabledata[0].maintainingCount.organizationCounts.length>=1)){
+ this.oneEcharts.dispose()
+ this.oneEcharts.clear()
+ //this.getechartsdata()
+ }
+
}
-
}