-
+
diff --git a/src/app/ui/learning-record-details/learning-record-details.component.scss b/src/app/ui/learning-record-details/learning-record-details.component.scss
index 5d92c75..cba0bf2 100644
--- a/src/app/ui/learning-record-details/learning-record-details.component.scss
+++ b/src/app/ui/learning-record-details/learning-record-details.component.scss
@@ -14,7 +14,10 @@
}
mat-form-field{
input{
- padding-left: 3px;
+ padding-left: 3px;
+ // width: 200px;
+ // height: 26px;
+ // line-height: 26px;
}
}
@@ -29,7 +32,7 @@
.listbox{
margin-top: 18px;
margin-left: 26%;
- height: 82%;
+ height: 84%;
overflow-y: auto;
.timeTitle{
font-weight: 800;
@@ -40,4 +43,8 @@
font-size: 16px;
line-height: 30px;
}
+}
+.mat-paginator {
+ background-color: hsla(0,0%,100%,0);
+ padding-right: 10%;
}
\ No newline at end of file
diff --git a/src/app/ui/learning-record-details/learning-record-details.component.ts b/src/app/ui/learning-record-details/learning-record-details.component.ts
index 5b04c6c..7b7471d 100644
--- a/src/app/ui/learning-record-details/learning-record-details.component.ts
+++ b/src/app/ui/learning-record-details/learning-record-details.component.ts
@@ -26,7 +26,7 @@ export class LearningRecordDetailsComponent implements OnInit {
PageNumber:any = 1//当前页数
id:any = this.route.snapshot.queryParams.id//身份证
-
+ PostName:any = this.route.snapshot.queryParams.PostName.replace(/-/g,'/')//传过来的职务名称
recordList:any//渲染的100条列表
oneMonthDate:number = 30*24*60*60*1000; //一个月的时间戳
@@ -42,6 +42,7 @@ export class LearningRecordDetailsComponent implements OnInit {
pageNumber:number = 1; //第几页
ngOnInit(): void {
+ console.log(this.PostName)
this.adapter.setLocale('CH');
let nowdate = new Date().toLocaleDateString() //本月日期 2020/07/11 形式
@@ -91,8 +92,30 @@ export class LearningRecordDetailsComponent implements OnInit {
return year+'-'+month+'-'+ day + " "+ hour +':'+ min +':'+ seconds;
}
- //获得所有学习记录
+ //初始获得所有学习记录
getAllStudyRecords(){
+ let date:any = new Date()
+ let data = {
+ Name : this.id,
+ Catalog : this.Catalog || "",
+ PageNumber : this.PageNumber,
+ PageSize:"100",
+ PostName:""
+ }
+ this.http.get("/api/StudyRecords",{params:data}).subscribe((data:any) => {
+ this.recordList = data.items
+ this.recordList.forEach((item) => {
+ item.time = item.creationTime.substring(0,10)
+ item.time2 = item.creationTime.substring(11,16)
+ })
+ this.length = data.totalCount
+ this.pageSize = data.pageSize
+ this.pageEvent.pageIndex = 0
+ })
+ }
+
+ //带查询时间获得所有学习记录
+ getAllStudyRecords2(){
let date:any = new Date()
let data = {
Name : this.id,
@@ -114,6 +137,7 @@ export class LearningRecordDetailsComponent implements OnInit {
})
}
+ //
//查询
onSubmit(){
if(this.startdate.value > this.enddate.value){
@@ -130,7 +154,7 @@ export class LearningRecordDetailsComponent implements OnInit {
}
this.startTime = this.getTIme(this.startdate.value)
this.endTime = this.getTIme(this.enddate.value)
- this.getAllStudyRecords()
+ this.getAllStudyRecords2()
}
//重置
reset(){
diff --git a/src/styles.scss b/src/styles.scss
index 43476c1..bef4481 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -83,3 +83,7 @@ table td.mat-footer-cell:last-of-type{
width: 210px;
font-size: 13px!important;
}
+
+.mat-drawer-container{
+ background-color: none;
+}
\ No newline at end of file