Browse Source

[新建]审核记录功能真实数据

dev
chenjingyu 4 years ago
parent
commit
6f44bd6882
  1. 95
      src/app/plan-audit/plan-record/plan-record.component.html
  2. 25
      src/app/plan-audit/plan-record/plan-record.component.scss
  3. 98
      src/app/plan-audit/plan-record/plan-record.component.ts

95
src/app/plan-audit/plan-record/plan-record.component.html

@ -4,46 +4,65 @@
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-25 15:31:29
* @LastEditTime: 2021-01-21 10:12:20
-->
<div class="box">
<div class="boxleft">
<div class="lefthead">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="headdiv" style="margin-top: 30px;">
<span>操作类型:</span>
<input type="radio" name="level"><span>全部</span>
<input type="radio" name="level" style="margin-left: 50px;"><span>更新</span>
<input type="radio" name="level" style="margin-left: 50px;"><span>新增</span>
<input type="radio" name="level" style="margin-left: 50px;"><span>删除</span>
<span style="margin-left: 100px;">共计:80</span>
<span>操作类型:</span>
<input type="radio" name="level" value="" [(ngModel)]="level"><span>全部</span>
<input type="radio" name="level" style="margin-left: 50px;" value="1" [(ngModel)]="level"><span>更新</span>
<input type="radio" name="level" style="margin-left: 50px;" value="0" [(ngModel)]="level"><span>新增</span>
<input type="radio" name="level" style="margin-left: 50px;" value="2" [(ngModel)]="level"><span>删除</span>
<span style="margin-left: 100px;">共计:{{count}}</span>
</div>
<div class="headdiv">
<span>审核状态:</span>
<input type="radio" name="passstate"><span>全部</span>
<input type="radio" name="passstate" style="margin-left: 50px;"><span>已通过</span>
<input type="radio" name="passstate" style="margin-left: 50px;"><span>已拒绝</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value=""><span>全部</span>
<input type="radio" name="passstate" style="margin-left: 50px;" [(ngModel)]="verifyState" value="1"><span>初审通过</span>
<input type="radio" name="passstate" style="margin-left: 50px;" [(ngModel)]="verifyState" value="2"><span>初审驳回</span>
<input type="radio" name="passstate" style="margin-left: 50px;" [(ngModel)]="verifyState" value="4"><span>终审通过</span>
<input type="radio" name="passstate" style="margin-left: 50px;" [(ngModel)]="verifyState" value="5"><span>终审驳回</span>
</div>
<div class="headthree">
<span>类型:</span>
<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>
<span style="margin-left: 30px;">所属组织:</span>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<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-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option>
</mat-select>
</mat-form-field>
<span style="margin-left: 30px;">编制级别:</span>
<mat-form-field>
<mat-select placeholder='请选择组织机构' name="js" [(ngModel)]="js">
<mat-option value="1">Ⅰ级</mat-option>
<mat-option value="2">Ⅱ级</mat-option>
</mat-select>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="PlanLevel">
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
<span style="margin-left: 30px;">时间:</span>
</div>
<div class="headfour">
<span style="margin-left: 30px;">时间:</span>
<mat-form-field class="example-full-width">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
<span style="margin-left: 10px;">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
<button mat-raised-button color="primary" style="margin-left: 40px;" type="submit" >查询</button>
<button mat-raised-button color="primary" style="margin-left: 20px;" (click)='record()'><img src="../../../assets/images/refresh.png" > 刷新</button>
</div>
<div class="tablediv">
</form>
<!-- <div class="tablediv">
<table cellspacing="0" cellpadding="0">
<thead>
<th style="width: 15%;">类型</th>
@ -64,7 +83,37 @@
</tr>
</tbody>
</table>
</div>
</div> -->
<div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<thead>
<th style="width: 15%;">类型</th>
<th style="width: 15%;">操作</th>
<th style="width: 15%;">所属组织</th>
<th style="width: 15%;">审核状态</th>
<th style="width: 15%;">提交人</th>
<th style="width: 25%;">提交时间</th>
</thead>
</table>
<div class="tbodycss" id="tbodydiv" >
<table cellspacing="0" cellpadding="0" id="table" >
<tr *ngFor="let item of tableDate;let key = index" >
<td style="width: 15%;">
<!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> -->
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':'消防车辆'}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.operation == '1','red':item.operation == '2','blue':item.operation == '0'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 15%;">{{item.verifyOrganizationName}}</td>
<td style="width: 15%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}</td>
<td style="width: 15%;">{{item.creatorName}}</td>
<td style="width: 25%;">{{item.createTime|date:'yyyy-MM-dd'}}</td>
</tr>
</table>
</div>
</div>
</div>
</div>

25
src/app/plan-audit/plan-record/plan-record.component.scss

@ -32,10 +32,17 @@
}
}
.tablediv{
width: 95%;
table{
margin: 20px 20px;
width: 100%;
height: 70%;
.tbodycss{
overflow-y: auto;
height: 600px;
width: 100%;
}
table{
//margin: 20px 20px;
margin-left: 20px;
width: 97%;
//border: 1px solid #2196F3;
thead{
@ -45,6 +52,7 @@
font-size: 16px;
}
tr:nth-child(odd){
background: #FAFAFA;
}
@ -65,4 +73,13 @@ th,td{
}
.green{color: #00C756;}
.red{color: #FF4D4D;}
.blue{color: #2196F3;}
.blue{color: #2196F3;}
//滚动条样式
::-webkit-scrollbar{
width: 6px;
background-color: white;
}
::-webkit-scrollbar-thumb{
background-color: #2196F3;
}

98
src/app/plan-audit/plan-record/plan-record.component.ts

@ -4,10 +4,12 @@
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2020-12-25 14:53:46
* @LastEditTime: 2021-01-21 10:15:50
*/
import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { HttpClient } from '@angular/common/http'
@Component({
selector: 'app-plan-record',
@ -16,18 +18,96 @@ import { FormControl } from '@angular/forms';
})
export class PlanRecordComponent implements OnInit {
constructor() { }
constructor(private http:HttpClient,public snackBar: MatSnackBar) { }
ngOnInit(): void {
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
this.PlanLevel=0
}
if(level == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"1"},
{name:"大队",value:"2"},
{name:"中队",value:"3"}
]
this.PlanLevel=1
}
if(level == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
this.PlanLevel=2
}
if(level == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
this.PlanLevel=3
}
this.getAlltabledate()
}
selected = new FormControl(0); //选项卡 实例
level//类型
js//组织机构
preparelevels:any
level=''//类型
verifyState=''//审核状态
projectlevel//组织机构
PlanLevel//编制级别
addtime//时间
tableDate=[
{level:"Ⅰ级预案",option:"更新",orgication:"浦东支队",unitstate:"已通过",addname:"赵信",addtime:"2020-12-15 10:36:24"},
{level:"消火栓",option:"新增",orgication:"闵行支队",unitstate:"已拒绝",addname:"张三",addtime:"2020-12-15 10:36:24"},
{level:"天然取水点",option:"删除",orgication:"上海总队",unitstate:"已拒绝",addname:"王五",addtime:"2020-12-15 10:36:24"}
]
endtime//结束时间
count//一共多少条
tableDate
//获取表格数据
getAlltabledate(){
let paramsdata:any = {
Operation:this.level||[],
ContentType:Number(this.projectlevel)||[],
Level:this.PlanLevel||[],
verifyState:this.verifyState||[1,2,4,5],
QueryStartTime:this.addtime||'',
QueryEndTime:this.endtime||''
}
this.http.get("/api/ContentVerifies",{params:paramsdata}).subscribe((data:any)=>{
//console.log(data)
this.tableDate=data.items
this.count=data.totalCount
})
}
//提交查询
onSubmit(value){
//console.log(value)
this.getAlltabledate()
}
//刷新
record(){
this.verifyState=''
this.level=''
this.projectlevel=''
this.addtime=''
this.endtime=''
let level = sessionStorage.getItem("level");
if(level == "0"){//如果是总队
this.PlanLevel=0
}
if(level == "1"){//如果是支队
this.PlanLevel=1
}
if(level == "2"){//如果是大队
this.PlanLevel=2
}
if(level == "3"){//如果是中队
this.PlanLevel=3
}
this.getAlltabledate()
}
}

Loading…
Cancel
Save