|
@@ -151,22 +151,44 @@ const _batchStudentList = () => {
|
|
|
listType.value = "level4";
|
|
|
});
|
|
|
};
|
|
|
+function parseStudentPage(student: any) {
|
|
|
+ dataList.value = [];
|
|
|
+
|
|
|
+ student.papers.forEach((paper: any, paperIndex: number) => {
|
|
|
+ if (!paper.pages) return;
|
|
|
+ paper.pages.forEach((page: any, pageIndex: number) => {
|
|
|
+ dataList.value.push({
|
|
|
+ ...page,
|
|
|
+ paperId: paper.id as number,
|
|
|
+ pageIndex,
|
|
|
+ paperIndex,
|
|
|
+ studentIndex: 0,
|
|
|
+ studentId: student.id,
|
|
|
+ examId: userStore.curExam?.id,
|
|
|
+ kid: `${student.id}-${0}-${paperIndex}-${pageIndex}`,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
const _getStuCardDetail = () => {
|
|
|
getStuCardDetail({
|
|
|
batchId: curBatch.value.value,
|
|
|
studentId: curStu.value.studentId,
|
|
|
}).then((res: any) => {
|
|
|
curStuCardData.value = res || {};
|
|
|
- dataCheckStore.setInfo({
|
|
|
- curPage: curStuCardData.value as any,
|
|
|
- curPageIndex: -1,
|
|
|
- });
|
|
|
-
|
|
|
- if (!dataCheckStore.curPage) return;
|
|
|
- dataCheckStore.setInfo({ curStudent: curStuCardData.value as any });
|
|
|
+ parseStudentPage(curStuCardData.value);
|
|
|
+ selectPage(0);
|
|
|
});
|
|
|
};
|
|
|
+function selectPage(index: number) {
|
|
|
+ dataCheckStore.setInfo({
|
|
|
+ curPage: dataList.value[index],
|
|
|
+ curPageIndex: index,
|
|
|
+ });
|
|
|
|
|
|
+ if (!dataCheckStore.curPage) return;
|
|
|
+ dataCheckStore.setInfo({ curStudent: curStuCardData.value as any });
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
_batchSubjectList();
|
|
|
});
|
|
@@ -206,6 +228,7 @@ const curStu = ref({
|
|
|
studentName: "",
|
|
|
});
|
|
|
const curStuCardData = ref({});
|
|
|
+const dataList = ref<any>([]);
|
|
|
|
|
|
const chooseLeft = (item: any, index: number) => {
|
|
|
activeIndex.value = index;
|