Browse Source

[完善] 考官阅卷完善

master
陈鹏飞 4 years ago
parent
commit
76accea93f
  1. 1
      src/app/examiner/create-test-score/create-test-score.component.ts
  2. 10
      src/app/examiner/review-files/review-files.component.html
  3. 20
      src/app/examiner/review-files/review-files.component.ts
  4. 10
      src/app/student/examination-details/examination-details.component.html
  5. 3
      src/app/student/examination-details/examination-details.component.ts

1
src/app/examiner/create-test-score/create-test-score.component.ts

@ -1187,7 +1187,6 @@ export class CreateTestScoreComponent implements OnInit {
//将筛选出来的数据变为服务器提交数据
let paperDataInfo = []
console.log(111,copyDatas)
copyDatas.forEach((item,key) =>{
paperDataInfo[key] = {}
paperDataInfo[key].id = null

10
src/app/examiner/review-files/review-files.component.html

@ -32,7 +32,7 @@
<mat-expansion-panel *ngIf="selectPaper.basicInfoData && selectPaper.basicInfoData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">基本信息</label>
<label>总分: <label class="mark"> {{selectPaper.basicInfoScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.basicInfoScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.basicInfoItemScore}}</label></label>
<button class="headerButton" *ngIf="selectPaper.basicInfoScore == selectPaper.basicInfoTotalPoints">全部正确</button>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.basicInfoData;let itemkey = index">
@ -68,7 +68,7 @@
<mat-expansion-panel *ngIf="selectPaper.adjoinData && selectPaper.adjoinData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">四周毗邻</label>
<label>总分: <label class="mark"> {{selectPaper.adjoinScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.adjoinScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.adjoinItemScore}}</label></label>
<button class="headerButton" *ngIf="selectPaper.adjoinScore == selectPaper.adjoinTotalPoints">全部正确</button>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.adjoinData">
@ -87,7 +87,7 @@
<mat-expansion-panel *ngIf="selectPaper.importLocationData && selectPaper.importLocationData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">重点部位</label>
<label>总分: <label class="mark"> {{selectPaper.importLocationScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.importLocationScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.importLocationItemScore}}</label></label>
<button class="headerButton" *ngIf="selectPaper.importLocationScore == selectPaper.importLocationTotalPoints">全部正确</button>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.importLocationData">
@ -112,7 +112,7 @@
<mat-expansion-panel *ngIf="selectPaper.functionalDivisionData && selectPaper.functionalDivisionData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">功能分区</label>
<label>总分: <label class="mark"> {{selectPaper.functionalDivisionScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.functionalDivisionScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.functionalDivisionItemSocre}}</label></label>
<button class="headerButton" *ngIf="selectPaper.functionalDivisionScore == selectPaper.functionalDivisionTotalPoints">全部正确</button>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.functionalDivisionData">
@ -137,7 +137,7 @@
<mat-expansion-panel *ngIf="selectPaper.facilityData && selectPaper.facilityData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">数据核验</label>
<label>总分: <label class="mark"> {{selectPaper.facilityScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.facilityScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.facilityItemScore}}</label></label>
<button class="headerButton" *ngIf="selectPaper.facilityScore == selectPaper.facilityTotalPoints">全部正确</button>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.facilityData">

20
src/app/examiner/review-files/review-files.component.ts

@ -32,12 +32,17 @@ export class ReviewFilesComponent implements OnInit {
this.http.get(`/api/Examinations/${this.examId}`).subscribe((data:any)=>{
this.paperData = data
this.paperId = this.paperData.paperId
this.paperData.examinationDataInfo.forEach(element => {
this.paperData.examinationDataInfo.forEach((element,index) => {
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
element.adjoinItemScore = data.paperInfo.paperDataInfo[index].adjoinItemScore //四周毗邻单项分
element.basicInfoItemScore = data.paperInfo.paperDataInfo[index].basicInfoItemScore //基本信息单项分
element.facilityItemScore = data.paperInfo.paperDataInfo[index].facilityItemScore //消防设施单项分
element.functionalDivisionItemSocre = data.paperInfo.paperDataInfo[index].functionalDivisionItemSocre //功能分区单选分
element.importLocationItemScore = data.paperInfo.paperDataInfo[index].importLocationItemScore //重点部位单项分
element.score = element.adjoinScore + element.basicInfoScore + element.facilityScore + element.functionalDivisionScore + element.importLocationScore
});
this.paperCompanyData = JSON.parse( JSON.stringify(data.examinationDataInfo) ) //具体考卷
@ -60,6 +65,7 @@ export class ReviewFilesComponent implements OnInit {
await new Promise((resolve,reject)=>{
this.http.get(`/api/ExaminationPlans`,{params:params}).subscribe(data => {
item.planList = data
item.planList.forEach(element => { item.planScore = item.planScore + element.paperPlanInfo.score });
if(type == false){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
@ -127,7 +133,7 @@ export class ReviewFilesComponent implements OnInit {
//forEach
element.adjoinTotalPoints = 0 //四周毗邻 分数
element.adjoinData.forEach(item => { //四周毗邻
item.children.forEach(items => { items.isRight? element.adjoinTotalPoints = element.adjoinTotalPoints + 1 : null });
item.children.forEach(items => { items.isRight? element.adjoinTotalPoints = element.adjoinTotalPoints + element.adjoinItemScore : null });
});
element.basicInfoTotalPoints = 0 //基本信息总分
element.basicInfoData.forEach(item => { //基本信息
@ -138,15 +144,15 @@ export class ReviewFilesComponent implements OnInit {
indexList.forEach(ele=>{ if (itemss.data[ele.index].isRight !=undefined && itemss.data[ele.index].isRight === false) { ele.isRight = false } })
});
indexList.forEach(item=>{
item.isRight? element.basicInfoTotalPoints = element.basicInfoTotalPoints + 1 : null
item.isRight? element.basicInfoTotalPoints = element.basicInfoTotalPoints + element.basicInfoItemScore : null
})
} else { //input
item.children.forEach(items => { items.isRight? element.basicInfoTotalPoints = element.basicInfoTotalPoints + 1 : null });
item.children.forEach(items => { items.isRight? element.basicInfoTotalPoints = element.basicInfoTotalPoints + element.basicInfoItemScore : null });
}
});
element.facilityTotalPoints = 0 //消防设施总分
element.facilityData.forEach(item => { //消防设施
item.children.forEach(items => { items.isRight? element.facilityTotalPoints = element.facilityTotalPoints + 1 : null });
item.children.forEach(items => { items.isRight? element.facilityTotalPoints = element.facilityTotalPoints + element.facilityItemScore : null });
});
element.functionalDivisionTotalPoints = 0 //功能分区总分
element.functionalDivisionData.forEach(item => { //功能分区
@ -157,7 +163,7 @@ export class ReviewFilesComponent implements OnInit {
indexList.forEach(ele=>{ if (itemss.data[ele.index].isRight !=undefined && itemss.data[ele.index].isRight === false) { ele.isRight = false } })
});
indexList.forEach(item=>{
item.isRight? element.functionalDivisionTotalPoints = element.functionalDivisionTotalPoints + 1 : null
item.isRight? element.functionalDivisionTotalPoints = element.functionalDivisionTotalPoints + element.functionalDivisionItemSocre : null
})
}
});
@ -170,7 +176,7 @@ export class ReviewFilesComponent implements OnInit {
indexList.forEach(ele=>{ if (itemss.data[ele.index].isRight !=undefined && itemss.data[ele.index].isRight === false) { ele.isRight = false } })
});
indexList.forEach(item=>{
item.isRight? element.importLocationTotalPoints = element.importLocationTotalPoints + 1 : null
item.isRight? element.importLocationTotalPoints = element.importLocationTotalPoints + element.importLocationItemScore : null
})
}
});

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

@ -30,7 +30,7 @@
<mat-expansion-panel *ngIf="selectPaper.basicInfoData && selectPaper.basicInfoData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">基本信息</label>
<label>总分: <label class="mark"> {{selectPaper.basicInfoScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.basicInfoScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.basicInfoItemScore}}</label></label>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.basicInfoData;let itemkey = index">
<div class="publicTitle">{{item.name}}</div>
@ -55,7 +55,7 @@
<mat-expansion-panel *ngIf="selectPaper.adjoinData && selectPaper.adjoinData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">四周毗邻</label>
<label>总分: <label class="mark"> {{selectPaper.adjoinScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.adjoinScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.adjoinItemScore}}</label></label>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.adjoinData">
<div class="publicTitle">{{item.name}}</div>
@ -67,7 +67,7 @@
<mat-expansion-panel *ngIf="selectPaper.importLocationData && selectPaper.importLocationData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">重点部位</label>
<label>总分: <label class="mark"> {{selectPaper.importLocationScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.importLocationScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.importLocationItemScore}}</label></label>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.importLocationData">
<div class="publicTitle">{{item.name}}</div>
@ -87,7 +87,7 @@
<mat-expansion-panel *ngIf="selectPaper.functionalDivisionData && selectPaper.functionalDivisionData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">功能分区</label>
<label>总分: <label class="mark"> {{selectPaper.functionalDivisionScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.functionalDivisionScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.functionalDivisionItemSocre}}</label></label>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.functionalDivisionData">
<div class="publicTitle">{{item.name}}</div>
@ -107,7 +107,7 @@
<mat-expansion-panel *ngIf="selectPaper.facilityData && selectPaper.facilityData.length">
<mat-expansion-panel-header class="panelHeader">
<label class="mariginRight">数据核验</label>
<label>总分: <label class="mark"> {{selectPaper.facilityScore}}</label>分, </label><label>单项<label class="mark"></label></label>
<label>总分: <label class="mark"> {{selectPaper.facilityScore}}</label>分, </label><label>单项<label class="mark"> {{selectPaper.facilityItemScore}}</label></label>
</mat-expansion-panel-header>
<div class="publicTest" *ngFor="let item of selectPaper.facilityData">
<div class="publicTitle">{{item.name}}</div>

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

@ -97,14 +97,13 @@ export class ExaminationDetailsComponent implements OnInit {
async getUnitPlans(){
for (let index = 0; index < this.paperCompanyData.length; index++) {
const item = this.paperCompanyData[index];
console.log(888,item)
item.planList = []
let params = {
paperId : item.paperId,
companyId : item.companyInfo.id
}
await new Promise((resolve,reject)=>{
this.http.get(`/api/PaperPlans`,{params:params}).subscribe(data => {
item.planList = []
item.planList = data
resolve(1)
})

Loading…
Cancel
Save