diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.html b/src/app/key-unit/key-unit-management/key-unit-management.component.html index 276d48f..eb3c1c2 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.html +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.html @@ -8,15 +8,53 @@ - -
+
+ + + + + 更多筛选条件 + 收起 +
+ +
+ + +
+
+ + + + 未关注 + 已关注 + + + +
+
+ + + + + {{unit.name}} + + + + 更多筛选条件 + 收起 +
+
+ + +
+ +
包含下级 - 更多筛选条件 - 收起 +
clear
@@ -40,34 +78,7 @@
- -
- - - - -
-
- - - - - {{unit.name}} - - - - -
-
- - - - 未关注 - 已关注 - - -
-
+
@@ -76,7 +87,7 @@
-
+
@@ -89,10 +100,7 @@
-
- - -
+
diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.scss b/src/app/key-unit/key-unit-management/key-unit-management.component.scss index 1676076..b76bbeb 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.scss +++ b/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 diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.ts b/src/app/key-unit/key-unit-management/key-unit-management.component.ts index 1079af1..9d8f3e5 100644 --- a/src/app/key-unit/key-unit-management/key-unit-management.component.ts +++ b/src/app/key-unit/key-unit-management/key-unit-management.component.ts @@ -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 } } //获得所有重点单位 diff --git a/src/app/plan-audit/plan-record/plan-record.component.scss b/src/app/plan-audit/plan-record/plan-record.component.scss index 2c9ca4f..9d22124 100644 --- a/src/app/plan-audit/plan-record/plan-record.component.scss +++ b/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;} diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.html b/src/app/plan-audit/wait-examineer/wait-examineer.component.html index 133bb25..c81b24e 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.html +++ b/src/app/plan-audit/wait-examineer/wait-examineer.component.html @@ -4,16 +4,14 @@
操作类型: + 全部 更新 新增 删除 -
共计:{{count}}条
diff --git a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss b/src/app/plan-audit/wait-examineer/wait-examineer.component.scss index ecc0ced..21613c6 100644 --- a/src/app/plan-audit/wait-examineer/wait-examineer.component.scss +++ b/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; } diff --git a/src/app/plan-management/entry-plan/entry-plan.component.html b/src/app/plan-management/entry-plan/entry-plan.component.html index 099f1fd..82735dc 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.html +++ b/src/app/plan-management/entry-plan/entry-plan.component.html @@ -9,15 +9,29 @@
- -
+
+ + + + + {{unit.name}} + + + + 更多筛选条件 + 收起 +
+
+ + +
+
包含下级 - 更多筛选条件 - 收起 +
clear
@@ -40,17 +54,6 @@
- -
- - - - - {{unit.name}} - - - -
@@ -61,8 +64,27 @@ 其他预案 + 更多筛选条件 + 收起
-
+
+ + +
+
+ + + + + {{item.name}} + + + 包含下级 +
+
@@ -73,21 +95,9 @@
-
- - - - - {{item.name}} - - - 包含下级 -
-
+ +
@@ -96,7 +106,7 @@
-
+
@@ -106,10 +116,6 @@
-
- - -
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.scss b/src/app/plan-management/entry-plan/entry-plan.component.scss index aca075b..40b974d 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.scss +++ b/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 diff --git a/src/app/plan-management/entry-plan/entry-plan.component.ts b/src/app/plan-management/entry-plan/entry-plan.component.ts index 1e4032f..337e3bf 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.ts +++ b/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(){ diff --git a/src/app/plan-management/maintain-up/maintain-up.component.html b/src/app/plan-management/maintain-up/maintain-up.component.html index 3d7fe2f..c24c072 100644 --- a/src/app/plan-management/maintain-up/maintain-up.component.html +++ b/src/app/plan-management/maintain-up/maintain-up.component.html @@ -39,7 +39,11 @@
- +
+ + +
+
@@ -55,8 +59,14 @@ + 更多筛选条件 + 收起
-
+
+ + +
+
@@ -65,7 +75,7 @@
-
+
@@ -74,7 +84,7 @@
-
+
@@ -87,10 +97,7 @@
-
- - -
+
diff --git a/src/app/plan-management/maintain-up/maintain-up.component.scss b/src/app/plan-management/maintain-up/maintain-up.component.scss index ef26154..1a477bb 100644 --- a/src/app/plan-management/maintain-up/maintain-up.component.scss +++ b/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 diff --git a/src/app/plan-management/maintain-up/maintain-up.component.ts b/src/app/plan-management/maintain-up/maintain-up.component.ts index 7b47e76..557935b 100644 --- a/src/app/plan-management/maintain-up/maintain-up.component.ts +++ b/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(); diff --git a/src/app/plan-management/meet-plan/meet-plan.component.html b/src/app/plan-management/meet-plan/meet-plan.component.html index ff00ab0..e9798c4 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.html +++ b/src/app/plan-management/meet-plan/meet-plan.component.html @@ -9,26 +9,50 @@
- - -
- +
+ - - 国家级 - 市级 - + + + {{item.name}} + - 更多筛选条件 + 包含下级 + 更多筛选条件 收起 +
+ + +
+ + +
+
+ + + + 国家级 + 市级 + + +
+ 更多筛选条件 + 收起
-
+
+ + +
+
@@ -39,20 +63,17 @@ +
-
+ + +
-
-
+
@@ -63,25 +84,12 @@
-
- - - - - {{item.name}} - - - 包含下级 -
-
+
diff --git a/src/app/plan-management/meet-plan/meet-plan.component.scss b/src/app/plan-management/meet-plan/meet-plan.component.scss index b85f11d..31ef63e 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.scss +++ b/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 diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts index 0b2c0b3..f85889d 100644 --- a/src/app/plan-management/meet-plan/meet-plan.component.ts +++ b/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 } //获取表格数据 diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html index fea010f..c9613fe 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html +++ b/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 -->
-
-
+
+ + + + + {{item.name}} + + + 包含下级 + 更多筛选条件 + 收起 +
+
+ + +
+
- 更多筛选条件 - 收起 +
+ + + + + 更多筛选条件 + 收起 +
+ +
+ + +
+
@@ -37,19 +67,8 @@
-
- - - - - -
-
+ +
@@ -60,25 +79,10 @@
-
- - - - - {{item.name}} - - - 包含下级 -
+
-
- - -
+
diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss index cdbb1c2..ae47af9 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.scss +++ b/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 diff --git a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts b/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts index c7b7918..ca16484 100644 --- a/src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts +++ b/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 diff --git a/src/app/plan-management/open-plan/open-plan.component.html b/src/app/plan-management/open-plan/open-plan.component.html index 3bb6661..6dec103 100644 --- a/src/app/plan-management/open-plan/open-plan.component.html +++ b/src/app/plan-management/open-plan/open-plan.component.html @@ -8,19 +8,34 @@
- - -
- +
+ - - - {{unit.name}} - - + + {{item.name}} + + 包含下级 + 更多筛选条件 + 收起 +
+ +
+ +
-
+
+ + + + + {{unit.name}} + + + + +
+
@@ -32,25 +47,13 @@
-
- - - - - {{item.name}} - - - 包含下级 -
- + +
+ +
-
- -
+
diff --git a/src/app/plan-management/open-plan/open-plan.component.scss b/src/app/plan-management/open-plan/open-plan.component.scss index 9b77e69..7e795ed 100644 --- a/src/app/plan-management/open-plan/open-plan.component.scss +++ b/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 diff --git a/src/app/plan-management/open-plan/open-plan.component.ts b/src/app/plan-management/open-plan/open-plan.component.ts index 32765c6..8f894fd 100644 --- a/src/app/plan-management/open-plan/open-plan.component.ts +++ b/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 //存储所有预案信息 //获得所有预案信息 diff --git a/src/app/plan-management/pass-plan/pass-plan.component.html b/src/app/plan-management/pass-plan/pass-plan.component.html index eb4f771..2314d86 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.html +++ b/src/app/plan-management/pass-plan/pass-plan.component.html @@ -40,7 +40,19 @@
- +
+ + +
+
+ + + + {{item.name}} + + + 包含下级 +
@@ -50,8 +62,14 @@ + 更多筛选条件 + 收起
-
+
+ + +
+
@@ -61,22 +79,11 @@ 其他预案 +
-
- - - - - {{item.name}} - - - 包含下级 -
-
+ +
@@ -89,10 +96,7 @@
-
- - -
+
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.scss b/src/app/plan-management/pass-plan/pass-plan.component.scss index 3e7cd43..6b834aa 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.scss +++ b/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{ diff --git a/src/app/plan-management/pass-plan/pass-plan.component.ts b/src/app/plan-management/pass-plan/pass-plan.component.ts index 27fe7f4..41dd317 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.ts +++ b/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 diff --git a/src/app/plan-management/reinforce-plan/reinforce-plan.component.html b/src/app/plan-management/reinforce-plan/reinforce-plan.component.html index bac14ac..f95a6c0 100644 --- a/src/app/plan-management/reinforce-plan/reinforce-plan.component.html +++ b/src/app/plan-management/reinforce-plan/reinforce-plan.component.html @@ -40,7 +40,23 @@
- +
+ + +
+
+ + + + 总队 + 支队 + 大队 + 中队 + + + + 包含下级 +
@@ -63,32 +79,10 @@
-
- - - - 总队 - 支队 - 大队 - 中队 - - - - 包含下级 -
- +
-
+
diff --git a/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss b/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss index 3e7cd43..cf61363 100644 --- a/src/app/plan-management/reinforce-plan/reinforce-plan.component.scss +++ b/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 diff --git a/src/app/plan-management/reinforce-plan/reinforce-plan.component.ts b/src/app/plan-management/reinforce-plan/reinforce-plan.component.ts index ea8d246..afd1999 100644 --- a/src/app/plan-management/reinforce-plan/reinforce-plan.component.ts +++ b/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 diff --git a/src/app/plan-management/type-plan/type-plan.component.html b/src/app/plan-management/type-plan/type-plan.component.html index 734537c..6863823 100644 --- a/src/app/plan-management/type-plan/type-plan.component.html +++ b/src/app/plan-management/type-plan/type-plan.component.html @@ -9,26 +9,32 @@
- -
- - - - - 更多筛选条件 +
+ + + + + {{item.name}} + + + 包含下级 + 更多筛选条件 收起 +
+ +
+ +
- + - - - - arrow forward - 🠊 - - + +
@@ -41,25 +47,27 @@ 审核退回 + 更多筛选条件 + 收起
-
- - - - - {{item.name}} - - - 包含下级 -
- +
+ + +
+
+ + + + + + arrow forward + 🠊 + + +
-
- - + +
diff --git a/src/app/plan-management/type-plan/type-plan.component.scss b/src/app/plan-management/type-plan/type-plan.component.scss index dab8169..5f3d4fc 100644 --- a/src/app/plan-management/type-plan/type-plan.component.scss +++ b/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 diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts index b34996a..cc5feb8 100644 --- a/src/app/plan-management/type-plan/type-plan.component.ts +++ b/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 } diff --git a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts b/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts index c9b4b9c..39b8b2b 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts +++ b/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;i0){ - - } */ - + 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:{ diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss index fdf24f1..5ab7618 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.scss +++ b/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%); } } \ No newline at end of file diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts index d52757d..69d0c37 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-three-bar-details/add-unit-three-bar-details.component.ts @@ -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.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.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.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}}); } }); diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.html b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.html index 3e30b85..d735bed 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.html +++ b/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 -->
@@ -70,7 +70,7 @@
- +
diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.scss b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.scss index 6904ade..83396d9 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.scss +++ b/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{ diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts index f74a51e..74af655 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts @@ -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.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.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.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.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=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.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.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 { - 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', diff --git a/src/app/statistic-analysis/all-plan/all-plan.component.scss b/src/app/statistic-analysis/all-plan/all-plan.component.scss index 01512e9..3900afd 100644 --- a/src/app/statistic-analysis/all-plan/all-plan.component.scss +++ b/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{ diff --git a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts b/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts index 52828f6..4b321f8 100644 --- a/src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts +++ b/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.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=JSON.parse(JSON.stringify(this.data.allDate)) - for(var i=0;i' } this.res+='' - this.res+='总计'+countall+''+allCountbi.toFixed(2)+'%' + this.res+='总计'+countall+'100%' this.res+='
' return this.res @@ -477,7 +479,7 @@ export class EchartsDataService { } this.res+='' - this.res+='总计'+countall+''+allCountbi.toFixed(2)+'%' + this.res+='总计'+countall+'100%' this.res+='
' 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.res+='
'; @@ -554,20 +507,19 @@ export class EchartsDataService { this.res+='' this.res+='' this.res+=''; - for(var i=0;i' - this.res+='' + this.res+='' + this.res+='' this.res+='' } + this.res+='' - this.res+='' + this.res+='' this.res+='
总占比
'+this.localData[i].count+''+this.tishiData[i].organizationName+''+this.tishiData[i].count+''+countbi+'%
总计'+countall+''+allCountbi.toFixed(2)+'%
总计'+countall+'100%
' 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 diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts index 779b1f1..ae140a3 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.ts +++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-01 15:24:39 * @LastEditors: sueRimn - * @LastEditTime: 2021-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;i0){ + 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); } diff --git a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.scss b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.scss index 4d7c76c..ec4238b 100644 --- a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.scss +++ b/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; diff --git a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts index bf869e7..45c07d9 100644 --- a/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts +++ b/src/app/statistic-analysis/state/page-there-year/page-there-year.component.ts @@ -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.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.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
@@ -66,7 +66,7 @@
- +
diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss index bc02d59..d0c1957 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss +++ b/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; diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts index 4e1d71e..44cb412 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts @@ -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,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.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.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=JSON.parse(JSON.stringify(this.echartsData.allDate)) //console.log(this.tabledata[0].companyStatistics.trendStatistics.added) - for(var i=0;i=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.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.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}}); } } diff --git a/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts b/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts index 4b5a37c..699c668 100644 --- a/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts +++ b/src/app/statistic-analysis/state/page-zhong-dui-details/page-zhong-dui-details.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-05 13:50:45 * @LastEditors: sueRimn - * @LastEditTime: 2021-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