Browse Source

作战部署分数修改

智慧矿山应急安全培训、考核、演练管理系统
jongbowen 2 years ago
parent
commit
146053832a
  1. 2
      src/app/examiner/examiner.module.ts
  2. 9
      src/app/examiner/review-files/editFraction.html
  3. 1
      src/app/examiner/review-files/review-files.component.html
  4. 8
      src/app/examiner/review-files/review-files.component.scss
  5. 65
      src/app/examiner/review-files/review-files.component.ts

2
src/app/examiner/examiner.module.ts

@ -69,6 +69,7 @@ import { FinishDia } from "./examiner-index/examiner-index.component";
import {
ReviewFilesComponent,
editRightWrongComponent,
editFractionComponent
} from "./review-files/review-files.component";
import { editorsDia } from "./create-test-score/create-test-score.component";
import { NzTreeSelectModule } from "ng-zorro-antd/tree-select";
@ -93,6 +94,7 @@ import { EvaluateComponent } from "./review-files/evaluate/evaluate.component";
FinishDia,
ReviewFilesComponent,
editRightWrongComponent,
editFractionComponent,
editorsDia,
EchartsComponent,
StationExamineeComponent,

9
src/app/examiner/review-files/editFraction.html

@ -0,0 +1,9 @@
<div class="editRightWrong">
<div class="content">
<input type="text" [(ngModel)]="isScore">
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" (click)='submit()'>确定</button>
<button mat-raised-button mat-dialog-close>取消</button>
</div>
</div>

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

@ -178,6 +178,7 @@
<td>
<span style="color: #07CDCF;" (click)="readExam(item,0)" *ngIf="paperType==1">阅卷</span>
<span style="color: #07CDCF;" (click)="readExam(item,1)" *ngIf="paperType!=1">查看</span>
<span style="color: #07CDCF;" (click)="editFraction(item)" >修改得分</span>
</td>
</tr>
</table>

8
src/app/examiner/review-files/review-files.component.scss

@ -71,11 +71,19 @@ button {
.editRightWrong {
button { margin: 0 10px; }
.content { margin-bottom: 10px; text-align: center; }
input{
height: 24px;
border: 1px solid #d4cdcd;
}
input[type=text]:focus {
outline: none;
}
.mat-radio-button {
height: 22px;
line-height: 22px;
display: inline-block;
margin: 0 10px;
}
}
.refresh{

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

@ -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);
}
}
Loading…
Cancel
Save