Browse Source

记录修改评分

智慧矿山应急安全培训、考核、演练管理系统
jongbowen 2 years ago
parent
commit
f2b4c7b550
  1. 26
      src/app/examiner/review-files/review-files.component.ts

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

@ -9,6 +9,7 @@ import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { ActivatedRoute } from "@angular/router";
import { EvaluateComponent } from "./evaluate/evaluate.component";
@Component({
selector: "app-review-files",
templateUrl: "./review-files.component.html",
@ -351,14 +352,35 @@ export class ReviewFilesComponent implements OnInit {
//forEach
});
}
oldData=[]
//修改结果
editResults(e) {
let data = e;
const dialogRef = this.dialog.open(editRightWrongComponent, { data });
dialogRef.afterClosed().subscribe((data) => {
if (data) {
let index=0
if (e.isRight != data.isChecked) {
this.oldData.forEach((element:any,i)=>{
if(element.name==e.name){
// element.oldIsRight=e.isRight
// element.newIsRight=data.isChecked
this.oldData.splice(i, 1)
index++
return
}
})
if(!index){
this.oldData.push(
{
name:e.name,
oldIsRight:e.isRight,
newIsRight:data.isChecked
}
)
}
e.isRight = data.isChecked;
this.getPaperGrade();
}
@ -512,6 +534,8 @@ export class editRightWrongComponent implements OnInit {
ngOnInit(): void {
this.isChecked = JSON.parse(JSON.stringify(this.data.isRight));
console.log(this.data,88888);
}
isChecked: boolean; //是否正确

Loading…
Cancel
Save