|
@@ -41,7 +41,7 @@ export default defineComponent({
|
|
|
currentIndex: 0,
|
|
|
questionList: [] as any,
|
|
|
page: 1,
|
|
|
- rows: 10,
|
|
|
+ rows: 50,
|
|
|
total: 0,
|
|
|
isFinish: false, // 是否完成加载
|
|
|
visiableInfo: {
|
|
@@ -70,14 +70,17 @@ export default defineComponent({
|
|
|
// 计时
|
|
|
const { counter, resume, pause } = useInterval(1000, { controls: true });
|
|
|
|
|
|
- const getExamDetails = async () => {
|
|
|
+ const getExamDetails = async (
|
|
|
+ maxStudentExaminationErrorEditionId?: string
|
|
|
+ ) => {
|
|
|
try {
|
|
|
const { data } = await request.post(
|
|
|
'/edu-app/studentUnitExamination/errorEdition',
|
|
|
{
|
|
|
data: {
|
|
|
page: state.page,
|
|
|
- rows: state.rows
|
|
|
+ rows: state.rows,
|
|
|
+ maxStudentExaminationErrorEditionId
|
|
|
}
|
|
|
}
|
|
|
);
|
|
@@ -110,8 +113,10 @@ export default defineComponent({
|
|
|
state.currentIndex + 3 >= state.questionList.length &&
|
|
|
!state.isFinish
|
|
|
) {
|
|
|
+ const lastQuestion =
|
|
|
+ state.questionList[state.questionList.length - 1];
|
|
|
state.page = state.page + 1;
|
|
|
- getExamDetails();
|
|
|
+ getExamDetails(lastQuestion.id);
|
|
|
}
|
|
|
}
|
|
|
);
|
|
@@ -168,7 +173,16 @@ export default defineComponent({
|
|
|
|
|
|
// 后面没有题
|
|
|
if (state.questionList.length === state.currentIndex + 1) {
|
|
|
- swipeRef.value?.prev();
|
|
|
+ const index = state.questionList.findIndex(
|
|
|
+ (item: any) =>
|
|
|
+ item.studentExaminationErrorEditionId ===
|
|
|
+ state.visiableInfo.graspItem.studentExaminationErrorEditionId
|
|
|
+ );
|
|
|
+ state.questionList.splice(index, 1);
|
|
|
+ state.total -= 1;
|
|
|
+ state.currentIndex -= 1;
|
|
|
+ resizeSwipeItemHeight();
|
|
|
+ // swipeRef.value?.prev();
|
|
|
return;
|
|
|
}
|
|
|
} catch {
|