Browse Source

[完善]完善考生获取试卷信息顺序

master
邵佳豪 4 years ago
parent
commit
a468b08346
  1. 4
      src/app/student/examination-details/examination-details.component.html
  2. 21
      src/app/student/examination-details/examination-details.component.ts

4
src/app/student/examination-details/examination-details.component.html

@ -7,7 +7,9 @@
<div class="centerLeft" style="background: #F5FDFE;"><div>单位名称</div><div>总分</div></div>
<div class="centerLeft"><div>单位名称</div><div>总分</div></div>
</div>
<div class="right"></div>
<div class="right">
</div>
</div>
</div>

21
src/app/student/examination-details/examination-details.component.ts

@ -13,16 +13,27 @@ export class ExaminationDetailsComponent implements OnInit {
constructor(public http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public route:ActivatedRoute) { }
ngOnInit(): void {
this.getTestInfo()
async ngOnInit(): Promise<void> {
await this.getTestInfo()
console.log(2)
}
paperData:any//试卷信息
//获取考卷
getTestInfo () {
async getTestInfo () {
let id = this.route.snapshot.queryParams.paperId
this.http.get(`/api/Papers/${id}`).subscribe((data:any)=>{
console.log(data)
await new Promise((resolve, reject) => {
this.http.get(`/api/Papers/${id}`).subscribe((data:any)=>{
console.log(data)
this.paperData = data
resolve(1)
})
})
}
//获得单位预案设定
getUnitPlans(){
}
}

Loading…
Cancel
Save