|
@@ -81,6 +81,8 @@ async function updateTask() {
|
|
}
|
|
}
|
|
|
|
|
|
const taskData = res.data;
|
|
const taskData = res.data;
|
|
|
|
+ const subjectiveQuestions = taskData.subjectiveQuestions || [];
|
|
|
|
+ const objectiveQuestions = taskData.objectiveQuestions || [];
|
|
const rawTask: Task = {
|
|
const rawTask: Task = {
|
|
examId: taskData.examId,
|
|
examId: taskData.examId,
|
|
studentId: taskData.studentId,
|
|
studentId: taskData.studentId,
|
|
@@ -96,11 +98,11 @@ async function updateTask() {
|
|
(taskData.objectiveScore || 0) + (taskData.subjectiveScore || 0),
|
|
(taskData.objectiveScore || 0) + (taskData.subjectiveScore || 0),
|
|
sheetUrls: taskData.sheetUrls.map((item) => item.url),
|
|
sheetUrls: taskData.sheetUrls.map((item) => item.url),
|
|
sliceUrls: [],
|
|
sliceUrls: [],
|
|
- questionList: taskData.subjectiveQuestions,
|
|
|
|
|
|
+ questionList: subjectiveQuestions,
|
|
answerMap: {},
|
|
answerMap: {},
|
|
recogDatas: [],
|
|
recogDatas: [],
|
|
cardData: [],
|
|
cardData: [],
|
|
- markAreas: taskData.subjectiveQuestions.map((item) => {
|
|
|
|
|
|
+ markAreas: subjectiveQuestions.map((item) => {
|
|
return {
|
|
return {
|
|
mainNumber: item.mainNumber,
|
|
mainNumber: item.mainNumber,
|
|
subNumber: item.subNumber,
|
|
subNumber: item.subNumber,
|
|
@@ -108,14 +110,14 @@ async function updateTask() {
|
|
splitConfig: item.picList || [],
|
|
splitConfig: item.picList || [],
|
|
};
|
|
};
|
|
}),
|
|
}),
|
|
- hasMarkArea: taskData.subjectiveQuestions.some((item) => {
|
|
|
|
|
|
+ hasMarkArea: subjectiveQuestions.some((item) => {
|
|
return item.picList?.length;
|
|
return item.picList?.length;
|
|
}),
|
|
}),
|
|
};
|
|
};
|
|
|
|
|
|
// 获取客观题选项信息
|
|
// 获取客观题选项信息
|
|
const answerMap = {} as Task["answerMap"];
|
|
const answerMap = {} as Task["answerMap"];
|
|
- taskData.objectiveQuestions.forEach((item) => {
|
|
|
|
|
|
+ objectiveQuestions.forEach((item) => {
|
|
answerMap[`${item.mainNumber}_${item.subNumber}`] = {
|
|
answerMap[`${item.mainNumber}_${item.subNumber}`] = {
|
|
answer: item.answer,
|
|
answer: item.answer,
|
|
totalScore: item.totalScore,
|
|
totalScore: item.totalScore,
|