Browse Source

[完善]增加预案搜索条件

tangshan
邵佳豪 3 years ago
parent
commit
5a6da9f00d
  1. 403
      src/app/plan-management/entry-plan/entry-plan.component.html
  2. 25
      src/app/plan-management/entry-plan/entry-plan.component.spec.ts
  3. 359
      src/app/plan-management/entry-plan/entry-plan.component.ts
  4. 165
      src/app/plan-management/open-plan/open-plan.component.html
  5. 25
      src/app/plan-management/open-plan/open-plan.component.spec.ts
  6. 22
      src/app/plan-management/open-plan/open-plan.component.ts
  7. 256
      src/app/plan-management/pass-plan/pass-plan.component.html
  8. 25
      src/app/plan-management/pass-plan/pass-plan.component.spec.ts
  9. 24
      src/app/plan-management/pass-plan/pass-plan.component.ts
  10. 4
      src/app/statistic-analysis/combined-query/combined-query.component.html
  11. 1
      src/app/statistic-analysis/combined-query/combined-query.component.ts

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

@ -1,149 +1,164 @@
<div style="height: 100%;overflow-y: auto;">
<div class="header" >
<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">
</mat-form-field>
</div>
<div class="queryField" >
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'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>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField ordiv" *ngIf="!padMore">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<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">
</mat-form-field>
</div>
<div class="queryField">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id">
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen' 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>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField ordiv" *ngIf="!padMore">
<label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<div class="organizationbox" *ngIf="isorganizationbox">
<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-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型' [multiple]="true">
<mat-option value=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>
</div>
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<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>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<div class="organizationbox" *ngIf="isorganizationbox">
<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-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select name="reservePlanType" [(ngModel)]="reservePlanType" placeholder='请选择预案类型'
[multiple]="true">
<mat-option value=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>
</div>
<div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<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>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" [(ngModel)]="toExamine" placeholder='请选择审核状态'>
<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" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
<mat-option value="desc">从高到低</mat-option>
<mat-option value="asc">从低到高</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">制作情况:</label>
<mat-form-field>
<mat-select placeholder='请选择预案制作情况' [(ngModel)]="haveyuan" name="haveyuan">
<mat-option value='true'>有预案</mat-option>
<mat-option value="false">无预案</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案状态:</label>
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</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 class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核状态:</label>
<mat-form-field>
<mat-select name="toExamine" [(ngModel)]="toExamine" placeholder='请选择审核状态'>
<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" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">信息完整度排序:</label>
<mat-form-field>
<mat-select placeholder='请选择排序方式' [(ngModel)]="integritySort" name="integritySort">
<mat-option value="desc">从高到低</mat-option>
<mat-option value="asc">从低到高</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">制作情况:</label>
<mat-form-field>
<mat-select placeholder='请选择预案制作情况' [(ngModel)]="haveyuan" name="haveyuan">
<mat-option value='true'>有预案</mat-option>
<mat-option value="false">无预案</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案状态:</label>
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</form>
</div>
<!-- <mat-divider></mat-divider> -->
@ -154,8 +169,8 @@
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">单位状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.company.isNewData">新增</span>
<span class="weihu" *ngIf="!element.company.isNewData">维护更新</span>
<span class="add" *ngIf="element.company.isNewData">新增</span>
<span class="weihu" *ngIf="!element.company.isNewData">维护更新</span>
</td>
</ng-container>
<ng-container matColumnDef="unitname">
@ -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,91 +199,118 @@
<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>
</div>
<span>{{(element.company.companyIntegrityScore.basicInfoScore * 5).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.basicInfoScore *
5).toFixed(1)}}%</span>
</div>
<div class="number">5%</div>
<div class="number">5%</div>
</li>
<li>
<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>
<div class="number">10%</div>
</li>
<li>
<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>
<div class="number">10%</div>
</li>
<li>
<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>
</div>
<span>{{(element.company.companyIntegrityScore.adjoinScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.adjoinScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
<div class="number">10%</div>
</li>
<li>
<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>
<div class="number">25%</div>
</li>
<li>
<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>
</div>
<span>{{(element.company.companyIntegrityScore.importantLocationScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.importantLocationScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
<div class="number">10%</div>
</li>
<li>
<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>
<div class="number">10%</div>
</li>
<li>
<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>
</div>
<span>{{(element.company.companyIntegrityScore.realityImageScore * 10).toFixed(1)}}%</span>
<span>{{(element.company.companyIntegrityScore.realityImageScore *
10).toFixed(1)}}%</span>
</div>
<div class="number">10%</div>
<div class="number">10%</div>
</li>
<li>
<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>
<div class="number">10%</div>
</li>
</ul>
</div>
@ -289,34 +332,32 @@
<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>
<td mat-cell *matCellDef="let element">{{element.planType}}</td>
<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.auditStatus}}</td>
<th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">{{element.auditStatus}}</td>
</ng-container>
<ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel}}</td>
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span style="color: blue;" (click)="routerTo(element)">查看预案</span>
<span style="color: blue;" (click)="routerTo(element)">查看预案</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"
(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();
});
});

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

@ -4,7 +4,7 @@ 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 { 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';
@ -17,7 +17,7 @@ import { ConstantPool } from '@angular/compiler';
})
export class EntryPlanComponent implements OnInit {
constructor(private http:HttpClient,private router:Router,private route:ActivatedRoute,private tree: TreeService,public dialog: MatDialog,public snackBar: MatSnackBar) { }
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { }
private _transformer = (node, level: number) => { //初始化tree
return {
@ -35,236 +35,236 @@ export class EntryPlanComponent implements OnInit {
myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable;
//分页
@ViewChild(MatPaginator, {static: true})
@ViewChild(MatPaginator, { static: true })
pageEvent: PageEvent;
paginator: MatPaginator;
length:any; //共多少条数据
pageSize:any; //每页条数
length: any; //共多少条数据
pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber:any; //第几页
IsNewData='' //预案维护更新或者新增
IsNewCompanyData=''//单位维护更新或者新增
PageNumber: any; //第几页
IsNewData = '' //预案维护更新或者新增
IsNewCompanyData = ''//单位维护更新或者新增
displayedColumns: string[] = ['state','unitname','integrity','level','jurisdictionsquadron', 'unittype','plantype', 'passstate','projectlevel','operation'];
allorganizations:any //所有组织机构
allunittype:any //所有单位类型
tabledataSource:any //表格数据
displayedColumns: string[] = ['state', 'unitname', 'integrity', 'level', 'jurisdictionsquadron', 'unittype', 'plantype', 'passstate', 'projectlevel', 'operation'];
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
tabledataSource: any //表格数据
organizationName:any //当前单位组织机构名称
preparelevels:any
integritySort:any //完整度排序
organizationName: any //当前单位组织机构名称
preparelevels: any
integritySort: any //完整度排序
haveyuan//有无预案
colorRgb(sColor){
colorRgb(sColor) {
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
var sColor = sColor.toLowerCase();
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
var sColorNew = "#";
for (var i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
}
sColor = sColorNew;
}
//处理六位的颜色值
var sColorChange = [];
for (var i = 1; i < 7; i += 2) {
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
if (sColor.length === 4) {
var sColorNew = "#";
for (var i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
}
return sColorChange;
sColor = sColorNew;
}
//处理六位的颜色值
var sColorChange = [];
for (var i = 1; i < 7; i += 2) {
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
}
return sColorChange;
} else {
return sColor;
return sColor;
}
}
colorHex(rgb){
colorHex(rgb) {
var _this = rgb;
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
if (/^(rgb|RGB)/.test(_this)) {
var aColor = _this.replace(/(?:(|)|rgb|RGB)*/g, "").split(",");
var strHex = "#";
for (var i = 0; i < aColor.length; i++) {
var hex:any = Number(aColor[i]).toString(16);
hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位
if (hex === "0") {
hex += hex;
}
strHex += hex;
var aColor = _this.replace(/(?:(|)|rgb|RGB)*/g, "").split(",");
var strHex = "#";
for (var i = 0; i < aColor.length; i++) {
var hex: any = Number(aColor[i]).toString(16);
hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位
if (hex === "0") {
hex += hex;
}
if (strHex.length !== 7) {
strHex = _this;
}
return strHex;
strHex += hex;
}
if (strHex.length !== 7) {
strHex = _this;
}
return strHex;
} else if (reg.test(_this)) {
var aNum = _this.replace(/#/, "").split("");
if (aNum.length === 6) {
return _this;
} else if (aNum.length === 3) {
var numHex = "#";
for (var i = 0; i < aNum.length; i += 1) {
numHex += (aNum[i] + aNum[i]);
}
return numHex;
var aNum = _this.replace(/#/, "").split("");
if (aNum.length === 6) {
return _this;
} else if (aNum.length === 3) {
var numHex = "#";
for (var i = 0; i < aNum.length; i += 1) {
numHex += (aNum[i] + aNum[i]);
}
return numHex;
}
} else {
return _this;
return _this;
}
}
gradientColor(startColor, endColor, step) {
let _this = this
let startRGB = _this.colorRgb(startColor);//转换为rgb数组模式
let startR = startRGB[0];
let startG = startRGB[1];
let startB = startRGB[2];
let startRGB = _this.colorRgb(startColor);//转换为rgb数组模式
let startR = startRGB[0];
let startG = startRGB[1];
let startB = startRGB[2];
let endRGB = _this.colorRgb(endColor);
let endR = endRGB[0];
let endG = endRGB[1];
let endB = endRGB[2];
let endRGB = _this.colorRgb(endColor);
let endR = endRGB[0];
let endG = endRGB[1];
let endB = endRGB[2];
let sR = (endR - startR) / step;//总差值
let sG = (endG - startG) / step;
let sB = (endB - startB) / step;
let sR = (endR - startR) / step;//总差值
let sG = (endG - startG) / step;
let sB = (endB - startB) / step;
var colorArr = [];
for (var i = 0; i < step; i++) {
//计算每一步的hex值
var hex = _this.colorHex('rgb('+ parseInt((sR * i + startR))+ ',' + parseInt((sG * i + startG))+ ',' + parseInt((sB * i + startB)) + ')');
colorArr.push(hex);
//计算每一步的hex值
var hex = _this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')');
colorArr.push(hex);
}
return colorArr;
}
integrity(width){
}
integrity(width) {
let _this = this
let style:any = {}
style.width = width +'%';
if(width < 30){
let style: any = {}
style.width = width + '%';
if (width < 30) {
let colorArr = this.gradientColor('#D50000', '#E53935', 30);
for(let i = 0; i < 30; i++){
if( i == width){
for (let i = 0; i < 30; i++) {
if (i == width) {
style.background = colorArr[i]
}
}
}
if(width >= 30 && width < 60){
if (width >= 30 && width < 60) {
let colorArr = this.gradientColor('#FF9800', '#E65100', 30);
for(let i = 30; i < 60; i++){
if( i == width){
style.background = colorArr[i-30]
for (let i = 30; i < 60; i++) {
if (i == width) {
style.background = colorArr[i - 30]
}
}
}
if(width >= 60){
if (width >= 60) {
let colorArr = this.gradientColor('#81C784', '#2E7D32', 41);
for(let i = 60; i <= 100; i++){
if( i == width){
style.background = colorArr[i-60]
for (let i = 60; i <= 100; i++) {
if (i == width) {
style.background = colorArr[i - 60]
}
}
}
return style
}
integrityDetails(width,zong){
let style:any = {}
style.width = (width/zong)*100 +'%';
integrityDetails(width, zong) {
let style: any = {}
style.width = (width / zong) * 100 + '%';
return style
}
level
ngOnInit(): void {
if(window.matchMedia("(max-width: 1400px)").matches){
this.pcMore=false
this.padMore=true
this.pcfind=false
this.padjt=true
}else{
this.pcfind=true
this.pcMore=true
this.padMore=false
this.padjt=false
if (window.matchMedia("(max-width: 1400px)").matches) {
this.pcMore = false
this.padMore = true
this.pcfind = false
this.padjt = true
} else {
this.pcfind = true
this.pcMore = true
this.padMore = false
this.padjt = false
}
this.getunitdata();
this.getOrganizations();
this.getUnittype();
this.getAllPlanInfo();
this.level = sessionStorage.getItem("level");
if(this.level == "0"){//如果是总队
if (this.level == "0") {//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
{ name: "总队", value: "1" },
{ name: "支队", value: "2" },
{ name: "大队", value: "4" },
{ name: "中队", value: "8" }
]
}
if(this.level == "1"){//如果是支队
if (this.level == "1") {//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
{ name: "支队", value: "2" },
{ name: "大队", value: "4" },
{ name: "中队", value: "8" }
]
}
if(this.level == "2"){//如果是大队
if (this.level == "2") {//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
{ name: "大队", value: "4" },
{ name: "中队", value: "8" }
]
}
if(this.level == "3"){//如果是中队
if (this.level == "3") {//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
{ name: "中队", value: "8" }
]
}
}
pcMore//pc更多
pcput=false//pc收起
pcput = false//pc收起
pcfind//pc查询
padjt=false
padMore=true//pad收缩控制
padput=false//pad收起按钮
imgsrcopen="../../../assets/images/routdown2.png"
imgsrcdown="../../../assets/images/routup2.png"
pcInfo(){
this.pcMore=!this.pcMore
this.pcput=!this.pcput
padjt = false
padMore = true//pad收缩控制
padput = false//pad收起按钮
imgsrcopen = "../../../assets/images/routdown2.png"
imgsrcdown = "../../../assets/images/routup2.png"
pcInfo() {
this.pcMore = !this.pcMore
this.pcput = !this.pcput
}
padInfo(){
this.padMore=!this.padMore
this.padput=!this.padput
padInfo() {
this.padMore = !this.padMore
this.padput = !this.padput
}
//得到当前单位信息
getunitdata(){
getunitdata() {
this.http.get("/api/Account/Profiles").subscribe(
(data:any)=>{
this.organizationName = data.organizationName
(data: any) => {
this.organizationName = data.organizationName
}
)
}
treedata:any //组织机构树型数据
newArr:any = []
newallorganizations:any //用于存储在原始数据基础上的每个机构增加children字段
treedata: any //组织机构树型数据
newArr: any = []
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
//得到当前单位所在组织机构的tree型数据
getpresentOrganization(){
getpresentOrganization() {
this.newallorganizations = this.allorganizations
this.newallorganizations.forEach(item => {
item.children = []
this.newallorganizations.forEach(element => {
if(element.parentId == item.id){
if (element.parentId == item.id) {
item.children.push(element)
}
});
});
this.http.get("/api/Account/Profiles").subscribe(
(data:any)=>{
(data: any) => {
this.organizationName = data.organizationName
if(this.organizationName){
if (this.organizationName) {
this.newallorganizations.forEach(item => {
if(item.name == this.organizationName){
if (item.name == this.organizationName) {
this.dataSource.data = [item]
}
});
}else{
} else {
this.dataSource.data = this.tree.toTree(this.treedata);
}
}
@ -273,9 +273,9 @@ export class EntryPlanComponent implements OnInit {
}
//获得所有组织机构
getOrganizations(){
getOrganizations() {
this.http.get('/api/Organizations').subscribe(
(data:any)=>{
(data: any) => {
this.allorganizations = data
this.treedata = this.tree.toTree(data);
this.getpresentOrganization();
@ -283,21 +283,21 @@ export class EntryPlanComponent implements OnInit {
)
}
//获得所有单位类型
getUnittype(){
getUnittype() {
this.http.get('/api/BuildingTypes/Simple').subscribe(
data=>{
data => {
this.allunittype = data
}
)
}
//分页事件
chagePage(e){
this.PageNumber = e.pageIndex+1
chagePage(e) {
this.PageNumber = e.pageIndex + 1
this.getAllPlanInfo();
}
//辖区中队div是否显示
isorganizationbox:boolean = false
isorganizationbox: boolean = false
//点击辖区中队树,将选择的辖区中队添加到变量
add(node) {
this.isorganizationbox = false
@ -309,36 +309,42 @@ export class EntryPlanComponent implements OnInit {
this.isorganizationbox = true
}
//关闭出现的组织机构div
closediv(){
closediv() {
this.isorganizationbox = false
}
allPlanInfo:any //存储所有预案信息
allPlanInfo: any //存储所有预案信息
//获得所有预案信息
getAllPlanInfo(){
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){
if (this.reservePlanType && this.reservePlanType.length != 0) {
reservePlanType = eval(this.reservePlanType.join("|"))
}
let paramsdata:any = {
let paramsdata: any = {
CompanyName: this.companyName || '',
OrganizationId: this.jsId || '',
HasChildrenOrganization:this.jscheck || '',
BuildingTypeId: this.unittype || '',
HasChildrenOrganization: this.jscheck || '',
BuildingTypeId: this.unittype || '',
PlanType: reservePlanType || '',
AuditStatus: this.toExamine || '',
PlanLevel: this.preparelevel || '',
PlanLevel: this.preparelevel || '',
HasChildrenPlanLevel: this.plcheck || '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
PageSize: this.pageSizeOptions[0],
Sort: this.integritySort ? 'integrityscore' : '',
SortType: this.integritySort || '',
HasPlanComponents:this.haveyuan||'',
PlanCategories:this.planCategory,
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
HasPlanComponents: this.haveyuan || '',
PlanCategories: this.planCategory,
IsNewData: this.IsNewData,
IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode
}
this.http.get("/api/Plans",{params:paramsdata}).subscribe((data:any)=>{
this.http.get("/api/Plans", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
this.allPlanInfo = data
@ -347,34 +353,34 @@ export class EntryPlanComponent implements OnInit {
})
}
operation=true
operation = true
//查看预案按钮跳转
routerTo(element){
this.level=='0'?this.operation=false:true
sessionStorage.setItem("companyName",element.company.name)
window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&orId=${element.company.organizationId}&unitType=${element.company.buildingTypes.length == 0 ? null :element.company.buildingTypes[0].name}&unitAdd=${element.company.address}&usci=${element.company.usci}`);
routerTo(element) {
this.level == '0' ? this.operation = false : true
sessionStorage.setItem("companyName", element.company.name)
window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null : element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&orId=${element.company.organizationId}&unitType=${element.company.buildingTypes.length == 0 ? null : element.company.buildingTypes[0].name}&unitAdd=${element.company.address}&usci=${element.company.usci}`);
}
//查询
onSubmit (value) {
onSubmit(value) {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
this.getAllPlanInfo()
}
companyName:any //单位名称
js:any //所选组织机构
jsId:any //所选组织机构的id
jscheck:boolean //所选组织机构勾选框
unittype:any //单位类型
reservePlanType:any //预案类型
toExamine:any //审核状态
preparelevel:any //编制级别
plcheck:boolean //编制级别勾选框
planCategory=[] //预案级别
companyName: any //单位名称
js: any //所选组织机构
jsId: any //所选组织机构的id
jscheck: boolean //所选组织机构勾选框
unittype: any //单位类型
reservePlanType: any //预案类型
toExamine: any //审核状态
preparelevel: any //编制级别
plcheck: boolean //编制级别勾选框
planCategory = [] //预案级别
//重置
reset(){
this.IsNewCompanyData=''
this.IsNewData=''
reset() {
this.IsNewCompanyData = ''
this.IsNewData = ''
this.companyName = ''
this.js = ''
this.jsId = ''
@ -385,12 +391,15 @@ export class EntryPlanComponent implements OnInit {
this.preparelevel = ''
this.integritySort = ''
this.plcheck = false
this.haveyuan=''
this.planCategory=[]
this.haveyuan = ''
this.planCategory = []
//重新获取初始化列表
// console.log(this.pageEvent)
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.templatePlan = false
this.customPlan = false
this.getAllPlanInfo();
}
}

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

@ -8,7 +8,7 @@
<input matInput placeholder="请输入单位名称" name="companyName" [(ngModel)]="companyName" autocomplete="off">
</mat-form-field>
</div>
<div class="queryField" >
<div class="queryField">
<label style="margin-right: 10px;">编制级别:</label>
<mat-form-field>
<mat-select [(ngModel)]="preparelevel" name="preparelevel" placeholder='请选择编制级别'>
@ -16,77 +16,84 @@
</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">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
<mat-option *ngFor="let unit of allunittype" [value]="unit.id">
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select [(ngModel)]="reservePlanType" name="reservePlanType" placeholder='请选择预案类型'>
<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>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案状态:</label>
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
</mat-form-field>
<div class="queryField" *ngIf="pcfind" >
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
<mat-form-field>
<mat-select [(ngModel)]="reservePlanType" name="reservePlanType" placeholder='请选择预案类型'>
<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>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案状态:</label>
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</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>
</div>
</div>
</form>
</div>
<!-- <mat-divider></mat-divider> -->
<div class="body">
</div>
<!-- <mat-divider></mat-divider> -->
<div class="body">
<div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
</td>
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
</td>
</ng-container>
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">{{element.companyName}}</td>
<ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">{{element.companyName}}</td>
</ng-container>
<ng-container matColumnDef="planname">
<th mat-header-cell *matHeaderCellDef>预案名称</th>
@ -114,30 +121,26 @@
</ng-container>
<ng-container matColumnDef="openRange">
<th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.openRange}}</td>
<th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.openRange}}</td>
</ng-container>
<ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel | planlevel}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="routerTo(element)" style="color: blue;cursor: pointer;">查看预案</span>
</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"
(page)="chagePage($event)">
</mat-paginator>
<ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element">
<span (click)="routerTo(element)" style="color: blue;cursor: pointer;">查看预案</span>
</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"
(page)="chagePage($event)">
</mat-paginator>
</div>
</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();
});
});

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

@ -43,9 +43,9 @@ export class OpenPlanComponent implements OnInit {
pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber: any; //第几页
IsNewData='' //维护更新活新增
IsNewData = '' //维护更新活新增
displayedColumns: string[] = ['state','unitname', 'planname', 'addpeople', 'addtime', 'plantype', 'auditStatus', 'weihuStatus','openRange', 'projectlevel', 'operation'];
displayedColumns: string[] = ['state', 'unitname', 'planname', 'addpeople', 'addtime', 'plantype', 'auditStatus', 'weihuStatus', 'openRange', 'projectlevel', 'operation'];
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
@ -115,8 +115,13 @@ export class OpenPlanComponent implements OnInit {
allPlanInfo: any //存储所有预案信息
//获得所有预案信息
IsNewCompanyData=''
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: '',
@ -129,8 +134,9 @@ export class OpenPlanComponent implements OnInit {
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
Sort: '',
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
IsNewData: this.IsNewData,
IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode
}
this.http.get("/api/PublicPlans", { params: paramsdata }).subscribe((data: any) => {
// console.log(111,data)
@ -292,9 +298,11 @@ export class OpenPlanComponent implements OnInit {
//重新获取初始化列表
this.pageEvent.pageIndex = 0
this.PageNumber = 1
this.templatePlan = false
this.customPlan = false
this.getAllPlanInfo();
this.IsNewCompanyData=''
this.IsNewData=''
this.IsNewCompanyData = ''
this.IsNewData = ''
}
}

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

@ -13,36 +13,38 @@
<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>
<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-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
<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-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
</button>
<li>{{node.name}}</li>
</mat-tree-node>
</mat-tree>
</div>
</div>
<div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">预案类型:</label>
@ -57,20 +59,22 @@
</div>
<div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id" >
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 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>
<label style="margin-right: 10px;">单位类型:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' [(ngModel)]="unittype" name="unittype">
<mat-option *ngFor="let unit of allunittype" [value]="unit.id">
{{unit.name}}
</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="pcMore" style="margin-left: 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" >
<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>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">编制级别:</label>
@ -85,123 +89,129 @@
<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-option value=6>应急预案(国家级)</mat-option>
<mat-option value=7>应急预案(市级)</mat-option>
<mat-option value=8>类型预案</mat-option>
<mat-option value=1>Ⅰ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option>
<mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option>
</mat-select>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true">
<mat-option value=6>应急预案(国家级)</mat-option>
<mat-option value=7>应急预案(市级)</mat-option>
<mat-option value=8>类型预案</mat-option>
<mat-option value=1>Ⅰ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option>
<mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> -->
<span style="margin-left: 15px;">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">单位状态:</label>
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-form-field>
<mat-select placeholder='请选择单位状态' [(ngModel)]="IsNewCompanyData" name="IsNewCompanyData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</mat-select>
</mat-form-field>
</div>
<div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">预案状态:</label>
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-form-field>
<mat-select placeholder='请选择预案状态' [(ngModel)]="IsNewData" name="IsNewData">
<mat-option value='true'>新增</mat-option>
<mat-option value="false">维护更新</mat-option>
</mat-select>
</mat-form-field>
</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>
<!-- <mat-divider></mat-divider> -->
<div class="body">
</div>
<!-- <mat-divider></mat-divider> -->
<div class="body">
<div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
</td>
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef style="width: 10%;">预案状态</th>
<td mat-cell *matCellDef="let element">
<span class="add" *ngIf="element.isNewData">新增</span>
<span class="weihu" *ngIf="!element.isNewData">维护更新</span>
</td>
</ng-container>
<ng-container matColumnDef="planname">
<th mat-header-cell *matHeaderCellDef>预案名称</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
<ng-container matColumnDef="planname">
<th mat-header-cell *matHeaderCellDef>预案名称</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
<ng-container matColumnDef="addpeople">
<th mat-header-cell *matHeaderCellDef>添加人</th>
<td mat-cell *matCellDef="let element">{{element.creatorName}}</td>
</ng-container>
<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>
</ng-container>
<ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th>
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.planType | plantype}}</td>
</ng-container>
<ng-container matColumnDef="auditStatus">
<th mat-header-cell *matHeaderCellDef>新增审核</th>
<td mat-cell *matCellDef="let element">{{element.newVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="weihuState">
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="addpeople">
<th mat-header-cell *matHeaderCellDef>添加人</th>
<td mat-cell *matCellDef="let element">{{element.creatorName}}</td>
</ng-container>
<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>
</ng-container>
<ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th>
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd'}}</td>
</ng-container>
<ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.planType | plantype}}</td>
</ng-container>
<ng-container matColumnDef="auditStatus">
<th mat-header-cell *matHeaderCellDef>新增审核</th>
<td mat-cell *matCellDef="let element">{{element.newVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="weihuState">
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="openRange">
<th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.openRange}}</td>
</ng-container>
<ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel | planlevel}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<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>
</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"
(page)="chagePage($event)">
</mat-paginator>
<ng-container matColumnDef="openRange">
<th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.openRange}}</td>
</ng-container>
<ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel | planlevel}}</td>
</ng-container>
<ng-container matColumnDef="operation">
<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>
</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"
(page)="chagePage($event)">
</mat-paginator>
</div>
</div>
</div>
</div>

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();
});
});

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

@ -44,11 +44,11 @@ export class PassPlanComponent implements OnInit {
pageSizeOptions: number[] = [10] //设置每页条数
PageNumber: any; //第几页
displayedColumns: string[] = ['state','planname', 'addpeople', 'level', 'addtime', 'plantype', 'auditStatus','weihuState', 'openRange', 'projectlevel', 'operation'];
displayedColumns: string[] = ['state', 'planname', 'addpeople', 'level', 'addtime', 'plantype', 'auditStatus', 'weihuState', 'openRange', 'projectlevel', 'operation'];
allorganizations: any //所有组织机构
allunittype: any //所有单位类型
tabledataSource: any //表格数据
IsNewData='' //维护更新活新增
IsNewData = '' //维护更新活新增
url
preparelevels: any
@ -116,9 +116,14 @@ export class PassPlanComponent implements OnInit {
}
allPlanInfo: any //存储所有预案信息
IsNewCompanyData='' //单位是新增还是维护更新
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) {
@ -139,8 +144,9 @@ export class PassPlanComponent implements OnInit {
PageSize: this.pageSizeOptions[0],
Sort: '',
PlanCategories: this.planCategory,
IsNewData:this.IsNewData,
IsNewCompanyData:this.IsNewCompanyData
IsNewData: this.IsNewData,
IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode
}
this.http.get("/api/ApprovedPlans", { params: paramsdata }).subscribe((data: any) => {
this.length = data.totalCount
@ -453,8 +459,8 @@ export class PassPlanComponent implements OnInit {
planCategory = []//预案级别
//重置
reset() {
this.IsNewData=''
this.IsNewCompanyData=''
this.IsNewData = ''
this.IsNewCompanyData = ''
this.companyName = ''
this.js = ''
this.jsId = ''
@ -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();
}
}

4
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>

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

@ -223,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 || '',

Loading…
Cancel
Save