diff --git a/src/app/gis-management/gis-labeling/gis-labeling.component.ts b/src/app/gis-management/gis-labeling/gis-labeling.component.ts index a567a28..90d0e05 100644 --- a/src/app/gis-management/gis-labeling/gis-labeling.component.ts +++ b/src/app/gis-management/gis-labeling/gis-labeling.component.ts @@ -805,7 +805,7 @@ export class GisLabelingComponent implements OnInit { //三维场景 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/') } //查看预案 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 56e7756..81cd56c 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.html +++ b/src/app/plan-management/entry-plan/entry-plan.component.html @@ -254,7 +254,7 @@ 操作 - 查看预案 + 查看预案 diff --git a/src/app/plan-management/meet-plan/meet-plan.component.html b/src/app/plan-management/meet-plan/meet-plan.component.html new file mode 100644 index 0000000..5a47d5f --- /dev/null +++ b/src/app/plan-management/meet-plan/meet-plan.component.html @@ -0,0 +1,134 @@ +
+
+
+
+ +
+ + + + +
+ + +
+ + + + Ⅰ级 + Ⅱ级 + + +
+
+ + + + +
+
+ + + + + 🠊 + + + +
+
+ + + + +
+
+ + + + 未提交审核 + 审核中 + 审核通过 + 审核退回 + + +
+
+ + + + + {{item.name}} + + + 包含下级 +
+ +
+
+ + +
+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
预案名称{{element.unitname}}预案级别{{url=='2'?'Ⅱ级':'Ⅰ级'}}添加人{{element.addname}}添加时间{{element.addtime}}预案类型{{element.plantype}}审核状态{{element.passstate}}是否公开{{element.isopen}}编制级别{{element.projectlevel}}操作 + 查看预案 +
+ + + + +
+
+
diff --git a/src/app/plan-management/meet-plan/meet-plan.component.scss b/src/app/plan-management/meet-plan/meet-plan.component.scss new file mode 100644 index 0000000..95d2d38 --- /dev/null +++ b/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%; + } + } + } \ No newline at end of file diff --git a/src/app/plan-management/meet-plan/meet-plan.component.spec.ts b/src/app/plan-management/meet-plan/meet-plan.component.spec.ts new file mode 100644 index 0000000..cc95020 --- /dev/null +++ b/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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MeetPlanComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MeetPlanComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/plan-management/meet-plan/meet-plan.component.ts b/src/app/plan-management/meet-plan/meet-plan.component.ts new file mode 100644 index 0000000..ba3f1ed --- /dev/null +++ b/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,@Inject(MAT_DIALOG_DATA) public data: any) {} + unitname//预案名称 + level//预案级别 + addname//添加人 + addtime//添加时间 + unittype//预案类型 + unitstate//审核状态 + projectlevel//编制级别 + close(){ + this.dialogRef.close(); + } +} diff --git a/src/app/plan-management/meet-plan/newunit.html b/src/app/plan-management/meet-plan/newunit.html new file mode 100644 index 0000000..c770a48 --- /dev/null +++ b/src/app/plan-management/meet-plan/newunit.html @@ -0,0 +1,42 @@ + +
+
+ 新增预案 +
+
+ + + + +
+
+ + + + +
+
+ + + + 国家级 + 市级 + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/plan-management/meet-plan/newunit.scss b/src/app/plan-management/meet-plan/newunit.scss new file mode 100644 index 0000000..7e78e9c --- /dev/null +++ b/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; + } + } \ No newline at end of file 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 33eeeb9..c05a228 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,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 14:15:10 * @LastEditors: sueRimn - * @LastEditTime: 2020-12-28 11:10:30 + * @LastEditTime: 2021-01-06 10:37:08 -->
@@ -39,6 +39,10 @@ + 🠊 + + +
@@ -91,7 +95,7 @@ 预案级别 - {{element.level}} + {{url=='2'?'Ⅱ级':'Ⅰ级'}} 添加人 @@ -121,7 +125,7 @@ 操作 - 查看预案 + 查看预案 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 20b2aca..77b6370 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: 2020-12-28 11:14:53 + * @LastEditTime: 2021-01-06 10:39:07 */ import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http' @@ -30,8 +30,8 @@ export interface PeriodicElement { projectlevel: string; } 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({ @@ -71,8 +71,10 @@ export class OnetwoEntryPlanComponent implements OnInit { {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']; @@ -129,6 +131,12 @@ export class OnetwoEntryPlanComponent implements OnInit { //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}`); + } } diff --git a/src/app/plan-management/plan-management-routing.module.ts b/src/app/plan-management/plan-management-routing.module.ts index 1fbaee1..bbcc1f8 100644 --- a/src/app/plan-management/plan-management-routing.module.ts +++ b/src/app/plan-management/plan-management-routing.module.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 10:59:48 * @LastEditors: sueRimn - * @LastEditTime: 2020-12-29 09:29:35 + * @LastEditTime: 2021-01-06 09:57:07 */ import { NgModule } from '@angular/core'; 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 { EntryPlanLookComponent } from './entry-plan-look/entry-plan-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 = [ { path: 'entryPlan', component: EntryPlanComponent}, @@ -22,7 +24,10 @@ const routes: Routes = [ { path: 'passPlan', component: PassPlanComponent}, { path: 'entryPlandetail', component: EntryPlanLookComponent}, { 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({ diff --git a/src/app/plan-management/plan-management.module.ts b/src/app/plan-management/plan-management.module.ts index 50bc886..2b5d724 100644 --- a/src/app/plan-management/plan-management.module.ts +++ b/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 { WebLookComponent } from './web-look/web-look.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({ - 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: [ CommonModule, PlanManagementRoutingModule, diff --git a/src/app/plan-management/type-plan/newunit.html b/src/app/plan-management/type-plan/newunit.html new file mode 100644 index 0000000..cd632ec --- /dev/null +++ b/src/app/plan-management/type-plan/newunit.html @@ -0,0 +1,27 @@ + +
+
+ 新增预案 +
+
+ + + + +
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/src/app/plan-management/type-plan/newunit.scss b/src/app/plan-management/type-plan/newunit.scss new file mode 100644 index 0000000..7e78e9c --- /dev/null +++ b/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; + } + } \ No newline at end of file diff --git a/src/app/plan-management/type-plan/type-plan.component.html b/src/app/plan-management/type-plan/type-plan.component.html new file mode 100644 index 0000000..ab8c247 --- /dev/null +++ b/src/app/plan-management/type-plan/type-plan.component.html @@ -0,0 +1,117 @@ +
+
+
+
+ +
+ + + + +
+ +
+ + + + +
+
+ + + + + 🠊 + + + +
+ +
+ + + + 未提交审核 + 审核中 + 审核通过 + 审核退回 + + +
+
+ + + + + {{item.name}} + + + 包含下级 +
+ +
+
+ + +
+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
预案名称{{element.unitname}}添加人{{element.addname}}添加时间{{element.addtime}}预案类型类型预案审核状态{{element.passstate}}是否公开{{element.isopen}}编制级别{{element.projectlevel}}操作 + 查看预案 +
+ + + + +
+
+
+

type-plan works!

diff --git a/src/app/plan-management/type-plan/type-plan.component.scss b/src/app/plan-management/type-plan/type-plan.component.scss new file mode 100644 index 0000000..95d2d38 --- /dev/null +++ b/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%; + } + } + } \ No newline at end of file diff --git a/src/app/plan-management/type-plan/type-plan.component.spec.ts b/src/app/plan-management/type-plan/type-plan.component.spec.ts new file mode 100644 index 0000000..d9fbc9f --- /dev/null +++ b/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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ TypePlanComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TypePlanComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/plan-management/type-plan/type-plan.component.ts b/src/app/plan-management/type-plan/type-plan.component.ts new file mode 100644 index 0000000..9c36971 --- /dev/null +++ b/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,@Inject(MAT_DIALOG_DATA) public data: any) {} + unitname//预案名称 + level//预案级别 + addname//添加人 + addtime//添加时间 + unittype//预案类型 + unitstate//审核状态 + projectlevel//编制级别 + close(){ + this.dialogRef.close(); + } +} 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 746ed24..c68811d 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 @@ -130,7 +130,7 @@ export class AddUnitOneComponent implements OnInit { ] }; 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" }); this.indexBzt.setOption(options); diff --git a/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts b/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts index 103c132..04f363f 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-three-line-details/add-unit-three-line-details.component.ts +++ b/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)) { 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}}); } }); } 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 7f4c0ed..cb3ca61 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: 2020-09-10 08:53:50 + * @LastEditTime: 2021-01-04 11:09:57 -->
@@ -68,8 +68,9 @@
-->
+ - +
@@ -78,7 +79,7 @@
-
+
\ No newline at end of file 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 72ca5fc..b2a431d 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 @@ -17,11 +17,12 @@ } } .publicCss{ - height: 350px; - width: 50%; - display: inline-block; - box-sizing: border-box; - padding: 20px; + width: 80%; + height: 550px; + position: absolute; + left: 50%; + top: 55%; + transform: translate(-50%,-50%); } //头部搜索栏 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 7b866bb..cb7ceee 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 @@ -1,5 +1,5 @@ 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 { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { EchartsDataService } from '../../echarts-data.service'; @@ -11,25 +11,27 @@ declare var echarts: any; }) export class AddUnitTwoTimeComponent implements OnInit { forward(){ - this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type']) + this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname}}) } 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//延时器需要清除 + headname ngOnInit(): void { - this.dateInit () + //this.dateInit () this.bianli() + this.route.queryParams.subscribe(param=>{ + this.headname=param.level + }); this.setTimeoutObj = setTimeout(() => { - this.oneInit (this.date,this.dateNum) + //this.oneInit (this.date,this.dateNum) this.twoInit (this.date,this.dateNum,'month') }, 0); } ngOnDestroy(){ window.clearTimeout(this.setTimeoutObj); - this.chartQusj.clear() - this.chartQusj.dispose() this.forArr.forEach(item => { item.echart.clear() item.echart.dispose() @@ -104,12 +106,12 @@ export class AddUnitTwoTimeComponent implements OnInit { if(this.selectType == "year"){ 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') } if(this.selectType == "month"){ 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') } @@ -259,7 +261,7 @@ export class AddUnitTwoTimeComponent implements OnInit { twoInit (date,dateNum,typeName) { this.forArr.forEach((item,key) => { let that = this - item.echart = echarts.init(document.getElementById(item.id), 'skinUpp'); + item.echart = echarts.init(document.getElementById('gaoceng'), 'skinUpp'); var option = { grid: { top: 50, @@ -269,13 +271,13 @@ export class AddUnitTwoTimeComponent implements OnInit { }, // 标题 title: { - text: item.name+':总数(1012)', + text: this.headname+':总数(1012)', top: -4, left: 'center', textStyle:{ //文字颜色 color:'#000', - fontSize:22 + fontSize:30 } }, //提示框 @@ -287,7 +289,8 @@ export class AddUnitTwoTimeComponent implements OnInit { }else{ return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name) } - } + }, + position: this.serviceData.tableTooltipNoShow2 }, // x轴 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) 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{ - 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') + } } diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html index e3fb7fe..9102a8d 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.html @@ -4,23 +4,20 @@ * @Author: sueRimn * @Date: 2020-09-05 13:50:45 * @LastEditors: sueRimn - * @LastEditTime: 2020-09-11 16:51:57 + * @LastEditTime: 2021-01-04 10:51:43 -->
+ -
-
- -
-
+
diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss index 7ff4670..efabe3c 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.scss @@ -36,11 +36,12 @@ } } .publicCss{ - height: 350px; - width: 50%; - display: inline-block; - box-sizing: border-box; - padding: 20px; + width: 100%; + height: 550px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); } .selectedBtn{ background-color: #2196f3; diff --git a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts index 58fbedb..18bc1ee 100644 --- a/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts +++ b/src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import {EchartsDataService} from '../../echarts-data.service'; declare var echarts: any; @Component({ @@ -9,27 +9,30 @@ declare var echarts: any; }) export class AddUnitTwoTypeStatisticsComponent implements OnInit { - constructor(private router: Router,public data:EchartsDataService) { } + constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { } forward(){ - this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type']) + this.router.navigate(['/statisticanalysis/addUnit_one/addUnit_two_type'],{queryParams:{'level':this.headname}}) } 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" //当前路由地址 setTimeoutObj//延时器需要清除 + headname ngOnInit(): void { + this.route.queryParams.subscribe(param=>{ + this.headname=param.level + }); this.setTimeoutObj = window.setTimeout(()=>{ this.bianli() - this.initCharts() + //this.initCharts() this.barEcharts() },0) } ngOnDestroy(){ window.clearTimeout(this.setTimeoutObj); - this.indexBzt.clear() - this.indexBzt.dispose() + this.forArr.forEach(item => { item.echart.clear() item.echart.dispose() @@ -261,31 +264,47 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { barEcharts(){ this.forArr.forEach(item=>{ let _this = this - item.echart = echarts.init(document.getElementById(item.id),'walden'); + item.echart = echarts.init(document.getElementById('gaoceng'),'walden'); let option = { title: { - text: item.name+':总数(1024)', + text: this.headname+':总数(1024)', left: "center", top: "0", //bottom: '80%', textStyle: { - fontSize: 23 + fontSize: 30 } }, xAxis: { type: 'category', data:this.data.zuzhiorBuilding=="zhi"?this.buildingData: this.zhiNameData, - axisLabel: this.axisLabel + axisLabel:{ + //this.axisLabel, + interval: 0, + textStyle:{ + fontSize :18, + color:'#000000' + } + + } }, yAxis: { type: 'value', - axisLabel:this.axisLabel, + axisLabel:{ + //this.axisLabel, + textStyle:{ + fontSize :16, + color:'#000000' + } + + } }, tooltip: { trigger: 'item', formatter: (params)=>{ return this.tableTooltip(this.tableDataZhong,params.name) - } + }, + position: this.data.tableTooltipNoShow2 }, series: [{ data: this.data.zuzhiorBuilding=="zhi"?this.buildnumData: this.zhiNumData, @@ -296,13 +315,13 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit { backgroundStyle: { color: 'rgba(220, 220, 220, 0.8)' }, - barWidth :'28', + barWidth :'38', //label: this.topTextlabel }] }; item.echart.setOption(option); 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+='
' return res } + //返回 + backClick(){ + this.router.navigateByUrl('/statisticanalysis/addUnit_one') + } } 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 9f48d2b..ab131e5 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 @@ -96,7 +96,7 @@ export class BuildingTypeOneComponent implements OnInit { ] }; 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); } diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html index 9ab5e6e..b12d73e 100644 --- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html +++ b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.html @@ -4,22 +4,23 @@ * @Author: sueRimn * @Date: 2020-09-05 13:50:45 * @LastEditors: sueRimn - * @LastEditTime: 2020-09-11 14:16:12 + * @LastEditTime: 2021-01-04 14:27:33 -->
- - + +
-
+
-
+
diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss index 509d7ef..aa420af 100644 --- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss +++ b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.scss @@ -34,11 +34,12 @@ } } .publicCss{ - height: 350px; - width: 50%; - display: inline-block; - box-sizing: border-box; - padding: 20px; + width: 100%; + height: 550px; + position: absolute; + left: 50%; + top: 55%; + transform: translate(-50%,-50%); } .selectedBtn{ background-color: #2196f3; diff --git a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts b/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts index 01bc388..9b2f0bc 100644 --- a/src/app/statistic-analysis/buildingType/building-type-two-reverse/building-type-two-reverse.component.ts +++ b/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 { Router } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import {EchartsDataService} from '../../echarts-data.service'; declare var echarts: any; @Component({ @@ -9,7 +9,7 @@ declare var echarts: any; }) export class BuildingTypeTwoReverseComponent implements OnInit { - constructor(private router: Router,public data:EchartsDataService) { } + constructor(private router: Router,public data:EchartsDataService,private route:ActivatedRoute) { } forward(){ this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_forward']) @@ -17,16 +17,20 @@ export class BuildingTypeTwoReverseComponent implements OnInit { reverse(){ this.router.navigate(['/statisticanalysis/buildingType_one/buildingType_two_reverse']) } + headname//标题 ngOnInit(): void { + this.route.queryParams.subscribe(param=>{ + this.headname=param.level + }); window.setTimeout(()=>{ this.bianli() - this.initCharts() + //this.initCharts() this.barEcharts() },0) } ngOnDestroy(): void { - this.indexBzt.clear() - this.indexBzt.dispose() + /* this.indexBzt.clear() + this.indexBzt.dispose() */ this.forArr.forEach(item => { item.echart.clear() item.echart.dispose() @@ -136,6 +140,12 @@ export class BuildingTypeTwoReverseComponent implements OnInit { {id:'zhanlan',name:'展览建筑',echart:null}, {id:'suidao',name:'隧道',echart:null}] + + + //返回 + goback(){ + window.history.go(-1) + } /* 顶部饼状图 */ indexBzt initCharts(){ @@ -220,32 +230,47 @@ export class BuildingTypeTwoReverseComponent implements OnInit { barEcharts(){ this.forArr.forEach(item=>{ let _this = this - item.echart = echarts.init(document.getElementById(item.id),'walden'); + item.echart = echarts.init(document.getElementById('gaoceng'),'walden'); let option = { title: { - text: item.name+':总数(1024)', + text: this.headname+':总数(1024)', left: "center", top: "15", - bottom: '80', + //bottom: '80', textStyle: { - fontSize: 23 + fontSize: 30 } }, xAxis: { type: 'category', data: this.zhiNameData, - axisLabel: this.axisLabel + axisLabel:{ + //this.axisLabel, + interval: 0, + textStyle:{ + fontSize :18, + color:'#000000' + } + + } }, yAxis: { type: 'value', - axisLabel:this.axisLabel, + axisLabel:{ + //this.axisLabel, + textStyle:{ + fontSize :16, + color:'#000000' + } + + } }, tooltip: { trigger: 'item', formatter: (params)=>{ return this.tableTooltip(this.tableDataZhong,params.name) }, - //position: this.data.tableTooltipNoShow + position: this.data.tableTooltipNoShow2 }, series: [{ data: this.zhiNumData, @@ -257,13 +282,13 @@ export class BuildingTypeTwoReverseComponent implements OnInit { backgroundStyle: { color: 'rgba(220, 220, 220, 0.8)' }, - barWidth :'28', + barWidth :'38', //label: this.topTextlabel }] }; item.echart.setOption(option); 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}}) }); }) } 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 b262403..e7a9efc 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: 2020-11-10 14:35:31 + * @LastEditTime: 2020-12-30 14:06:07 */ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @@ -103,7 +103,8 @@ export class PageOneComponent implements OnInit { ] }; 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); } diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html index 0bde65c..72e4dc9 100644 --- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html +++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.html @@ -10,32 +10,8 @@
-
- -
- -
- -
- -
-
-
- -
- -
- -
- -
-
-
- -
- -
-
+ +
diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss index 08baac9..57d23cc 100644 --- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss +++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.scss @@ -14,4 +14,17 @@ height: 330px; } } -} \ No newline at end of file +} +.echartsBox{ + width: 100%; + height: 100%; + overflow: auto; + #pie{ + width: 100%; + height: 550px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + } + } \ No newline at end of file diff --git a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts index b9d768f..db54f9c 100644 --- a/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts +++ b/src/app/statistic-analysis/state/page-two-name/page-two-name.component.ts @@ -17,35 +17,16 @@ export class PageTwoNameComponent implements OnInit { ngOnInit(): void { setTimeout(() => { 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.passPlanEchart() - this.planMake() - this.planBack() - this.planAudit() }, 0); } 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 = { interval: 0, textStyle:{ @@ -104,22 +85,29 @@ export class PageTwoNameComponent implements OnInit { //预案新增统计 planAdd () { let _this = this - this.addEchart = echarts.init(document.getElementById('addEchart'),'walden'); + this.addEchart = echarts.init(document.getElementById('pie'),'walden'); var option = { title: { - text: "预案新增:总数(1024)", + text: _this.headname+"总数(1024)", left: "center", top: "0", bottom: '100%', textStyle: { - fontSize: 23 + fontSize: 30 } }, xAxis: { type: 'category', data: this.zhiNameData, - axisLabel:this.axisLabel + axisLabel:{ + //this.axisLabel, + textStyle:{ + fontSize :18, + color:'#000000' + } + + } }, yAxis: { type: 'value', @@ -136,8 +124,8 @@ export class PageTwoNameComponent implements OnInit { trigger: 'item', formatter: (params)=>{ return this.data.biaogeTishi(params.name) - }/* , - position: this.data.tableTooltipNoShow2 */ + }, + position: this.data.tableTooltipNoShow2 }, series: [{ data: this.zhiNumData, @@ -148,7 +136,7 @@ export class PageTwoNameComponent implements OnInit { backgroundStyle: { color: 'rgba(220, 220, 220, 0.8)' }, - barWidth :'28', + barWidth :'38', //label: this.topTextlabel }] }; diff --git a/src/app/statistic-analysis/state/page-two-time/echarts.html b/src/app/statistic-analysis/state/page-two-time/echarts.html index 22d2c00..cce5564 100644 --- a/src/app/statistic-analysis/state/page-two-time/echarts.html +++ b/src/app/statistic-analysis/state/page-two-time/echarts.html @@ -1,9 +1,17 @@ +
-
+
-
+
diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html index 758f8c8..7cbd5ce 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-05 08:59:24 * @LastEditors: sueRimn - * @LastEditTime: 2020-09-10 10:19:33 + * @LastEditTime: 2021-01-04 11:15:39 -->
@@ -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 9143544..b8b9d20 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 @@ -47,12 +47,12 @@ //echarts div公有样式 .publicCss{ - height: 350px; - width: 50%; - display: inline-block; - box-sizing: border-box; - padding: 10px; - margin: 10px 0; + width: 80%; + height: 550px; + position: absolute; + left: 50%; + top: 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 13e32a8..496b628 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 @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; 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 { FormControl } from '@angular/forms'; import { DateAdapter } from '@angular/material/core'; @@ -44,6 +44,7 @@ export class PageTwoTimeComponent implements OnInit { //返回 goBack () { this.echartsData.statefulInspectionToggle = true + window.history.go(-1) } selectType:string = 'month'; //选择当前的 查询类型 按月/年 @@ -140,7 +141,7 @@ export class PageTwoTimeComponent implements OnInit { }) export class echartsComponent implements OnInit { - constructor(private router: Router,public snackBar: MatSnackBar,private adapter: DateAdapter,public echartsData:EchartsDataService) { } + constructor(private router: Router,private activatedRoute: ActivatedRoute,public snackBar: MatSnackBar,private adapter: DateAdapter,public echartsData:EchartsDataService) { } tiaoshiPao:any datayuey=[270, 253, 244, 199, 189, 173, 160, 198, 200] @@ -160,60 +161,39 @@ export class echartsComponent implements OnInit { ngOnInit(): void { window.setTimeout(()=>{ 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.threeInit() + /* this.threeInit() this.fourInit() this.fiveInit() - this.sixInit() + this.sixInit() */ },0) } ngOnDestroy () { - this.oneExample.clear() - this.oneExample.dispose() this.twoExample.clear() 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) { - this.oneExample.clear() - this.oneExample.dispose() this.twoExample.clear() 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') { 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.threeInit(this.dataYearX,this.dataYearY) - this.fourInit(this.dataYearX,this.dataYearY) - this.fiveInit(this.dataYearX,this.dataYearY) - this.sixInit(this.dataYearX,this.dataYearY) + } else { this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) - this.oneInit() + //this.oneInit() this.twoInit() - this.threeInit() - this.fourInit() - this.fiveInit() - this.sixInit() + } } @@ -307,31 +287,28 @@ export class echartsComponent implements OnInit { this.oneExample.setOption(option); } + headtext twoExample:any; twoInit (X=this.datayuex, Y=this.datayuey) { let that = this this.twoExample = echarts.init(document.getElementById('two'), 'skinUpp'); var option = { - grid: { - top: 50, - left:50, - right: 20, - bottom: 20, - }, + // 标题 title: { - text: '预案新增'+':总数(1024)', + text: this.headtext+':总数(1024)', top: -4, left: 'center', bottom: 100, textStyle:{ //文字颜色 + fontSize: 30, color:'#000', } }, tooltip: { trigger: 'axis', - + position: this.echartsData.tableTooltipNoShowq, formatter: (params)=>{ return this.echartsData.tableTooltip(this.echartsData.tableDataZhi,'预案新增') } @@ -344,7 +321,7 @@ export class echartsComponent implements OnInit { axisLabel: { color: "#000", //刻度线标签颜色 textStyle:{ - fontSize :15, + fontSize :18, color:'#000000' }, },