|
@@ -68,54 +68,54 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column sortable label="采集人" prop="infoCollector">
|
|
<el-table-column sortable label="采集人" prop="infoCollector">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column sortable label="完成状态">
|
|
|
|
|
|
+ <el-table-column fixed="right" sortable label="完成状态">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span
|
|
<span
|
|
v-show="scope.row.finished && scope.row.examType == 'ONLINE'"
|
|
v-show="scope.row.finished && scope.row.examType == 'ONLINE'"
|
|
- >已完成</span
|
|
|
|
- >
|
|
|
|
|
|
+ ><el-tag type="success">已完成</el-tag>
|
|
|
|
+ </span>
|
|
<span
|
|
<span
|
|
v-show="!scope.row.finished && scope.row.examType == 'ONLINE'"
|
|
v-show="!scope.row.finished && scope.row.examType == 'ONLINE'"
|
|
- >未完成</span
|
|
|
|
- >
|
|
|
|
|
|
+ ><el-tag type="danger">未完成</el-tag>
|
|
|
|
+ </span>
|
|
<span
|
|
<span
|
|
v-show="scope.row.finished && scope.row.examType == 'OFFLINE'"
|
|
v-show="scope.row.finished && scope.row.examType == 'OFFLINE'"
|
|
- >已抽题</span
|
|
|
|
- >
|
|
|
|
|
|
+ ><el-tag type="success">已抽题</el-tag>
|
|
|
|
+ </span>
|
|
<span
|
|
<span
|
|
v-show="
|
|
v-show="
|
|
!scope.row.finished && scope.row.examType == 'OFFLINE'
|
|
!scope.row.finished && scope.row.examType == 'OFFLINE'
|
|
"
|
|
"
|
|
- >未抽题</span
|
|
|
|
- >
|
|
|
|
|
|
+ ><el-tag type="danger">未抽题</el-tag>
|
|
|
|
+ </span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="335">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
- v-show="scope.row.examType == 'OFFLINE'"
|
|
|
|
type="success"
|
|
type="success"
|
|
icon="el-icon-success"
|
|
icon="el-icon-success"
|
|
@click="previewPaper(scope.row.examStudentId)"
|
|
@click="previewPaper(scope.row.examStudentId)"
|
|
- >查看考题</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ v-if="form.examType == 'OFFLINE'"
|
|
|
|
+ >查看考题
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
- v-show="scope.row.examType == 'OFFLINE'"
|
|
|
|
type="success"
|
|
type="success"
|
|
icon="el-icon-success"
|
|
icon="el-icon-success"
|
|
@click="exportPaper(scope.row.examStudentId)"
|
|
@click="exportPaper(scope.row.examStudentId)"
|
|
- >下载考题</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ v-if="form.examType == 'OFFLINE'"
|
|
|
|
+ >下载考题
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
- v-show="scope.row.examType == 'OFFLINE'"
|
|
|
|
type="success"
|
|
type="success"
|
|
icon="el-icon-success"
|
|
icon="el-icon-success"
|
|
@click="openUploadAnswerDialog(scope.row.examStudentId)"
|
|
@click="openUploadAnswerDialog(scope.row.examStudentId)"
|
|
- >上传作答</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ v-if="form.examType == 'OFFLINE'"
|
|
|
|
+ >上传作答
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -190,9 +190,9 @@ export default {
|
|
studentName: null,
|
|
studentName: null,
|
|
isWarn: null,
|
|
isWarn: null,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
- pageSize: 10
|
|
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ examType: ""
|
|
},
|
|
},
|
|
-
|
|
|
|
getExamCondition: {
|
|
getExamCondition: {
|
|
params: {
|
|
params: {
|
|
name: "",
|
|
name: "",
|
|
@@ -261,7 +261,7 @@ export default {
|
|
.get("/api/ecs_oe_admin/exam/record/select/byExamStudentId", {
|
|
.get("/api/ecs_oe_admin/exam/record/select/byExamStudentId", {
|
|
params: { examStudentId: examStudentId }
|
|
params: { examStudentId: examStudentId }
|
|
})
|
|
})
|
|
- .then(function success(response) {
|
|
|
|
|
|
+ .then(response => {
|
|
if (response.data) {
|
|
if (response.data) {
|
|
var examRecordList = response.data;
|
|
var examRecordList = response.data;
|
|
if (examRecordList && examRecordList.length > 0) {
|
|
if (examRecordList && examRecordList.length > 0) {
|
|
@@ -270,7 +270,10 @@ export default {
|
|
examRecordList[0].basePaperId
|
|
examRecordList[0].basePaperId
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
- this.$message("该考生未参加考试");
|
|
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "该考生未参加考试",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -281,7 +284,7 @@ export default {
|
|
.get("/api/ecs_oe_admin/exam/record/select/byExamStudentId", {
|
|
.get("/api/ecs_oe_admin/exam/record/select/byExamStudentId", {
|
|
params: { examStudentId: examStudentId }
|
|
params: { examStudentId: examStudentId }
|
|
})
|
|
})
|
|
- .then(function success(response) {
|
|
|
|
|
|
+ .then(response => {
|
|
if (response.data) {
|
|
if (response.data) {
|
|
var examRecordList = response.data;
|
|
var examRecordList = response.data;
|
|
if (examRecordList && examRecordList.length > 0) {
|
|
if (examRecordList && examRecordList.length > 0) {
|
|
@@ -302,14 +305,32 @@ export default {
|
|
"&$token=" +
|
|
"&$token=" +
|
|
token;
|
|
token;
|
|
} else {
|
|
} else {
|
|
- this.$message("该考生未参加考试");
|
|
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "该考生未参加考试",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
openUploadAnswerDialog(examStudentId) {
|
|
openUploadAnswerDialog(examStudentId) {
|
|
- this.uploadAnswerDialogVisible = true;
|
|
|
|
- this.currentOfflineExamStudentId = examStudentId;
|
|
|
|
|
|
+ this.$http
|
|
|
|
+ .get("/api/ecs_oe_admin/exam/record/data/findByExamStudentId", {
|
|
|
|
+ params: { examStudentId: examStudentId }
|
|
|
|
+ })
|
|
|
|
+ .then(response => {
|
|
|
|
+ var examRecordDataList = response.data;
|
|
|
|
+ if (examRecordDataList.length == 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "该考生未参加考试",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ this.uploadAnswerDialogVisible = true;
|
|
|
|
+ this.currentOfflineExamStudentId = examStudentId;
|
|
|
|
+ this.currentOfflineExamRecordId = examRecordDataList[0].id;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
uploadAnswerChange(event) {
|
|
uploadAnswerChange(event) {
|
|
if (event.target.files.length > 0) {
|
|
if (event.target.files.length > 0) {
|
|
@@ -319,32 +340,27 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
doUploadAnswer() {
|
|
doUploadAnswer() {
|
|
|
|
+ let config = {
|
|
|
|
+ headers: { "Content-Type": "multipart/form-data" }
|
|
|
|
+ };
|
|
|
|
+ let param = new FormData();
|
|
|
|
+ param.append("file", this.offlineAnswerFile);
|
|
|
|
+ param.append("examRecordDataId", this.currentOfflineExamRecordDataId);
|
|
this.$http
|
|
this.$http
|
|
- .get("/api/ecs_oe_admin/exam/record/data/findByExamStudentId", {
|
|
|
|
- params: { examStudentId: this.currentOfflineExamStudentId }
|
|
|
|
|
|
+ .post("/api/ecs_oe_student/offlineExam/submitPaper", param, config)
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "上传成功",
|
|
|
|
+ type: "success"
|
|
|
|
+ });
|
|
|
|
+ this.uploadAnswerDialogVisible = false;
|
|
})
|
|
})
|
|
- .then(response => {
|
|
|
|
- debugger;
|
|
|
|
- var examRecordDataList = response.data;
|
|
|
|
- if (examRecordDataList.length == 0) {
|
|
|
|
- this.$message("该考生未参加考试");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- let param = new FormData();
|
|
|
|
- param.append("file", this.offlineAnswerFile);
|
|
|
|
- var examRecordDataId = examRecordDataList[0].id;
|
|
|
|
- param.append("examRecordDataId", examRecordDataId);
|
|
|
|
- let config = {
|
|
|
|
- headers: { "Content-Type": "multipart/form-data" }
|
|
|
|
- };
|
|
|
|
- this.$http
|
|
|
|
- .post("/api/ecs_oe_student/offlineExam/submitPaper", param, config)
|
|
|
|
- .then(() => {
|
|
|
|
- debugger;
|
|
|
|
- })
|
|
|
|
- .catch(function(error) {
|
|
|
|
- console.log(error);
|
|
|
|
- });
|
|
|
|
|
|
+ .catch(function(error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "上传失败",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|