|
@@ -171,7 +171,7 @@ const handleSubmit = (tempSave: boolean = false) => {
|
|
|
const msg = tempSave ? '保存中...' : '提交中...';
|
|
const msg = tempSave ? '保存中...' : '提交中...';
|
|
|
uni.$ie.showLoading(msg);
|
|
uni.$ie.showLoading(msg);
|
|
|
setTimeout(async () => {
|
|
setTimeout(async () => {
|
|
|
- const params = {
|
|
|
|
|
|
|
+ const params: Study.ExamPaperSubmit = {
|
|
|
...paperData.value,
|
|
...paperData.value,
|
|
|
questions: questionList.value.map(item => {
|
|
questions: questionList.value.map(item => {
|
|
|
return {
|
|
return {
|
|
@@ -190,7 +190,7 @@ const handleSubmit = (tempSave: boolean = false) => {
|
|
|
// examineeId: examineerData.value.examineeId,
|
|
// examineeId: examineerData.value.examineeId,
|
|
|
isDone: tempSave ? isAllDone.value : true,
|
|
isDone: tempSave ? isAllDone.value : true,
|
|
|
duration: practiceDuration.value
|
|
duration: practiceDuration.value
|
|
|
- } as Study.ExamPaperSubmit;
|
|
|
|
|
|
|
+ };
|
|
|
console.log('提交试卷参数', params)
|
|
console.log('提交试卷参数', params)
|
|
|
await commitExamineePaper(params);
|
|
await commitExamineePaper(params);
|
|
|
if (isSimulationExam.value || isTestExam.value) {
|
|
if (isSimulationExam.value || isTestExam.value) {
|
|
@@ -268,6 +268,7 @@ const restoreQuestion = (savedQuestion: Study.ExamineeQuestion[], fullQuestion:
|
|
|
}
|
|
}
|
|
|
return fullQuestion;
|
|
return fullQuestion;
|
|
|
}
|
|
}
|
|
|
|
|
+// 1、加载知识点练习数据
|
|
|
const loadPracticeData = async () => {
|
|
const loadPracticeData = async () => {
|
|
|
const { paperType, readonly, practiceInfo } = prevData.value;
|
|
const { paperType, readonly, practiceInfo } = prevData.value;
|
|
|
let data: Study.Examinee | null = null;
|
|
let data: Study.Examinee | null = null;
|
|
@@ -285,7 +286,6 @@ const loadPracticeData = async () => {
|
|
|
params.questionType = practiceInfo?.questionType;
|
|
params.questionType = practiceInfo?.questionType;
|
|
|
} else {
|
|
} else {
|
|
|
params.directed = practiceInfo?.directed || false;
|
|
params.directed = practiceInfo?.directed || false;
|
|
|
- params.questionType = practiceInfo?.questionType || 0;
|
|
|
|
|
}
|
|
}
|
|
|
const res = await getOpenExaminee(params);
|
|
const res = await getOpenExaminee(params);
|
|
|
data = res.data || {};
|
|
data = res.data || {};
|
|
@@ -300,6 +300,7 @@ const loadPracticeData = async () => {
|
|
|
totalExamTime.value = Number.MAX_SAFE_INTEGER;
|
|
totalExamTime.value = Number.MAX_SAFE_INTEGER;
|
|
|
combinePaperData(data, paperType);
|
|
combinePaperData(data, paperType);
|
|
|
}
|
|
}
|
|
|
|
|
+// 2、加载模拟考试数据
|
|
|
const loadExamData = async () => {
|
|
const loadExamData = async () => {
|
|
|
const { paperType, readonly, simulationInfo } = prevData.value;
|
|
const { paperType, readonly, simulationInfo } = prevData.value;
|
|
|
let data: Study.Examinee;
|
|
let data: Study.Examinee;
|
|
@@ -320,6 +321,31 @@ const loadExamData = async () => {
|
|
|
combinePaperData(data, paperType);
|
|
combinePaperData(data, paperType);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+// 3、加载对口升学试卷数据
|
|
|
|
|
+const loadVHSPaperData = async () => {
|
|
|
|
|
+ const { paperType, readonly, simulationInfo } = prevData.value;
|
|
|
|
|
+ let data: Study.Examinee;
|
|
|
|
|
+ if (simulationInfo?.examineeId) {
|
|
|
|
|
+ if (readonly) {
|
|
|
|
|
+ const res = await getExamineeResult(simulationInfo.examineeId);
|
|
|
|
|
+ data = res.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ paperType: paperType,
|
|
|
|
|
+ relateId: simulationInfo?.examineeId,
|
|
|
|
|
+ } as Study.OpenExamineeRequestDTO;
|
|
|
|
|
+ const res = await getOpenExaminee(params);
|
|
|
|
|
+ data = res.data || {};
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!data) {
|
|
|
|
|
+ uni.$ie.hideLoading();
|
|
|
|
|
+ transferBack();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ totalExamTime.value = data.paperInfo?.time || Number.MAX_SAFE_INTEGER;
|
|
|
|
|
+ combinePaperData(data, paperType);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
const combinePaperData = async (examinee: Study.Examinee, paperType: EnumPaperType) => {
|
|
const combinePaperData = async (examinee: Study.Examinee, paperType: EnumPaperType) => {
|
|
|
examineeId.value = examinee.examineeId;
|
|
examineeId.value = examinee.examineeId;
|
|
|
if (examinee.paperId) {
|
|
if (examinee.paperId) {
|
|
@@ -379,7 +405,11 @@ const loadData = async () => {
|
|
|
if (paperType === EnumPaperType.PRACTICE || paperType === EnumPaperType.COURSE) {
|
|
if (paperType === EnumPaperType.PRACTICE || paperType === EnumPaperType.COURSE) {
|
|
|
loadPracticeData();
|
|
loadPracticeData();
|
|
|
} else if (paperType === EnumPaperType.SIMULATED || paperType === EnumPaperType.TEST) {
|
|
} else if (paperType === EnumPaperType.SIMULATED || paperType === EnumPaperType.TEST) {
|
|
|
- loadExamData();
|
|
|
|
|
|
|
+ if (paperType === EnumPaperType.SIMULATED && userStore.isVHS) {
|
|
|
|
|
+ loadVHSPaperData();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loadExamData();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
onLoad(() => {
|
|
onLoad(() => {
|