diff --git a/src/app/plan-audit/plan-record/plan-record.component.scss b/src/app/plan-audit/plan-record/plan-record.component.scss
index 67d555f..14ee4bc 100644
--- a/src/app/plan-audit/plan-record/plan-record.component.scss
+++ b/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;}
\ No newline at end of file
+.blue{color: #2196F3;}
+
+//滚动条样式
+::-webkit-scrollbar{
+ width: 6px;
+ background-color: white;
+ }
+ ::-webkit-scrollbar-thumb{
+ background-color: #2196F3;
+ }
\ No newline at end of file
diff --git a/src/app/plan-audit/plan-record/plan-record.component.ts b/src/app/plan-audit/plan-record/plan-record.component.ts
index 9ed4c77..3fc1f35 100644
--- a/src/app/plan-audit/plan-record/plan-record.component.ts
+++ b/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()
+ }
}