Browse Source

[修改]各级预案查询条件修改

dev
chenjingyu 4 years ago
parent
commit
599bea074e
  1. 48
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html
  2. 49
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  3. 9
      src/app/plan-management/type-plan/newunit.html
  4. 21
      src/app/plan-management/type-plan/newunit.scss
  5. 1
      src/app/plan-management/type-plan/type-plan.component.html
  6. 9
      src/app/plan-management/type-plan/type-plan.component.ts

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

@ -4,11 +4,11 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 14:15:10 * @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 10:37:08 * @LastEditTime: 2021-01-08 09:47:51
--> -->
<div style="height: 100%;overflow-y: auto;"> <div style="height: 100%;overflow-y: auto;">
<div class="header" > <div class="header" >
<form > <form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="queryBox"> <div class="queryBox">
<div class="queryField"> <div class="queryField">
@ -19,35 +19,32 @@
</div> </div>
<div class="queryField">
<label style="margin-right: 10px;">预案级别:</label>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="level">
<mat-option value="1">Ⅰ级</mat-option>
<mat-option value="2">Ⅱ级</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">添加人:</label> <label style="margin-right: 10px;">添加人:</label>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="companyName" autocomplete="off" [(ngModel)]="addname"> <input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">添加时间:</label> <label style="margin-right: 10px;">添加时间:</label>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime"> <input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field> </mat-form-field>
🠊 🠊
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input type="date" matInput autocomplete="off" > <input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field> </mat-form-field>
</div> </div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">预案类型:</label> <label style="margin-right: 10px;">预案类型:</label>
<mat-form-field class="example-full-width"> <mat-form-field>
<input matInput placeholder="请输入预案类型" name="companyName" autocomplete="off" [(ngModel)]="unittype"> <mat-select name="reservePlanType" [(ngModel)]="reservePlanType" 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> </mat-form-field>
</div> </div>
<div class="queryField"> <div class="queryField">
@ -86,12 +83,13 @@
<div class="newadd"> <div class="newadd">
<button mat-raised-button color="primary" (click)="addunit()"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button> <button mat-raised-button color="primary" (click)="addunit()"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div> </div>
<div class="body"> <div class="body">
<div class="tablebox"> <div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> <table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="unitname"> <ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>预案名称</th> <th mat-header-cell *matHeaderCellDef>预案名称</th>
<td mat-cell *matCellDef="let element">{{element.unitname}}</td> <td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="level"> <ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef>预案级别</th> <th mat-header-cell *matHeaderCellDef>预案级别</th>
@ -99,33 +97,35 @@
</ng-container> </ng-container>
<ng-container matColumnDef="addname"> <ng-container matColumnDef="addname">
<th mat-header-cell *matHeaderCellDef>添加人</th> <th mat-header-cell *matHeaderCellDef>添加人</th>
<td mat-cell *matCellDef="let element">{{element.addname}}</td> <td mat-cell *matCellDef="let element">{{element.creatorName}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="addtime"> <ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th> <th mat-header-cell *matHeaderCellDef>添加时间</th>
<td mat-cell *matCellDef="let element">{{element.addtime}}</td> <td mat-cell *matCellDef="let element">{{element.creationTime|date:'yyyy-MM-dd'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="plantype"> <ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef>预案类型</th> <th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">{{element.plantype}}</td> <td mat-cell *matCellDef="let element">{{element.planType=='1'?'二维预案':element.planType=='2'?'三维预案':element.planType=='4'?'其他预案':'卡片预案'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="passstate"> <ng-container matColumnDef="passstate">
<th mat-header-cell *matHeaderCellDef>审核状态</th> <th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">{{element.passstate}}</td> <td mat-cell *matCellDef="let element">{{element.auditStatus=='8'?'未提交审核':element.auditStatus=='1'?'审核中':element.auditStatus=='2'?'审核通过':'审核退回'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="isopen"> <ng-container matColumnDef="isopen">
<th mat-header-cell *matHeaderCellDef>是否公开</th> <th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.isopen}}</td> <td mat-cell *matCellDef="let element">{{element.openRange}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="projectlevel"> <ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th> <th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.projectlevel}}</td> <td mat-cell *matCellDef="let element">{{element.planLevel=='0'?'总队':element.planLevel=='1'?'支队':element.planLevel=='2'?'大队':'中队'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element" style="white-space: nowrap;">
<span (click)='routerTo(element)' style="color: blue;">查看预案</span> <span (click)='routerTo(element)' style="color: blue;">查看预案</span>
<span style="color: blue;"> 下载</span>
<span style="color: red;"> 删除</span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 14:15:10 * @Date: 2020-12-24 14:15:10
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 10:39:07 * @LastEditTime: 2021-01-08 09:48:06
*/ */
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
@ -19,20 +19,7 @@ import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { TreeService } from '../../http-interceptors/tree.service' import { TreeService } from '../../http-interceptors/tree.service'
import { ConstantPool } from '@angular/compiler'; import { ConstantPool } from '@angular/compiler';
import { MatTableDataSource } from '@angular/material/table'; import { MatTableDataSource } from '@angular/material/table';
export interface PeriodicElement {
unitname: string;
level: string;
addname: string;
addtime: string;
unittype: string;
unitstate: string;
isopen: string;
projectlevel: string;
}
const ELEMENT_DATA=[
{unitname:"抗洪抢险救援应急救援预案",level:"Ⅰ级",addname:"张三",addtime:"2020-12-16",plantype:"洪涝",passstate:"审核通过",isopen:"未公开",projectlevel:"总队"},
{unitname:"泥石流应急救援预案",level:"Ⅰ级",addname:"韩信",addtime:"2020-12-16",plantype:"泥石流",passstate:"审核中",isopen:"未公开",projectlevel:"支队"}
]
@Component({ @Component({
selector: 'app-onetwo-entry-plan', selector: 'app-onetwo-entry-plan',
@ -72,18 +59,20 @@ export class OnetwoEntryPlanComponent implements OnInit {
] ]
} }
this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length) this.url=window.location.href.substring(window.location.href.length-1,window.location.href.length)
this.getAlltabledate()
} }
url url
preparelevels:any preparelevels:any
plcheck:boolean //编制级别勾选框 plcheck:boolean //编制级别勾选框
displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation']; displayedColumns: string[] = ['unitname','level','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation'];
tabledataSource=ELEMENT_DATA tabledataSource
unitname//预案名称 unitname//预案名称
level//预案级别 level//预案级别
addname//添加人 addname//添加人
addtime//添加时间 addtime//添加时间
unittype//预案类型 endtime//结束时间
reservePlanType//预案类型
unitstate//审核状态 unitstate//审核状态
projectlevel//编制级别 projectlevel//编制级别
//分页 //分页
@ -112,17 +101,41 @@ export class OnetwoEntryPlanComponent implements OnInit {
}) })
} }
//获取表格数据
getAlltabledate(){
let paramsdata:any = {
PlanCategory:this.url=='2'?2:1,
PlanType:this.projectlevel||'',
AuditStatus:this.unitstate|| '',
PageNumber: this.PageNumber || '1',
PageSize: this.pageSizeOptions[0],
}
this.http.get("/api/PlanComponentsMajor",{params:paramsdata}).subscribe((data:any)=>{
this.length = data.totalCount
this.tabledataSource = data.items
console.log(this.tabledataSource)
})
}
//重置 //重置
reset(){ reset(){
this.unitname='' this.unitname=''
this.level='' this.level=''
this.addname='' this.addname=''
this.addtime='' this.addtime=''
this.unittype='' //this.unittype=''
this.unitstate='' this.unitstate=''
this.projectlevel='' this.projectlevel=''
} }
//查询
onSubmit (value) {
this.PageNumber = 1
this.pageEvent.pageIndex = 0
this.getAlltabledate();
}
//新增预案弹窗 //新增预案弹窗
addunit(){ addunit(){
const dialogRef = this.dialog.open(newunitComponent, { const dialogRef = this.dialog.open(newunitComponent, {

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-24 16:26:16 * @Date: 2020-12-24 16:26:16
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 10:15:18 * @LastEditTime: 2021-01-06 15:16:50
--> -->
<div class="box"> <div class="box">
<div class="top"> <div class="top">
@ -18,7 +18,12 @@
</div> </div>
<div class="queryField"> <div class="queryField">
<label style="margin-right: 10px;">上传本地文件:</label> <label style="margin-right: 10px;">上传本地文件:</label>
<button mat-raised-button color="primary" ><img style="margin-bottom: 2px;" src="../../../assets/images/bendi.png"> 本地文件</button> <button mat-raised-button color="primary" (click)='upload()' ><img style="margin-bottom: 2px;margin-right: 2px;" src="../../../assets/images/bendi.png">本地文件</button>
<input type="file" id="up" style="display: none;" (change)='upchange($event)'>
<!-- <span class="fileinput-button mat-raised-button">
<img style="position: relative;top: 2px;right: 2px;" src="../../../assets/images/bendi.png"><span>本地文件</span>
<input type="file">
</span> -->
</div> </div>
<div class="bottom"> <div class="bottom">
<button mat-raised-button color="primary">确定</button> <button mat-raised-button color="primary">确定</button>

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

@ -32,4 +32,23 @@
height: 36px; height: 36px;
font-size: 16px; font-size: 16px;
} }
} }
.fileinput-button {
width: 148px;
height: 36px;
top: 10px;
position: relative;
display: inline-block;
overflow: hidden;
background-color: #2196F3;
color: #FFFFFF;
font-size: 16px;
}
.fileinput-button input{
position: absolute;
right: 0px;
top: 0px;
opacity: 0;
-ms-filter: 'alpha(opacity=0)';
}

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

@ -63,6 +63,7 @@
<div class="newadd"> <div class="newadd">
<button mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button> <button mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div> </div>
<div class="body"> <div class="body">
<div class="tablebox"> <div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8"> <table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">

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

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2021-01-06 09:47:43 * @Date: 2021-01-06 09:47:43
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-06 10:27:09 * @LastEditTime: 2021-01-06 15:12:30
*/ */
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
@ -115,4 +115,11 @@ export class newunitType{
close(){ close(){
this.dialogRef.close(); this.dialogRef.close();
} }
//上传
upload(){
document.getElementById('up').click()
}
upchange(e){
console.log(e)
}
} }

Loading…
Cancel
Save