|
|
|
@ -29,13 +29,11 @@ export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
pattern: any = this.route.snapshot.queryParams.pattern || '' |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.route.snapshot.queryParams.pattern){ |
|
|
|
|
if (this.route.snapshot.queryParams.status == 0) { |
|
|
|
|
//已创建完成未开考
|
|
|
|
|
this.getSoloPaper() |
|
|
|
|
} else { |
|
|
|
|
console.log('this.unitId',this.unitId) |
|
|
|
|
this.unitId = JSON.parse(sessionStorage.getItem(sessionStorage.getItem('paperId'))) |
|
|
|
|
for (let y = 0, length = this.unitId.length; y < length; y++) { |
|
|
|
|
let element = this.unitId[y] |
|
|
|
@ -70,6 +68,11 @@ export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
this.planItemScore() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if (this.route.snapshot.queryParams.pattern) { |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -80,11 +83,15 @@ export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
this.http.get(`/api/Papers/${sessionStorage.getItem('paperId')}`).subscribe((data: any) => { |
|
|
|
|
this.editdata = data |
|
|
|
|
console.log('试卷信息', this.editdata) |
|
|
|
|
if (data.paperDataInfo) { |
|
|
|
|
data.paperDataInfo.forEach(item => { |
|
|
|
|
this.unitId.push(JSON.parse(item.originalData)) |
|
|
|
|
}) |
|
|
|
|
// console.log('试卷信息',this.unitId)
|
|
|
|
|
this.planItemScore() |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -95,10 +102,12 @@ export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
for (let y = 0, length = this.unitId.length; y < length; y++) { |
|
|
|
|
let element = this.unitId[y] |
|
|
|
|
await new Promise((resolve, reject) => { |
|
|
|
|
this.http.get('/api/PaperPlans',{params:{ |
|
|
|
|
this.http.get('/api/PaperPlans', { |
|
|
|
|
params: { |
|
|
|
|
paperId: sessionStorage.getItem('paperId'), |
|
|
|
|
companyId: element.id |
|
|
|
|
}}).subscribe(data => { |
|
|
|
|
} |
|
|
|
|
}).subscribe(data => { |
|
|
|
|
console.log('当前试卷的预案列表', data) |
|
|
|
|
element.planList = data |
|
|
|
|
resolve(1) |
|
|
|
@ -553,9 +562,11 @@ export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
//获取各建筑消防设施
|
|
|
|
|
this.http.get('/api/Buildings',{params:{ |
|
|
|
|
this.http.get('/api/Buildings', { |
|
|
|
|
params: { |
|
|
|
|
companyId: companyId |
|
|
|
|
}}).subscribe((data:any)=>{ |
|
|
|
|
} |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
if (data.length != 0) { getAllBuildingFireFac(data) } |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -1267,9 +1278,11 @@ export class CreateTestScoreComponent implements OnInit {
|
|
|
|
|
for (let i = 0; i < element.planList.length; i++) { |
|
|
|
|
await new Promise((resolve, reject) => { |
|
|
|
|
const item = element.planList[i]; |
|
|
|
|
_this.http.put(`/api/PaperPlans/ModifyScore/${item.id}`,'',{params:{ |
|
|
|
|
_this.http.put(`/api/PaperPlans/ModifyScore/${item.id}`, '', { |
|
|
|
|
params: { |
|
|
|
|
score: item.score |
|
|
|
|
}}).subscribe(((data) => { |
|
|
|
|
} |
|
|
|
|
}).subscribe(((data) => { |
|
|
|
|
resolve(i) |
|
|
|
|
console.log('修改分数成功' + i, item.score) |
|
|
|
|
})) |
|
|
|
@ -1379,9 +1392,11 @@ export class AddPlanTwoDialog {
|
|
|
|
|
//获取当前公司的二维预案
|
|
|
|
|
get2DPlan() { |
|
|
|
|
let planArr = [] |
|
|
|
|
this.http.get('/api/PlanComponents',{params:{ |
|
|
|
|
this.http.get('/api/PlanComponents', { |
|
|
|
|
params: { |
|
|
|
|
companyId: this.data.companyData.companyData.id |
|
|
|
|
}}).subscribe((data:any) => { |
|
|
|
|
} |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
data.items.forEach(item => { |
|
|
|
|
//二维预案并且审核通过
|
|
|
|
|
(item.planType == 1 && item.auditStatus == 2) ? planArr.push(item) : null |
|
|
|
@ -1458,9 +1473,11 @@ export class AddPlanTwoDialog {
|
|
|
|
|
url: null, |
|
|
|
|
attachmentUrls: null |
|
|
|
|
} |
|
|
|
|
this.http.post("/api/ExamPlanComponents2D",body,{params:{ |
|
|
|
|
this.http.post("/api/ExamPlanComponents2D", body, { |
|
|
|
|
params: { |
|
|
|
|
companyId: this.data.companyData.companyData.id |
|
|
|
|
}}).subscribe((data:any)=>{ |
|
|
|
|
} |
|
|
|
|
}).subscribe((data: any) => { |
|
|
|
|
console.log("创建自定义二维成功") |
|
|
|
|
|
|
|
|
|
let paperPlansBody = { |
|
|
|
|