陈鹏飞 3 years ago
parent
commit
208739bea8
  1. 129
      src/app/plan-management/entry-plan/entry-plan.component.html
  2. 25
      src/app/plan-management/entry-plan/entry-plan.component.spec.ts
  3. 11
      src/app/plan-management/entry-plan/entry-plan.component.ts
  4. 19
      src/app/plan-management/open-plan/open-plan.component.html
  5. 25
      src/app/plan-management/open-plan/open-plan.component.spec.ts
  6. 10
      src/app/plan-management/open-plan/open-plan.component.ts
  7. 52
      src/app/plan-management/pass-plan/pass-plan.component.html
  8. 25
      src/app/plan-management/pass-plan/pass-plan.component.spec.ts
  9. 12
      src/app/plan-management/pass-plan/pass-plan.component.ts
  10. 22
      src/app/statistic-analysis/combined-query/combined-query.component.html
  11. 3
      src/app/statistic-analysis/combined-query/combined-query.component.scss
  12. 79
      src/app/statistic-analysis/combined-query/combined-query.component.ts

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

@ -2,11 +2,11 @@
<div class="header">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="queryBox">
<div class="queryField">
<label style="margin-right: 10px;">单位名称:</label>
<mat-form-field class="example-full-width">
<input matInput placeholder="请输入单位名称" name="companyName" [(ngModel)]="companyName" autocomplete="off">
<input matInput placeholder="请输入单位名称" name="companyName" [(ngModel)]="companyName"
autocomplete="off">
</mat-form-field>
</div>
<div class="queryField">
@ -18,8 +18,10 @@
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img
[src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
@ -28,22 +30,24 @@
<div class="queryField ordiv" *ngIf="!padMore">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<div (click)="closediv()" class="closediv">
<mat-icon>clear</mat-icon>
</div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)'
class="organizationlist">
<button type="button" mat-icon-button disabled></button>
<li>{{node.name}}</li>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button
type="button"
mat-icon-button
matTreeNodeToggle
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding
(click)='add(node)' class="organizationlist">
<button type="button" mat-icon-button matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
@ -57,15 +61,20 @@
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型' [multiple]="true">
<mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型'
[multiple]="true">
<mat-option value=16>文本预案</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>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;"
(click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;"
(click)='pcInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div>
<div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button>
@ -74,7 +83,8 @@
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true">
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory"
[multiple]="true">
<mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option>
@ -89,7 +99,8 @@
<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-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>
@ -105,8 +116,6 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
@ -143,6 +152,12 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
</div>
</div>
</form>
</div>
@ -169,7 +184,8 @@
<span class="integrityNum">
{{(element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed()}}%
</span>
<div class="integrityColorDiv" [style]="integrity((element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed())">
<div class="integrityColorDiv"
[style]="integrity((element.company.companyIntegrityScore.totalScore.toFixed(2) * 100).toFixed())">
</div>
<div class="integrityDetails" [ngClass]="{'bottomposition': i <= 5,'topposition': i > 5}">
<div class="integrityDetailsTop">
@ -183,9 +199,12 @@
<div class="name">单位信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.basicInfoScore * 5).toFixed(1),5)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.basicInfoScore * 5).toFixed(1),5)">
</div>
<span>{{(element.company.companyIntegrityScore.basicInfoScore * 5).toFixed(1)}}%</span>
</div>
<span>{{(element.company.companyIntegrityScore.basicInfoScore *
5).toFixed(1)}}%</span>
</div>
<div class="number">5%</div>
</li>
@ -193,9 +212,12 @@
<div class="name">建筑信息</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.buildingInfoScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.buildingInfoScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.buildingInfoScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.buildingInfoScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -203,9 +225,12 @@
<div class="name">平面图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.planImageScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.planImageScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.planImageScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.planImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -213,9 +238,12 @@
<div class="name">四周毗邻</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.adjoinScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.adjoinScore * 10).toFixed(1),10)">
</div>
<span>{{(element.company.companyIntegrityScore.adjoinScore * 10).toFixed(1)}}%</span>
</div>
<span>{{(element.company.companyIntegrityScore.adjoinScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -223,9 +251,12 @@
<div class="name">消防设施</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.facilityScore * 25).toFixed(1),25)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.facilityScore * 25).toFixed(1),25)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.facilityScore * 25).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.facilityScore *
25).toFixed(1)}}%</span>
</div>
<div class="number">25%</div>
</li>
@ -233,9 +264,12 @@
<div class="name">重点部位</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.importantLocationScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.importantLocationScore * 10).toFixed(1),10)">
</div>
<span>{{(element.company.companyIntegrityScore.importantLocationScore * 10).toFixed(1)}}%</span>
</div>
<span>{{(element.company.companyIntegrityScore.importantLocationScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -243,9 +277,12 @@
<div class="name">功能分区</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.functionalDivisionScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.functionalDivisionScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.functionalDivisionScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.functionalDivisionScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -253,9 +290,12 @@
<div class="name">实景图</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.realityImageScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.realityImageScore * 10).toFixed(1),10)">
</div>
<span>{{(element.company.companyIntegrityScore.realityImageScore * 10).toFixed(1)}}%</span>
</div>
<span>{{(element.company.companyIntegrityScore.realityImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -263,9 +303,12 @@
<div class="name">CAD上传</div>
<div class="colorDiv">
<div class="colorDivBac">
<div class="colorDivCon" [style]="integrityDetails((element.company.companyIntegrityScore.cadScore * 10).toFixed(1),10)"></div>
<div class="colorDivCon"
[style]="integrityDetails((element.company.companyIntegrityScore.cadScore * 10).toFixed(1),10)">
</div>
</div>
<span>{{(element.company.companyIntegrityScore.cadScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.cadScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
</li>
@ -289,7 +332,8 @@
<ng-container matColumnDef="unittype">
<th mat-header-cell *matHeaderCellDef>单位类型</th>
<td mat-cell *matCellDef="let element">{{element.company.buildingTypes[0] ? element.company.buildingTypes[0].name : ''}}</td>
<td mat-cell *matCellDef="let element">{{element.company.buildingTypes[0] ?
element.company.buildingTypes[0].name : ''}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
@ -312,11 +356,8 @@
<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"
(page)="chagePage($event)"
>
<mat-paginator pageEvent [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>

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

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

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

@ -314,7 +314,12 @@ export class EntryPlanComponent implements OnInit {
}
allPlanInfo: any //存储所有预案信息
//获得所有预案信息
templatePlan: boolean = false//模板录入预案checkbox
customPlan: boolean = false//自定义预案
getAllPlanInfo() {
let planmode = []
this.templatePlan ? planmode.push(2) : null
this.customPlan ? planmode.push(4) : null
let reservePlanType
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = ''
if (this.reservePlanType && this.reservePlanType.length != 0) {
@ -336,7 +341,8 @@ export class EntryPlanComponent implements OnInit {
HasPlanComponents: this.haveyuan || '',
PlanCategories: this.planCategory,
IsNewData: this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode
}
this.http.get("/api/Plans", { params: paramsdata }).subscribe((data: any) => {
@ -391,6 +397,9 @@ export class EntryPlanComponent implements OnInit {
// console.log(this.pageEvent)
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.templatePlan = false
this.customPlan = false
this.getAllPlanInfo();
}
}

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

@ -16,8 +16,10 @@
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div>
<div class="queryField" *ngIf="!pcfind">
@ -64,7 +66,12 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<mat-checkbox [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore">
<mat-checkbox [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
@ -130,14 +137,10 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
<mat-paginator [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</div>
</div>
</div>

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

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

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

@ -116,7 +116,12 @@ export class OpenPlanComponent implements OnInit {
allPlanInfo: any //存储所有预案信息
//获得所有预案信息
IsNewCompanyData = ''
templatePlan: boolean = false//模板录入预案checkbox
customPlan: boolean = false//自定义预案
getAllPlanInfo() {
let planmode = []
this.templatePlan ? planmode.push(2) : null
this.customPlan ? planmode.push(4) : null
let paramsdata: any = {
CompanyName: this.companyName || '',
OrganizationId: '',
@ -130,7 +135,8 @@ export class OpenPlanComponent implements OnInit {
PageSize: this.pageSizeOptions[0],
Sort: '',
IsNewData: this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode
}
this.http.get("/api/PublicPlans", { params: paramsdata }).subscribe((data: any) => {
// console.log(111,data)
@ -292,6 +298,8 @@ export class OpenPlanComponent implements OnInit {
//重新获取初始化列表
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.templatePlan = false
this.customPlan = false
this.getAllPlanInfo();
this.IsNewCompanyData = ''
this.IsNewData = ''

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

@ -13,24 +13,26 @@
<div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<div (click)="closediv()" class="closediv">
<mat-icon>clear</mat-icon>
</div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button type="button" mat-icon-button disabled></button>
<li>{{node.name}}</li>
</mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist">
<button
type="button"
mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)'
class="organizationlist">
<button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
@ -65,8 +67,10 @@
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 20px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcMore" style="margin-left: 20px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img
[src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img
[src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div>
<div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button>
@ -127,7 +131,12 @@
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox>
</div>
</div>
</form>
@ -156,7 +165,8 @@
<ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element">{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案':
element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}}</td>
element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}}
</td>
</ng-container>
<ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th>
@ -187,18 +197,18 @@
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="lookUnitInfo(element)" style="color: blue;cursor: pointer;">查看单位信息</span>
<span (click)="routerTo(element)" style="color: blue;cursor: pointer;margin-left: 10px;">{{url=='1'?'审核预案':'查看预案'}} </span>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='openReserve(element)' *ngIf="element.auditStatus==2">预案公开</label>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='closeReserve(element)' *ngIf="element.auditStatus==2">预案取消公开</label>
<span (click)="routerTo(element)"
style="color: blue;cursor: pointer;margin-left: 10px;">{{url=='1'?'审核预案':'查看预案'}} </span>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='openReserve(element)'
*ngIf="element.auditStatus==2">预案公开</label>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='closeReserve(element)'
*ngIf="element.auditStatus==2">预案取消公开</label>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator
[length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
<mat-paginator [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>

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

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

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

@ -117,8 +117,13 @@ export class PassPlanComponent implements OnInit {
allPlanInfo: any //存储所有预案信息
IsNewCompanyData = '' //单位是新增还是维护更新
templatePlan: boolean = false//模板录入预案checkbox
customPlan: boolean = false//自定义预案
//获得所有预案信息
getAllPlanInfo() {
let planmode = []
this.templatePlan ? planmode.push(2) : null
this.customPlan ? planmode.push(4) : null
let reservePlanType
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = ''
if (this.reservePlanType && this.reservePlanType.length != 0) {
@ -140,7 +145,8 @@ export class PassPlanComponent implements OnInit {
Sort: '',
PlanCategories: this.planCategory,
IsNewData: this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode
}
this.http.get("/api/ApprovedPlans", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
@ -469,6 +475,10 @@ export class PassPlanComponent implements OnInit {
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.planCategory = []
this.templatePlan = false
this.customPlan = false
this.getAllPlanInfo();
}
}

22
src/app/statistic-analysis/combined-query/combined-query.component.html

@ -86,8 +86,8 @@
<mat-form-field>
<mat-select required [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择单位状态'
[multiple]="true">
<mat-option [value]='preparelevel[0]'>新增</mat-option>
<mat-option [value]='preparelevel[1]||2'>维护更新</mat-option>
<mat-option [value]='1'>新增</mat-option>
<mat-option [value]='2'>维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
@ -134,22 +134,32 @@
<div class="tablebox" id="table">
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==0&&!tableDataNull">
<thead>
<th *ngFor="let item of displayedColumns;let i=index">{{item}}</th>
<th *ngFor="let item of displayedColumns;let i=index">{{item}}<mat-icon
*ngIf="i == 0 && orRecord.length != 0" style="cursor: pointer;vertical-align: text-top;"
(click)="goBack()">undo
</mat-icon>
</th>
</thead>
<tbody>
<tr *ngFor="let element of tabledataSource">
<td *ngFor="let eletd of element.name;let key = index" (click)="clicktd(key,eletd)">{{eletd}}</td>
<td *ngFor="let eletd of element.name;let key = index" [ngClass]="{'pointer': key == 0}"
(click)="clicktd(key,eletd)">{{eletd}}</td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" *ngIf="preparelevels==1&&!tableDataNull">
<thead>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}</th>
<th *ngFor="let item of yuanColumns;let i=index">{{item}}<mat-icon
*ngIf="i == 0 && orRecord.length != 0" style="cursor: pointer;vertical-align: text-top;"
(click)="goBack()">undo
</mat-icon>
</th>
</thead>
<tbody>
<tr *ngFor="let element of yuanTable">
<td *ngFor="let eletd of element.name;let key = index" (click)="clicktd(key,eletd)">{{eletd}}</td>
<td *ngFor="let eletd of element.name;let key = index" [ngClass]="{'pointer': key == 0}"
(click)="clicktd(key,eletd)">{{eletd}}</td>
</tr>
</tbody>
</table>

3
src/app/statistic-analysis/combined-query/combined-query.component.scss

@ -176,6 +176,9 @@
mat-paginator {
width: 100%;
}
.pointer{
cursor: pointer;
}
}
}

79
src/app/statistic-analysis/combined-query/combined-query.component.ts

@ -59,10 +59,30 @@ export class CombinedQueryComponent implements OnInit {
selected = new FormControl(0); //选项卡实例
//判断选了哪一个
selectedIndexChange(e) {
this.orRecord = []
this.selected.setValue(e)
this.preparelevels = Number(e)
if (this.preparelevels == 0) {
this.js = this.organizationName
this.jsId = this.organizationId
this.jscheck = true
this.unittype = []
this.allunittype.forEach(element => {
this.unittype.push(element.id)
});
this.preparelevel = [1]
this.dwaddtime = '2020-01-01'//单位查询开始时间
this.dwendtime = this.getNowFormatDate()//单位结束时间
} else if (this.preparelevels == 1) {
this.yuanjs = this.organizationName
this.yuanjsId = this.organizationId
this.yuanaddtime = '2020-01-01'//预案查询开始时间
this.yuanendtime = this.getNowFormatDate()//预案查询结束时间
this.yuanjscheck = true
this.reservePlanType = ['1', '2', '4', '16']
this.planCategory = ['1', '2', '3', '4', '5']
}
this.getAllPlanInfo()
}
@ -203,6 +223,7 @@ export class CombinedQueryComponent implements OnInit {
yuanintegritySort = 1 //预案排序字段
isMasklayer = false
async getAllPlanInfo() {
console.log(this.preparelevel)
let paramsdata: any = {
QueryMode: this.preparelevels,
OrganizationId: this.jsId || '',
@ -413,6 +434,7 @@ export class CombinedQueryComponent implements OnInit {
//重置
reset() {
this.orRecord = []
if (this.preparelevels == 0) {
this.js = this.organizationName
this.jsId = this.organizationId
@ -437,27 +459,66 @@ export class CombinedQueryComponent implements OnInit {
this.getAllPlanInfo();
}
orRecord = []
//进入下一层
clicktd(key, element) {
// console.log(key)
// console.log(element)
// console.log(this.allorganizations)
let config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
if (key == 0) {
let clickOr
this.allorganizations.forEach(item => {
if (element === item.name) {
clickOr = item
}
});
// console.log(clickOr)
if (this.preparelevels == 0) {
if (element == this.js) {
this.snackBar.open('已在当前查询的消防救援站下,无法下钻', '确定', config);
return
}
} else if (this.preparelevels == 1) {
if (element == this.yuanjs) {
this.snackBar.open('已在当前查询的消防救援站下,无法下钻', '确定', config);
return
}
}
if (clickOr.children.length == 0 && this.excelData.length == 1) {
this.snackBar.open('无下级消防救援站,无法下钻', '确定', config);
return
}
//记录点击过的消防救援站
this.orRecord.push({ name: this.js, id: this.jsId })
if (this.preparelevels == 0) {
this.js = element
this.jsId = item.id
this.jsId = clickOr.id
} else if (this.preparelevels == 1) {
this.yuanjs = element
this.yuanjsId = item.id
this.yuanjsId = clickOr.id
}
console.log(this.orRecord)
this.getAllPlanInfo();
}
});
}
goBack() {
if (this.preparelevels == 0) {
this.js = this.orRecord[this.orRecord.length - 1].name
this.jsId = this.orRecord[this.orRecord.length - 1].id
} else if (this.preparelevels == 1) {
this.yuanjs = this.orRecord[this.orRecord.length - 1].name
this.yuanjsId = this.orRecord[this.orRecord.length - 1].id
}
this.orRecord.pop();
console.log(this.orRecord)
this.getAllPlanInfo();
}
exal() {

Loading…
Cancel
Save