diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html index 0aea5f4..691b75a 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.html +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.html @@ -100,7 +100,7 @@ 转在线导入 编辑 - 查看 + 查看 下载 删除 diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts index cbc96ed..e7780f1 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts @@ -47,9 +47,26 @@ export class AddUnitThreeBarDetailsComponent implements OnInit { } //获取服务层数据 async getechartsData(){ - let paramsdata={ - //id:this.buildId, + let paramsdata/* ={ organizationId:this.orId + } */ + if(this.serviceData.addYear==undefined&&this.serviceData.addMonth!=undefined){ + this.serviceData.addYear=new Date().getFullYear() + paramsdata={ + organizationId:this.orId, + TimeIntervalStart:this.serviceData.addYear+'-'+this.serviceData.addMonth, + TimeIntervalEnd:this.serviceData.addYear+'-'+this.serviceData.addMonth, + } + }else if(this.serviceData.addYear==undefined&&this.serviceData.addMonth==undefined){ + paramsdata={ + organizationId:this.orId, + } + }else{ + paramsdata={ + organizationId:this.orId, + TimeIntervalStart:this.serviceData.addYear+'-'+this.serviceData.addMonth, + TimeIntervalEnd:this.serviceData.addYear+'-'+this.serviceData.addMonth, + } } await this.serviceData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`) this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate)) diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts index c025240..c427fd1 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts @@ -38,7 +38,7 @@ export class AddUnitTwoTimeComponent implements OnInit { } //获取数据 - yeardatee + yeardatee=new Date().getFullYear() async getdata(){ this.date=[] this.dateNum=[] diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts index 14ef38f..d5e30a2 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts @@ -59,9 +59,26 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit { }) } async getechartsData(){ - let paramsdata:any = { - //id:this.zhiorbuild=='zhi'? this.canshuId:this.lastId, + let paramsdata:any /* = { organizationId:this.zhiorbuild=='zhi'?this.lastId:this.canshuId + } */ + if(this.echartsData.addYear==undefined&&this.echartsData.addMonth!=undefined){ + this.echartsData.addYear=new Date().getFullYear() + paramsdata={ + organizationId:this.zhiorbuild=='zhi'?this.lastId:this.canshuId, + TimeIntervalStart:this.echartsData.addYear+'-'+this.echartsData.addMonth, + TimeIntervalEnd:this.echartsData.addYear+'-'+this.echartsData.addMonth, + } + }else if(this.echartsData.addYear==undefined&&this.echartsData.addMonth==undefined){ + paramsdata={ + organizationId:this.zhiorbuild=='zhi'?this.lastId:this.canshuId, + } + }else{ + paramsdata={ + organizationId:this.zhiorbuild=='zhi'?this.lastId:this.canshuId, + TimeIntervalStart:this.echartsData.addYear+'-'+this.echartsData.addMonth, + TimeIntervalEnd:this.echartsData.addYear+'-'+this.echartsData.addMonth, + } } await this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.zhiorbuild=='zhi'?this.canshuId:this.lastId}`) this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts index 66e239d..2392957 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; +import { threadId } from 'worker_threads'; import {EchartsDataService} from '../../echarts-data.service'; declare var echarts: any; @Component({ @@ -25,6 +26,8 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { buildingTypeId=[] zhiorbuild padHw + year + month ngOnInit(): void { if(window.matchMedia("(max-width: 1400px)").matches){ this.padHw=true @@ -40,8 +43,10 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { this.headname=param.level this.lastId=param.id this.zhiorbuild=param.type + this.year=param.year||null + this.month=param.month.substring(0,1)||null }); - + console.log(this.month) this.setTimeoutObj = window.setTimeout(()=>{ this.getechartsData() }) @@ -56,10 +61,23 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { } //获取服务层数据 async getechartsData(){ - let paramsdata:any = { - id:this.lastId, + let paramsdata + if(this.year==null){ + paramsdata = { + id:this.lastId, + //organizationId:'1' + } + }else{ + paramsdata={ + id:this.lastId, + TimeIntervalStart:this.year+'-'+this.month||'', + TimeIntervalEnd:this.year+'-'+this.month||'' //organizationId:'1' + } + this.data.addYear=this.year + this.data.addMonth=this.month } + await this.data.getData(this.zhiorbuild=="zhi"?paramsdata:null,this.zhiorbuild=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`) this.tabledata=JSON.parse(JSON.stringify(this.data.allDate)) //console.log(this.tabledata) diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index 853fdf5..6364623 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -22,8 +22,13 @@ export class EchartsDataService { zhuXname=[""] //点击首页不同饼状图后面柱状图显示不同数据 //预案状态分析 + planMonth//预案查询月份 + planYear//预案查询年份 statefulInspectionName:string; statefulInspectionToggle:boolean = true; // true=显示当前点击柱状图 flase=显示当前点击折现图 + //新增模块 + addYear//新增年 + addMonth//新增月 //维护删除 dezhiorBuinding="zhi" //维护删除页面判断是支队查询还是建筑类型查询 @@ -35,7 +40,7 @@ export class EchartsDataService { scheduledUpdatesXName:string; //scheduledUpdatesToggle:string ="one"; // 显示 当前点击 已核查/未核查 scheduledUpdatesToggle:number=1 - TimeType=0//按月查询还是按年查询 + TimeType=1//按月查询还是按年查询 time//点击的年份或者月份 eventEmit = new EventEmitter(); 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 8e1ef33..13c6c96 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts @@ -292,7 +292,7 @@ export class publicEchartsComponent implements OnInit { } isToggle:boolean = true; // 已核查/未核查 - selectType:string = 'month'; //选择当前的 查询类型 按月/年 + selectType:string = 'year'; //选择当前的 查询类型 按月/年 //查询数据 years:any = [] selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12] @@ -305,10 +305,10 @@ export class publicEchartsComponent implements OnInit { } } - selectOneYear:any = (new Date()).getFullYear() //开始年份 + selectOneYear:any = (new Date()).getFullYear()-2 //开始年份 selectTwoYear:any = (new Date()).getFullYear() //结束年份 selectStartMonth:any = 1 //开始月份 - selectEndMonth:any = (new Date()).getMonth()+1 //结束月份 + selectEndMonth:any = (new Date()).getMonth()+2 //结束月份 //点击月或年 changeTime(e){ console.log(e) @@ -342,11 +342,12 @@ export class publicEchartsComponent implements OnInit { this.snackBar.open('请选择正确时间区段','确定',config); } } - selectStartYear:any = (new Date()).getFullYear() //开始年份 + selectStartYear:any = (new Date()).getFullYear()-2 //开始年份 selectEndYear:any = (new Date()).getFullYear() //结束年份 //按年查询 yearSubmit (e) { + console.log(e) if (e.selectEndYear >= e.selectStartYear) { let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 @@ -408,14 +409,14 @@ export class publicEchartsComponent implements OnInit { this.verifieds.oneEcharts.clear() this.verifieds.oneEcharts.dispose() this.echartsData.zhiorBuinding="zhi" - this.verifieds.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12') + this.verifieds.getechartsdata(this.echartsData.dateYear-2+"-"+'01','1',this.echartsData.dateYear+'-'+'12','12') } //建筑类型查询 buildingFind(){ this.verifieds.oneEcharts.clear() this.verifieds.oneEcharts.dispose() this.echartsData.zhiorBuinding="building" - this.verifieds.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12') + this.verifieds.getechartsdata(this.echartsData.dateYear-2+"-"+'01','1',this.echartsData.dateYear+'-'+'12','12') } @@ -437,7 +438,7 @@ export class verifiedComponent implements OnInit { ngOnInit(): void { window.setTimeout(()=>{ if(this.echartsData.scheduledUpdatesToggle==1){ - this.getechartsdata(this.echartsData.dateYear,'1',this.echartsData.dateYear,'12') + this.getechartsdata(this.echartsData.dateYear-2+"-"+'01','1',this.echartsData.dateYear+'-'+'12','12') } },0) @@ -481,8 +482,8 @@ export class verifiedComponent implements OnInit { let Parameters={ MaintainedState:this.route.snapshot.queryParams.type, TimeType:this.echartsData.TimeType, - TimeStart:this.echartsData.TimeType==0?selectStartYear+'-'+selectStartMonth:this.echartsData.dateYear+'-'+'01', - TimeEnd:this.echartsData.TimeType==0?selectEndYear+'-'+selectEndMonth:this.echartsData.dateYear+'-'+'12', + TimeStart:this.echartsData.TimeType==1?selectStartYear:this.echartsData.dateYear+'-'+'01', + TimeEnd:this.echartsData.TimeType==1?selectEndYear:this.echartsData.dateYear+'-'+'12', //OrganizationId } console.log(this.echartsData.zhiorBuinding) diff --git a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts index 7be7e89..43cfbb2 100644 --- a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts +++ b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts @@ -32,7 +32,7 @@ export class PageThereYearComponent implements OnInit { this.year = params['level']; this.buildingTypeName = params['headtext']; this.type=params['type'] - //this.lastyears=params['years'] + this.lastyears=params['headtext'].substring(0,4) this.tid=params.tid this.pieonetype=params.pieonetype }); @@ -226,8 +226,14 @@ export class PageThereYearComponent implements OnInit { /*事件处理代码书写位置*/ if(this.serviceData.level=='0'||this.serviceData.level=='1'||this.serviceData.level=='2'){ this.serviceData.isQuery=true + this.serviceData.planMonth=this.option.xAxis.data[xIndex].substring(0,1) + this.serviceData.planYear=this.lastyears + /* if(!this.serviceData.isQuery){ + this.serviceData.planYear=this.lastyears + } */ + //this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1','type':this.type}}); - this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':this.year,'headtext':this.buildingTypeName,'zhong':'1','type':this.type,'pieonetype':this.pieonetype,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':this.year,'headtext':this.buildingTypeName,'zhong':'1','type':this.type,'pieonetype':this.pieonetype,'tid':this.tid,'month':this.option.xAxis.data[xIndex]}}); } else if(this.serviceData.level=='3'){ //中队跳转 diff --git a/src/app/statistic-analysis/state/page-there/page-there.component.ts b/src/app/statistic-analysis/state/page-there/page-there.component.ts index 293e05b..3d8021b 100644 --- a/src/app/statistic-analysis/state/page-there/page-there.component.ts +++ b/src/app/statistic-analysis/state/page-there/page-there.component.ts @@ -76,11 +76,39 @@ export class PageThereComponent implements OnInit { headName selectType:string = 'month'; //选择当前的 查询类型 按月/年 async getechartsdata(){ - let paramdata={ + let paramdata/* ={ planStatus:this.tid=='pieone'?'': this.type, PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', OrganizationId:this.lastid, PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'' + } */ + if(this.echartsData.planYear==undefined&&this.echartsData.planMonth!=undefined){ + this.echartsData.planYear=new Date().getFullYear() + paramdata={ + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + OrganizationId:this.lastid, + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + TimeIntervalStart:this.echartsData.planYear+'-'+this.echartsData.planMonth, + TimeIntervalEnd:this.echartsData.planYear+'-'+this.echartsData.planMonth, + } + + }else if(this.echartsData.planYear==undefined&&this.echartsData.planMonth==undefined){ + paramdata={ + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + OrganizationId:this.lastid, + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + } + }else{ + paramdata={ + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + OrganizationId:this.lastid, + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + TimeIntervalStart:this.echartsData.planYear+'-'+this.echartsData.planMonth, + TimeIntervalEnd:this.echartsData.planYear+'-'+this.echartsData.planMonth, + } } await this.echartsData.getData(paramdata,this.tid=='pieone'&&this.pieonetype=='true'?'/api/StatisticsAnalysis/Plans/Category':this.tid=='pieone'&&this.pieonetype=='false'?'/api/StatisticsAnalysis/Plans/Type': `/api/StatisticsAnalysis/Plans/Status`) this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) @@ -245,6 +273,8 @@ export class PageThereComponent implements OnInit { if (this.zhutu.containPixel('grid',pointInPixel)) { let xIndex=this.zhutu.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; /*事件处理代码书写位置*/ + this.echartsData.isQuery==false? this.echartsData.planYear=this.option.xAxis.data[xIndex]:this.echartsData.planYear==undefined + console.log(this.echartsData.planYear) if((this.echartsData.level=='0'||this.echartsData.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){ this.router.navigate(['/statisticanalysis/PageZhongDuiDetails'],{queryParams:{'level':this.option.xAxis.data[xIndex],'name':this.headtext,'id':this.option.xAxis.id[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); }else{ diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts index 19119d6..41edcec 100644 --- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts +++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts @@ -50,10 +50,39 @@ export class PageTwoNameComponent implements OnInit { ngOnDestroy(): void { } async getechartsdata(){ - let paramdata={ + console.log(this.data.planYear,this.data.planMonth) + let paramdata/* ={ planStatus:this.tid=='pieone'?'': this.type, PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', - PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'' + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + TimeIntervalStart:this.data.planYear+'-'+this.data.planMonth, + TimeIntervalEnd:this.data.planYear+'-'+this.data.planMonth, + } */ + if(this.data.planYear==undefined&&this.data.planMonth!=undefined){ + this.data.planYear=new Date().getFullYear() + paramdata={ + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + TimeIntervalStart:this.data.planYear+'-'+this.data.planMonth, + TimeIntervalEnd:this.data.planYear+'-'+this.data.planMonth, + } + }else if(this.data.planYear==undefined&&this.data.planMonth==undefined){ + paramdata={ + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + /* TimeIntervalStart:this.data.planYear+'-'+this.data.planMonth, + TimeIntervalEnd:this.data.planYear+'-'+this.data.planMonth, */ + } + }else{ + paramdata={ + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', + TimeIntervalStart:this.data.planYear+'-'+this.data.planMonth, + TimeIntervalEnd:this.data.planYear+'-'+this.data.planMonth, + } } await this.data.getData(paramdata,this.tid=='pieone'&&this.pieonetype=='true'?'/api/StatisticsAnalysis/Plans/Category':this.tid=='pieone'&&this.pieonetype=='false'?'/api/StatisticsAnalysis/Plans/Type': `/api/StatisticsAnalysis/Plans/Status`) this.tabledata=JSON.parse(JSON.stringify(this.data.allDate)) diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts index 8d1eb95..67a848a 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts @@ -432,6 +432,7 @@ export class echartsComponent implements OnInit { if (this.twoExample.containPixel('grid',pointInPixel)) { let xIndex=this.twoExample.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; if(this.echartsData.selectType==2){ + this.echartsData.planYear=X[xIndex].substring(0,4) this.router.navigate(['/statisticanalysis/stataPageThereYearComponent'],{queryParams:{'level':this.headtext,'headtext':X[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); }else{ /*事件处理代码书写位置*/ @@ -439,6 +440,8 @@ export class echartsComponent implements OnInit { this.twoExample.clear() this.echartsData.isQuery=true this.twoExample.setOption(option); + this.echartsData.planMonth=option.xAxis.data[xIndex].substring(0,1) + //this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'zhong':'1','type':this.type,'pieonetype':this.pieonetype,'tid':this.tid,'month':option.xAxis.data[xIndex]}}); //this.router.navigate(['/statisticanalysis/statePageOne/name'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':this.headtext,'type':this.type}}); } else if(this.echartsData.level=='3'){ //中队跳转