|
|
|
@ -15,25 +15,50 @@ export class ExaminationDetailsComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
async ngOnInit(): Promise<void> { |
|
|
|
|
await this.getTestInfo() |
|
|
|
|
console.log(2) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
paperData:any//试卷信息
|
|
|
|
|
|
|
|
|
|
paperData:any //试卷信息
|
|
|
|
|
paperCompanyData:any = []; //考生具体考卷
|
|
|
|
|
selectPaper:any = {id:null}; //选择当前考卷
|
|
|
|
|
|
|
|
|
|
//获取考卷
|
|
|
|
|
async getTestInfo () { |
|
|
|
|
let id = this.route.snapshot.queryParams.paperId |
|
|
|
|
await new Promise((resolve, reject) => { |
|
|
|
|
this.http.get(`/api/Papers/${id}`).subscribe((data:any)=>{ |
|
|
|
|
console.log(data) |
|
|
|
|
this.paperData = data |
|
|
|
|
this.paperData.paperDataInfo.forEach(element => { |
|
|
|
|
element.adjoinData? element.adjoinData = JSON.parse(element.adjoinData) : null |
|
|
|
|
element.basicInfoData? element.basicInfoData = JSON.parse(element.basicInfoData) : null |
|
|
|
|
element.facilityData? element.facilityData = JSON.parse(element.facilityData) : null |
|
|
|
|
element.functionalDivisionData? element.functionalDivisionData = JSON.parse(element.functionalDivisionData) : null |
|
|
|
|
element.importLocationData? element.importLocationData = JSON.parse(element.importLocationData) : null |
|
|
|
|
}); |
|
|
|
|
this.paperCompanyData = JSON.parse( JSON.stringify(data.paperDataInfo) ) //具体考卷
|
|
|
|
|
this.selectPaper = this.paperCompanyData[0] || {id:null} //当前选择考卷
|
|
|
|
|
this.handlePaperData() |
|
|
|
|
resolve(1) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//处理考卷 数据格式
|
|
|
|
|
handlePaperData () { |
|
|
|
|
console.log(this.selectPaper) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//切换 选择考卷
|
|
|
|
|
togglePaper (e) { |
|
|
|
|
if (this.selectPaper.id != e.id) { |
|
|
|
|
this.selectPaper = e |
|
|
|
|
this.handlePaperData() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获得单位预案设定
|
|
|
|
|
getUnitPlans(){ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|