From 18aca1b1a9b0b840ca7a2feb6b7e2fe29c25e41c Mon Sep 17 00:00:00 2001 From: chenjingyu <bobsun@hotmail.com> Date: Fri, 23 Jul 2021 13:55:39 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E9=87=8D=E7=82=B9=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E6=8F=90=E4=BA=A4=E5=AE=A1=E6=A0=B8=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../key-unit-management.component.ts | 4 +- .../wait-examineer.component.html | 42 +++++++--- .../wait-examineer.component.scss | 2 + .../all-plan/all-plan.component.html | 13 ++- .../all-plan/all-plan.component.scss | 1 + .../all-plan/all-plan.component.ts | 79 ++++++++++++++++-- .../statistic-analysis/all-plan/lookunit.html | 28 +++++++ .../echarts-data.service.ts | 28 +++++-- .../state/page-one/page-one.component.ts | 82 +++++++++++++------ .../state/page-there/page-there.component.ts | 23 ++++-- .../page-two-name/page-two-name.component.ts | 23 ++++-- .../page-two-time/page-two-time.component.ts | 21 +++-- .../page-zhong-dui-details.component.ts | 28 +++++-- .../statistic-analysis.module.ts | 12 ++- 14 files changed, 304 insertions(+), 82 deletions(-) create mode 100644 src/app/statistic-analysis/all-plan/lookunit.html diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts index 4e7f394..8d4ffff 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts @@ -743,10 +743,10 @@ export class KeyUnitManagementComponent implements OnInit { } //提交审核 submitAudit(element){ - //console.log(element) + console.log(element) let body:any = { title:element.name, - Operation:0, + Operation:element.contentVerify==null? 0:1, itemId:element.id, verifyState:3, contentType:11 diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index c634c4a..1dd7cf3 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -13,7 +13,8 @@ </div> </div> <div class="headthree"> - <span>类型:</span> + <div class="headthreeone"> + <span>类型:</span> <mat-form-field> <mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel"> <mat-option value="1">Ⅰ级预案</mat-option> @@ -30,15 +31,28 @@ <mat-option value="14">联动力量</mat-option> </mat-select> </mat-form-field> - <span style="margin-left: 15px;">编制级别:</span> + <span style="margin-left: 100px;">编制级别:</span> <mat-form-field> <mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="PlanLevel"> <mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> </mat-select> </mat-form-field> - <button mat-raised-button color="primary" type="submit">查询</button> + </div> + <div class="headthreetwo"> + <span >预案类型:</span> + <mat-form-field> + <mat-select placeholder='请选择预案类型' name="unittype" [(ngModel)]="projectlevel"> + <mat-option value="1">二维预案</mat-option> + <mat-option value="2">三维预案</mat-option> + <mat-option value="4">其他预案</mat-option> + <mat-option value="16">文本预案</mat-option> + </mat-select> + </mat-form-field> + <button mat-raised-button color="primary" type="submit" style="margin-left: 100px;">查询</button> <button mat-raised-button color="primary" (click)='record()'><img src="../../../assets/images/refresh.png"> 重置</button> + </div> + </div> </form> @@ -46,12 +60,13 @@ <table cellspacing="0" cellpadding="0" style="margin-top: 10px;"> <thead> <th style="width: 15%;">类型</th> + <th style="width: 10%;">预案类型</th> <th style="width: 15%;">名称</th> - <th style="width: 10%;">操作</th> - <th style="width: 15%;">所属组织</th> - <th style="width: 15%;">审核状态</th> - <th style="width: 15%;">提交人</th> - <th style="width: 25%;">提交时间</th> + <th style="width: 5%;">操作</th> + <th style="width: 20%;">所属组织</th> + <th style="width: 10%;">审核状态</th> + <th style="width: 10%;">提交人</th> + <th style="width: 15%;">提交时间</th> </thead> </table> <div class="tbodycss" id="tbodydiv"> @@ -64,18 +79,19 @@ {{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'? 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}} </td> + <td style="width: 10%;">二维预案</td> <td style="width: 15%;">{{item.title}}</td> - <td style="width: 10%;" + <td style="width: 5%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}"> {{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td> - <td style="width: 15%;">{{item.organizationName}}</td> - <td style="width: 15%;" + <td style="width: 20%;">{{item.organizationName}}</td> + <td style="width: 10%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}"> {{item.verifyState=='0'?'待初审':item.verifyState=='1'? '初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}} </td> - <td style="width: 15%;">{{item.creatorName}}</td> - <td style="width: 25%;">{{item.createTime|date:'yyyy-MM-dd'}}</td> + <td style="width: 10%;">{{item.creatorName}}</td> + <td style="width: 15%;">{{item.createTime|date:'yyyy-MM-dd'}}</td> </tr> </table> </div> diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index 1469a93..0c1bdef 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss @@ -75,6 +75,8 @@ } } .headthree { + display: flex; + flex-direction: column; @media screen and (min-device-width: 1400px) { margin-left: 30px; } diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.html b/src/app/statistic-analysis/all-plan/all-plan.component.html index b45e2ec..451f921 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.html +++ b/src/app/statistic-analysis/all-plan/all-plan.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-03-05 15:57:08 * @LastEditors: sueRimn - * @LastEditTime: 2021-03-24 14:19:05 + * @LastEditTime: 2021-07-21 09:45:49 --> <div class="body"> <div class="topbox"> @@ -14,17 +14,26 @@ </div> <div class="title"> <span>{{titlename}}</span> + <button mat-stroked-button style="float: right;margin-right: 50px;" *ngIf="danwei" (click)='lookunit()'>单位类型查看</button> </div> <div class="tablebox"> <table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> <ng-container matColumnDef="unitname"> - <th mat-header-cell *matHeaderCellDef style="width: 10%;">名称</th> + <th mat-header-cell *matHeaderCellDef style="width: 10%;">预案名称</th> <td mat-cell *matCellDef="let element">{{element.name}}</td> </ng-container> <ng-container matColumnDef="modifiedTime"> <th mat-header-cell *matHeaderCellDef style="width: 10%;">添加时间</th> <td mat-cell *matCellDef="let element">{{element.creationTime|date:'yyyy-MM-dd'}}</td> </ng-container> + <ng-container matColumnDef="unitName" *ngIf="danwei"> + <th mat-header-cell *matHeaderCellDef style="width: 10%;">单位名称</th> + <td mat-cell *matCellDef="let element">{{element.company.name}}</td> + </ng-container> + <ng-container matColumnDef="buildtype" *ngIf="danwei"> + <th mat-header-cell *matHeaderCellDef style="width: 10%;">单位类型</th> + <td mat-cell *matCellDef="let element">{{element.company.buildingTypes[0].name}}</td> + </ng-container> <ng-container matColumnDef="organizationName"> <th mat-header-cell *matHeaderCellDef style="width: 10%;">预案级别</th> <td mat-cell *matCellDef="let element">{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案': diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.scss b/src/app/statistic-analysis/all-plan/all-plan.component.scss index 3900afd..a35901d 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.scss +++ b/src/app/statistic-analysis/all-plan/all-plan.component.scss @@ -39,6 +39,7 @@ } } .tablebox{ + overflow-y: auto; width: 100%; text-align: center; margin-top:2%; diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.ts b/src/app/statistic-analysis/all-plan/all-plan.component.ts index 0327f73..077786a 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.ts +++ b/src/app/statistic-analysis/all-plan/all-plan.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2021-03-15 11:32:30 * @LastEditors: sueRimn - * @LastEditTime: 2021-05-17 17:19:25 + * @LastEditTime: 2021-07-22 14:12:43 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -32,19 +32,41 @@ export class AllPlanComponent implements OnInit { ngOnInit(): void { this.route.queryParams.subscribe(params => { - this.titlename = params['name']; + this.titlename = params['xname']; this.type = params['type']; this.jsId = params['id'] this.tid = params.tid + this.yuantype=params.name + this.pieonetype=params.pieonetype }); + if(this.yuantype=='二维预案'){ + this.planType=1 + }else if(this.yuantype=='三维预案'){ + this.planType=2 + }else if(this.yuantype=='其他预案'){ + this.planType=4 + }else if(this.yuantype=='文本预案'){ + this.planType=16 + } + if(this.tid=='pieone'&&(this.yuantype=='Ⅲ级预案'||this.yuantype=='Ⅳ级预案'||this.yuantype=='Ⅴ级预案')){ + this.danwei=true + this.displayedColumns=['unitname', 'modifiedTime','unitName','buildtype', 'organizationName', 'buildingTypes', 'operation'] + }else{ + this.danwei=false + this.displayedColumns=['unitname', 'modifiedTime', 'organizationName', 'buildingTypes', 'operation'] + } this.getAlltabledate() } tid - displayedColumns: string[] = ['unitname', 'modifiedTime', 'organizationName', 'buildingTypes', 'operation']; + displayedColumns: string[] tabledataSource titlename //上个页面传过来的名称 type //上个页面传过来:1重点单位 2预案 jsId //组织机构id + yuantype//上个页面传过来的预案类型或者级别 + danwei=true//控制单位字段显示或隐藏 + pieonetype//判断是级别还是类型,上个页面传过来的参数 + planType//预案类型 //分页 @ViewChild(MatPaginator, { static: true }) pageEvent: PageEvent; @@ -68,8 +90,9 @@ export class AllPlanComponent implements OnInit { getAlltabledate() { let paramtedate: any = { organizationId: this.jsId || '', - planStatus: this.tid == 'pieone' ? '' : this.type, - PlanCategory: this.tid == 'pieone' ? this.type : '', + planStatus:this.tid=='pieone'?'': this.type, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'', PageNumber: this.PageNumber || '1', PageSize: this.pageSizeOptions[0] } @@ -133,6 +156,14 @@ export class AllPlanComponent implements OnInit { window.open(`/planManagement/webLook`) } } + //单位类型查看 + lookunit(){ + const dialogRef = this.dialog.open(lookunit, { + width: '350px', + height: '700px', + data: {jsId:this.jsId,type:this.type} + }); + } } @@ -151,4 +182,42 @@ export class PsViewer { }); } +} +//单位类型查看弹出框 +@Component({ + selector: 'lookunit', + templateUrl: './lookunit.html', + styleUrls: ['./all-plan.component.scss'] +}) +export class lookunit{ + constructor(private router: Router, private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<lookunit>, @Inject(MAT_DIALOG_DATA) public data: any) { } + ngOnInit(): void{ + this.getAlltabledate() + } + tabledataSource//表格数据 + displayedColumns=['unitname', 'count'] + //分页 + @ViewChild(MatPaginator, { static: true }) + pageEvent: PageEvent; + paginator: MatPaginator; + length: any; //共多少条数据 + pageSize: any; //每页条数 + pageSizeOptions: number[] = [10] //设置每页条数 + PageNumber: any; //第几页 + //分页事件 + changePage(e) { + this.PageNumber = e.pageIndex + 1 + this.getAlltabledate() + } + //获取表格数据 + getAlltabledate(){ + let paramtedate: any = { + organizationId: this.data.jsId || '', + PlanCategory:this.data.type ||'' + } + this.http.get(`/api/StatisticsAnalysis/Plans/BuildingTypes`, { params: paramtedate }).subscribe((data: any) => { + this.tabledataSource=data.planBuildingTypes + // console.log(this.tabledataSource) + }) + } } \ No newline at end of file diff --git a/src/app/statistic-analysis/all-plan/lookunit.html b/src/app/statistic-analysis/all-plan/lookunit.html new file mode 100644 index 0000000..80257f5 --- /dev/null +++ b/src/app/statistic-analysis/all-plan/lookunit.html @@ -0,0 +1,28 @@ +<!-- + * @Descripttion: + * @version: + * @Author: sueRimn + * @Date: 2021-07-21 09:15:47 + * @LastEditors: sueRimn + * @LastEditTime: 2021-07-21 15:13:16 +--> +<div class="body"> + <div class="title"> + <span>单位类型统计</span> + </div> + <div class="tablebox"> + <table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> + <ng-container matColumnDef="unitname"> + <th mat-header-cell *matHeaderCellDef style="width: 50%;">单位名称</th> + <td mat-cell *matCellDef="let element">{{element.buildingTypeName}}</td> + </ng-container> + <ng-container matColumnDef="count"> + <th mat-header-cell *matHeaderCellDef style="width: 50%;">数量</th> + <td mat-cell *matCellDef="let element">{{element.count}}</td> + </ng-container> + <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> + <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> + </table> + + </div> +</div> diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index 210455e..d72cad1 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -485,23 +485,34 @@ export class EchartsDataService { } //预案表格提示 apidata=[] - biaogeTishiyuan(datas,tid){ + biaogeTishiyuan(datas,tid,pieonetype){ //localStorage.setItem('tishi',this.tishiData) this.tishiData='' var countall=0//总计 var countbi=0//站比 var allCountbi=0//总站比 if(tid=='pieone'){ - this.tishiData='' - for(var a in this.obdata[0].planCategoryStatistics.planCategories){ - if(this.obdata[0].planCategoryStatistics.planCategories[a].planCategoryName==datas.planStatusName){ - this.tishiData=this.obdata[0].planCategoryStatistics.planCategories[a].organizations + if(pieonetype){ + for(var a in this.obdata[0].planCategoryStatistics.planCategories){ + if(this.obdata[0].planCategoryStatistics.planCategories[a].planCategoryName==datas.planStatusName){ + this.tishiData=this.obdata[0].planCategoryStatistics.planCategories[a].organizations + } } + for(var i=0;i<this.tishiData.length;i++){ + countall+=this.tishiData[i].count + } } - - for(var i=0;i<this.tishiData.length;i++){ - countall+=this.tishiData[i].count + else{ + for(var a in this.obdata[0].planTypeStatistics.planTypes){ + if(this.obdata[0].planTypeStatistics.planTypes[a].planTypeName==datas.planStatusName){ + this.tishiData=this.obdata[0].planTypeStatistics.planTypes[a].organizations + } } + for(var i=0;i<this.tishiData.length;i++){ + countall+=this.tishiData[i].count + } + } + }else{ for(var a in this.obdata[0].planStatusStatistics.planStatuses){ @@ -588,7 +599,6 @@ export class EchartsDataService { }) this.allDate.push(result) this.obdata=JSON.parse(JSON.stringify(this.allDate)) - } selectType=0//选择年月 selectOneYear diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts index 11b472c..6fd7db3 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.ts +++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-01 15:24:39 * @LastEditors: sueRimn - * @LastEditTime: 2021-07-14 14:31:47 + * @LastEditTime: 2021-07-21 08:54:04 */ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @@ -93,13 +93,13 @@ export class PageOneComponent implements OnInit { }else{ this.tabledata[0].planTypeStatistics.planTypes.forEach((value,index,array) => { if(array[index].planTypeName=='Plan2D'){ - this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:1}) + this.planTypeStatisticsdata.push({name:'二维预案',value:array[index].count,planStatusName:array[index].planTypeName,type:1}) }else if(array[index].planTypeName=='Plan3D'){ - this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:2}) + this.planTypeStatisticsdata.push({name:'三维预案',value:array[index].count,planStatusName:array[index].planTypeName,type:2}) }else if(array[index].planTypeName=='Other'){ - this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:3}) + this.planTypeStatisticsdata.push({name:'其它预案',value:array[index].count,planStatusName:array[index].planTypeName,type:3}) }else if(array[index].planTypeName=='PlanText'){ - this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planCategoryName,type:4}) + this.planTypeStatisticsdata.push({name:'文本预案',value:array[index].count,planStatusName:array[index].planTypeName,type:4}) } }); } @@ -135,7 +135,7 @@ export class PageOneComponent implements OnInit { tooltip: { trigger: 'item', formatter: (params)=>{ - this.echartsData.biaogeTishiyuan(params.data,tid) + this.echartsData.biaogeTishiyuan(params.data,tid,this.pieonetype) return this.echartsData.res } }, @@ -185,30 +185,58 @@ export class PageOneComponent implements OnInit { this.indexBzt.on('click', (params) => { // console.log(params) if(tid=='pieone'){ - for(var i=0;i<this.tabledata[0].planCategoryStatistics.planCategories.length;i++){ - if(this.tabledata[0].planCategoryStatistics.planCategories[i].planCategoryName==params.data.planStatusName){ - if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ - this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.forEach((element,index,array) => { - if(array[index].organizationId==this.orid){ - array.splice(index,1) - } - window.setTimeout(()=>{ - if(array.length>0){ - this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone'}}); + if(this.pieonetype){ + for(var i=0;i<this.tabledata[0].planCategoryStatistics.planCategories.length;i++){ + if(this.tabledata[0].planCategoryStatistics.planCategories[i].planCategoryName==params.data.planStatusName){ + if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ + this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.forEach((element,index,array) => { + if(array[index].organizationId==this.orid){ + array.splice(index,1) } - else{ - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pieone'}}); - } - }) - }); - + window.setTimeout(()=>{ + if(array.length>0){ + this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); + } + else{ + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); + } + }) + }); + + } + else if(this.echartsData.level=='3'){ + //中队跳转 + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); + } } - else if(this.echartsData.level=='3'){ - //中队跳转 - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pieone'}}); + } + }else{ + for(var i=0;i<this.tabledata[0].planTypeStatistics.planTypes.length;i++){ + if(this.tabledata[0].planTypeStatistics.planTypes[i].planTypeName==params.data.planStatusName){ + if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].planCategoryStatistics.planCategories[i].organizations.length>0){ + this.tabledata[0].planTypeStatistics.planTypes[i].organizations.forEach((element,index,array) => { + if(array[index].organizationId==this.orid){ + array.splice(index,1) + } + window.setTimeout(()=>{ + if(array.length>0){ + this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); + } + else{ + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); + } + }) + }); + + } + else if(this.echartsData.level=='3'){ + //中队跳转 + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pieone','pieonetype':this.pieonetype}}); + } } } } + }else{ for(var i=0;i<this.tabledata[0].planStatusStatistics.planStatuses.length;i++){ if(this.tabledata[0].planStatusStatistics.planStatuses[i].planStatusName==params.data.planStatusName){ @@ -222,7 +250,7 @@ export class PageOneComponent implements OnInit { this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type,'tid':'pietwo'}}); } else{ - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); } }) }); @@ -230,7 +258,7 @@ export class PageOneComponent implements OnInit { } else if(this.echartsData.level=='3'){ //中队跳转 - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':params.name,'name':params.name,'id':null,'type':params.data.type,'tid':'pietwo'}}); } } } 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 f43a9b9..293e05b 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 @@ -53,6 +53,16 @@ export class PageThereComponent implements OnInit { this.zhong=param.zhong this.headName=datayuex+this.headtext; this.tid=param.tid + this.pieonetype=param.pieonetype + if(this.headtext=='二维预案'){ + this.planType=1 + }else if(this.headtext=='三维预案'){ + this.planType=2 + }else if(this.headtext=='其他预案'){ + this.planType=4 + }else if(this.headtext=='文本预案'){ + this.planType=16 + } //console.log(headName) }); @@ -60,16 +70,19 @@ export class PageThereComponent implements OnInit { this.getechartsdata() }) } + pieonetype//判断是级别还是类型,上个页面传过来的参数 + planType//预案类型 padHw headName selectType:string = 'month'; //选择当前的 查询类型 按月/年 async getechartsdata(){ let paramdata={ planStatus:this.tid=='pieone'?'': this.type, - PlanCategory:this.tid=='pieone'?this.type:'', - OrganizationId:this.lastid + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + OrganizationId:this.lastid, + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'' } - await this.echartsData.getData(paramdata,this.tid=='pieone'?'/api/StatisticsAnalysis/Plans/Category': `/api/StatisticsAnalysis/Plans/Status`) + 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)) // console.log(this.tabledata) for(var i=0;i<this.tabledata[0].organizations.length;i++){ @@ -233,9 +246,9 @@ export class PageThereComponent implements OnInit { let xIndex=this.zhutu.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; /*事件处理代码书写位置*/ 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]+this.headtext,'id':this.option.xAxis.id[xIndex],'type':this.type,'tid':this.tid}}); + 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{ - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':this.option.xAxis.data[xIndex],'id':this.option.xAxis.id[xIndex],'type':this.type,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':this.option.xAxis.data[xIndex],'name':this.headtext,'id':this.option.xAxis.id[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); } } 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 7084409..c2facd5 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 @@ -29,6 +29,16 @@ export class PageTwoNameComponent implements OnInit { this.headname=param.level this.type=param.type this.tid=param.tid + this.pieonetype=param.pieonetype + if(this.headname=='二维预案'){ + this.planType=1 + }else if(this.headname=='三维预案'){ + this.planType=2 + }else if(this.headname=='其他预案'){ + this.planType=4 + }else if(this.headname=='文本预案'){ + this.planType=16 + } }); @@ -42,11 +52,12 @@ export class PageTwoNameComponent implements OnInit { async getechartsdata(){ let paramdata={ planStatus:this.tid=='pieone'?'': this.type, - PlanCategory:this.tid=='pieone'?this.type:'' + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'' } - await this.data.getData(paramdata,this.tid=='pieone'?'/api/StatisticsAnalysis/Plans/Category': `/api/StatisticsAnalysis/Plans/Status`) + 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)) - //console.log(this.tabledata) + console.log(this.tabledata) for(var i=0;i<this.tabledata[0].organizations.length;i++){ this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName) this.zhiNumData.push(this.tabledata[0].organizations[i].count) @@ -55,6 +66,8 @@ export class PageTwoNameComponent implements OnInit { this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData) this.planAdd() } + pieonetype//判断是级别还是类型,上个页面传过来的参数 + planType//预案类型 tid//上个页面点的第几个饼状图 padHw headname//标题 @@ -186,9 +199,9 @@ export class PageTwoNameComponent implements OnInit { let xIndex=this.addEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; /*事件处理代码书写位置*/ if((this.data.level=='0'||this.data.level=='1')&&this.tabledata[0].organizations[xIndex].subOrganizations.length>=1){ - this.router.navigate(['/statisticanalysis/stataPageThere'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':_this.headname,'id':option.xAxis.id[xIndex],'type':this.type,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/stataPageThere'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':_this.headname,'id':option.xAxis.id[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); }else{ - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':option.xAxis.data[xIndex],'id':option.xAxis.id[xIndex],'type':this.type,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':option.xAxis.data[xIndex],'name':this.headname,'id':option.xAxis.id[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); } //this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':option.xAxis.data[xIndex],'id':option.xAxis.id[xIndex],'type':this.type}}); 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 9c54ba8..7b66a7d 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 @@ -166,6 +166,8 @@ export class echartsComponent implements OnInit { datayuex=[] dataYearX = [] dataYearY = [] + pieonetype//判断是级别还是类型,上个页面传过来的参数 + planType//预案类型 toggleTrue (){} //气泡提示数据获取 bianli(){ @@ -186,8 +188,17 @@ export class echartsComponent implements OnInit { this.headtext=param.level this.type=param.type this.tid=param.tid + this.pieonetype=param.pieonetype }); - + if(this.headtext=='二维预案'){ + this.planType=1 + }else if(this.headtext=='三维预案'){ + this.planType=2 + }else if(this.headtext=='其他预案'){ + this.planType=4 + }else if(this.headtext=='文本预案'){ + this.planType=16 + } window.setTimeout(()=>{ this.getechartsData() }) @@ -205,8 +216,8 @@ export class echartsComponent implements OnInit { this.zongcount=0 let paramdata={ planStatus:this.tid=='pieone'?'': this.type, - PlanCategory:this.tid=='pieone'?this.type:'', - objectType:this.tid=='pieone'?2: 1, + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + objectType:this.tid=='pieone'&&this.pieonetype=='true'?2:this.tid=='pieone'&&this.pieonetype=='false'?5: 1, TrendType:0 } await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`) @@ -419,7 +430,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.router.navigate(['/statisticanalysis/stataPageThereYearComponent'],{queryParams:{'level':this.headtext,'headtext':X[xIndex],'type':this.type,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/stataPageThereYearComponent'],{queryParams:{'level':this.headtext,'headtext':X[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); }else{ /*事件处理代码书写位置*/ if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){ @@ -429,7 +440,7 @@ export class echartsComponent implements OnInit { //this.router.navigate(['/statisticanalysis/statePageOne/name'],{queryParams:{'level':option.xAxis.data[xIndex],'headtext':this.headtext,'type':this.type}}); } else if(this.echartsData.level=='3'){ //中队跳转 - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'type':this.type,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); } } diff --git a/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts b/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts index a7f2b45..79b966b 100644 --- a/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts +++ b/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-05 13:50:45 * @LastEditors: sueRimn - * @LastEditTime: 2021-04-20 15:42:08 + * @LastEditTime: 2021-07-22 11:28:02 */ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; @@ -30,6 +30,9 @@ export class PageZhongDuiDetailsComponent implements OnInit { organizationId=[] padHw tid + yuanName + pieonetype//判断是级别还是类型,上个页面传过来的参数 + planType//预案类型 ngOnInit(): void { if(sessionStorage.getItem('refresh') === 'true') { sessionStorage.removeItem('refresh'); @@ -49,8 +52,18 @@ export class PageZhongDuiDetailsComponent implements OnInit { this.type=param.type this.lastid=param.id this.tid=param.tid + this.yuanName=param.name + this.pieonetype=param.pieonetype }); - + if(this.yuanName=='二维预案'){ + this.planType=1 + }else if(this.yuanName=='三维预案'){ + this.planType=2 + }else if(this.yuanName=='其他预案'){ + this.planType=4 + }else if(this.yuanName=='文本预案'){ + this.planType=16 + } window.setTimeout(()=>{ this.getechartsdata() }) @@ -62,10 +75,11 @@ export class PageZhongDuiDetailsComponent implements OnInit { async getechartsdata(){ let paramdata={ planStatus:this.tid=='pieone'?'': this.type, - PlanCategory:this.tid=='pieone'?this.type:'', - OrganizationId:this.lastid + PlanCategory:this.tid=='pieone'&&this.pieonetype=='true'?this.type:'', + OrganizationId:this.lastid, + PlanType:this.tid=='pieone'&&this.pieonetype=='false'?this.planType:'' } - await this.data.getData(paramdata,this.tid=='pieone'?'/api/StatisticsAnalysis/Plans/Category': `/api/StatisticsAnalysis/Plans/Status`) + 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)) // console.log(this.tabledata) for(var i=0;i<this.tabledata[0].organizations.length;i++){ @@ -118,7 +132,7 @@ export class PageZhongDuiDetailsComponent implements OnInit { this.detailPlanEchart = echarts.init(document.getElementById('detailBox'),'walden'); var option = { title: { - text: this.headName+`总数(${this.tabledata[0].totalCount})`, + text: this.headName+this.yuanName+`总数(${this.tabledata[0].totalCount})`, left: "center", top: "0", textStyle: { @@ -179,7 +193,7 @@ export class PageZhongDuiDetailsComponent implements OnInit { const pointInPixel= [params.offsetX, params.offsetY]; if (this.detailPlanEchart.containPixel('grid',pointInPixel)){ let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; - this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':option.xAxis.data[xIndex],'id':option.xAxis.id[xIndex],'type':this.type,'tid':this.tid}}); + this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'xname':option.xAxis.data[xIndex],'name':this.yuanName,'id':option.xAxis.id[xIndex],'type':this.type,'tid':this.tid,'pieonetype':this.pieonetype}}); } }); diff --git a/src/app/statistic-analysis/statistic-analysis.module.ts b/src/app/statistic-analysis/statistic-analysis.module.ts index c6b8cf2..fc7d228 100644 --- a/src/app/statistic-analysis/statistic-analysis.module.ts +++ b/src/app/statistic-analysis/statistic-analysis.module.ts @@ -73,10 +73,18 @@ import { AllPlanComponent } from './all-plan/all-plan.component'; import { PsViewer }from './all-plan/all-plan.component'; import { GkPsViewer2, PlanAnalysisBySynthesisComponent } from './plan-analysis-by-synthesis/plan-analysis-by-synthesis.component' import { PlanManagementModule } from '../plan-management/plan-management.module'; -import { RealMonitoringComponent } from './real-monitoring/real-monitoring.component' +import { RealMonitoringComponent } from './real-monitoring/real-monitoring.component'; +import { lookunit }from './all-plan/all-plan.component' @NgModule({ - declarations: [GkPsViewer2,PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent,echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent,moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, CompangInfoComponent, AllPlanComponent,PsViewer, RealMonitoringComponent,PlanAnalysisBySynthesisComponent], + declarations: [GkPsViewer2,PageOneComponent, PageTwoTimeComponent, PageTwoNameComponent, PageZhongDuiDetailsComponent, + echartsComponent, DeleteOneComponent, DeleteTwoComponent, DeleteThereComponent, DeleteFourComponent, BuildingTypeOneComponent, + ScheduledUpdatesComponent,publicEchartsComponent,verifiedComponent,notVerifiedComponent,detailedInformationComponent, + moreTableComponent,yueDateComponent,yuebuildingDateComponent,indexConditionComponent, BuildingTypeTwoForwardComponent, + BuildingTypeTwoReverseComponent, BuildingTypeThreeDetailsComponent, AddUnitOneComponent, AddUnitTwoTypeStatisticsComponent, + AddUnitTwoTypeDetailsComponent, AddUnitTwoTimeComponent,AddUnitThreeLineDetailsComponent,AddUnitThreeBarDetailsComponent, + HomeComponent, DeleteThereLineDetailsComponent, PageThereComponent, PageThereYearComponent, DeleteTwoNewaddComponent, + CompangInfoComponent, AllPlanComponent,PsViewer, RealMonitoringComponent,PlanAnalysisBySynthesisComponent,lookunit], imports: [ CommonModule, StatisticAnalysisRoutingModule,