邵佳豪 4 years ago
parent
commit
8527958db3
  1. 2
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  2. 2
      src/app/plan-management/entry-plan/entry-plan.component.html
  3. 134
      src/app/plan-management/meet-plan/meet-plan.component.html
  4. 118
      src/app/plan-management/meet-plan/meet-plan.component.scss
  5. 25
      src/app/plan-management/meet-plan/meet-plan.component.spec.ts
  6. 128
      src/app/plan-management/meet-plan/meet-plan.component.ts
  7. 42
      src/app/plan-management/meet-plan/newunit.html
  8. 35
      src/app/plan-management/meet-plan/newunit.scss
  9. 10
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html
  10. 14
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  11. 11
      src/app/plan-management/plan-management-routing.module.ts
  12. 8
      src/app/plan-management/plan-management.module.ts
  13. 27
      src/app/plan-management/type-plan/newunit.html
  14. 35
      src/app/plan-management/type-plan/newunit.scss
  15. 117
      src/app/plan-management/type-plan/type-plan.component.html
  16. 118
      src/app/plan-management/type-plan/type-plan.component.scss
  17. 25
      src/app/plan-management/type-plan/type-plan.component.spec.ts
  18. 118
      src/app/plan-management/type-plan/type-plan.component.ts
  19. 2
      src/app/statistic-analysis/addUnit/add-unit-one/add-unit-one.component.ts
  20. 2
      src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts
  21. 9
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.html
  22. 11
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.scss
  23. 39
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  24. 11
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html
  25. 11
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss
  26. 53
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  27. 2
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  28. 15
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html
  29. 11
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss
  30. 53
      src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts
  31. 5
      src/app/statistic-analysis/state/page-one/page-one.component.ts
  32. 28
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.html
  33. 15
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss
  34. 48
      src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts
  35. 14
      src/app/statistic-analysis/state/page-two-time/echarts.html
  36. 4
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.html
  37. 12
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss
  38. 65
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

2
src/app/gis-management/gis-labeling/gis-labeling.component.ts

@ -805,7 +805,7 @@ export class GisLabelingComponent implements OnInit {
//三维场景 //三维场景
threeeScene (e) { threeeScene (e) {
window.open('http://121.37.20.190:8088/%5B%E7%BD%91%E9%A1%B5%E7%89%88%5D%E8%B4%B5%E6%B8%AF%E6%B2%B9%E5%BA%93%E4%B8%89%E7%BB%B4%E7%81%AD%E7%81%AB%E9%A2%84%E6%A1%88/') window.open('http://39.106.78.171:8088/%E6%BC%94%E7%A4%BA%E6%A1%88%E4%BE%8B/--SHGJHYZX/')
} }
//查看预案 //查看预案

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

@ -254,7 +254,7 @@
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<span (click)="routerTo(element)" style="color: blue;">查看预案</span> <span style="color: blue;">查看预案</span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

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

@ -0,0 +1,134 @@
<div style="height: 100%;overflow-y: auto;">
<div class="header" >
<form >
<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">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="level">
<mat-option value="1">Ⅰ级</mat-option>
<mat-option value="2">Ⅱ级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">添加人:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="companyName" autocomplete="off" [(ngModel)]="addname">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
🠊
<mat-form-field class="example-full-width">
<input type="date" matInput autocomplete="off" >
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入预案类型" name="companyName" autocomplete="off" [(ngModel)]="unittype">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate">
<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>
</mat-form-field>
</div>
<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>
</div>
</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>
<div class="newadd">
<button mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div>
<div class="body">
<div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>预案名称</th>
<td mat-cell *matCellDef="let element">{{element.unitname}}</td>
</ng-container>
<ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element">{{url=='2'?'Ⅱ级':'Ⅰ级'}}</td>
</ng-container>
<ng-container matColumnDef="addname">
<th mat-header-cell *matHeaderCellDef>添加人</th>
<td mat-cell *matCellDef="let element">{{element.addname}}</td>
</ng-container>
<ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th>
<td mat-cell *matCellDef="let element">{{element.addtime}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.plantype}}</td>
</ng-container>
<ng-container matColumnDef="passstate">
<th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">{{element.passstate}}</td>
</ng-container>
<ng-container matColumnDef="isopen">
<th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.isopen}}</td>
</ng-container>
<ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.projectlevel}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span style="color: blue;">查看预案</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator pageEvent [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions">
</mat-paginator>
</div>
</div>
</div>

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

@ -0,0 +1,118 @@
.header {
width: 100%;
padding: 12px 10px;
// margin-bottom: 10px;
box-sizing: border-box;
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px;
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;}
}
} //queryBox
.ordiv{
position: relative;
.organizationbox{
width:450px;
height: 200px;
background: white;
position: absolute;
top: 48px;
left: 77px;
z-index: 999;
border: 1px solid grey;
overflow-y: auto;
background-color: #fafafa;
li{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: #fafafa;
}
mat-tree-node{
cursor: pointer;
white-space:pre;
background-color: #fafafa;
}
mat-tree-node:hover{
background: rgba(225, 225, 225, 0.8);
li{
background: rgba(225, 225, 225, 0.8);
}
}
.closediv{
z-index: 100;
position: absolute;
right: 0;
top: 0;
width: 30px;
height: 30px;
cursor: pointer;
line-height: 30px;
text-align: center;
}
.closediv:hover{
background:rgba(225, 225, 225, 0.8);
}
}
}
}
.newadd{
margin-top: 10px;
margin-left: 70px;
button{
font-size: 16px;
width: 100px;
height: 36px;
}
}
.body{
.buttonbox{
padding-left: 50px;
button{
margin:0 10px
}
}
.tablebox{
table{
width: 100%;
margin-left: 0%;
margin-top:15px;
th,td{
text-align: center;
font-size: 15px;
color: #000000;
}
}
mat-paginator{
width: 100%;
margin-left: 0%;
}
.mat-column-unitname{
width: 15%;
}
.mat-column-integrity{
width: 13%;
}
.mat-column-operation{
width: 5%;
}
.mat-column-jurisdictionsquadron{
width: 10%;
}
}
}

25
src/app/plan-management/meet-plan/meet-plan.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MeetPlanComponent } from './meet-plan.component';
describe('MeetPlanComponent', () => {
let component: MeetPlanComponent;
let fixture: ComponentFixture<MeetPlanComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ MeetPlanComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MeetPlanComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

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

@ -0,0 +1,128 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { MatPaginator } from '@angular/material/paginator';
import { FlatTreeControl } from '@angular/cdk/tree';
import { FormControl } from '@angular/forms';
import { Router,ActivatedRoute } from '@angular/router'
import { PageEvent } from '@angular/material/paginator';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
@Component({
selector: 'app-meet-plan',
templateUrl: './meet-plan.component.html',
styleUrls: ['./meet-plan.component.scss']
})
export class MeetPlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void {
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
}
this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length)
}
url
preparelevels:any
plcheck:boolean //编制级别勾选框
displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation'];
tabledataSource
unitname//预案名称
level//预案级别
addname//添加人
addtime//添加时间
unittype//预案类型
unitstate//审核状态
projectlevel//编制级别
//分页
@ViewChild(MatPaginator, {static: true})
pageEvent: PageEvent;
paginator: MatPaginator;
length:any; //共多少条数据
pageSize:any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any; //第几页
//获得所有预案信息
getAllPlanInfo(){
let paramsdata:any = {
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
}
this.http.get("/api/Plans",{params:paramsdata}).subscribe((data:any)=>{
this.length = data.totalCount
//this.allPlanInfo = data
//this.tabledataSource = new MatTableDataSource(data.items)
console.log(this.tabledataSource)
})
}
//重置
reset(){
this.unitname=''
this.level=''
this.addname=''
this.addtime=''
this.unittype=''
this.unitstate=''
this.projectlevel=''
}
//新增预案弹窗
addunit(){
const dialogRef = this.dialog.open(newunitMeet, {
width: '340px',
height:'430px'
//data: paperDataInfo
});
}
}
@Component({
selector: 'new-unit',
templateUrl: './newunit.html',
styleUrls: ['./newunit.scss']
})
export class newunitMeet{
constructor(private router:Router,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<newunitMeet>,@Inject(MAT_DIALOG_DATA) public data: any) {}
unitname//预案名称
level//预案级别
addname//添加人
addtime//添加时间
unittype//预案类型
unitstate//审核状态
projectlevel//编制级别
close(){
this.dialogRef.close();
}
}

42
src/app/plan-management/meet-plan/newunit.html

@ -0,0 +1,42 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-24 16:26:16
* @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 09:34:26
-->
<div class="box">
<div class="top">
<span style="font-size: 20px;">新增预案</span>
</div>
<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">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入预案类型" name="companyName" autocomplete="off" [(ngModel)]="unittype">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="level">
<mat-option value="1">国家级</mat-option>
<mat-option value="2">市级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">上传本地文件:</label>
<button mat-raised-button color="primary" ><img style="margin-bottom: 2px;" src="../../../assets/images/bendi.png"> 本地文件</button>
</div>
<div class="bottom">
<button mat-raised-button color="primary">确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)="close()">取消</button>
</div>
</div>

35
src/app/plan-management/meet-plan/newunit.scss

@ -0,0 +1,35 @@
.box{
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.queryField {
margin: 3px 5px;
input {
width: 50px;
height: 18px;
line-height: 18px;
border-radius: 3px;}
button{
width: 140px;
font-size: 16px;
}
}
.top{
width: 100%;
margin-bottom: 20px;
span{
color: #2196F3;
margin-left: 100px;
font-size: 18px;
}
}
.bottom{
margin: 30px 30px;
button{
width: 80px;
height: 36px;
font-size: 16px;
}
}

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 14:15:10 * @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-28 11:10:30 * @LastEditTime: 2021-01-06 10:37:08
--> -->
<div style="height: 100%;overflow-y: auto;"> <div style="height: 100%;overflow-y: auto;">
<div class="header" > <div class="header" >
@ -39,6 +39,10 @@
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime"> <input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field> </mat-form-field>
🠊
<mat-form-field class="example-full-width">
<input type="date" matInput autocomplete="off" >
</mat-form-field>
</div> </div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">预案类型:</label> <label style="margin-right: 10px;">预案类型:</label>
@ -91,7 +95,7 @@
</ng-container> </ng-container>
<ng-container matColumnDef="level"> <ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef>预案级别</th> <th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element">{{element.level}}</td> <td mat-cell *matCellDef="let element">{{url=='2'?'Ⅱ级':'Ⅰ级'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="addname"> <ng-container matColumnDef="addname">
<th mat-header-cell *matHeaderCellDef>添加人</th> <th mat-header-cell *matHeaderCellDef>添加人</th>
@ -121,7 +125,7 @@
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<span style="color: blue;">查看预案</span> <span (click)='routerTo(element)' style="color: blue;">查看预案</span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 14:15:10 * @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-28 11:14:53 * @LastEditTime: 2021-01-06 10:39:07
*/ */
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
@ -30,8 +30,8 @@ export interface PeriodicElement {
projectlevel: string; projectlevel: string;
} }
const ELEMENT_DATA=[ const ELEMENT_DATA=[
{unitname:"梧州市中恒制药有限公司",level:"Ⅰ级",addname:"张三",addtime:"2020-12-16",plantype:"洪涝",passstate:"审核通过",isopen:"未公开",projectlevel:"总队"}, {unitname:"抗洪抢险救援应急救援预案",level:"Ⅰ级",addname:"张三",addtime:"2020-12-16",plantype:"洪涝",passstate:"审核通过",isopen:"未公开",projectlevel:"总队"},
{unitname:"贵州油港",level:"级",addname:"韩信",addtime:"2020-12-16",plantype:"泥石流",passstate:"审核中",isopen:"未公开",projectlevel:"支队"} {unitname:"泥石流应急救援预案",level:"级",addname:"韩信",addtime:"2020-12-16",plantype:"泥石流",passstate:"审核中",isopen:"未公开",projectlevel:"支队"}
] ]
@Component({ @Component({
@ -71,8 +71,10 @@ export class OnetwoEntryPlanComponent implements OnInit {
{name:"中队",value:"8"} {name:"中队",value:"8"}
] ]
} }
this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length)
} }
url
preparelevels:any preparelevels:any
plcheck:boolean //编制级别勾选框 plcheck:boolean //编制级别勾选框
displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation']; displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation'];
@ -129,6 +131,12 @@ export class OnetwoEntryPlanComponent implements OnInit {
//data: paperDataInfo //data: paperDataInfo
}); });
} }
//查看预案按钮跳转
routerTo(element){
console.log(element)
sessionStorage.setItem("companyName",element.unitname)
window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=true&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}`);
}
} }

11
src/app/plan-management/plan-management-routing.module.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 10:59:48 * @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-12-29 09:29:35 * @LastEditTime: 2021-01-06 09:57:07
*/ */
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
@ -13,7 +13,9 @@ import { OpenPlanComponent } from './open-plan/open-plan.component';
import { PassPlanComponent } from './pass-plan/pass-plan.component'; import { PassPlanComponent } from './pass-plan/pass-plan.component';
import { EntryPlanLookComponent } from './entry-plan-look/entry-plan-look.component'; import { EntryPlanLookComponent } from './entry-plan-look/entry-plan-look.component';
import { WebLookComponent } from './web-look/web-look.component'; import { WebLookComponent } from './web-look/web-look.component';
import {OnetwoEntryPlanComponent} from './onetwo-entry-plan/onetwo-entry-plan.component' import {OnetwoEntryPlanComponent} from './onetwo-entry-plan/onetwo-entry-plan.component';
import { MeetPlanComponent } from './meet-plan/meet-plan.component';
import { TypePlanComponent } from './type-plan/type-plan.component'
const routes: Routes = [ const routes: Routes = [
{ path: 'entryPlan', component: EntryPlanComponent}, { path: 'entryPlan', component: EntryPlanComponent},
@ -22,7 +24,10 @@ const routes: Routes = [
{ path: 'passPlan', component: PassPlanComponent}, { path: 'passPlan', component: PassPlanComponent},
{ path: 'entryPlandetail', component: EntryPlanLookComponent}, { path: 'entryPlandetail', component: EntryPlanLookComponent},
{ path: 'webLook', component: WebLookComponent}, { path: 'webLook', component: WebLookComponent},
{ path: 'OnetwoEntryPlan', component: OnetwoEntryPlanComponent}//一二级预案录入 { path: 'OnetwoEntryPlan', component: OnetwoEntryPlanComponent},//一级预案录入
{ path: 'OnetwoEntryPlan2', component: OnetwoEntryPlanComponent},//二级预案录入
{ path: 'MeetPlan',component:MeetPlanComponent},//应急预案
{ path: 'typePlan',component:TypePlanComponent},//类型预案
]; ];
@NgModule({ @NgModule({

8
src/app/plan-management/plan-management.module.ts

@ -51,12 +51,16 @@ import { EntryPlanLookComponent, AddPlanone, DownloadFile, AuditResult, ChangeNa
import { PlanType, AuditSatus, PlanLevel } from '../pipes/boolean.pipe'; import { PlanType, AuditSatus, PlanLevel } from '../pipes/boolean.pipe';
import { WebLookComponent } from './web-look/web-look.component'; import { WebLookComponent } from './web-look/web-look.component';
import { OnetwoEntryPlanComponent } from './onetwo-entry-plan/onetwo-entry-plan.component'; import { OnetwoEntryPlanComponent } from './onetwo-entry-plan/onetwo-entry-plan.component';
import { newunitComponent} from './onetwo-entry-plan/onetwo-entry-plan.component' import { newunitComponent} from './onetwo-entry-plan/onetwo-entry-plan.component';
import { MeetPlanComponent } from './meet-plan/meet-plan.component';
import { newunitMeet }from './meet-plan/meet-plan.component';
import { TypePlanComponent } from './type-plan/type-plan.component';
import { newunitType }from './type-plan/type-plan.component'
@NgModule({ @NgModule({
declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent,AddPlanone,PlanType,AuditSatus,PlanLevel,DownloadFile,AuditResult,ChangeName, WebLookComponent, OnetwoEntryPlanComponent,newunitComponent], declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent,AddPlanone,PlanType,AuditSatus,PlanLevel,DownloadFile,AuditResult,ChangeName, WebLookComponent, OnetwoEntryPlanComponent,newunitComponent, MeetPlanComponent,newunitMeet, TypePlanComponent,newunitType],
imports: [ imports: [
CommonModule, CommonModule,
PlanManagementRoutingModule, PlanManagementRoutingModule,

27
src/app/plan-management/type-plan/newunit.html

@ -0,0 +1,27 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-24 16:26:16
* @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 10:15:18
-->
<div class="box">
<div class="top">
<span style="font-size: 20px;">新增预案</span>
</div>
<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">
<label style="margin-right: 10px;">上传本地文件:</label>
<button mat-raised-button color="primary" ><img style="margin-bottom: 2px;" src="../../../assets/images/bendi.png"> 本地文件</button>
</div>
<div class="bottom">
<button mat-raised-button color="primary">确定</button>
<button mat-raised-button style="margin-left: 50px;" (click)="close()">取消</button>
</div>
</div>

35
src/app/plan-management/type-plan/newunit.scss

@ -0,0 +1,35 @@
.box{
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
}
.queryField {
margin: 3px 5px;
input {
width: 50px;
height: 18px;
line-height: 18px;
border-radius: 3px;}
button{
width: 140px;
font-size: 16px;
}
}
.top{
width: 100%;
margin-bottom: 20px;
span{
color: #2196F3;
margin-left: 100px;
font-size: 18px;
}
}
.bottom{
margin: 30px 30px;
button{
width: 80px;
height: 36px;
font-size: 16px;
}
}

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

@ -0,0 +1,117 @@
<div style="height: 100%;overflow-y: auto;">
<div class="header" >
<form >
<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">
<label style="margin-right: 10px;">添加人:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="companyName" autocomplete="off" [(ngModel)]="addname">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
🠊
<mat-form-field class="example-full-width">
<input type="date" matInput autocomplete="off" >
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" placeholder='请选择审核状态' [(ngModel)]="unitstate">
<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>
</mat-form-field>
</div>
<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>
</div>
</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>
<div class="newadd">
<button mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div>
<div class="body">
<div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>预案名称</th>
<td mat-cell *matCellDef="let element">{{element.unitname}}</td>
</ng-container>
<ng-container matColumnDef="addname">
<th mat-header-cell *matHeaderCellDef>添加人</th>
<td mat-cell *matCellDef="let element">{{element.addname}}</td>
</ng-container>
<ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th>
<td mat-cell *matCellDef="let element">{{element.addtime}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">类型预案</td>
</ng-container>
<ng-container matColumnDef="passstate">
<th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">{{element.passstate}}</td>
</ng-container>
<ng-container matColumnDef="isopen">
<th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.isopen}}</td>
</ng-container>
<ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.projectlevel}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span style="color: blue;">查看预案</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator pageEvent [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions">
</mat-paginator>
</div>
</div>
</div>
<p>type-plan works!</p>

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

@ -0,0 +1,118 @@
.header {
width: 100%;
padding: 12px 10px;
// margin-bottom: 10px;
box-sizing: border-box;
// border-bottom: 1px solid black;
.queryBox {
box-sizing: border-box;
padding: 5px 25px;
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;}
}
} //queryBox
.ordiv{
position: relative;
.organizationbox{
width:450px;
height: 200px;
background: white;
position: absolute;
top: 48px;
left: 77px;
z-index: 999;
border: 1px solid grey;
overflow-y: auto;
background-color: #fafafa;
li{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: #fafafa;
}
mat-tree-node{
cursor: pointer;
white-space:pre;
background-color: #fafafa;
}
mat-tree-node:hover{
background: rgba(225, 225, 225, 0.8);
li{
background: rgba(225, 225, 225, 0.8);
}
}
.closediv{
z-index: 100;
position: absolute;
right: 0;
top: 0;
width: 30px;
height: 30px;
cursor: pointer;
line-height: 30px;
text-align: center;
}
.closediv:hover{
background:rgba(225, 225, 225, 0.8);
}
}
}
}
.newadd{
margin-top: 10px;
margin-left: 70px;
button{
font-size: 16px;
width: 100px;
height: 36px;
}
}
.body{
.buttonbox{
padding-left: 50px;
button{
margin:0 10px
}
}
.tablebox{
table{
width: 100%;
margin-left: 0%;
margin-top:15px;
th,td{
text-align: center;
font-size: 15px;
color: #000000;
}
}
mat-paginator{
width: 100%;
margin-left: 0%;
}
.mat-column-unitname{
width: 15%;
}
.mat-column-integrity{
width: 13%;
}
.mat-column-operation{
width: 5%;
}
.mat-column-jurisdictionsquadron{
width: 10%;
}
}
}

25
src/app/plan-management/type-plan/type-plan.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TypePlanComponent } from './type-plan.component';
describe('TypePlanComponent', () => {
let component: TypePlanComponent;
let fixture: ComponentFixture<TypePlanComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TypePlanComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TypePlanComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

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

@ -0,0 +1,118 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2021-01-06 09:47:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 10:27:09
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
import { MatPaginator } from '@angular/material/paginator';
import { FlatTreeControl } from '@angular/cdk/tree';
import { FormControl } from '@angular/forms';
import { Router,ActivatedRoute } from '@angular/router'
import { PageEvent } from '@angular/material/paginator';
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service'
@Component({
selector: 'app-type-plan',
templateUrl: './type-plan.component.html',
styleUrls: ['./type-plan.component.scss']
})
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 {
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(level == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
}
}
preparelevels:any
plcheck:boolean //编制级别勾选框
displayedColumns: string[] = ['unitname','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation'];
tabledataSource
unitname//预案名称
level//预案级别
addname//添加人
addtime//添加时间
unittype//预案类型
unitstate//审核状态
projectlevel//编制级别
//分页
@ViewChild(MatPaginator, {static: true})
pageEvent: PageEvent;
paginator: MatPaginator;
length:any; //共多少条数据
pageSize:any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any; //第几页
//重置
reset(){
this.unitname=''
this.level=''
this.addname=''
this.addtime=''
this.unittype=''
this.unitstate=''
this.projectlevel=''
}
//新增预案弹窗
addunit(){
const dialogRef = this.dialog.open(newunitType, {
width: '340px',
height:'300px'
//data: paperDataInfo
});
}
}
@Component({
selector: 'new-unit',
templateUrl: './newunit.html',
styleUrls: ['./newunit.scss']
})
export class newunitType{
constructor(private router:Router,private http: HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public dialogRef: MatDialogRef<newunitType>,@Inject(MAT_DIALOG_DATA) public data: any) {}
unitname//预案名称
level//预案级别
addname//添加人
addtime//添加时间
unittype//预案类型
unitstate//审核状态
projectlevel//编制级别
close(){
this.dialogRef.close();
}
}

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

@ -130,7 +130,7 @@ export class AddUnitOneComponent implements OnInit {
] ]
}; };
this.indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
this.router.navigateByUrl('/statisticanalysis/addUnit_one/addUnit_two_type'); this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':params.name}});
id=="pieone"?this.echartsData.zuzhiorBuilding="zhi":this.echartsData.zuzhiorBuilding="building" id=="pieone"?this.echartsData.zuzhiorBuilding="zhi":this.echartsData.zuzhiorBuilding="building"
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);

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

@ -171,7 +171,7 @@ export class AddUnitThreeLineDetailsComponent implements OnInit {
if (this.detailPlanEchart.containPixel('grid',pointInPixel)) { if (this.detailPlanEchart.containPixel('grid',pointInPixel)) {
let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0]; let xIndex=this.detailPlanEchart.convertFromPixel({seriesIndex:0},[params.offsetX, params.offsetY])[0];
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':this.serviceData.zuzhiorBuilding=="zhi"? 'zhongdui':'zhidui','time':this.option.xAxis.data[xIndex],'buildingTpye':this.buildingTypeName}}); this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':this.option.xAxis.data[xIndex],'buildingTpye':this.buildingTypeName}});
} }
}); });
} }

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 13:50:45 * @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-10 08:53:50 * @LastEditTime: 2021-01-04 11:09:57
--> -->
<div class="box"> <div class="box">
<div class="header"> <div class="header">
@ -68,8 +68,9 @@
<button mat-raised-button color="primary" style="margin-left: 10px;" (click)='toggleFalse()'>纵向查询</button> <button mat-raised-button color="primary" style="margin-left: 10px;" (click)='toggleFalse()'>纵向查询</button>
</div> --> </div> -->
<div class="btnbox"> <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)="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: 50px;">区间选择</button>
</div> </div>
</div> </div>
<div class="echartsbox"> <div class="echartsbox">
@ -78,7 +79,7 @@
</div> </div>
<div> <div>
<div class="publicCss" id="gaoceng"></div> <div class="publicCss" id="gaoceng"></div>
<div class="publicCss" id="dixia"></div> <!-- <div class="publicCss" id="dixia"></div>
<div class="publicCss" id="guidao"></div> <div class="publicCss" id="guidao"></div>
<div class="publicCss" id="huagong"></div> <div class="publicCss" id="huagong"></div>
<div class="publicCss" id="chuguan"></div> <div class="publicCss" id="chuguan"></div>
@ -92,7 +93,7 @@
<div class="publicCss" id="canyin"></div> <div class="publicCss" id="canyin"></div>
<div class="publicCss" id="yingyuan"></div> <div class="publicCss" id="yingyuan"></div>
<div class="publicCss" id="zhanlan"></div> <div class="publicCss" id="zhanlan"></div>
<div class="publicCss" id="suidao"></div> <div class="publicCss" id="suidao"></div> -->
</div> </div>
</div> </div>
</div> </div>

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

@ -17,11 +17,12 @@
} }
} }
.publicCss{ .publicCss{
height: 350px; width: 80%;
width: 50%; height: 550px;
display: inline-block; position: absolute;
box-sizing: border-box; left: 50%;
padding: 20px; top: 55%;
transform: translate(-50%,-50%);
} }
//头部搜索栏 //头部搜索栏

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

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { EchartsDataService } from '../../echarts-data.service'; import { EchartsDataService } from '../../echarts-data.service';
@ -11,25 +11,27 @@ declare var echarts: any;
}) })
export class AddUnitTwoTimeComponent implements OnInit { export class AddUnitTwoTimeComponent implements OnInit {
forward(){ forward(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type']) this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname}})
} }
reverse(){ reverse(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time']) this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time'],{queryParams:{'level':this.headname}})
} }
constructor(private router: Router,public dialog: MatDialog,public snackBar: MatSnackBar,private serviceData: EchartsDataService) { } constructor(private router: Router,public dialog: MatDialog,public snackBar: MatSnackBar,private serviceData: EchartsDataService,private route:ActivatedRoute) { }
setTimeoutObj//延时器需要清除 setTimeoutObj//延时器需要清除
headname
ngOnInit(): void { ngOnInit(): void {
this.dateInit () //this.dateInit ()
this.bianli() this.bianli()
this.route.queryParams.subscribe(param=>{
this.headname=param.level
});
this.setTimeoutObj = setTimeout(() => { this.setTimeoutObj = setTimeout(() => {
this.oneInit (this.date,this.dateNum) //this.oneInit (this.date,this.dateNum)
this.twoInit (this.date,this.dateNum,'month') this.twoInit (this.date,this.dateNum,'month')
}, 0); }, 0);
} }
ngOnDestroy(){ ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj); window.clearTimeout(this.setTimeoutObj);
this.chartQusj.clear()
this.chartQusj.dispose()
this.forArr.forEach(item => { this.forArr.forEach(item => {
item.echart.clear() item.echart.clear()
item.echart.dispose() item.echart.dispose()
@ -104,12 +106,12 @@ export class AddUnitTwoTimeComponent implements OnInit {
if(this.selectType == "year"){ if(this.selectType == "year"){
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2) this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum2,this.date2)
this.oneInit(this.date2,this.dateNum2) //this.oneInit(this.date2,this.dateNum2)
this.twoInit(this.date2,this.dateNum2,'year') this.twoInit(this.date2,this.dateNum2,'year')
} }
if(this.selectType == "month"){ if(this.selectType == "month"){
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date) this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
this.oneInit(this.date,this.dateNum) //this.oneInit(this.date,this.dateNum)
this.twoInit(this.date,this.dateNum,'month') this.twoInit(this.date,this.dateNum,'month')
} }
@ -259,7 +261,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
twoInit (date,dateNum,typeName) { twoInit (date,dateNum,typeName) {
this.forArr.forEach((item,key) => { this.forArr.forEach((item,key) => {
let that = this let that = this
item.echart = echarts.init(document.getElementById(item.id), 'skinUpp'); item.echart = echarts.init(document.getElementById('gaoceng'), 'skinUpp');
var option = { var option = {
grid: { grid: {
top: 50, top: 50,
@ -269,13 +271,13 @@ export class AddUnitTwoTimeComponent implements OnInit {
}, },
// 标题 // 标题
title: { title: {
text: item.name+':总数(1012)', text: this.headname+':总数(1012)',
top: -4, top: -4,
left: 'center', left: 'center',
textStyle:{ textStyle:{
//文字颜色 //文字颜色
color:'#000', color:'#000',
fontSize:22 fontSize:30
} }
}, },
//提示框 //提示框
@ -287,7 +289,8 @@ export class AddUnitTwoTimeComponent implements OnInit {
}else{ }else{
return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name) return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name)
} }
} },
position: this.serviceData.tableTooltipNoShow2
}, },
// x轴 // x轴
xAxis: { xAxis: {
@ -352,13 +355,17 @@ export class AddUnitTwoTimeComponent implements OnInit {
/*事件处理代码书写位置*/ /*事件处理代码书写位置*/
// console.log(option.series[0].data[xIndex],option.xAxis.data[xIndex],option.title.text,option.series[0].name) // console.log(option.series[0].data[xIndex],option.xAxis.data[xIndex],option.title.text,option.series[0].name)
if(option.series[0].name == "year"){ if(option.series[0].name == "year"){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails'],{queryParams:{'year':this.date2[xIndex],'buildingType':item.name}}); this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_lineDetails'],{queryParams:{'year':this.date2[xIndex],'buildingType':this.headname}});
}else{ }else{
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':this.serviceData.zuzhiorBuilding=="zhi"? 'zhongdui':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':item.name}}); this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time/three_barDetails'],{queryParams:{'level':'zhidui','time':option.xAxis.data[xIndex],'buildingTpye':this.headname}});
} }
} }
}); });
}) })
} }
//返回
backClick(){
this.router.navigateByUrl('/statisticanalysis/addUnit_one')
}
} }

11
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html

@ -4,23 +4,20 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 13:50:45 * @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-11 16:51:57 * @LastEditTime: 2021-01-04 10:51:43
--> -->
<div class="box"> <div class="box">
<div class="topbox"> <div class="topbox">
<div class="btnbox"> <div class="btnbox">
<button mat-stroked-button style="margin-left: 30px;" (click)="backClick()">返回</button>
<button mat-stroked-button (click)="reverse()" [ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_time'}">区间选择</button> <button mat-stroked-button (click)="reverse()" [ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_time'}">区间选择</button>
<button mat-stroked-button (click)="forward()" [ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_type'}" style="margin-right: 30px;">类型统计</button> <button mat-stroked-button (click)="forward()" [ngClass]="{'selectedBtn': url == '/statisticanalysis/addUnit_one/addUnit_two_type'}" style="margin-right: 30px;">类型统计</button>
</div> </div>
</div> </div>
<div class="echartsbox"> <div class="echartsbox">
<div id="pie">
</div>
<div style="padding-top: 100px;"> <div style="padding-top: 100px;">
<div class="publicCss" id="gaoceng"></div> <div class="publicCss" id="gaoceng"></div>
<div class="publicCss" id="dixia"></div> <!-- <div class="publicCss" id="dixia"></div>
<div class="publicCss" id="guidao"></div> <div class="publicCss" id="guidao"></div>
<div class="publicCss" id="huagong"></div> <div class="publicCss" id="huagong"></div>
<div class="publicCss" id="chuguan"></div> <div class="publicCss" id="chuguan"></div>
@ -34,7 +31,7 @@
<div class="publicCss" id="canyin"></div> <div class="publicCss" id="canyin"></div>
<div class="publicCss" id="yingyuan"></div> <div class="publicCss" id="yingyuan"></div>
<div class="publicCss" id="zhanlan"></div> <div class="publicCss" id="zhanlan"></div>
<div class="publicCss" id="suidao"></div> <div class="publicCss" id="suidao"></div> -->
</div> </div>
</div> </div>

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

@ -36,11 +36,12 @@
} }
} }
.publicCss{ .publicCss{
height: 350px; width: 100%;
width: 50%; height: 550px;
display: inline-block; position: absolute;
box-sizing: border-box; left: 50%;
padding: 20px; top: 50%;
transform: translate(-50%,-50%);
} }
.selectedBtn{ .selectedBtn{
background-color: #2196f3; background-color: #2196f3;

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

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service'; import {EchartsDataService} from '../../echarts-data.service';
declare var echarts: any; declare var echarts: any;
@Component({ @Component({
@ -9,27 +9,30 @@ declare var echarts: any;
}) })
export class AddUnitTwoTypeStatisticsComponent implements OnInit { export class AddUnitTwoTypeStatisticsComponent implements OnInit {
constructor(private router: Router,public data:EchartsDataService) { } constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { }
forward(){ forward(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type']) this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname}})
} }
reverse(){ reverse(){
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time']) this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_time'],{queryParams:{'level':this.headname}})
} }
url = "/statisticanalysis/addUnit_one/addUnit_two_type" //当前路由地址 url = "/statisticanalysis/addUnit_one/addUnit_two_type" //当前路由地址
setTimeoutObj//延时器需要清除 setTimeoutObj//延时器需要清除
headname
ngOnInit(): void { ngOnInit(): void {
this.route.queryParams.subscribe(param=>{
this.headname=param.level
});
this.setTimeoutObj = window.setTimeout(()=>{ this.setTimeoutObj = window.setTimeout(()=>{
this.bianli() this.bianli()
this.initCharts() //this.initCharts()
this.barEcharts() this.barEcharts()
},0) },0)
} }
ngOnDestroy(){ ngOnDestroy(){
window.clearTimeout(this.setTimeoutObj); window.clearTimeout(this.setTimeoutObj);
this.indexBzt.clear()
this.indexBzt.dispose()
this.forArr.forEach(item => { this.forArr.forEach(item => {
item.echart.clear() item.echart.clear()
item.echart.dispose() item.echart.dispose()
@ -261,31 +264,47 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
barEcharts(){ barEcharts(){
this.forArr.forEach(item=>{ this.forArr.forEach(item=>{
let _this = this let _this = this
item.echart = echarts.init(document.getElementById(item.id),'walden'); item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = { let option = {
title: { title: {
text: item.name+':总数(1024)', text: this.headname+':总数(1024)',
left: "center", left: "center",
top: "0", top: "0",
//bottom: '80%', //bottom: '80%',
textStyle: { textStyle: {
fontSize: 23 fontSize: 30
} }
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data:this.data.zuzhiorBuilding=="zhi"?this.buildingData: this.zhiNameData, data:this.data.zuzhiorBuilding=="zhi"?this.buildingData: this.zhiNameData,
axisLabel: this.axisLabel axisLabel:{
//this.axisLabel,
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
}
}
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLabel:this.axisLabel, axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name) return this.tableTooltip(this.tableDataZhong,params.name)
} },
position: this.data.tableTooltipNoShow2
}, },
series: [{ series: [{
data: this.data.zuzhiorBuilding=="zhi"?this.buildnumData: this.zhiNumData, data: this.data.zuzhiorBuilding=="zhi"?this.buildnumData: this.zhiNumData,
@ -296,13 +315,13 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
backgroundStyle: { backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)' color: 'rgba(220, 220, 220, 0.8)'
}, },
barWidth :'28', barWidth :'38',
//label: this.topTextlabel //label: this.topTextlabel
}] }]
}; };
item.echart.setOption(option); item.echart.setOption(option);
item.echart.on('click', (params) => { item.echart.on('click', (params) => {
this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':params.name,'buildingTypeName':item.name}}) this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_typeDetails'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}})
}); });
}) })
@ -331,5 +350,9 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
res+='</table></div></div>' res+='</table></div></div>'
return res return res
} }
//返回
backClick(){
this.router.navigateByUrl('/statisticanalysis/addUnit_one')
}
} }

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

@ -96,7 +96,7 @@ export class BuildingTypeOneComponent implements OnInit {
] ]
}; };
this.indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
this.router.navigateByUrl('/statisticanalysis/buildingType_one/buildingType_two_forward'); this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'],{queryParams:{'level':params.name}});
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);
} }

15
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html

@ -4,22 +4,23 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-05 13:50:45 * @Date: 2020-09-05 13:50:45
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-09-11 14:16:12 * @LastEditTime: 2021-01-04 14:27:33
--> -->
<div class="box"> <div class="box">
<div class="topbox"> <div class="topbox">
<div class="btnbox"> <div class="btnbox">
<button mat-stroked-button (click)="reverse()"[ngClass]="{'selectedBtn': true}" style="margin-right: 10px;">反向查询</button> <!-- <button mat-stroked-button (click)="reverse()"[ngClass]="{'selectedBtn': true}" style="margin-right: 10px;">反向查询</button>
<button mat-stroked-button (click)="forward()"style="margin-right: 20px;">正向查询</button> <button mat-stroked-button (click)="forward()"style="margin-right: 20px;">正向查询</button> -->
<button mat-stroked-button (click)='goback()'>返回</button>
</div> </div>
</div> </div>
<div class="echartsbox"> <div class="echartsbox">
<div id="pie"> <!-- <div id="pie">
</div> </div> -->
<div> <div>
<div class="publicCss" id="gaoceng"></div> <div class="publicCss" id="gaoceng"></div>
<div class="publicCss" id="dixia"></div> <!-- <div class="publicCss" id="dixia"></div>
<div class="publicCss" id="guidao"></div> <div class="publicCss" id="guidao"></div>
<div class="publicCss" id="huagong"></div> <div class="publicCss" id="huagong"></div>
<div class="publicCss" id="chuguan"></div> <div class="publicCss" id="chuguan"></div>
@ -33,7 +34,7 @@
<div class="publicCss" id="canyin"></div> <div class="publicCss" id="canyin"></div>
<div class="publicCss" id="yingyuan"></div> <div class="publicCss" id="yingyuan"></div>
<div class="publicCss" id="zhanlan"></div> <div class="publicCss" id="zhanlan"></div>
<div class="publicCss" id="suidao"></div> <div class="publicCss" id="suidao"></div> -->
</div> </div>
</div> </div>

11
src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss

@ -34,11 +34,12 @@
} }
} }
.publicCss{ .publicCss{
height: 350px; width: 100%;
width: 50%; height: 550px;
display: inline-block; position: absolute;
box-sizing: border-box; left: 50%;
padding: 20px; top: 55%;
transform: translate(-50%,-50%);
} }
.selectedBtn{ .selectedBtn{
background-color: #2196f3; background-color: #2196f3;

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

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import {EchartsDataService} from '../../echarts-data.service'; import {EchartsDataService} from '../../echarts-data.service';
declare var echarts: any; declare var echarts: any;
@Component({ @Component({
@ -9,7 +9,7 @@ declare var echarts: any;
}) })
export class BuildingTypeTwoReverseComponent implements OnInit { export class BuildingTypeTwoReverseComponent implements OnInit {
constructor(private router: Router,public data:EchartsDataService) { } constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { }
forward(){ forward(){
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward']) this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward'])
@ -17,16 +17,20 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
reverse(){ reverse(){
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse']) this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse'])
} }
headname//标题
ngOnInit(): void { ngOnInit(): void {
this.route.queryParams.subscribe(param=>{
this.headname=param.level
});
window.setTimeout(()=>{ window.setTimeout(()=>{
this.bianli() this.bianli()
this.initCharts() //this.initCharts()
this.barEcharts() this.barEcharts()
},0) },0)
} }
ngOnDestroy(): void { ngOnDestroy(): void {
this.indexBzt.clear() /* this.indexBzt.clear()
this.indexBzt.dispose() this.indexBzt.dispose() */
this.forArr.forEach(item => { this.forArr.forEach(item => {
item.echart.clear() item.echart.clear()
item.echart.dispose() item.echart.dispose()
@ -136,6 +140,12 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
{id:'zhanlan',name:'展览建筑',echart:null}, {id:'zhanlan',name:'展览建筑',echart:null},
{id:'suidao',name:'隧道',echart:null}] {id:'suidao',name:'隧道',echart:null}]
//返回
goback(){
window.history.go(-1)
}
/* 顶部饼状图 */ /* 顶部饼状图 */
indexBzt indexBzt
initCharts(){ initCharts(){
@ -220,32 +230,47 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
barEcharts(){ barEcharts(){
this.forArr.forEach(item=>{ this.forArr.forEach(item=>{
let _this = this let _this = this
item.echart = echarts.init(document.getElementById(item.id),'walden'); item.echart = echarts.init(document.getElementById('gaoceng'),'walden');
let option = { let option = {
title: { title: {
text: item.name+':总数(1024)', text: this.headname+':总数(1024)',
left: "center", left: "center",
top: "15", top: "15",
bottom: '80', //bottom: '80',
textStyle: { textStyle: {
fontSize: 23 fontSize: 30
} }
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.zhiNameData, data: this.zhiNameData,
axisLabel: this.axisLabel axisLabel:{
//this.axisLabel,
interval: 0,
textStyle:{
fontSize :18,
color:'#000000'
}
}
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
axisLabel:this.axisLabel, axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :16,
color:'#000000'
}
}
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.tableTooltip(this.tableDataZhong,params.name) return this.tableTooltip(this.tableDataZhong,params.name)
}, },
//position: this.data.tableTooltipNoShow position: this.data.tableTooltipNoShow2
}, },
series: [{ series: [{
data: this.zhiNumData, data: this.zhiNumData,
@ -257,13 +282,13 @@ export class BuildingTypeTwoReverseComponent implements OnInit {
backgroundStyle: { backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)' color: 'rgba(220, 220, 220, 0.8)'
}, },
barWidth :'28', barWidth :'38',
//label: this.topTextlabel //label: this.topTextlabel
}] }]
}; };
item.echart.setOption(option); item.echart.setOption(option);
item.echart.on('click', (params) => { item.echart.on('click', (params) => {
this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':item.name}}) this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_three_details'],{queryParams:{'organizationName':params.name,'buildingTypeName':this.headname}})
}); });
}) })
} }

5
src/app/statistic-analysis/state/page-one/page-one.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-09-01 15:24:39 * @Date: 2020-09-01 15:24:39
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2020-11-10 14:35:31 * @LastEditTime: 2020-12-30 14:06:07
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@ -103,7 +103,8 @@ export class PageOneComponent implements OnInit {
] ]
}; };
this.indexBzt.on('click', (params) => { this.indexBzt.on('click', (params) => {
this.router.navigateByUrl('/statisticanalysis/statePageOne/time'); this.router.navigate(['/statisticanalysis/statePageOne/time'],{queryParams:{'level':params.name}});
console.log(params)
}); });
this.indexBzt.setOption(options); this.indexBzt.setOption(options);
} }

28
src/app/statistic-analysis/state/page-two-name/page-two-name.component.html

@ -10,32 +10,8 @@
<div id="pie"> <div id="pie">
</div> </div>
<div class="histogramBox" style="margin-top: 150px;">
<!-- 新增 -->
<div id="addEchart" class="echart-item">
</div>
<!-- 审核通过 -->
<div id="passPlanEchart" class="echart-item">
</div>
</div>
<div class="histogramBox">
<!-- 预案编制 -->
<div id="planMake" class="echart-item">
</div>
<!-- 审核退回 -->
<div id="planBack" class="echart-item">
</div>
</div>
<div class="histogramBox">
<!-- 审核中 -->
<div id="planAudit" class="echart-item">
</div>
</div>
</div> </div>
<app-page-zhong-dui-details #zhongDuiChild *ngIf="!data.statefulInspectionToggle"></app-page-zhong-dui-details> <app-page-zhong-dui-details #zhongDuiChild *ngIf="!data.statefulInspectionToggle"></app-page-zhong-dui-details>

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

@ -14,4 +14,17 @@
height: 330px; height: 330px;
} }
} }
} }
.echartsBox{
width: 100%;
height: 100%;
overflow: auto;
#pie{
width: 100%;
height: 550px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
}

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

@ -17,35 +17,16 @@ export class PageTwoNameComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
setTimeout(() => { setTimeout(() => {
this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData) this.tiaoshiPao=this.data.qipao(this.tiaoshiPao,this.zhiNumData,this.zhiNameData)
this.planState() this.route.queryParams.subscribe(param=>{
this.headname=param.level
});
this.planAdd() this.planAdd()
this.passPlanEchart()
this.planMake()
this.planBack()
this.planAudit()
}, 0); }, 0);
} }
ngOnDestroy(): void { ngOnDestroy(): void {
this.addEchart.clear()
this.addEchart.dispose()
this.passPlanEchartObj.clear()
this.passPlanEchartObj.dispose()
this.passMakeEchart.clear()
this.passMakeEchart.dispose()
this.passBackEchart.clear()
this.passBackEchart.dispose()
this.planAuditEchart.clear()
this.planAuditEchart.dispose()
this.topEchart.clear()
this.topEchart.dispose()
} }
headname//标题
axisLabel = { axisLabel = {
interval: 0, interval: 0,
textStyle:{ textStyle:{
@ -104,22 +85,29 @@ export class PageTwoNameComponent implements OnInit {
//预案新增统计 //预案新增统计
planAdd () { planAdd () {
let _this = this let _this = this
this.addEchart = echarts.init(document.getElementById('addEchart'),'walden'); this.addEchart = echarts.init(document.getElementById('pie'),'walden');
var option = { var option = {
title: { title: {
text: "预案新增:总数(1024)", text: _this.headname+"总数(1024)",
left: "center", left: "center",
top: "0", top: "0",
bottom: '100%', bottom: '100%',
textStyle: { textStyle: {
fontSize: 23 fontSize: 30
} }
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.zhiNameData, data: this.zhiNameData,
axisLabel:this.axisLabel axisLabel:{
//this.axisLabel,
textStyle:{
fontSize :18,
color:'#000000'
}
}
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
@ -136,8 +124,8 @@ export class PageTwoNameComponent implements OnInit {
trigger: 'item', trigger: 'item',
formatter: (params)=>{ formatter: (params)=>{
return this.data.biaogeTishi(params.name) return this.data.biaogeTishi(params.name)
}/* , },
position: this.data.tableTooltipNoShow2 */ position: this.data.tableTooltipNoShow2
}, },
series: [{ series: [{
data: this.zhiNumData, data: this.zhiNumData,
@ -148,7 +136,7 @@ export class PageTwoNameComponent implements OnInit {
backgroundStyle: { backgroundStyle: {
color: 'rgba(220, 220, 220, 0.8)' color: 'rgba(220, 220, 220, 0.8)'
}, },
barWidth :'28', barWidth :'38',
//label: this.topTextlabel //label: this.topTextlabel
}] }]
}; };

14
src/app/statistic-analysis/state/page-two-time/echarts.html

@ -1,9 +1,17 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-30 15:07:52
-->
<app-page-zhong-dui-details *ngIf="!echartsData.statefulInspectionToggle"></app-page-zhong-dui-details> <app-page-zhong-dui-details *ngIf="!echartsData.statefulInspectionToggle"></app-page-zhong-dui-details>
<div [hidden]="!echartsData.statefulInspectionToggle"> <div [hidden]="!echartsData.statefulInspectionToggle">
<div style="height: 450px;width: 50%;margin: 0 auto;" id="one"></div> <!-- <div style="height: 450px;width: 50%;margin: 0 auto;" id="one"></div> -->
<div class="publicCss" id="two"></div> <div class="publicCss" id="two"></div>
<div class="publicCss" id="three"></div> <!-- <div class="publicCss" id="three"></div>
<div class="publicCss" id="four"></div> <div class="publicCss" id="four"></div>
<div class="publicCss" id="five"></div> <div class="publicCss" id="five"></div>
<div class="publicCss" id="six"></div> <div class="publicCss" id="six"></div> -->
</div> </div>

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

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

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

@ -47,12 +47,12 @@
//echarts div公有样式 //echarts div公有样式
.publicCss{ .publicCss{
height: 350px; width: 80%;
width: 50%; height: 550px;
display: inline-block; position: absolute;
box-sizing: border-box; left: 50%;
padding: 10px; top: 50%;
margin: 10px 0; transform: translate(-50%,-50%);
} }
.publicOneLineCss{ .publicOneLineCss{
height: 350px; height: 350px;

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

@ -1,6 +1,6 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDatepickerInputEvent } from '@angular/material/datepicker'; import { MatDatepickerInputEvent } from '@angular/material/datepicker';
import { Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar'; import { MatSnackBarConfig, MatSnackBar } from '@angular/material/snack-bar';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
import { DateAdapter } from '@angular/material/core'; import { DateAdapter } from '@angular/material/core';
@ -44,6 +44,7 @@ export class PageTwoTimeComponent implements OnInit {
//返回 //返回
goBack () { goBack () {
this.echartsData.statefulInspectionToggle = true this.echartsData.statefulInspectionToggle = true
window.history.go(-1)
} }
selectType:string = 'month'; //选择当前的 查询类型 按月/年 selectType:string = 'month'; //选择当前的 查询类型 按月/年
@ -140,7 +141,7 @@ export class PageTwoTimeComponent implements OnInit {
}) })
export class echartsComponent implements OnInit { export class echartsComponent implements OnInit {
constructor(private router: Router,public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { } constructor(private router: Router,private activatedRoute: ActivatedRoute,public snackBar: MatSnackBar,private adapter: DateAdapter<any>,public echartsData:EchartsDataService) { }
tiaoshiPao:any tiaoshiPao:any
datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200] datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200]
@ -160,60 +161,39 @@ export class echartsComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
window.setTimeout(()=>{ window.setTimeout(()=>{
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
this.oneInit() this.activatedRoute.queryParams.subscribe(param=>{
this.headtext=param.level
});
//this.oneInit()
this.twoInit() this.twoInit()
this.threeInit() /* this.threeInit()
this.fourInit() this.fourInit()
this.fiveInit() this.fiveInit()
this.sixInit() this.sixInit() */
},0) },0)
} }
ngOnDestroy () { ngOnDestroy () {
this.oneExample.clear()
this.oneExample.dispose()
this.twoExample.clear() this.twoExample.clear()
this.twoExample.dispose() this.twoExample.dispose()
this.threeExample.clear()
this.threeExample.dispose()
this.fourExample.clear()
this.fourExample.dispose()
this.fiveExample.clear()
this.fiveExample.dispose()
this.sixExample.clear()
this.sixExample.dispose()
} }
changeTime (e) { changeTime (e) {
this.oneExample.clear()
this.oneExample.dispose()
this.twoExample.clear() this.twoExample.clear()
this.twoExample.dispose() this.twoExample.dispose()
this.threeExample.clear()
this.threeExample.dispose()
this.fourExample.clear()
this.fourExample.dispose()
this.fiveExample.clear()
this.fiveExample.dispose()
this.sixExample.clear()
this.sixExample.dispose()
if (e=='year') { if (e=='year') {
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX)
this.oneInit(this.dataYearX,this.dataYearY) //this.oneInit(this.dataYearX,this.dataYearY)
this.twoInit(this.dataYearX,this.dataYearY) this.twoInit(this.dataYearX,this.dataYearY)
this.threeInit(this.dataYearX,this.dataYearY)
this.fourInit(this.dataYearX,this.dataYearY)
this.fiveInit(this.dataYearX,this.dataYearY)
this.sixInit(this.dataYearX,this.dataYearY)
} else { } else {
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
this.oneInit() //this.oneInit()
this.twoInit() this.twoInit()
this.threeInit()
this.fourInit()
this.fiveInit()
this.sixInit()
} }
} }
@ -307,31 +287,28 @@ export class echartsComponent implements OnInit {
this.oneExample.setOption(option); this.oneExample.setOption(option);
} }
headtext
twoExample:any; twoExample:any;
twoInit (X=this.datayuex, Y=this.datayuey) { twoInit (X=this.datayuex, Y=this.datayuey) {
let that = this let that = this
this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp'); this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp');
var option = { var option = {
grid: {
top: 50,
left:50,
right: 20,
bottom: 20,
},
// 标题 // 标题
title: { title: {
text: '预案新增'+':总数(1024)', text: this.headtext+':总数(1024)',
top: -4, top: -4,
left: 'center', left: 'center',
bottom: 100, bottom: 100,
textStyle:{ textStyle:{
//文字颜色 //文字颜色
fontSize: 30,
color:'#000', color:'#000',
} }
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
position: this.echartsData.tableTooltipNoShowq,
formatter: (params)=>{ formatter: (params)=>{
return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案新增') return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案新增')
} }
@ -344,7 +321,7 @@ export class echartsComponent implements OnInit {
axisLabel: { axisLabel: {
color: "#000", //刻度线标签颜色 color: "#000", //刻度线标签颜色
textStyle:{ textStyle:{
fontSize :15, fontSize :18,
color:'#000000' color:'#000000'
}, },
}, },

Loading…
Cancel
Save