|
|
|
@ -352,7 +352,7 @@ export class ReviewFilesComponent implements OnInit {
|
|
|
|
|
//forEach
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
oldData=[] |
|
|
|
|
oldData=[] //基本信息
|
|
|
|
|
//修改结果
|
|
|
|
|
editResults(e) { |
|
|
|
|
let data = e; |
|
|
|
@ -387,7 +387,40 @@ export class ReviewFilesComponent implements OnInit {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
oldData2=[] //作战部署
|
|
|
|
|
editFraction(e) { |
|
|
|
|
let data = e; |
|
|
|
|
console.log(e); |
|
|
|
|
|
|
|
|
|
const dialogRef = this.dialog.open(editFractionComponent, { data }); |
|
|
|
|
dialogRef.afterClosed().subscribe((data) => { |
|
|
|
|
if (data) { |
|
|
|
|
if (e.score != data.isScore) { |
|
|
|
|
let index=0 |
|
|
|
|
this.oldData2.forEach((element:any,i)=>{ |
|
|
|
|
if(element.id==e.name){ |
|
|
|
|
element.newIsScore=data.isScore |
|
|
|
|
this.oldData2.splice(i, 1) |
|
|
|
|
index++ |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(!index){ |
|
|
|
|
this.oldData2.push( |
|
|
|
|
{ |
|
|
|
|
name:e.id, |
|
|
|
|
oldIsScore:e.score, |
|
|
|
|
newIsScore:data.isScore |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
e.score = data.isScore |
|
|
|
|
this.getPaperGrade(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//刷新预案设定表格
|
|
|
|
|
refreshTable() { |
|
|
|
|
this.getUnitPlans(false); |
|
|
|
@ -547,3 +580,31 @@ export class editRightWrongComponent implements OnInit {
|
|
|
|
|
this.dialogRef.close(data); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@Component({ |
|
|
|
|
selector: "app-edit-Fraction", |
|
|
|
|
templateUrl: "./editFraction.html", |
|
|
|
|
styleUrls: ["./review-files.component.scss"], |
|
|
|
|
}) |
|
|
|
|
export class editFractionComponent implements OnInit { |
|
|
|
|
constructor( |
|
|
|
|
public http: HttpClient, |
|
|
|
|
public dialog: MatDialog, |
|
|
|
|
public snackBar: MatSnackBar, |
|
|
|
|
public route: ActivatedRoute, |
|
|
|
|
@Inject(MAT_DIALOG_DATA) public data: any, |
|
|
|
|
public dialogRef: MatDialogRef<any> |
|
|
|
|
) {} |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data); |
|
|
|
|
|
|
|
|
|
this.isScore = JSON.parse(JSON.stringify(this.data.score)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
isScore: Number; //分数
|
|
|
|
|
|
|
|
|
|
submit() { |
|
|
|
|
let data = { isScore: this.isScore }; |
|
|
|
|
this.dialogRef.close(data); |
|
|
|
|
} |
|
|
|
|
} |