From 5ad29edcc40e0316705869e0b00b0364cfaa0b93 Mon Sep 17 00:00:00 2001 From: 13562321995 <13562321995@163.com> Date: Fri, 8 Apr 2022 14:44:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=8E=B7=E5=8F=96=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E5=88=86=E6=95=B0BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mark-papers-two/mark-papers-two.component.ts | 9 ++++++++- src/app/examiner/review-files/review-files.component.ts | 8 ++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/app/examiner/mark-papers-two/mark-papers-two.component.ts b/src/app/examiner/mark-papers-two/mark-papers-two.component.ts index 096e188..08dd207 100644 --- a/src/app/examiner/mark-papers-two/mark-papers-two.component.ts +++ b/src/app/examiner/mark-papers-two/mark-papers-two.component.ts @@ -32,6 +32,14 @@ export class MarkPapersTwoComponent implements OnInit { this.getname=param.name }); this.getAlltabledate() + + //监听 此HTML标签焦点事件 + document.addEventListener('visibilitychange', ()=>{ + let isHidden = document.hidden + if (!isHidden) { + this.getAlltabledate() + } + }) } headtext @@ -58,7 +66,6 @@ export class MarkPapersTwoComponent implements OnInit { SortType: null, } this.http.get("/api/Examinations",{params:paramsdata}).subscribe((data:any)=>{ - console.log(data.items) this.dataSource=data.items this.length=data.totalCount }) diff --git a/src/app/examiner/review-files/review-files.component.ts b/src/app/examiner/review-files/review-files.component.ts index 2c15f82..89f5e72 100644 --- a/src/app/examiner/review-files/review-files.component.ts +++ b/src/app/examiner/review-files/review-files.component.ts @@ -17,6 +17,14 @@ export class ReviewFilesComponent implements OnInit { this.paperType = this.route.snapshot.queryParams.paperType || 1 await this.getTest() this.getUnitPlans()//将试卷的预案考题放进数据中 + + //监听 此HTML标签焦点事件 + document.addEventListener('visibilitychange', ()=>{ + let isHidden = document.hidden + if (!isHidden) { + this.getUnitPlans(false) + } + }) } paperType:any = 1; //阅卷/查看