Browse Source

[完善]根据文档内容修改

智慧矿山应急安全培训、考核、演练管理系统
邵佳豪 2 years ago
parent
commit
ff97b08738
  1. 2
      src/app/examiner/examiner.module.ts
  2. 4
      src/app/examiner/mark-papers-two/mark-papers-two.component.html
  3. 11
      src/app/examiner/review-files/evaluate/evaluate.component.html
  4. 0
      src/app/examiner/review-files/evaluate/evaluate.component.scss
  5. 25
      src/app/examiner/review-files/evaluate/evaluate.component.spec.ts
  6. 28
      src/app/examiner/review-files/evaluate/evaluate.component.ts
  7. 650
      src/app/examiner/review-files/review-files.component.ts
  8. 10
      src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.html
  9. 36
      src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.ts
  10. 1
      src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.ts
  11. 23
      src/app/student/student-exam-record/student-exam-record.component.html
  12. 7
      src/app/ui/collection-tools-read/collection-tools.component.ts
  13. 1
      src/app/ui/collection-tools-read/remark/remark.component.html
  14. 0
      src/app/ui/collection-tools-read/remark/remark.component.scss
  15. 25
      src/app/ui/collection-tools-read/remark/remark.component.spec.ts
  16. 22
      src/app/ui/collection-tools-read/remark/remark.component.ts
  17. 2
      src/app/ui/ui.module.ts

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

@ -77,6 +77,7 @@ import { StationExamineeComponent } from "./statistic-analysis/examStatistics/st
import { ExamineePapersComponent } from "./statistic-analysis/examStatistics/examinee-papers/examinee-papers.component";
import { ExamineeCapacityComponent } from "./statistic-analysis/abilityAnalysis/examinee-capacity/examinee-capacity.component";
import { NzRateModule } from "ng-zorro-antd/rate";
import { EvaluateComponent } from "./review-files/evaluate/evaluate.component";
@NgModule({
declarations: [
CreateTestScoreComponent,
@ -97,6 +98,7 @@ import { NzRateModule } from "ng-zorro-antd/rate";
StationExamineeComponent,
ExamineePapersComponent,
ExamineeCapacityComponent,
EvaluateComponent,
],
imports: [
CommonModule,

4
src/app/examiner/mark-papers-two/mark-papers-two.component.html

@ -25,7 +25,8 @@
<th style="width: 15%;">交卷时间</th>
<th style="width: 15%;">是否已阅</th>
<th style="width: 15%;">分数</th>
<th style="width: 20%;">操作</th>
<th style="width: 10%;">评价</th>
<th style="width: 10%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let item of dataSource">
@ -34,6 +35,7 @@
<td>{{item.endTime|date:'yyyy-MM-dd HH:mm'}}</td>
<td [ngClass]="{'green': item.isMarked == true,'red':item.isMarked == false}">{{item.isMarked== true?"已阅卷":"未阅卷"}}</td>
<td>{{item.totalScore}}</td>
<td>{{item.comment}}</td>
<td >
<span style="color: #01CFD5;cursor: pointer;" (click)='reviewFiles(item)'>阅卷</span>
</td>

11
src/app/examiner/review-files/evaluate/evaluate.component.html

@ -0,0 +1,11 @@
<h1 mat-dialog-title>考试评价:</h1>
<div mat-dialog-content>
<mat-form-field appearance="fill">
<mat-label>评价</mat-label>
<input matInput [(ngModel)]="data.Evaluate">
</mat-form-field>
</div>
<div mat-dialog-actions>
<button mat-button (click)="onNoClick(false)">取消</button>
<button mat-button (click)="onNoClick(true)">确定</button>
</div>

0
src/app/examiner/review-files/evaluate/evaluate.component.scss

25
src/app/examiner/review-files/evaluate/evaluate.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EvaluateComponent } from './evaluate.component';
describe('EvaluateComponent', () => {
let component: EvaluateComponent;
let fixture: ComponentFixture<EvaluateComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EvaluateComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EvaluateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

28
src/app/examiner/review-files/evaluate/evaluate.component.ts

@ -0,0 +1,28 @@
import { Component, OnInit, Inject } from "@angular/core";
import {
MatDialog,
MAT_DIALOG_DATA,
MatDialogRef,
} from "@angular/material/dialog";
@Component({
selector: "app-evaluate",
templateUrl: "./evaluate.component.html",
styleUrls: ["./evaluate.component.scss"],
})
export class EvaluateComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<EvaluateComponent>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit(): void {
// throw new Error("Method not implemented.");
}
onNoClick(type): void {
let obj = {
type: type,
value: this.data.Evaluate,
};
this.dialogRef.close(obj);
}
}

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

@ -1,202 +1,351 @@
import { HttpClient } from '@angular/common/http';
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { ActivatedRoute } from '@angular/router';
import { HttpClient } from "@angular/common/http";
import { Component, Inject, OnInit } from "@angular/core";
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
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',
styleUrls: ['../../student/examination-details/examination-details.component.scss','./review-files.component.scss']
selector: "app-review-files",
templateUrl: "./review-files.component.html",
styleUrls: [
"../../student/examination-details/examination-details.component.scss",
"./review-files.component.scss",
],
})
export class ReviewFilesComponent implements OnInit {
constructor(public http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar,public route:ActivatedRoute) { }
constructor(
public http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public route: ActivatedRoute
) {}
async ngOnInit(): Promise<void> {
this.paperType = this.route.snapshot.queryParams.paperType || 1
await this.getTest()
this.getUnitPlans()//将试卷的预案考题放进数据中
this.paperType = this.route.snapshot.queryParams.paperType || 1;
await this.getTest();
this.getUnitPlans(); //将试卷的预案考题放进数据中
//监听 此HTML标签焦点事件
document.addEventListener('visibilitychange', ()=>{
let isHidden = document.hidden
document.addEventListener("visibilitychange", () => {
let isHidden = document.hidden;
if (!isHidden) {
this.getUnitPlans(false)
this.getUnitPlans(false);
}
})
});
}
paperType:any = 1; //阅卷/查看
examId:any = this.route.snapshot.queryParams.examId; //考卷id
paperId:any; //试卷id
paperData:any //试卷信息
examScore:number = 0//整个试卷的总分
paperCompanyData:any = []; //考生具体考卷
selectPaper:any = {id:null}; //选择当前考卷
selectPaperType:string = '1'; //选择当前考卷内容 基本信息/作战部署
paperType: any = 1; //阅卷/查看
examId: any = this.route.snapshot.queryParams.examId; //考卷id
paperId: any; //试卷id
paperData: any; //试卷信息
examScore: number = 0; //整个试卷的总分
paperCompanyData: any = []; //考生具体考卷
selectPaper: any = { id: null }; //选择当前考卷
selectPaperType: string = "1"; //选择当前考卷内容 基本信息/作战部署
//获取考生试卷
async getTest () {
async getTest() {
await new Promise((resolve, reject) => {
this.http.get(`/api/Examinations/${this.examId}`).subscribe((data:any)=>{
this.paperData = data
this.paperId = this.paperData.paperId
this.http
.get(`/api/Examinations/${this.examId}`)
.subscribe((data: any) => {
this.paperData = data;
this.paperId = this.paperData.paperId;
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 //重点部位单项分
if (this.paperType == 1) { //阅卷
element.adjoinScore = data.paperInfo.paperDataInfo[index].adjoinScore //四周毗邻 总分
element.basicInfoScore = data.paperInfo.paperDataInfo[index].basicInfoScore //基本信息 总分
element.facilityScore = data.paperInfo.paperDataInfo[index].facilityScore //消防设施 总分
element.functionalDivisionScore = data.paperInfo.paperDataInfo[index].functionalDivisionScore //功能分区 总分
element.importLocationScore = data.paperInfo.paperDataInfo[index].importLocationScore //重点部位 总分
}
element.score = element.adjoinScore + element.basicInfoScore + element.facilityScore + element.functionalDivisionScore + element.importLocationScore
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; //重点部位单项分
if (this.paperType == 1) {
//阅卷
element.adjoinScore =
data.paperInfo.paperDataInfo[index].adjoinScore; //四周毗邻 总分
element.basicInfoScore =
data.paperInfo.paperDataInfo[index].basicInfoScore; //基本信息 总分
element.facilityScore =
data.paperInfo.paperDataInfo[index].facilityScore; //消防设施 总分
element.functionalDivisionScore =
data.paperInfo.paperDataInfo[index].functionalDivisionScore; //功能分区 总分
element.importLocationScore =
data.paperInfo.paperDataInfo[index].importLocationScore; //重点部位 总分
}
element.score =
element.adjoinScore +
element.basicInfoScore +
element.facilityScore +
element.functionalDivisionScore +
element.importLocationScore;
});
this.paperCompanyData = JSON.parse(
JSON.stringify(data.examinationDataInfo)
); //具体考卷
this.selectPaper = this.paperCompanyData[0];
resolve(1);
});
this.paperCompanyData = JSON.parse( JSON.stringify(data.examinationDataInfo) ) //具体考卷
this.selectPaper = this.paperCompanyData[0]
resolve(1)
})
})
});
}
//获得单位预案设定
async getUnitPlans(type:boolean = true){
async getUnitPlans(type: boolean = true) {
for (let index = 0; index < this.paperCompanyData.length; index++) {
const item = this.paperCompanyData[index];
item.planScore = 0 //预案总分
item.planList = [] //预案data
item.planScore = 0; //预案总分
item.planList = []; //预案data
let params = {
examinationId : this.route.snapshot.queryParams.examId,
companyId : item.companyInfo.id
}
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';
config.duration = 5000
// this.snackBar.open('刷新成功','确定',config);
}
resolve(1)
})
})
examinationId: this.route.snapshot.queryParams.examId,
companyId: item.companyInfo.id,
};
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";
config.duration = 5000;
// this.snackBar.open('刷新成功','确定',config);
}
resolve(1);
});
});
}
type? this.handleResults() : null //计算答案正确错误
type ? this.handleResults() : null; //计算答案正确错误
}
//处理数据 计算答案正确错误
handleResults () {
this.examScore = 0
this.paperCompanyData.forEach(element => {
this.examScore = this.examScore + element.score + element.planScore //试卷总分
handleResults() {
this.examScore = 0;
this.paperCompanyData.forEach((element) => {
this.examScore = this.examScore + element.score + element.planScore; //试卷总分
//forEach
element.adjoinData.forEach(item => { //四周毗邻
item.children.forEach(items => {
if (items.isRight===undefined) {
items.result == items.userAnswer? items.isRight = true : items.isRight = false
element.adjoinData.forEach((item) => {
//四周毗邻
item.children.forEach((items) => {
if (items.isRight === undefined) {
items.result == items.userAnswer
? (items.isRight = true)
: (items.isRight = false);
}
});
});
element.basicInfoData.forEach(item => { //基本信息
if (item.tabledata && item.tabledata.length) { //表格
item.tabledata.forEach((itemss,index) => {
if (index!=0) {
itemss.data.forEach(items => {
if (items.isRight===undefined) { items.result == items.userAnswer? items.isRight = true : items.isRight = false }
element.basicInfoData.forEach((item) => {
//基本信息
if (item.tabledata && item.tabledata.length) {
//表格
item.tabledata.forEach((itemss, index) => {
if (index != 0) {
itemss.data.forEach((items) => {
if (items.isRight === undefined) {
items.result == items.userAnswer
? (items.isRight = true)
: (items.isRight = false);
}
});
}
});
} else { //input
item.children.forEach(items => { if (items.isRight===undefined) { items.result == items.userAnswer? items.isRight = true : items.isRight = false } });
} else {
//input
item.children.forEach((items) => {
if (items.isRight === undefined) {
items.result == items.userAnswer
? (items.isRight = true)
: (items.isRight = false);
}
});
}
});
element.facilityData.forEach(item => { //消防设施
item.children.forEach(items => { if (items.isRight===undefined) { items.result == items.userAnswer? items.isRight = true : items.isRight = false } });
element.facilityData.forEach((item) => {
//消防设施
item.children.forEach((items) => {
if (items.isRight === undefined) {
items.result == items.userAnswer
? (items.isRight = true)
: (items.isRight = false);
}
});
});
element.functionalDivisionData.forEach(item => { //功能分区
item.tabledata.forEach((itemss,index) => {
if (index!=0) {
itemss.data.forEach(items => { if (items.isRight===undefined) { items.result == items.userAnswer? items.isRight = true : items.isRight = false } });
element.functionalDivisionData.forEach((item) => {
//功能分区
item.tabledata.forEach((itemss, index) => {
if (index != 0) {
itemss.data.forEach((items) => {
if (items.isRight === undefined) {
items.result == items.userAnswer
? (items.isRight = true)
: (items.isRight = false);
}
});
}
});
});
element.importLocationData.forEach(item => { //重点部位
item.tabledata.forEach((itemss,index) => {
if (index!=0) {
itemss.data.forEach(items => { if (items.isRight===undefined) { items.result == items.userAnswer? items.isRight = true : items.isRight = false } });
element.importLocationData.forEach((item) => {
//重点部位
item.tabledata.forEach((itemss, index) => {
if (index != 0) {
itemss.data.forEach((items) => {
if (items.isRight === undefined) {
items.result == items.userAnswer
? (items.isRight = true)
: (items.isRight = false);
}
});
}
});
});
//forEach
});
this.getPaperGrade()
this.getPaperGrade();
}
//循环 获取最新得分
getPaperGrade () {
this.paperCompanyData.forEach(element => {
getPaperGrade() {
this.paperCompanyData.forEach((element) => {
//forEach
element.adjoinTotalPoints = 0 //四周毗邻 分数
element.adjoinData.forEach(item => { //四周毗邻
item.children.forEach(items => { items.isRight? element.adjoinTotalPoints = element.adjoinTotalPoints + element.adjoinItemScore : null });
element.adjoinTotalPoints = 0; //四周毗邻 分数
element.adjoinData.forEach((item) => {
//四周毗邻
item.children.forEach((items) => {
items.isRight
? (element.adjoinTotalPoints =
element.adjoinTotalPoints + element.adjoinItemScore)
: null;
});
});
element.basicInfoTotalPoints = 0 //基本信息总分
element.basicInfoData.forEach(item => { //基本信息
if (item.tabledata && item.tabledata.length) { //表格
let indexList = []
item.tabledata[0].data.forEach((e,index) => { let everyRow = { isRight: true, index: index }; indexList.push(everyRow) }); //表格 行数
item.tabledata.forEach((itemss,index) => {
indexList.forEach(ele=>{ if (itemss.data[ele.index].isRight !=undefined && itemss.data[ele.index].isRight === false) { ele.isRight = false } })
element.basicInfoTotalPoints = 0; //基本信息总分
element.basicInfoData.forEach((item) => {
//基本信息
if (item.tabledata && item.tabledata.length) {
//表格
let indexList = [];
item.tabledata[0].data.forEach((e, index) => {
let everyRow = { isRight: true, index: index };
indexList.push(everyRow);
}); //表格 行数
item.tabledata.forEach((itemss, index) => {
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 + element.basicInfoItemScore)
: null;
});
} else {
//input
item.children.forEach((items) => {
items.isRight
? (element.basicInfoTotalPoints =
element.basicInfoTotalPoints + element.basicInfoItemScore)
: null;
});
indexList.forEach(item=>{
item.isRight? element.basicInfoTotalPoints = element.basicInfoTotalPoints + element.basicInfoItemScore : null
})
} else { //input
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 + element.facilityItemScore : null });
element.facilityTotalPoints = 0; //消防设施总分
element.facilityData.forEach((item) => {
//消防设施
item.children.forEach((items) => {
items.isRight
? (element.facilityTotalPoints =
element.facilityTotalPoints + element.facilityItemScore)
: null;
});
});
element.functionalDivisionTotalPoints = 0 //功能分区总分
element.functionalDivisionData.forEach(item => { //功能分区
element.functionalDivisionTotalPoints = 0; //功能分区总分
element.functionalDivisionData.forEach((item) => {
//功能分区
if (item.tabledata && item.tabledata.length) {
let indexList = []
item.tabledata[0].data.forEach((e,index) => { let everyRow = { isRight: true, index: index }; indexList.push(everyRow) }); //表格 行数
item.tabledata.forEach((itemss,index) => {
indexList.forEach(ele=>{ if (itemss.data[ele.index].isRight !=undefined && itemss.data[ele.index].isRight === false) { ele.isRight = false } })
let indexList = [];
item.tabledata[0].data.forEach((e, index) => {
let everyRow = { isRight: true, index: index };
indexList.push(everyRow);
}); //表格 行数
item.tabledata.forEach((itemss, index) => {
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 +
element.functionalDivisionItemSocre)
: null;
});
indexList.forEach(item=>{
item.isRight? element.functionalDivisionTotalPoints = element.functionalDivisionTotalPoints + element.functionalDivisionItemSocre : null
})
}
});
element.importLocationTotalPoints = 0 //重点部位总分
element.importLocationData.forEach(item => { //重点部位
element.importLocationTotalPoints = 0; //重点部位总分
element.importLocationData.forEach((item) => {
//重点部位
if (item.tabledata && item.tabledata.length) {
let indexList = []
item.tabledata[0].data.forEach((e,index) => { let everyRow = { isRight: true, index: index }; indexList.push(everyRow) }); //表格 行数
item.tabledata.forEach((itemss,index) => {
indexList.forEach(ele=>{ if (itemss.data[ele.index].isRight !=undefined && itemss.data[ele.index].isRight === false) { ele.isRight = false } })
let indexList = [];
item.tabledata[0].data.forEach((e, index) => {
let everyRow = { isRight: true, index: index };
indexList.push(everyRow);
}); //表格 行数
item.tabledata.forEach((itemss, index) => {
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 +
element.importLocationItemScore)
: null;
});
indexList.forEach(item=>{
item.isRight? element.importLocationTotalPoints = element.importLocationTotalPoints + element.importLocationItemScore : null
})
}
});
//forEach
@ -204,142 +353,175 @@ export class ReviewFilesComponent implements OnInit {
}
//修改结果
editResults (e) {
let data = e
const dialogRef = this.dialog.open(editRightWrongComponent, {data});
dialogRef.afterClosed().subscribe(data => {
editResults(e) {
let data = e;
const dialogRef = this.dialog.open(editRightWrongComponent, { data });
dialogRef.afterClosed().subscribe((data) => {
if (data) {
if (e.isRight != data.isChecked) {
e.isRight = data.isChecked
this.getPaperGrade()
e.isRight = data.isChecked;
this.getPaperGrade();
}
}
})
});
}
//刷新预案设定表格
refreshTable(){
this.getUnitPlans(false)
refreshTable() {
this.getUnitPlans(false);
}
//基本信息表格 是否展示当前行
rowIsShow (children,tag) {
let isShow:boolean = false
children.forEach(element => {
element.result == tag? isShow = true : null
rowIsShow(children, tag) {
let isShow: boolean = false;
children.forEach((element) => {
element.result == tag ? (isShow = true) : null;
});
return isShow
return isShow;
}
//切换 选择考卷
togglePaper (e) {
togglePaper(e) {
if (this.selectPaper.id != e.id) {
this.selectPaper = e
this.selectPaper = e;
}
}
//切换 选择考卷内容
togglePaperType (e) {
togglePaperType(e) {
if (this.selectPaperType != e) {
this.selectPaperType = e
this.selectPaperType = e;
}
}
//提交阅卷结果
submitResult () {
let bodyData = {
id: this.paperData.id,
isMarked: true,
totalScore: 0,
examinationDataInfo: [],
}
let paramsData = JSON.parse(JSON.stringify( this.paperCompanyData )) //考卷
paramsData.forEach(element => {
//计算总分
bodyData.totalScore = bodyData.totalScore+element.adjoinTotalPoints+element.basicInfoTotalPoints+element.facilityTotalPoints+element.functionalDivisionTotalPoints+element.importLocationTotalPoints
element.planList.forEach(item => {
bodyData.totalScore = bodyData.totalScore + item.score || 0
});
//计算总分
element.adjoinScore = element.adjoinTotalPoints //四周毗邻
delete element.adjoinTotalPoints
delete element.adjoinItemScore
element.basicInfoScore = element.basicInfoTotalPoints //基本信息
delete element.basicInfoTotalPoints
delete element.basicInfoItemScore
element.facilityScore = element.facilityTotalPoints //消防设施
delete element.facilityTotalPoints
delete element.facilityItemScore
element.functionalDivisionScore = element.functionalDivisionTotalPoints //功能分区
delete element.functionalDivisionTotalPoints
delete element.functionalDivisionItemSocre
element.importLocationScore = element.importLocationTotalPoints //重点部位
delete element.importLocationTotalPoints
delete element.importLocationItemScore
delete element.planList
delete element.planScore
delete element.score
element.adjoinData = JSON.stringify(element.adjoinData)
element.basicInfoData = JSON.stringify(element.basicInfoData)
element.facilityData = JSON.stringify(element.facilityData)
element.functionalDivisionData = JSON.stringify(element.functionalDivisionData)
element.importLocationData = JSON.stringify(element.importLocationData)
submitResult() {
const dialogRef = this.dialog.open(EvaluateComponent, {
data: { Evaluate: "" },
});
dialogRef.afterClosed().subscribe((result) => {
// console.log("The dialog was closed", result);
if (result.type) {
let bodyData = {
id: this.paperData.id,
isMarked: true,
totalScore: 0,
examinationDataInfo: [],
comment: result.value,
};
let paramsData = JSON.parse(JSON.stringify(this.paperCompanyData)); //考卷
paramsData.forEach((element) => {
//计算总分
bodyData.totalScore =
bodyData.totalScore +
element.adjoinTotalPoints +
element.basicInfoTotalPoints +
element.facilityTotalPoints +
element.functionalDivisionTotalPoints +
element.importLocationTotalPoints;
element.planList.forEach((item) => {
bodyData.totalScore = bodyData.totalScore + item.score || 0;
});
//计算总分
element.adjoinScore = element.adjoinTotalPoints; //四周毗邻
delete element.adjoinTotalPoints;
delete element.adjoinItemScore;
element.basicInfoScore = element.basicInfoTotalPoints; //基本信息
delete element.basicInfoTotalPoints;
delete element.basicInfoItemScore;
element.facilityScore = element.facilityTotalPoints; //消防设施
delete element.facilityTotalPoints;
delete element.facilityItemScore;
element.functionalDivisionScore =
element.functionalDivisionTotalPoints; //功能分区
delete element.functionalDivisionTotalPoints;
delete element.functionalDivisionItemSocre;
element.importLocationScore = element.importLocationTotalPoints; //重点部位
delete element.importLocationTotalPoints;
delete element.importLocationItemScore;
delete element.planList;
delete element.planScore;
delete element.score;
element.adjoinData = JSON.stringify(element.adjoinData);
element.basicInfoData = JSON.stringify(element.basicInfoData);
element.facilityData = JSON.stringify(element.facilityData);
element.functionalDivisionData = JSON.stringify(
element.functionalDivisionData
);
element.importLocationData = JSON.stringify(
element.importLocationData
);
});
bodyData.examinationDataInfo = paramsData;
this.http
.put(`/api/Examinations/${this.paperData.id}`, bodyData)
.subscribe((data) => {
const config = new MatSnackBarConfig();
config.verticalPosition = "top";
config.duration = 5000;
this.snackBar.open(
"阅卷结果提交成功,页面将于一秒后关闭!",
"确定",
config
);
setTimeout(() => {
window.close();
}, 1000);
});
}
});
bodyData.examinationDataInfo = paramsData
this.http.put(`/api/Examinations/${this.paperData.id}`,bodyData).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 5000
this.snackBar.open('阅卷结果提交成功,页面将于一秒后关闭!','确定',config);
setTimeout(() => {
window.close()
}, 1000);
})
}
//作战部署 阅卷
readExam(item,e){
sessionStorage.setItem('companyName', this.selectPaper.companyInfo.name)
sessionStorage.setItem('planId', item.paperPlanInfo.planComponentId)
sessionStorage.setItem('buildingTypeId', this.selectPaper.companyInfo.buildingTypes[0].id)
sessionStorage.setItem('companyId', this.selectPaper.companyInfo.id)
let openType
item.paperPlanInfo.examPlanType == 0 ? openType = 1 : openType = 2
window.open(`/canvasToolRead?planName=${item.paperPlanInfo.title}&paperplanId=${item.paperPlanId}&openType=${openType}&paperId=${this.paperId}&examId=${this.route.snapshot.queryParams.examId}&planComponentId=${item.paperPlanInfo.planComponentId}&paperType=${e}`)
readExam(item, e) {
sessionStorage.setItem("companyName", this.selectPaper.companyInfo.name);
sessionStorage.setItem("planId", item.paperPlanInfo.planComponentId);
sessionStorage.setItem(
"buildingTypeId",
this.selectPaper.companyInfo.buildingTypes[0].id
);
sessionStorage.setItem("companyId", this.selectPaper.companyInfo.id);
sessionStorage.setItem("remark", item.remark);
let openType;
item.paperPlanInfo.examPlanType == 0 ? (openType = 1) : (openType = 2);
window.open(
`/canvasToolRead?planName=${item.paperPlanInfo.title}&paperplanId=${item.paperPlanId}&openType=${openType}&paperId=${this.paperId}&examId=${this.route.snapshot.queryParams.examId}&planComponentId=${item.paperPlanInfo.planComponentId}&paperType=${e}`
);
}
}
export interface radioType {
isRight: boolean,
name: string,
isRight: boolean;
name: string;
}
@Component({
selector: 'app-edit-rightWrong',
templateUrl: './editRightWrong.html',
styleUrls: ['./review-files.component.scss']
selector: "app-edit-rightWrong",
templateUrl: "./editRightWrong.html",
styleUrls: ["./review-files.component.scss"],
})
export class editRightWrongComponent 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>,) { }
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 {
this.isChecked = JSON.parse( JSON.stringify(this.data.isRight) )
this.isChecked = JSON.parse(JSON.stringify(this.data.isRight));
}
isChecked:boolean; //是否正确
radioList:radioType[] = [
{ isRight: true, name: '正确', },
{ isRight: false, name: '错误', },
isChecked: boolean; //是否正确
radioList: radioType[] = [
{ isRight: true, name: "正确" },
{ isRight: false, name: "错误" },
];
submit () {
let data = {isChecked : this.isChecked}
this.dialogRef.close(data)
submit() {
let data = { isChecked: this.isChecked };
this.dialogRef.close(data);
}
}

10
src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.html

@ -16,6 +16,7 @@
<div class="queryField">
<button style="background-color: #07CDCF;" (click)="Submit()">查询</button>
<button style="margin-left: 10px; background-color: #FF8678;" (click)="Reset()">重置</button>
<button style="margin-left: 10px; background-color: #07CDCF;" (click)="Export()">导出</button>
<button style="margin-left: 10px; background-color: #07CDCF;" (click)="goback()">返回</button>
</div>
</div>
@ -27,8 +28,9 @@
<th style="width: 15%;">试卷名称</th>
<th style="width: 25%;">考核机构</th>
<th style="width: 15%;">考试结束时间</th>
<th style="width: 15%;">试卷得分</th>
<th style="width: 15%;">操作</th>
<th style="width: 10%;">试卷得分</th>
<th style="width: 10%;">试卷评价</th>
<th style="width: 10%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let item of tabledataSource;let key = index">
@ -42,6 +44,10 @@
</td>
<td>
{{item.score}}
</td>
<td>
{{item.comment}}
</td>
<td>
<span style="color: #07CDCF;cursor: pointer;" (click)="To(item)">详情</span>
</td>

36
src/app/examiner/statistic-analysis/examStatistics/examinee-papers/examinee-papers.component.ts

@ -19,12 +19,13 @@ export class ExamineePapersComponent implements OnInit {
) {}
examineeId;
examineeRealName;
//获取登录账号的个人资料
Profiles: any;
ngOnInit(): void {
this.Profiles = JSON.parse(sessionStorage.getItem("creatorData"));
this.examineeId = this.route.snapshot.queryParams.examineeId;
this.examineeRealName = this.route.snapshot.queryParams.examineeRealName;
this.getAlltabledate();
}
@ -89,7 +90,6 @@ export class ExamineePapersComponent implements OnInit {
tabledataSource;
length;
getAlltabledate() {
console.log(5, this.starttime);
let paramsdata: any = {
ExamineeId: this.examineeId,
ExaminationName: this.name || "",
@ -126,6 +126,38 @@ export class ExamineePapersComponent implements OnInit {
this.endtime = "";
this.getAlltabledate();
}
Export() {
let paramsdata: any = {
ExamineeId: this.examineeId,
ExaminationName: this.name || "",
EndTimeBegin: this.starttime ? this.starttime + " " + "0:0:0" : "",
EndTimeEnd: this.endtime ? this.endtime + " " + "23:59:59" : "",
};
this.http
.get(
"/api/ExamStatisticalAnalyses/ExaminationStatistics/ExportExaminations",
{
responseType: "blob" as "json",
params: paramsdata,
}
)
.subscribe((data: any) => {
console.log("导出成功", data);
const link = document.createElement("a");
const blob = new Blob([data], { type: "application/vnd.ms-excel" });
link.setAttribute("href", window.URL.createObjectURL(blob));
link.setAttribute(
"download",
this.examineeRealName + "考试记录" + ".xls"
);
link.style.visibility = "hidden";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
// this.message.create("success", `导出成功`);
});
}
goback() {
history.go(-1);
}

1
src/app/examiner/statistic-analysis/examStatistics/station-examinee/station-examinee.component.ts

@ -93,6 +93,7 @@ export class StationExamineeComponent implements OnInit {
this.router.navigate(["/home/statistic-examination/examinee-papers"], {
queryParams: {
examineeId: item.examineeId,
examineeRealName: item.examineeRealName,
},
}); //登陆成功跳转页面
}

23
src/app/student/student-exam-record/student-exam-record.component.html

@ -8,14 +8,15 @@
-->
<div class="content">
<div class="centertable">
<table >
<table>
<thead>
<th style="width: 20%;">试卷名称</th>
<th style="width: 10%;">参加人</th>
<th style="width: 20%;">考核队站</th>
<th style="width: 20%;">考试时间</th>
<th style="width: 15%;">考试成绩</th>
<th style="width: 15%;">操作</th>
<th style="width: 10%;">考试成绩</th>
<th style="width: 10%;">考试评价</th>
<th style="width: 10%;">操作</th>
</thead>
<tbody>
<tr *ngFor="let item of tabledataSource">
@ -23,16 +24,16 @@
<td>{{item.examineeName}}</td>
<td>{{item.paperInfo.organizationsName}}</td>
<td>{{item.paperInfo.startTime|date:'yyyy-MM-dd HH:mm'}}</td>
<td style="color: #FF8678;">{{ item.totalScore && item.totalScore!=0 ? item.totalScore+'分' : '未阅卷' }}</td>
<td style="color: #FF8678;">{{ item.totalScore && item.totalScore!=0 ? item.totalScore+'分' : '未阅卷'
}}</td>
<td>{{item.comment}}</td>
<td style="color: #07CDCF;cursor: pointer;" (click)='seePaper(item)'>查看</td>
</tr>
</tbody>
</table>
<mat-paginator [length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
<mat-paginator [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)">
</mat-paginator>
</div>
</div>
</div>

7
src/app/ui/collection-tools-read/collection-tools.component.ts

@ -43,6 +43,7 @@ import {
uploadQuestionsRead,
} from "./examinationQuestions";
import { AxMessageSystem } from "src/app/working-area/model/axMessageSystem";
import { RemarkComponent } from "./remark/remark.component";
@Component({
selector: "app-collection-tools",
@ -369,6 +370,7 @@ export class CollectionToolsReadComponent implements OnInit {
}
submitScore() {
// console.log(66666)
if (!sessionStorage.getItem("scoreNum")) {
const config = new MatSnackBarConfig();
config.verticalPosition = "top";
@ -380,6 +382,7 @@ export class CollectionToolsReadComponent implements OnInit {
paperPlanId: this.route.snapshot.queryParams.paperplanId,
examinationId: this.route.snapshot.queryParams.examId,
score: sessionStorage.getItem("scoreNum"),
remark: sessionStorage.getItem("notes"),
};
this.http
.put("/api/ExaminationPlans/ModifyScore", "", { params: params })
@ -1473,7 +1476,9 @@ export class CollectionToolsReadComponent implements OnInit {
}
//阅卷备注
notes() {}
notes() {
const dialogRef = this.dialog.open(RemarkComponent);
}
}
//查看需要标记的消防设施按钮

1
src/app/ui/collection-tools-read/remark/remark.component.html

@ -0,0 +1 @@
{{Remark}}

0
src/app/ui/collection-tools-read/remark/remark.component.scss

25
src/app/ui/collection-tools-read/remark/remark.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RemarkComponent } from './remark.component';
describe('RemarkComponent', () => {
let component: RemarkComponent;
let fixture: ComponentFixture<RemarkComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ RemarkComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(RemarkComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

22
src/app/ui/collection-tools-read/remark/remark.component.ts

@ -0,0 +1,22 @@
import { Component, OnInit, Inject } from "@angular/core";
import {
MatDialog,
MAT_DIALOG_DATA,
MatDialogRef,
} from "@angular/material/dialog";
@Component({
selector: "app-remark",
templateUrl: "./remark.component.html",
styleUrls: ["./remark.component.scss"],
})
export class RemarkComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<RemarkComponent>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
Remark;
ngOnInit(): void {
this.Remark = sessionStorage.getItem("remark");
}
}

2
src/app/ui/ui.module.ts

@ -108,6 +108,7 @@ import {
import { NzTreeSelectModule } from "ng-zorro-antd/tree-select";
import { AdministratorsComponent } from "./administrators/administrators.component";
import { AddEditAdminComponent } from "./administrators/add-edit-admin/add-edit-admin.component";
import { RemarkComponent } from './collection-tools-read/remark/remark.component';
@NgModule({
declarations: [
ChangepasswordComponent,
@ -147,6 +148,7 @@ import { AddEditAdminComponent } from "./administrators/add-edit-admin/add-edit-
Score,
AdministratorsComponent,
AddEditAdminComponent,
RemarkComponent,
],
imports: [
NzDatePickerModule,

Loading…
Cancel
Save