邵佳豪 4 years ago
parent
commit
0f193662f9
  1. 82
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  2. 37
      src/app/key-unit/key-unit-management/key-unit-management.component.scss
  3. 17
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  4. 147
      src/app/plan-audit/plan-record/plan-record.component.scss
  5. 10
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  6. 119
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  7. 76
      src/app/plan-management/entry-plan/entry-plan.component.html
  8. 19
      src/app/plan-management/entry-plan/entry-plan.component.scss
  9. 19
      src/app/plan-management/entry-plan/entry-plan.component.ts
  10. 23
      src/app/plan-management/maintain-up/maintain-up.component.html
  11. 21
      src/app/plan-management/maintain-up/maintain-up.component.scss
  12. 22
      src/app/plan-management/maintain-up/maintain-up.component.ts
  13. 74
      src/app/plan-management/meet-plan/meet-plan.component.html
  14. 22
      src/app/plan-management/meet-plan/meet-plan.component.scss
  15. 23
      src/app/plan-management/meet-plan/meet-plan.component.ts
  16. 74
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html
  17. 22
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss
  18. 20
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  19. 57
      src/app/plan-management/open-plan/open-plan.component.html
  20. 24
      src/app/plan-management/open-plan/open-plan.component.scss
  21. 27
      src/app/plan-management/open-plan/open-plan.component.ts
  22. 44
      src/app/plan-management/pass-plan/pass-plan.component.html
  23. 24
      src/app/plan-management/pass-plan/pass-plan.component.scss
  24. 16
      src/app/plan-management/pass-plan/pass-plan.component.ts
  25. 44
      src/app/plan-management/reinforce-plan/reinforce-plan.component.html
  26. 19
      src/app/plan-management/reinforce-plan/reinforce-plan.component.scss
  27. 16
      src/app/plan-management/reinforce-plan/reinforce-plan.component.ts
  28. 72
      src/app/plan-management/type-plan/type-plan.component.html
  29. 22
      src/app/plan-management/type-plan/type-plan.component.scss
  30. 20
      src/app/plan-management/type-plan/type-plan.component.ts
  31. 38
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  32. 10
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss
  33. 25
      src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts
  34. 12
      src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.scss
  35. 33
      src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts
  36. 4
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.html
  37. 78
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.scss
  38. 89
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  39. 10
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.scss
  40. 21
      src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts
  41. 13
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss
  42. 107
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  43. 2
      src/app/statistic-analysis/all-plan/all-plan.component.scss
  44. 17
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  45. 12
      src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.scss
  46. 31
      src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts
  47. 25
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
  48. 2
      src/app/statistic-analysis/compang-info/compang-info.component.ts
  49. 99
      src/app/statistic-analysis/echarts-data.service.ts
  50. 61
      src/app/statistic-analysis/state/page-one/page-one.component.ts
  51. 8
      src/app/statistic-analysis/state/page-there-year/page-there-year.component.scss
  52. 51
      src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts
  53. 13
      src/app/statistic-analysis/state/page-there/page-there.component.scss
  54. 40
      src/app/statistic-analysis/state/page-there/page-there.component.ts
  55. 11
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
  56. 45
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
  57. 4
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
  58. 89
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss
  59. 124
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
  60. 29
      src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts

82
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -8,15 +8,53 @@
<input matInput placeholder="请输入单位名称" name="companyName" [(ngModel)]="companyName" autocomplete="off">
</mat-form-field>
</div>
<div class="queryField ordiv">
<div class="queryField" >
<label style="margin-right: 10px;">统一社会信用代码:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入统一社会信用代码" name="shehui" [(ngModel)]="shehui" autocomplete="off">
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">关注单位:</label>
<mat-form-field>
<mat-select placeholder='请选择单位是否关注' [(ngModel)]="follow" name="follow">
<mat-option value="0">未关注</mat-option>
<mat-option value="1">已关注</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField ordiv" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input (click)="stopclose($event)" readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox color="primary" style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
@ -40,34 +78,7 @@
</div>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">统一社会信用代码:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入统一社会信用代码" name="shehui" [(ngModel)]="shehui" autocomplete="off">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<!-- <span style="margin-left: 2%;">更多筛选条件</span> -->
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">关注单位:</label>
<mat-form-field>
<mat-select placeholder='请选择单位是否关注' [(ngModel)]="follow" name="follow">
<mat-option value="0">未关注</mat-option>
<mat-option value="1">已关注</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
@ -76,7 +87,7 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">完整度查询:</label>
<mat-form-field class="example-full-width">
<input type="number" oninput="if(value>100)value=100;if(value<0)value=0" matInput placeholder="请输入完整度最小值" name="integrityScoreMin" [(ngModel)]="integrityScoreMin" autocomplete="off">
@ -89,10 +100,7 @@
</div>
</div>
<div style="width: 100%;text-align: center;">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>
<mat-divider></mat-divider>

37
src/app/key-unit/key-unit-management/key-unit-management.component.scss

@ -1,40 +1,41 @@
@media screen and (min-device-width:1280px){
}
//margin: 3px 40px;
@media screen and (max-device-width:1290px) and (max-device-height:690px){
}
.header {
width: 100%;
padding: 12px 10px;
padding: 12px 0 12px 10px;
// margin-bottom: 10px;
box-sizing: border-box;
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px;
padding: 5px 10px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
@media screen and (min-device-width:1280px){
margin: 3px 40px;
}
//margin: 3px 40px;
@media screen and (max-device-width:1280px){
margin-left: 20px;
}
//margin: 3px 10px;
input {
width: 180px;
//width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 140px;
}
}
}
} //queryBox

17
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -11,6 +11,7 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { truncateSync } from 'fs';
@Component({
selector: 'app-key-unit-management',
@ -21,15 +22,19 @@ export class KeyUnitManagementComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
open="更多筛选条件"
down="收起"
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padjt=!this.padjt
this.padMore=!this.padMore
this.padput=!this.padput
}
@ -222,9 +227,15 @@ export class KeyUnitManagementComponent implements OnInit {
this.getUnittype();
this.getAllKeyUnit();
if(window.matchMedia("(max-width: 1290px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
}
//获得所有重点单位

147
src/app/plan-audit/plan-record/plan-record.component.scss

@ -13,97 +13,175 @@
display: flex;
flex-direction: column;
.headdiv{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin: 30px 0 0 28px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-top: 10px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin: 20px 0 0 15px;
}
height: 40px;
display: flex;
flex-direction: row;
span{
font-size: 16px;
@media screen and (min-device-width:1400px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
font-size: 16px;
}
margin-left: 3px;
}
input{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 50px;
top: 6px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-left: 12px;
top: 3px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 12px;
top: 6px;
}
position: relative;
top: 6px;
}
.count{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 110px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-left: 20px;
position: relative;
bottom: 4px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 20px;
}
}
}
.headdivtwo{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin: 0 0 0 28px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-left: 0;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin: 0 0 0 15px;
}
//height: 40px;
display: flex;
flex-direction: row;
span{
font-size: 16px;
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
margin-left: 3px;
}
input{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 50px;
top: 5px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-left: 0;
top: 3px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 0;
top: 5px;
}
position: relative;
top: 5px;
left: 2px;
}
.count{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 110px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1400px){
margin-left: 20px;
}
}
}
.headthree{
height: 45px;
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 30px;
}
mat-form-field{
width: 150px;
@media screen and (max-device-width:1200px){
font-size: 13px;
mat-form-field{
width: 120px;
}
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 15px;
mat-form-field{
width: 120px;
}
}
}
.headfour{
@media screen and (max-device-width:1200px){
font-size: 13px;
mat-form-field{
width: 150px;
}
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 15px;
mat-form-field{
width: 150px;
}
}
span{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 30px;
}
}
button{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 40px;
font-size: 16px;
width: 80px;
height: 36px;
}
@media screen and (max-device-width:1300px){
margin-left: 120px;
@media screen and (max-device-width:1200px){
margin-left: 80px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 80px;
}
}
img{
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
height: 14px;
width: 14px;
}
@media screen and (min-device-width:1400px){
height: 14px;
width: 14px;
}
@media screen and (max-device-width:1200px){
height: 12px;
width: 12px;
}
}
}
}
.tablediv{
@ -113,7 +191,7 @@
.tbodycss{
//overflow-y: auto;
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
overflow-y: auto;
}
height:550px;
@ -135,7 +213,13 @@
//font-size: 16px;
th{
font-weight:10;
font-size:16px
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
}
}
@ -147,7 +231,7 @@
}
.boxright{
height: 100%;
width: 55%;
width: 53%;
flex: 1;
background-color: #FFFFFF;
margin-left: 10px;
@ -190,7 +274,12 @@
}
th,td{
height:48px;
font-size: 16px;
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
text-align: center;
}
.green{color: #00C756;}

10
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -4,16 +4,14 @@
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="headdiv" style="margin-top: 30px;">
<span>操作类型:</span>
<!-- <div></div>
<div></div>
<div></div>
<div></div> -->
<input type="radio" name="level" value="" [(ngModel)]="level"><span>全部</span>
<input type="radio" name="level" value="1" [(ngModel)]="level"><span>更新</span>
<input type="radio" name="level" value="0" [(ngModel)]="level"><span>新增</span>
<input type="radio" name="level" value="2" [(ngModel)]="level"><span>删除</span>
<!-- <mat-radio-group name='aaa' [(ngModel)]="level" style="position: relative;bottom: 3px;">
<mat-radio-button class='radio' style="margin-left: 3px;" value="" >全部</mat-radio-button>
<mat-radio-button style="margin-left: 20px;height: 10px;" value="1">更新</mat-radio-button>
<mat-radio-button style="margin-left: 20px;" value="0">新增</mat-radio-button>
<mat-radio-button style="margin-left: 20px;" value="2">删除</mat-radio-button>
</mat-radio-group> -->
<div class="count">
<span >共计:{{count}}条</span>
</div>

119
src/app/plan-audit/wait-examineer/wait-examineer.component.scss

@ -13,10 +13,13 @@
display: flex;
flex-direction: column;
.headdiv{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin: 0 0 0 28px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 15px;
}
@media screen and (max-device-width:1200px){
margin-left: 5px;
}
height: 40px;
@ -26,52 +29,92 @@
height: 10px;
}
span{
font-size: 16px;
@media screen and (min-device-width:1400px){
font-size: 16px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 14px;
}
margin-left: 3px;
}
input{
@media screen and (min-device-width:1300px){
position: relative;
@media screen and (min-device-width:1400px){
margin-left: 50px;
top: 6px;
}
@media screen and (max-device-width:1300px){
margin-left: 12px;
@media screen and (max-device-width:1200px){
margin-left: 8px;
top: 4px;
}
position: relative;
top: 6px;
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 8px;
top: 6px;
}
}
.count{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 110px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-left: 20px;
position: relative;
bottom: 3px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 20px;
/* position: relative;
bottom: 3px; */
}
}
}
.headthree{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 30px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1200px){
margin-left: 7px;
font-size: 14px;
mat-form-field{
width: 120px;
}
}
mat-form-field{
width: 150px;
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 15px;
//font-size: 14px;
mat-form-field{
width: 140px;
}
}
button{
width: 80px;
height: 36px;
font-size: 16px;
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
margin-left: 30px;
font-size: 16px;
width: 80px;
height: 36px;
}
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1400px){
margin-left: 90px;
font-size: 14px;
}
}
img{
height: 14px;
width: 14px;
@media screen and (min-device-width:1400px){
height: 14px;
width: 14px;
}
@media screen and (max-device-width:1400px){
height: 12px;
width: 12px;
}
}
}
@ -80,7 +123,7 @@
width: 100%;
height: 100%;
.tbodycss{
@media screen and (min-device-width:1300px){
@media screen and (min-device-width:1400px){
overflow-y: auto;
}
@ -91,7 +134,12 @@
}
td{
font-weight:10;
font-size:15px
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 14px;
}
}
}
table{
@ -106,7 +154,12 @@
//font-size: 10px;
th{
font-weight:10;
font-size:16px
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 14px;
}
}
}
@ -118,17 +171,18 @@
}
.boxright{
height: 100%;
@media screen and (max-device-width:1300px){
@media screen and (max-device-width:1400px){
overflow-y: auto;
}
width: 55%;
width: 53%;
flex: 1;
background-color: #FFFFFF;
margin-left: 10px;
display: flex;
flex-direction: column;
.company{
@media screen and (min-device-width:1300px){
//margin-left: 20px;
@media screen and (min-device-width:1400px){
overflow-y: auto;
}
flex: 1;
@ -146,11 +200,11 @@
font-size: 16px;
}
.rightheadone{
width: 50%;
width: 40%;
margin-right: 7%;
}
.rightheadtwo{
width: 50%;
width: 60%;
margin-right: 2%;
}
}
@ -184,7 +238,12 @@
}
th,td{
height:48px;
font-size: 16px;
@media screen and (min-device-width:1400px){
font-size: 16px;
}
@media screen and (max-device-width:1400px){
font-size: 14px;
}
text-align: center;
//white-space: nowrap;
}

76
src/app/plan-management/entry-plan/entry-plan.component.html

@ -9,15 +9,29 @@
<input matInput placeholder="请输入单位名称" name="companyName" [(ngModel)]="companyName" autocomplete="off">
</mat-form-field>
</div>
<div class="queryField ordiv">
<div class="queryField" >
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField ordiv" *ngIf="!padMore">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
@ -40,17 +54,6 @@
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
@ -61,8 +64,27 @@
<mat-option value=4>其他预案</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" [(ngModel)]="toExamine" placeholder='请选择审核状态'>
@ -73,21 +95,9 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
@ -96,7 +106,7 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">制作情况:</label>
<mat-form-field>
<mat-select placeholder='请选择预案制作情况' [(ngModel)]="haveyuan" name="haveyuan">
@ -106,10 +116,6 @@
</mat-form-field>
</div>
</div>
<div class="butclass" style="width: 100%;text-align: center;">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>
<mat-divider></mat-divider>

19
src/app/plan-management/entry-plan/entry-plan.component.scss

@ -6,19 +6,34 @@
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px 0 25px;
padding: 5px 0 0 10px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
margin: 0 40px;
//margin: 0 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 160px;
}
}
}
} //queryBox

19
src/app/plan-management/entry-plan/entry-plan.component.ts

@ -169,11 +169,18 @@ export class EntryPlanComponent implements OnInit {
return style
}
level
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.getunitdata();
this.getOrganizations();
@ -207,16 +214,22 @@ export class EntryPlanComponent implements OnInit {
]
}
}
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput
}
//得到当前单位信息
getunitdata(){

23
src/app/plan-management/maintain-up/maintain-up.component.html

@ -39,7 +39,11 @@
</mat-tree>
</div>
</div>
<div *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<br>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">统一社会信用代码:</label>
<mat-form-field class="example-full-width">
@ -55,8 +59,14 @@
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 20px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">关注单位:</label>
<mat-form-field>
<mat-select placeholder='请选择单位是否关注' [(ngModel)]="follow" name="follow">
@ -65,7 +75,7 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
@ -74,7 +84,7 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">完整度查询:</label>
<mat-form-field class="example-full-width">
<input type="number" oninput="if(value>100)value=100;if(value<0)value=0" matInput placeholder="请输入完整度最小值" name="integrityScoreMin" [(ngModel)]="integrityScoreMin" autocomplete="off">
@ -87,10 +97,7 @@
</div>
</div>
<div style="width: 100%;text-align: center;">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>
<mat-divider></mat-divider>

21
src/app/plan-management/maintain-up/maintain-up.component.scss

@ -3,25 +3,40 @@
.header {
width: 100%;
padding: 12px 10px;
padding: 12px 0;
// margin-bottom: 10px;
box-sizing: border-box;
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px;
padding: 5px 0 0 5px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
margin: 3px 40px;
// margin: 3px 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
@media screen and (min-device-width:1400px){
margin: 3px 10px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 15px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 120px;
}
}
}
} //queryBox

22
src/app/plan-management/maintain-up/maintain-up.component.ts

@ -203,23 +203,33 @@ export class MaintainUpComponent implements OnInit {
this.PageNumber = e.pageIndex+1
this.getAllKeyUnit();
}
padMore//pad收缩控制
padput=false//pad收起按钮
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
open="更多筛选条件"
down="收起"
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput
this.padjt=!this.padjt
}
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.getunitdata();
this.getOrganizations();

74
src/app/plan-management/meet-plan/meet-plan.component.html

@ -9,26 +9,50 @@
<input matInput placeholder="请输入单位名称" name="companyName" autocomplete="off" [(ngModel)]="unitname">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<div class="queryField" >
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' name="level" [(ngModel)]="level">
<mat-option value="6">国家级</mat-option>
<mat-option value="7">市级</mat-option>
</mat-select>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel">
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' name="level" [(ngModel)]="level">
<mat-option value="6">国家级</mat-option>
<mat-option value="7">市级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">添加人:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname">
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
@ -39,20 +63,17 @@
<mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<!-- <mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型' [multiple]="true">
<mat-option value="8">卡片预案</mat-option>
<mat-option value="1">二维预案</mat-option>
<mat-option value="2">三维预案</mat-option>
<mat-option value="4">其他预案</mat-option>
</mat-select> -->
<input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate">
@ -63,25 +84,12 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel">
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
</div>
<div class="butclass" style="width: 100%;text-align: center;">
<!-- <div class="butclass" style="width: 100%;text-align: center;">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</div> -->
</form>
</div>
<mat-divider></mat-divider>

22
src/app/plan-management/meet-plan/meet-plan.component.scss

@ -6,19 +6,35 @@
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px 0 25px;
padding: 5px 0 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
margin: 3px 40px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
border-radius: 3px;
}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 120px;
}
}
}
} //queryBox

23
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -21,11 +21,16 @@ export class MeetPlanComponent implements OnInit {
ngOnInit(): void {
//console.log(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches)
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
//this.padjt=
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.levels = sessionStorage.getItem("level");
if(this.levels == "0"){//如果是总队
@ -81,17 +86,21 @@ export class MeetPlanComponent implements OnInit {
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any; //第几页
padMore//pad收缩控制
padput=false//pad收起按钮
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
open="更多筛选条件"
down="收起"
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput
this.padjt=!this.padjt
}
//获取表格数据

74
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html

@ -4,28 +4,58 @@
* @Author: sueRimn
* @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-29 09:51:14
* @LastEditTime: 2021-04-01 14:35:30
-->
<div style="height: 100%;overflow-y: auto;">
<div class="header" >
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="queryBox">
<div class="queryField">
<label style="margin-right: 10px;">预案名称:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入单位名称" name="companyName" autocomplete="off" [(ngModel)]="unitname">
</mat-form-field>
</div>
<div class="queryField">
<div class="queryField" >
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel">
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">添加人:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname">
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan">
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
@ -37,19 +67,8 @@
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<!-- <mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型' [multiple]="true">
<mat-option value="8">卡片预案</mat-option>
<mat-option value="1">二维预案</mat-option>
<mat-option value="2">三维预案</mat-option>
<mat-option value="4">其他预案</mat-option>
</mat-select> -->
<input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate">
@ -60,25 +79,10 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel">
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
</div>
<div class="butclass" style="width: 100%;text-align: center;">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>
<mat-divider></mat-divider>

22
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss

@ -6,19 +6,35 @@
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px 0 25px;
padding: 5px 0 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
margin: 0 40px;
//margin: 0 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
border-radius: 3px;
}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 120px;
}
}
}
} //queryBox

20
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-29 09:51:04
* @LastEditTime: 2021-03-31 14:12:46
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -33,10 +33,16 @@ export class OnetwoEntryPlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.levels = sessionStorage.getItem("level");
if(this.levels == "0"){//如果是总队
@ -68,15 +74,21 @@ export class OnetwoEntryPlanComponent implements OnInit {
this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length)
this.getAlltabledate()
}
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
padjt=false
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput
this.padjt=!this.padjt
}
levels

57
src/app/plan-management/open-plan/open-plan.component.html

@ -8,19 +8,34 @@
<input matInput placeholder="请输入单位名称" name="companyName" [(ngModel)]="companyName" autocomplete="off">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">单位类型:</label>
<div class="queryField" >
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField">
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select [(ngModel)]="reservePlanType" name="reservePlanType" placeholder='请选择预案类型'>
@ -32,25 +47,13 @@
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div style="width: 100%;text-align: center;">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>
<mat-divider></mat-divider>

24
src/app/plan-management/open-plan/open-plan.component.scss

@ -1,24 +1,40 @@
.header {
width: 100%;
padding: 12px 10px;
padding: 12px 5px;
// margin-bottom: 10px;
box-sizing: border-box;
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px;
padding: 5px 0 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
margin: 3px 40px;
//margin: 3px 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
border-radius: 3px;
}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 130px;
}
}
}
} //queryBox

27
src/app/plan-management/open-plan/open-plan.component.ts

@ -51,6 +51,17 @@ export class OpenPlanComponent implements OnInit {
tabledataSource:any //表格数据
preparelevels:any //编制级别
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.getunitdata();
this.getOrganizations();
this.getUnittype();
@ -84,6 +95,22 @@ export class OpenPlanComponent implements OnInit {
}
}
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput
}
allPlanInfo:any //存储所有预案信息
//获得所有预案信息

44
src/app/plan-management/pass-plan/pass-plan.component.html

@ -40,7 +40,19 @@
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
@ -50,8 +62,14 @@
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 20px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select [(ngModel)]="reservePlanType" name="reservePlanType" placeholder='请选择预案类型'>
@ -61,22 +79,11 @@
<mat-option value="4">其他预案</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
@ -89,10 +96,7 @@
</div>
</div>
<div class="butclass" style="width: 100%;text-align: center;">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>
<mat-divider></mat-divider>

24
src/app/plan-management/pass-plan/pass-plan.component.scss

@ -4,7 +4,7 @@
box-sizing: border-box;
.queryBox {
box-sizing: border-box;
padding: 5px 25px 0 25px;
padding: 5px 0 0 5px;
// margin-left: 50px;
display: flex;
flex-direction: row;
@ -12,13 +12,31 @@
align-items:center;
// justify-content:center;
.queryField {
margin: 0 40px;
//margin: 0 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
border-radius: 3px;
}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 120px;
}
}
}
} //queryBox
.butclass{

16
src/app/plan-management/pass-plan/pass-plan.component.ts

@ -52,10 +52,16 @@ export class PassPlanComponent implements OnInit {
preparelevels:any
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.getunitdata();
this.getOrganizations();
@ -91,10 +97,18 @@ export class PassPlanComponent implements OnInit {
this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length)
//console.log(this.url)
}
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput

44
src/app/plan-management/reinforce-plan/reinforce-plan.component.html

@ -40,7 +40,23 @@
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
<mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option>
<!-- <mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> -->
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
@ -63,32 +79,10 @@
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
<mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option>
<!-- <mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option> -->
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<!-- <div class="queryField">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
🠊
<mat-form-field class="example-full-width">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
</div> -->
</div>
<div class="butclass" style="width: 100%;text-align: center;">
<div class="butclass" style="width: 100%;text-align: center;" *ngIf="pcfind">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>

19
src/app/plan-management/reinforce-plan/reinforce-plan.component.scss

@ -4,7 +4,7 @@
box-sizing: border-box;
.queryBox {
box-sizing: border-box;
padding: 5px 25px 0 25px;
padding:5px 0 0 5px;
// margin-left: 50px;
display: flex;
flex-direction: row;
@ -12,12 +12,25 @@
align-items:center;
// justify-content:center;
.queryField {
margin: 0 40px;
margin: 0 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
border-radius: 3px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
//margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
//margin: 3px 0 3px 10px;
mat-form-field{
width: 110px;
}
}
}
} //queryBox

16
src/app/plan-management/reinforce-plan/reinforce-plan.component.ts

@ -51,10 +51,16 @@ export class ReinforcePlanComponent implements OnInit {
preparelevels:any
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.getunitdata();
this.getOrganizations();
@ -88,10 +94,18 @@ export class ReinforcePlanComponent implements OnInit {
]
}
}
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput

72
src/app/plan-management/type-plan/type-plan.component.html

@ -9,26 +9,32 @@
<input matInput placeholder="请输入单位名称" name="companyName" autocomplete="off" [(ngModel)]="unitname">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">添加人:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname">
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<div class="queryField" >
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel">
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">添加时间:</label>
<label style="margin-right: 10px;">添加:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> -->
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput autocomplete="off" name="endtime" [(ngModel)]="endtime">
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
@ -41,25 +47,27 @@
<mat-option value="4">审核退回</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'> </span>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="projectlevel">
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> -->
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput autocomplete="off" name="endtime" [(ngModel)]="endtime">
</mat-form-field>
</div>
<div class="butclass" style="width: 100%;text-align: center;">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</form>
</div>

22
src/app/plan-management/type-plan/type-plan.component.scss

@ -6,19 +6,35 @@
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px 0 25px;
padding: 5px 0 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
// justify-content:center;
.queryField {
margin: 3px 40px;
// margin: 3px 10px;
input {
width: 180px;
height: 22px;
line-height: 22px;
border-radius: 3px;}
border-radius: 3px;
}
@media screen and (min-device-width:1400px){
margin: 3px 20px;
}
@media screen and (max-device-width:1400px)and (min-device-width:1200px){
margin: 3px 10px;
mat-form-field{
width: 180px;
}
}
@media screen and (max-device-width:1200px){
margin: 3px 0 3px 10px;
mat-form-field{
width: 120px;
}
}
}
} //queryBox

20
src/app/plan-management/type-plan/type-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-06 09:47:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-29 09:49:11
* @LastEditTime: 2021-03-31 14:14:03
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -29,10 +29,16 @@ export class TypePlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
if(window.matchMedia("(max-width: 1290px)").matches&&window.matchMedia("(max-height: 700px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
}
this.levels = sessionStorage.getItem("level");
if(this.levels == "0"){//如果是总队
@ -63,13 +69,19 @@ export class TypePlanComponent implements OnInit {
}
this.getAlltabledate()
}
pcMore//pc更多
pcput=false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
padjt=false
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
}
padInfo(){
this.padjt=!this.padjt
this.padMore=!this.padMore
this.padput=!this.padput
}

38
src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts

@ -13,21 +13,25 @@ export class AddUnitOneComponent implements OnInit {
setTimeoutObj//延时器需要清除
tabledata
padHw
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
location.reload();
}
/* this.buildData.push(this.echartsData.getData(null,`/api/StatisticsAnalysis/BuildingTypes`))
this.orData=this.echartsData.getData(null,`/api/StatisticsAnalysis/Companies`) */
this.echartsData.getData(null,`/api/StatisticsAnalysis/Companies`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata)
this.initCharts("pieone")
this.initCharts("pietwo")
},1000)
this.getechartsdata()
})
this.echartsData.eventEmit.subscribe((value: any) => {
if (value == 'echarts') {
setTimeout(() => {
@ -41,6 +45,14 @@ export class AddUnitOneComponent implements OnInit {
updateEcharts(){
this.indexBzt.resize()
}
//获取服务层数据
async getechartsdata(){
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Companies`)
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata)
this.initCharts("pieone")
this.initCharts("pietwo")
}
//组件销毁时
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
@ -62,11 +74,11 @@ export class AddUnitOneComponent implements OnInit {
}
for(var i=0;i<this.tabledata[0].organizationStatistics.organizations.length;i++){
this.orData.push(this.tabledata[0].organizationStatistics.organizations[i])
this.lengthOrData.push(this.tabledata[0].organizationStatistics.organizations[i].organizationName)
/* if(this.tabledata[0].organizationStatistics.organizations[i].count>0){
} */
if(this.tabledata[0].organizationStatistics.organizations[i].organizationName.length>5&&this.padHw){
this.tabledata[0].organizationStatistics.organizations[i].organizationName=this.tabledata[0].organizationStatistics.organizations[i].organizationName.slice(0, 5)
+'\n'+this.tabledata[0].organizationStatistics.organizations[i].organizationName.slice(5)
}
this.lengthOrData.push(this.tabledata[0].organizationStatistics.organizations[i].organizationName)
}
this.buildData=this.buildData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})
this.orData=this.orData.map(v=>{return {name: v.organizationName,value:v.count,id:v.organizationId}})
@ -108,8 +120,8 @@ export class AddUnitOneComponent implements OnInit {
{
name: '访问来源',
type: 'pie',
radius: '50%',
center: ['45%', '53%'],
radius:this.padHw?'42%':'50%',
center: ['48%', '53%'],
bottom:130,
left:30,
label:{

10
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss

@ -67,10 +67,16 @@
overflow: auto;
#barEchart{
width: 100%;
height: 550px;
@media screen and (max-device-width:1400px){
height: 500px;
top: 55%;
}
@media screen and (min-device-width:1400px){
height: 550px;
top: 50%;
}
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
}

25
src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts

@ -35,13 +35,24 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
this.buildId=params['id']
this.orId=params['zhuid']
});
let paramsdata={
this.setTimeoutObj = window.setTimeout(()=>{
this.getechartsData()
})
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
//获取服务层数据
async getechartsData(){
let paramsdata={
//id:this.buildId,
organizationId:this.orId
}
this.serviceData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
await this.serviceData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName)
@ -50,12 +61,6 @@ export class AddUnitThreeBarDetailsComponent implements OnInit {
}
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.detailEcharts()
},1000)
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年

12
src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.scss

@ -33,7 +33,7 @@
// padding: 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex-wrap: nowrap;
align-items:center;
justify-content:center;
.queryField {
@ -67,10 +67,16 @@
overflow: auto;
#barEchart{
width: 80%;
height: 550px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
@media screen and (max-device-width:1400px){
height: 450px;
top: 60%;
}
@media screen and (min-device-width:1400px){
height: 550px;
top: 50%;
}
}
}

33
src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts

@ -19,6 +19,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
setTimeoutObj//延时器需要清除
qopao
lastId
zhiorbuild
ngOnInit(): void {
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
@ -30,10 +31,11 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
this.year = params['year'];
this.buildingTypeName = params['buildingType'];
this.lastId=params['id']
this.zhiorbuild=params['type']
});
this.setTimeoutObj = window.setTimeout(()=>{
this.getdata()
},1000)
})
}
ngOnDestroy(){
@ -43,26 +45,28 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
}
tabledata
zongcount=0
getdata(){
async getdata(){
let parzhi={
objectType:0,
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType,
//TrendYear:this.year||''
TrendYear:this.year||''
}
let parbuild={
objectType:0,
OrganizationId:this.lastId,
TrendType:this.serviceData.selectType,
//TrendYear:this.year||''
TrendYear:this.year||''
}
this.serviceData.getData(this.serviceData.zuzhiorBuilding=='zhi'?parbuild:parzhi,`/api/StatisticsAnalysis`)
await this.serviceData.getData(this.zhiorbuild=='zhi'?parbuild:parzhi,`/api/StatisticsAnalysis/Trends`)
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.serviceData.selectStartMonth||this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
this.dateNum.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].count)
this.zongcount=this.zongcount+this.tabledata[0].companyStatistics.trendStatistics.added[i].count
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.serviceData.selectStartMonth||this.tabledata[0][i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0][i].month)
this.dateNum.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
}
@ -70,7 +74,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
//this.oneInit (this.date,this.dateNum)
this.qopao=this.serviceData.qipao(this.qopao,this.dateNum,this.zhiNameData)
this.detailEcharts()
}, 1000);
});
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年
@ -119,10 +123,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'), 'skinUpp');
this.option = {
grid: {
top: 50,
left:40,
right: 20,
//bottom: 20,
top: 90,
},
// 标题
title: {
@ -208,7 +209,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.buildingTypeName,'id':this.lastId}})
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.buildingTypeName,'id':this.lastId,'type':this.zhiorbuild}})
//this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':this.option.xAxis.data[xIndex],'buildingTpye':this.buildingTypeName}});
}
});

4
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-13 14:41:42
* @LastEditTime: 2021-04-02 09:31:45
-->
<div class="box">
<div class="header">
@ -70,7 +70,7 @@
<div class="btnbox">
<button mat-stroked-button style="margin-left: 30px;" (click)="backClick()">返回</button>
<button mat-stroked-button (click)="forward()" style="margin-left: 20px;">类型统计</button>
<button mat-stroked-button (click)="reverse()" [ngClass]="{'selectedBtn': true}"style="margin-left: 50px;">区间选择</button>
<button mat-stroked-button (click)="reverse()" [ngClass]="{'selectedBtn': true}"style="margin-left: 20px;">区间选择</button>
</div>
</div>
<div class="echartsbox">

78
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.scss

@ -11,18 +11,26 @@
overflow: auto;
}
#Line{
width: 50%;
height: 420px;
margin: 50px auto;
//width: 50%;
height: 600px;
//margin: 50px auto;
}
}
.publicCss{
width: 80%;
height: 550px;
//height: 550px;
position: absolute;
left: 50%;
top: 55%;
//top: 55%;
transform: translate(-50%,-50%);
@media screen and (max-device-width:1400px){
height: 450px;
top: 60%;
}
@media screen and (min-device-width:1400px){
height: 550px;
top: 55%;
}
}
//头部搜索栏
@ -34,31 +42,57 @@
// padding: 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
justify-content:center;
flex-wrap: nowrap;
@media screen and (min-device-width:1200px){
align-items:center;
justify-content:center;
}
@media screen and (max-device-width:1200px){
justify-content: center;
align-items:center;
}
.queryField {
margin: 0 10px;
font-size: 14px;
.mat-form-field {
width: 130px;
max-height: 50px;;
margin: 0 15px 0 10px;
}
@media screen and (max-device-width:1200px){
font-size: 14px;
.mat-form-field {
width: 100px;
max-height: 50px;;
margin: 0 5px 0 5px;
}
}
@media screen and (min-device-width:1200px){
margin: 0 10px;
font-size: 14px;
.mat-form-field {
width: 130px;
max-height: 50px;;
margin: 0 15px 0 10px;
}
}
}
.btnbox{
display: flex;
flex-direction:row-reverse;
//float: right;
@media screen and (min-device-width:1200px){
justify-content: center;
align-items: center;
height: 100%;
align-items: center;
button{
width: 88px;
height: 36px;
}
margin-right:4%;
margin-right:4%;
}
@media screen and (max-device-width:1200px){
justify-content: center;
align-items: center;
button{
width: 88px;
height: 36px;
}
}
display: flex;
flex-direction:nowrap;
height: 100%;
}
}
.selectedBtn{

89
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

@ -39,26 +39,28 @@ export class AddUnitTwoTimeComponent implements OnInit {
}
//获取数据
yeardatee
getdata(){
async getdata(){
let parzhi={
objectType:0,
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType,
TrendYear:this.yeardatee||''
}
let parbuild={
objectType:0,
OrganizationId:this.lastId,
TrendType:this.serviceData.selectType,
TrendYear:this.yeardatee||''
}
this.serviceData.getData(this.serviceData.zuzhiorBuilding=='zhi'?parbuild:parzhi,`/api/StatisticsAnalysis`)
await this.serviceData.getData(this.zhiorbuild=="zhi"?parbuild:parzhi,`/api/StatisticsAnalysis/Trends`)
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.serviceData.selectStartMonth||this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
this.dateNum.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].count)
this.zongcount=this.zongcount+this.tabledata[0].companyStatistics.trendStatistics.added[i].count
console.log(this.tabledata[0])
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.serviceData.selectStartMonth||this.tabledata[0][i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0][i].month)
this.dateNum.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
}
@ -66,7 +68,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
//this.oneInit (this.date,this.dateNum)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.twoInit (this.date,this.dateNum,'month')
}, 1000);
});
}
forward(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild=='zhi'?'zhi':'build'}})
@ -102,11 +104,11 @@ export class AddUnitTwoTimeComponent implements OnInit {
if (e.selectEndMonth>=e.selectStartMonth) {
let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.serviceData.selectStartMonth&&this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
this.dateNum.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].count)
this.zongcount=this.zongcount+this.tabledata[0].companyStatistics.trendStatistics.added[i].count
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.serviceData.selectStartMonth&&this.tabledata[0][i].month<=this.serviceData.selectEndMonth){
this.date.push(this.tabledata[0][i].month)
this.dateNum.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
}
//this.oneInit (this.date,this.dateNum)
@ -123,20 +125,31 @@ export class AddUnitTwoTimeComponent implements OnInit {
selectEndYear:any = (new Date()).getFullYear() //结束年份
//按年查询
yearSubmit (e) {
this.zongcount=0
this.date2=[]
this.dateNum2=[]
if (e.selectEndYear >= e.selectStartYear) {
let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
//console.log(startTime)
//console.log(endTime)
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].year>=e.selectStartYear&&this.tabledata[0][i].year<=e.selectEndYear){
this.date2.push(this.tabledata[0][i].month)
this.dateNum2.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
}
//this.oneInit (this.date,this.dateNum)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.twoInit (this.date2,this.dateNum2,'year')
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
this.snackBar.open('结束年份必须大于开始年份','确定',config);
}
}
//年或月点击
dateChange(){
async dateChange(){
this.tiaoshiPao=null
this.forArr.forEach(item => {
item.echart.dispose()
@ -145,22 +158,32 @@ export class AddUnitTwoTimeComponent implements OnInit {
if(this.selectType == "year"){
this.zongcount=0
this.serviceData.selectType=2
let paramdata={
let parzhi={
objectType:0,
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType
TrendType:this.serviceData.selectType,
}
let parbuild={
objectType:0,
OrganizationId:this.lastId,
TrendType:this.serviceData.selectType,
}
this.serviceData.getData(paramdata,`/api/StatisticsAnalysis`)
/* let paramdata={
BuildingTypeId:this.lastId,
TrendType:this.serviceData.selectType
} */
await this.serviceData.getData(this.zhiorbuild=="zhi"?parbuild:parzhi,`/api/StatisticsAnalysis/Trends`)
this.setTimeoutObj = window.setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
this.dateNum2.push(this.tabledata[0].companyStatistics.trendStatistics.added[0].count)
this.zongcount=this.zongcount+this.tabledata[0].companyStatistics.trendStatistics.added[i].count
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].length;i++){
this.dateNum2.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.twoInit (this.date2,this.dateNum2,'year')
}, 1000);
});
/* this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.twoInit(this.date2,this.dateNum2,'year') */
}
@ -224,7 +247,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
}
date2 = ['2020', '2021']
dateNum2 = [0]
dateNum2 = []
//新增数量统计
oneInit (date,dateNum) {
@ -320,15 +343,12 @@ export class AddUnitTwoTimeComponent implements OnInit {
item.echart = echarts.init(document.getElementById('gaoceng'), 'skinUpp');
var option = {
grid: {
top: 50,
left:40,
right: 20,
//bottom: 20,
top: 90,
},
// 标题
title: {
text: this.headname+`:总数(${this.zongcount}`,
top: -4,
top:-4,
left: 'center',
textStyle:{
//文字颜色
@ -374,6 +394,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
},
// y轴
yAxis: {
//min:10,
type: 'value',
name: '个',
axisLabel: {
@ -411,7 +432,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
/*事件处理代码书写位置*/
// console.log(option.series[0].data[xIndex],option.xAxis.data[xIndex],option.title.text,option.series[0].name)
if(option.series[0].name == "year"){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails'],{queryParams:{'year':this.date2[xIndex],'buildingType':this.headname,'id':this.lastId}});
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails'],{queryParams:{'year':this.date2[xIndex],'buildingType':this.headname,'id':this.lastId,'type':this.zhiorbuild}});
/* this.selectType="month"
this.yeardatee=option.xAxis.data[xIndex]
@ -420,7 +441,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
}else{
if(this.serviceData.level=='0'||this.serviceData.level=='1'||this.serviceData.level=='2'){
//this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':this.headname}});
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId}})
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname,'id':this.lastId,'type':this.zhiorbuild}})
}
}

10
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.scss

@ -31,11 +31,17 @@
overflow: auto;
#barEchart{
width: 100%;
height: 550px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
@media screen and (max-device-width:1400px){
height: 500px;
top: 55%;
}
@media screen and (min-device-width:1400px){
height: 550px;
top: 50%;
}
}
}
}

21
src/app/statistic-analysis/addUnit/add-unit-two-type-details/add-unit-two-type-details.component.ts

@ -34,7 +34,14 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
tabledata
thisorId=[]
zhiorbuild
padHw
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
location.reload();
@ -46,13 +53,18 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
this.canshuId=params['zhuId']
this.zhiorbuild=params['type']
});
this.setTimeoutObj = window.setTimeout(()=>{
this.getechartsData()
})
}
async getechartsData(){
let paramsdata:any = {
//id:this.zhiorbuild=='zhi'? this.canshuId:this.lastId,
organizationId:this.zhiorbuild=='zhi'?this.lastId:this.canshuId
}
this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.zhiorbuild=='zhi'?this.canshuId:this.lastId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
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))
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
@ -61,7 +73,6 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
}
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData)
this.detailEcharts()
},1000)
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
@ -103,7 +114,7 @@ export class AddUnitTwoTypeDetailsComponent implements OnInit {
title: {
text: this.buildingTypeName + '(' +this.organizationName + ')'+`:总数(${this.tabledata[0].totalCount})`,
left: "center",
bottom: "500",
//bottom: "500",
textStyle: {
fontSize: 30
}

13
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss

@ -37,11 +37,18 @@
}
.publicCss{
width: 100%;
@media screen and (max-device-width:1400px){
height: 500px;
top: 55%;
}
@media screen and (min-device-width:1400px){
height: 550px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
position: absolute;
left: 50%;
transform: translate(-50%,-50%);
}
.selectedBtn{
background-color: #2196f3;

107
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -24,7 +24,14 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
organizationId=[]
buildingTypeId=[]
zhiorbuild
padHw
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
location.reload();
@ -34,13 +41,27 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
this.lastId=param.id
this.zhiorbuild=param.type
});
this.setTimeoutObj = window.setTimeout(()=>{
this.getechartsData()
})
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
this.forArr.forEach(item => {
item.echart.clear()
item.echart.dispose()
})
}
//获取服务层数据
async getechartsData(){
let paramsdata:any = {
id:this.lastId,
//organizationId:'1'
}
this.data.getData(this.zhiorbuild=="zhi"?paramsdata:null,this.zhiorbuild=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
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)
if(this.zhiorbuild=="zhi"){
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
@ -59,15 +80,6 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiorbuild=="zhi"?this.buildnumData:this.zhiNumData,this.zhiorbuild=="zhi"?this.buildingData:this.zhiNameData)
//this.initCharts()
this.barEcharts()
},1000)
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
this.forArr.forEach(item => {
item.echart.clear()
item.echart.dispose()
})
}
axisLabel = {
@ -293,6 +305,64 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
}
//柱状图
tabledata
asixLablehw={
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
},
formatter:function(value)
{
var ret = "";//拼接加\n返回的类目项
var maxLength =2;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于3,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
temp = value.substring(start, end) + "\n";
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
}
asixLable={
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
},
formatter:function(value)
{
var ret = "";//拼接加\n返回的类目项
var maxLength =4;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于3,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
temp = value.substring(start, end) + "\n";
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
}
barEcharts(){
this.forArr.forEach(item=>{
@ -309,22 +379,15 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
}
},
grid: {
top: 90,
containLabel:true,
top:this.padHw?60:90,
bottom: 30
},
xAxis: {
id:this.zhiorbuild=="zhi"?this.buildingTypeId:this.organizationId,
type: 'category',
data:this.zhiorbuild=="zhi"?this.buildingData: this.zhiNameData,
axisLabel:{
//this.axisLabel,
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
}
}
axisLabel:this.padHw?this.asixLablehw:this.asixLable,
},
yAxis: {
type: 'value',

2
src/app/statistic-analysis/all-plan/all-plan.component.scss

@ -1,4 +1,6 @@
.body{
height: 100%;
overflow-y: auto;
display: flex;
flex-direction: column;
.topbox{

17
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -14,21 +14,25 @@ export class BuildingTypeOneComponent implements OnInit {
constructor(private http:HttpClient,private router: Router,public echartsData:EchartsDataService) { }
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
this.echartsData.getData(null,`/api/StatisticsAnalysis/BuildingTypes`)
window.setTimeout(()=>{
this.initCharts()
},500)
this.getechartsdata()
})
}
ngOnDestroy(): void {
this.indexBzt.clear()
this.indexBzt.dispose()
}
async getechartsdata(){
await this.echartsData.getData(null,`/api/StatisticsAnalysis/BuildingTypes`)
this.initCharts()
}
/* 首页饼状图 */
indexBzt
padHw
@ -42,7 +46,7 @@ export class BuildingTypeOneComponent implements OnInit {
location.reload();
}
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata)
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
this.lengthdata.push(this.tabledata[0].buildingTypes[i].buildingTypeName)
this.count=this.count+this.tabledata[0].buildingTypes[i].count
@ -71,7 +75,8 @@ export class BuildingTypeOneComponent implements OnInit {
},
legend: {
orient: 'vertical',
right: this.padHw?150:250,
//left:this.padHw?50:0,
right:this.padHw?20:250,
top:60,
textStyle:{
fontSize:18,

12
src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.scss

@ -30,10 +30,18 @@
overflow: auto;
#barEchart{
width: 100%;
height: 550px;
@media screen and (max-device-width:1400px){
top: 60%;
height: 500px;
}
@media screen and (min-device-width:1400px){
top: 50%;
height: 550px;
}
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
}

31
src/app/statistic-analysis/buildingType/building-type-three-details/building-type-three-details.component.ts

@ -33,7 +33,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
padHw
ngOnInit(): void {
if(window.matchMedia("(max-width: 1300px)").matches&&window.matchMedia("(max-height: 700px)").matches){
if(window.matchMedia("(max-width: 1300px)").matches){
this.padHw=true
//this.padjt=
}else{
@ -49,13 +49,24 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
this.listorganizationId=params['organizationId'];
this.buildingTypeId=params['buildId'];
});
window.setTimeout(()=>{
this.getechartsdata()
})
}
ngOnDestroy(): void {
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
async getechartsdata(){
let paramsdata={
//id:this.buildingTypeId,
organizationId:this.listorganizationId
}
this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
await this.echartsData.getData(paramsdata,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildingTypeId}`)
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].organizations.length;i++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
@ -64,14 +75,6 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
}
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData)
this.detailEcharts()
},500)
}
ngOnDestroy(): void {
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
topTextlabel = {
show: true, // 开启显示
@ -92,7 +95,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'),'walden');
var option = {
title: {
top:this.padHw?50:0,
top:this.padHw?10:0,
text: this.buildingTypeName + '(' +this.organizationName + ')'+`:总数(${this.tabledata[0].totalCount})`,
left: "center",
textStyle: {
@ -100,7 +103,7 @@ export class BuildingTypeThreeDetailsComponent implements OnInit {
}
},
grid: {
top:this.padHw?180:110,
top:this.padHw?120:110,
//bottom: 10
},
xAxis: {

25
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts

@ -40,18 +40,10 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
id:this.buildId,
//organizationId:'1'
}
this.data.getData(null,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
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)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.barEcharts()
},500);
this.getechartsdata()
});
}
ngOnDestroy(): void {
@ -62,6 +54,17 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
item.echart.dispose()
})
}
async getechartsdata(){
await this.data.getData(null,`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.buildId}`)
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
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)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.barEcharts()
}
axisLabel = {
interval: 0,
textStyle:{

2
src/app/statistic-analysis/compang-info/compang-info.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-03-05 15:57:08
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-25 10:34:49
* @LastEditTime: 2021-03-30 10:39:08
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'

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

@ -1,6 +1,8 @@
import { Injectable, EventEmitter} from '@angular/core';
import { Observable, ReplaySubject } from 'rxjs';
import { HttpClient } from '@angular/common/http'
import { promise } from 'selenium-webdriver';
import { resolve } from 'dns';
@Injectable({
providedIn: 'root'
})
@ -437,7 +439,7 @@ export class EchartsDataService {
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
}
this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">100%</td></tfoot>'
this.res+='</table></div></div>'
return this.res
@ -477,7 +479,7 @@ export class EchartsDataService {
}
this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">100%</td></tfoot>'
this.res+='</table></div></div>'
return this.res
}
@ -485,66 +487,17 @@ export class EchartsDataService {
apidata=[]
biaogeTishiyuan(datas){
//localStorage.setItem('tishi',this.tishiData)
console.log(datas)
let paramdata={
planStatus:datas.type
}
if(datas.name=='预案新增'){
this.localData=''
if(localStorage.getItem('addtishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{
this.tishiData=data.organizations
localStorage.setItem('addtishi',JSON.stringify(this.tishiData))
})
}
this.localData=localStorage.getItem('addtishi')
}else if(datas.name=='预案审核中'){
this.localData=''
if(localStorage.getItem('shenheingtishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{
this.tishiData=data.organizations
localStorage.setItem('shenheingtishi',JSON.stringify(this.tishiData))
})
}
this.localData=localStorage.getItem('shenheingtishi')
}else if(datas.name=='预案审核退回'){
this.localData=''
if(localStorage.getItem('shenhetuitishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{
this.tishiData=data.organizations
localStorage.setItem('shenhetuitishi',JSON.stringify(this.tishiData))
})
}
this.localData=localStorage.getItem('shenhetuitishi')
}else if(datas.name='预案审核通过'){
this.localData=''
if(localStorage.getItem('yuansuccesstishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{
this.tishiData=data.organizations
localStorage.setItem('yuansuccesstishi',JSON.stringify(this.tishiData))
})
}
this.localData=localStorage.getItem('yuansuccesstishi')
}else if(datas.name='预案编制'){
this.localData=''
if(localStorage.getItem('yuanbiantishi')==undefined){
this.http.get(`/api/StatisticsAnalysis/Plans/Status`,{params:paramdata}).subscribe((data:any)=>{
this.tishiData=data.organizations
localStorage.setItem('yuanbiantishi',JSON.stringify(this.tishiData))
})
this.tishiData=''
for(var a in this.obdata[0].plansStatuses){
if(this.obdata[0].plansStatuses[a].planStatusName==datas.planStatusName){
this.tishiData=this.obdata[0].plansStatuses[a].organizations
}
this.localData=localStorage.getItem('yuanbiantishi')
}
console.log(JSON.parse(this.localData) )
this.localData=JSON.parse(this.localData)
window.setTimeout(()=>{
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.localData.length;i++){
countall+=this.localData[i].count
var countall=0//总计
var countbi=0//站比
var allCountbi=0//总站比
for(var i=0;i<this.tishiData.length;i++){
countall+=this.tishiData[i].count
}
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
@ -554,20 +507,19 @@ export class EchartsDataService {
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
for(var i=0;i<this.localData.length;i++){
countbi=Math.round(this.localData[i].count/countall* 10000)/ 100.00
for(var i=0;i<this.tishiData.length;i++){
countbi=Math.round(this.tishiData[i].count/countall* 10000)/ 100.00
allCountbi=allCountbi+countbi
this.res+='<tr>'
this.res+='<td style="text-align:center;">'+this.localData[i].organizationName+'</td>'
this.res+='<td style="text-align:center;">'+this.localData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].organizationName+'</td>'
this.res+='<td style="text-align:center;">'+this.tishiData[i].count+'</td>'
this.res+='<td style="text-align:center;">'+countbi+'%</td></tr>'
}
this.res+='</tbody>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">'+allCountbi.toFixed(2)+'%</td></tfoot>'
this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+countall+'</td><td style="text-align:center;">100%</td></tfoot>'
this.res+='</table></div></div>'
return this.res
},1000)
}
@ -607,12 +559,15 @@ export class EchartsDataService {
async getData(paramsdata,api){
this.allDate=[]
this.obdata=null
this.http.get(api,{params:paramsdata}).subscribe((data:any)=>{
this.allDate.push(data)
this.obdata=JSON.parse(JSON.stringify(this.allDate))
console.log(this.obdata)
return this.allDate
let result = await new Promise((resolve, reject)=>{
this.http.get(api,{params:paramsdata}).subscribe((data:any)=>{
resolve(data)
})
})
this.allDate.push(result)
this.obdata=JSON.parse(JSON.stringify(this.allDate))
console.log(this.obdata)
}
selectType=0//选择年月
selectOneYear

61
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-03-25 11:17:04
* @LastEditTime: 2021-04-01 14:22:36
*/
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
@ -22,21 +22,31 @@ export class PageOneComponent implements OnInit {
constructor(private router: Router,public echartsData:EchartsDataService) { }
padHw
ngOnInit() {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
location.reload();
}
this.echartsData.getData(null,`/api/StatisticsAnalysis/Plans`)
window.setTimeout(()=>{
this.initCharts()
},1000)
this.getechartsdata()
})
}
ngOnDestroy(): void {
this.indexBzt.clear()
this.indexBzt.dispose()
}
/* 饼状图跳转 */
async getechartsdata(){
await this.echartsData.getData(null,`/api/StatisticsAnalysis/Plans`)
this.initCharts()
}
/* 首页饼状图 */
indexBzt
@ -67,8 +77,8 @@ export class PageOneComponent implements OnInit {
},
legend: {
orient: 'vertical',
right: 150,
top:80,
right:this.padHw?50:150,
top:this.padHw?30:80,
//padding:20,
// itemWidth:60,
// itemHeight:25,
@ -99,11 +109,11 @@ export class PageOneComponent implements OnInit {
},
data: [
{value: this.tabledata[0].planningStatistics.newCount, name: '预案新增',type:1},
{value: this.tabledata[0].planningStatistics.approvedCount, name: '预案审核通过',itemStyle:{color:'#02A7F0'},type:3},
{value: this.tabledata[0].planningStatistics.editingCount, name: '预案编制',type:5},
{value: this.tabledata[0].planningStatistics.rejectedCount, name: '预案审核退回',type:4},
{value: this.tabledata[0].planningStatistics.auditingCount, name: '预案审核中',type:2}
{value: this.tabledata[0].plansStatuses[0].count, name: '预案新增',type:1,planStatusName:this.tabledata[0].plansStatuses[0].planStatusName},
{value: this.tabledata[0].plansStatuses[2].count, name: '预案审核通过',itemStyle:{color:'#02A7F0'},type:3,planStatusName:this.tabledata[0].plansStatuses[2].planStatusName},
{value: this.tabledata[0].plansStatuses[4].count, name: '预案编制',type:5,planStatusName:this.tabledata[0].plansStatuses[4].planStatusName},
{value: this.tabledata[0].plansStatuses[3].count, name: '预案审核退回',type:4,planStatusName:this.tabledata[0].plansStatuses[3].planStatusName},
{value: this.tabledata[0].plansStatuses[1].count, name: '预案审核中',type:2,planStatusName:this.tabledata[0].plansStatuses[1].planStatusName}
],
emphasis: {
itemStyle: {
@ -116,19 +126,22 @@ export class PageOneComponent implements OnInit {
]
};
this.indexBzt.on('click', (params) => {
/* let jwt = sessionStorage.getItem("token");
let rawJwt = CryptoJS.enc.Base64.parse(jwt.split('.')[1]);
let identityJson = CryptoJS.enc.Utf8.stringify(rawJwt);
let identityJsonparse=JSON.parse(identityJson) */
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.echartsData.localData.length>0){
window.setTimeout(()=>{
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}});
})
}
else if(this.echartsData.level=='3'){
//中队跳转
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type}});
console.log(params)
for(var i=0;i<this.tabledata[0].plansStatuses.length;i++){
if(this.tabledata[0].plansStatuses[i].planStatusName==params.data.planStatusName){
if((this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2')&&this.tabledata[0].plansStatuses[i].organizations.length>0){
window.setTimeout(()=>{
this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name,'type':params.data.type}});
})
}
else if(this.echartsData.level=='3'){
//中队跳转
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'id':null,'type':params.data.type}});
}
}
}
});
this.indexBzt.setOption(options);
}

8
src/app/statistic-analysis/state/page-there-year/page-there-year.component.scss

@ -10,6 +10,14 @@
height: 100%;
// overflow: auto;
}
#barEchart{
@media screen and (max-device-width:1200px){
height: 550px;
}
@media screen and (min-device-width:1200px){
height: 350px;
}
}
#Line{
width: 50%;
height: 420px;

51
src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts

@ -20,36 +20,43 @@ export class PageThereYearComponent implements OnInit {
level:String
setTimeoutObj//延时器需要清除
type
tabledata
tabledata//获取所有数据
lastyears//上个页面传过来的年份
ngOnInit(): void {
this.dateInit ()
this.route.queryParams.subscribe(params => {
this.year = params['level'];
this.buildingTypeName = params['headtext'];
this.type=params['type']
this.lastyears=params['years']
});
let paramdata={
planStatus:this.type,
TrendType:this.serviceData.selectType
}
this.serviceData.getData(paramdata,`/api/StatisticsAnalysis`)
this.setTimeoutObj = window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata[0].planStatistics.trendStatistics.added)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
this.date.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
this.dateNum.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].count)
}
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.detailEcharts()
},1000)
this.getechartsData()
})
}
ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj);
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
async getechartsData(){
let paramdata={
planStatus:this.type,
TrendYear:this.lastyears||'',
objectType:1,
TrendType:0
}
await this.serviceData.getData(paramdata,`/api/StatisticsAnalysis/Trends`)
this.tabledata=JSON.parse(JSON.stringify(this.serviceData.allDate))
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].length;i++){
this.date.push(this.tabledata[0][i].month)
this.dateNum.push(this.tabledata[0][i].count)
}
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.detailEcharts()
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年
//查询数据
@ -112,10 +119,8 @@ export class PageThereYearComponent implements OnInit {
this.detailPlanEchart = echarts.init(document.getElementById('barEchart'), 'skinUpp');
this.option = {
grid: {
//top: 50,
left:40,
right: 20,
//bottom: 20,
top: 90,
},
// 标题
title: {
@ -201,11 +206,13 @@ export class PageThereYearComponent implements OnInit {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/
if(this.serviceData.level=='0'||this.serviceData.level=='1'||this.serviceData.level=='2'){
this.router.navigate(['/statisticanalysis/stataPageThere'],{queryParams:{'level':this.option.xAxis.data[xIndex],'headtext':this.buildingTypeName,'zhong':'1','type':this.type}});
this.serviceData.isQuery=true
//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}});
}
else if(this.serviceData.level=='3'){
//中队跳转
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':1}});
this.router.navigate(['/statisticanalysis/CompangInfo'],{queryParams:{'name':params.name,'type':this.type}});
}
}
});

13
src/app/statistic-analysis/state/page-there/page-there.component.scss

@ -12,7 +12,7 @@
}
#Line{
width: 50%;
height: 420px;
height: 550px;
margin: 50px auto;
}
}
@ -67,10 +67,17 @@
overflow: auto;
#zhidui{
width: 100%;
height: 550px;
@media screen and (max-device-width:1400px){
height: 550px;
top: 60%;
}
@media screen and (min-device-width:1400px){
height: 650px;
top: 55%;
}
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
}

40
src/app/statistic-analysis/state/page-there/page-there.component.ts

@ -32,25 +32,38 @@ export class PageThereComponent implements OnInit {
}
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
this.dateInit();
let datayuex:string;
let headName:string;
this.activatedRoute.queryParams.subscribe(param=>{
this.lastid=param.id
this.type=param.type
this.headtext=param.headtext
datayuex=param.level
this.zhong=param.zhong
headName=datayuex+'月'+this.headtext;
this.headName=datayuex+'月'+this.headtext;
//console.log(headName)
});
window.setTimeout(()=>{
this.getechartsdata()
})
}
padHw
headName
selectType:string = 'month'; //选择当前的 查询类型 按月/年
async getechartsdata(){
let paramdata={
planStatus:this.type,
OrganizationId:this.lastid
}
this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
await this.echartsData.getData(paramdata,`/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++){
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName)
@ -58,13 +71,9 @@ export class PageThereComponent implements OnInit {
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
}
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.zhuzhuangtu(headName)
},1000)
this.zhuzhuangtu(this.headName)
}
selectType:string = 'month'; //选择当前的 查询类型 按月/年
//查询数据
years:any = []
selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12]
@ -121,9 +130,10 @@ export class PageThereComponent implements OnInit {
}
axisLabel = {
interval: 0,
interval: 0,
//rotate:-30,
textStyle:{
fontSize :18,
fontSize :15,
color:'#000000'
},
formatter:function(value)
@ -147,7 +157,7 @@ export class PageThereComponent implements OnInit {
else {
return value;
}
}
}
}//echarts两个字换行
/* 柱状图 */
zhuzhuangtu(headName:string){
@ -157,13 +167,15 @@ export class PageThereComponent implements OnInit {
title: {
text: headName,
left: "center",
top:0,
//bottom: "540",
textStyle: {
fontSize: 30
}
},
grid: {
top: 110,
top: this.padHw?90:110,
containLabel:true,
//bottom: 10
},
xAxis: {

11
src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss

@ -3,7 +3,7 @@
height: 100%;
#pie{
width: 100%;
height: 450px;
height: 100%;
// padding-top: 20px;
}
.histogramBox{
@ -21,10 +21,15 @@
overflow: auto;
#pie{
width: 100%;
height: 550px;
@media screen and (max-device-width:1400px){
height: 450px;
}
@media screen and (min-device-width:1400px){
height: 550px;
}
position: absolute;
left: 50%;
top: 50%;
top: 55%;
transform: translate(-50%,-50%);
}
}

45
src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts

@ -15,6 +15,12 @@ export class PageTwoNameComponent implements OnInit {
@ViewChild('zhongDuiChild') zhongDuiChild:PageZhongDuiDetailsComponent; //父组件中获得子组件的引用
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.padHw=true
//this.padjt=
}else{
this.padHw=false
}
if(sessionStorage.getItem('refresh') === 'true') {
sessionStorage.removeItem('refresh');
location.reload();
@ -23,25 +29,31 @@ export class PageTwoNameComponent implements OnInit {
this.headname=param.level
this.type=param.type
});
setTimeout(() => {
this.getechartsdata()
});
}
ngOnDestroy(): void {
}
async getechartsdata(){
let paramdata={
planStatus:this.type
}
this.data.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`)
setTimeout(() => {
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
console.log(this.tabledata)
await this.data.getData(paramdata,`/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++){
this.zhiNameData.push(this.tabledata[0].organizations[i].organizationName)
this.zhiNumData.push(this.tabledata[0].organizations[i].count)
this.organizationId.push(this.tabledata[0].organizations[i].organizationId)
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.planAdd()
},1000);
}
ngOnDestroy(): void {
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.planAdd()
}
padHw
headname//标题
type//预案类型
axisLabel = {
@ -109,14 +121,13 @@ export class PageTwoNameComponent implements OnInit {
title: {
text: _this.headname+`总数(${this.tabledata[0].totalCount}`,
left: "center",
top: "0",
bottom: '100%',
top: 0,
textStyle: {
fontSize: 30
}
},
grid: {
top: 110,
top:this.padHw?100: 80,
//bottom: 10
},
xAxis: {
@ -126,11 +137,13 @@ export class PageTwoNameComponent implements OnInit {
axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :18,
fontSize :16,
color:'#000000'
}
},
interval: 0,
}
},
},
yAxis: {
type: 'value',

4
src/app/statistic-analysis/state/page-two-time/page-two-time.component.html

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-09-05 08:59:24
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-17 08:49:56
* @LastEditTime: 2021-04-02 10:02:35
-->
<div class="content">
@ -66,7 +66,7 @@
</div>
<div class="fixedCss">
<button mat-raised-button (click)='goBack()' >返回</button>
<button mat-raised-button (click)='goBack()' style="margin-left: 5px;">返回</button>
<button mat-raised-button (click)='toggleTrue()' [ngClass]="{'selectButton': this.echartsData.isQuery}" style="margin:0 10px;" *ngIf="echartsData.statefulInspectionToggle">横向查询</button>
<button mat-raised-button (click)='toggleFalse()' [ngClass]="{'selectButton': !this.echartsData.isQuery}" *ngIf="echartsData.statefulInspectionToggle">纵向查询</button>
</div>

89
src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss

@ -20,39 +20,80 @@
//头部搜索栏
.header {
border-bottom: 1px solid #999;
height: 70px;
min-height: 70px;
box-sizing: border-box;
padding: 0 15px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items:center;
justify-content:center;
.queryField {
margin: 0 10px;
font-size: 14px;
.mat-form-field {
width: 130px;
max-height: 50px;;
margin: 0 15px 0 10px;
height: 80px;
min-height: 81px;;
box-sizing: border-box;
// padding: 0 15px;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
@media screen and (min-device-width:1200px){
align-items:center;
justify-content:center;
}
@media screen and (max-device-width:1200px){
justify-content: center;
align-items:center;
}
.queryField {
@media screen and (max-device-width:1200px){
font-size: 14px;
.mat-form-field {
width: 100px;
max-height: 50px;;
margin: 0 5px 0 5px;
}
}
@media screen and (min-device-width:1200px){
margin: 0 10px;
font-size: 14px;
.mat-form-field {
width: 130px;
max-height: 50px;;
margin: 0 15px 0 10px;
}
}
}
.fixedCss{
position: fixed;
top: 81px;
right: 32px;
@media screen and (min-device-width:1200px){
justify-content: center;
align-items: center;
button{
width: 88px;
height: 36px;
}
margin-right:4%;
}
@media screen and (max-device-width:1200px){
justify-content: center;
align-items: center;
button{
width: 88px;
height: 36px;
}
}
display: flex;
flex-direction:nowrap;
height: 100%;
}
}
//echarts div公有样式
.publicCss{
width: 80%;
height: 550px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
@media screen and (max-device-width:1400px){
height: 450px;
top: 60%;
}
@media screen and (min-device-width:1400px){
height: 550px;
top: 50%;
}
position: absolute;
left: 50%;
transform: translate(-50%,-50%);
}
.publicOneLineCss{
height: 350px;

124
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -128,11 +128,12 @@ export class PageTwoTimeComponent implements OnInit {
let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59
this.echartsData.selectOneYear=e.selectStartYear
this.echartsData.selectTwoYear=e.selectEndYear
this.appEcharts.findyear()
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择正确时间区段','确定',config);
this.snackBar.open('结束时间必须大于开始时间','确定',config);
}
}
@ -149,13 +150,14 @@ export class echartsComponent implements OnInit {
constructor(private router: Router,private activatedRoute: ActivatedRoute,public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { }
zongcount=0
type
organizationId=[]
tiaoshiPao:any
datayuey=[]
datayuex=[]
dataYearX = ['2020','2021']
dataYearY = ['0']
dataYearX = []
dataYearY = []
toggleTrue (){}
//气泡提示数据获取
bianli(){
@ -176,18 +178,32 @@ export class echartsComponent implements OnInit {
this.headtext=param.level
this.type=param.type
});
window.setTimeout(()=>{
this.getechartsData()
})
}
ngOnDestroy () {
this.twoExample.clear()
this.twoExample.dispose()
}
//获取数据
async getechartsData(){
let paramdata={
//planStatus:this.type,
TrendType:this.echartsData.selectType
planStatus:this.type,
objectType:1,
TrendType:0
}
this.echartsData.getData(paramdata,`/api/StatisticsAnalysis`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata[0].companyStatistics.trendStatistics.added)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.echartsData.selectStartMonth||this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.echartsData.selectEndMonth){
this.datayuex.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
this.datayuey.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].count)
await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`)
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.echartsData.selectStartMonth||this.tabledata[0][i].month<=this.echartsData.selectEndMonth){
this.datayuex.push(this.tabledata[0][i].month)
this.datayuey.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
}
@ -195,38 +211,36 @@ export class echartsComponent implements OnInit {
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
//this.oneInit()
this.twoInit()
},1000)
}
ngOnDestroy () {
this.twoExample.clear()
this.twoExample.dispose()
}
changeTime (e) {
async changeTime (e) {
this.twoExample.clear()
this.twoExample.dispose()
if (e=='year') {
//this.oneInit(this.dataYearX,this.dataYearY)
this.dataYearX=[]
this.echartsData.selectType=2
this.zongcount=0
let paramdata={
//planStatus:this.type,
objectType:1,
planStatus:this.type,
TrendType:this.echartsData.selectType
}
this.echartsData.getData(paramdata,`/api/StatisticsAnalysis`)
await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata[0].companyStatistics.trendStatistics.added)
this.dataYearY.push(this.tabledata[0].companyStatistics.trendStatistics.added[0].count)
console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].length;i++){
this.dataYearX.push(this.tabledata[0][i].year)
this.dataYearY.push(this.tabledata[0][i].count)
this.zongcount=this.zongcount+this.tabledata[0][i].count
}
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
//this.oneInit()
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX)
this.twoInit(this.dataYearX,this.dataYearY)
},1000)
})
//this.twoInit(this.dataYearX,this.dataYearY)
} else {
@ -238,29 +252,53 @@ export class echartsComponent implements OnInit {
}
}
//按月查询
findYue(){
async findYue(){
this.twoExample.clear()
this.datayuex=[]
this.datayuey=[]
let paramdata={
objectType:1,
planStatus:this.type,
TrendType:this.echartsData.selectType
}
this.echartsData.getData(paramdata,`/api/StatisticsAnalysis`)
await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata[0].companyStatistics.trendStatistics.added)
for(var i=0;i<this.tabledata[0].companyStatistics.trendStatistics.added.length;i++){
if(this.tabledata[0].companyStatistics.trendStatistics.added[i].month>=this.echartsData.selectStartMonth&&this.tabledata[0].companyStatistics.trendStatistics.added[i].month<=this.echartsData.selectEndMonth){
this.datayuex.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].month)
this.datayuey.push(this.tabledata[0].companyStatistics.trendStatistics.added[i].count)
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.echartsData.selectStartMonth&&this.tabledata[0][i].month<=this.echartsData.selectEndMonth){
this.datayuex.push(this.tabledata[0][i].month)
this.datayuey.push(this.tabledata[0][i].count)
}
}
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
this.twoInit(this.datayuex,this.datayuey)
},1000)
})
}
//按年查询
async findyear(){
this.twoExample.clear()
this.dataYearX=[]
this.dataYearY=[]
let paramdata={
objectType:1,
planStatus:this.type,
TrendType:this.echartsData.selectType
}
await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
//console.log(this.tabledata[0].companyStatistics.trendStatistics.added)
for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].year>=this.echartsData.selectOneYear&&this.tabledata[0][i].year<=this.echartsData.selectTwoYear){
this.dataYearX.push(this.tabledata[0][i].year)
this.dataYearY.push(this.tabledata[0][i].count)
}
}
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX)
this.twoInit(this.dataYearX,this.dataYearY)
})
}
headtext
twoExample:any;
tabledata
@ -268,10 +306,9 @@ export class echartsComponent implements OnInit {
let that = this
this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp');
var option = {
// 标题
title: {
text: this.headtext+':总数(102)',
text: this.headtext+`:总数(${this.zongcount}`,
top: -4,
left: 'center',
bottom: 100,
@ -281,6 +318,9 @@ export class echartsComponent implements OnInit {
color:'#000',
}
},
grid: {
top: 90,
},
tooltip: {
trigger: 'axis',
position: this.echartsData.tableTooltipNoShowq,
@ -353,7 +393,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':option.xAxis.data[xIndex],'headtext':option.title.text,'type':this.type}});
this.router.navigate(['/statisticanalysis/stataPageThereYearComponent'],{queryParams:{'level':this.headtext,'headtext':option.title.text,'type':this.type,'year':X[xIndex]}});
}else{
/*事件处理代码书写位置*/
if(this.echartsData.level=='0'||this.echartsData.level=='1'||this.echartsData.level=='2'){
@ -363,7 +403,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':1}});
this.router.navigate(['/statisticanalysis/AllPlan'],{queryParams:{'name':params.name,'type':this.type}});
}
}

29
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-03-25 10:56:10
* @LastEditTime: 2021-03-31 16:32:39
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
@ -41,13 +41,22 @@ export class PageZhongDuiDetailsComponent implements OnInit {
this.type=param.type
this.lastid=param.id
});
let paramdata={
planStatus:this.type,
OrganizationId:this.lastid
}
this.data.getData(paramdata,`/api/StatisticsAnalysis/Plans/Status`)
window.setTimeout(()=>{
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
this.getechartsdata()
})
}
ngOnDestroy(): void {
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
async getechartsdata(){
let paramdata={
planStatus:this.type,
OrganizationId:this.lastid
}
await this.data.getData(paramdata,`/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++){
this.zhongNameData.push(this.tabledata[0].organizations[i].organizationName)
@ -56,11 +65,6 @@ export class PageZhongDuiDetailsComponent implements OnInit {
}
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhongNumData,this.zhongNameData)
this.detailEcharts()
},1000)
}
ngOnDestroy(): void {
this.detailPlanEchart.clear()
this.detailPlanEchart.dispose()
}
//返回
goBack () {
@ -91,6 +95,7 @@ export class PageZhongDuiDetailsComponent implements OnInit {
data: this.zhongNameData,
axisLabel:{
//this.axisLabel,
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'

Loading…
Cancel
Save