|
@@ -68,6 +68,7 @@
|
|
class="qm-primary-button"
|
|
class="qm-primary-button"
|
|
style="width: 40%; margin-right: 20px"
|
|
style="width: 40%; margin-right: 20px"
|
|
:disabled="uploadFileList.length === 0"
|
|
:disabled="uploadFileList.length === 0"
|
|
|
|
+ :loading="uploading"
|
|
@click="uploadFiles"
|
|
@click="uploadFiles"
|
|
>
|
|
>
|
|
确认上传
|
|
确认上传
|
|
@@ -120,6 +121,7 @@ export default {
|
|
fileType: null,
|
|
fileType: null,
|
|
loadingStatus: false,
|
|
loadingStatus: false,
|
|
uploadFileList: [],
|
|
uploadFileList: [],
|
|
|
|
+ uploading: false,
|
|
// uploadFileFormat: [],
|
|
// uploadFileFormat: [],
|
|
// uploadFileAccept: "",
|
|
// uploadFileAccept: "",
|
|
};
|
|
};
|
|
@@ -429,6 +431,7 @@ export default {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.uploading = true;
|
|
|
|
|
|
let params = new FormData();
|
|
let params = new FormData();
|
|
params.append("examRecordDataId", this.course.examRecordDataId);
|
|
params.append("examRecordDataId", this.course.examRecordDataId);
|
|
@@ -464,16 +467,31 @@ export default {
|
|
|
|
|
|
this.$Message.info({
|
|
this.$Message.info({
|
|
content: "上传中...",
|
|
content: "上传中...",
|
|
- duration: 5,
|
|
|
|
|
|
+ duration: 30,
|
|
closable: true,
|
|
closable: true,
|
|
});
|
|
});
|
|
- await this.$http.post(
|
|
|
|
- "/api/branch_ecs_oe_admin/offlineExam/batchSubmitPaper",
|
|
|
|
- params,
|
|
|
|
- { headers: { "Content-Type": "multipart/form-data" } }
|
|
|
|
- );
|
|
|
|
- // console.log(res);
|
|
|
|
- this.$Message.destroy();
|
|
|
|
|
|
+ try {
|
|
|
|
+ await this.$http.post(
|
|
|
|
+ "/api/branch_ecs_oe_admin/offlineExam/batchSubmitPaper",
|
|
|
|
+ params,
|
|
|
|
+ { headers: { "Content-Type": "multipart/form-data" } }
|
|
|
|
+ );
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.logger({
|
|
|
|
+ action: "离线考试附件没有正常上传",
|
|
|
|
+ detail: error,
|
|
|
|
+ errorJSON: JSON.stringify(error, (key, value) =>
|
|
|
|
+ key === "token" ? "" : value
|
|
|
|
+ ),
|
|
|
|
+ errorName: error.name,
|
|
|
|
+ errorMessage: error.message,
|
|
|
|
+ errorStack: error.stack,
|
|
|
|
+ });
|
|
|
|
+ throw error;
|
|
|
|
+ } finally {
|
|
|
|
+ this.uploading = false;
|
|
|
|
+ this.$Message.destroy();
|
|
|
|
+ }
|
|
this.$Message.success({
|
|
this.$Message.success({
|
|
content: "上传成功",
|
|
content: "上传成功",
|
|
duration: 5,
|
|
duration: 5,
|