|
@@ -195,7 +195,7 @@ function parseStudentPage(student: any) {
|
|
|
});
|
|
|
}
|
|
|
const loading = ref(false);
|
|
|
-const _getStuCardDetail = () => {
|
|
|
+const _getStuCardDetail = (bool?: boolean) => {
|
|
|
loading.value = true;
|
|
|
getStuCardDetail({
|
|
|
batchId: curBatch.value.value,
|
|
@@ -204,7 +204,7 @@ const _getStuCardDetail = () => {
|
|
|
.then((res: any) => {
|
|
|
curStuCardData.value = res || {};
|
|
|
parseStudentPage(curStuCardData.value);
|
|
|
- selectPage(0);
|
|
|
+ selectPage(bool ? dataList.value.length - 1 : 0);
|
|
|
})
|
|
|
.finally(() => {
|
|
|
loading.value = false;
|
|
@@ -257,7 +257,7 @@ const curStu = ref({
|
|
|
const curStuCardData = ref({});
|
|
|
const dataList = ref<any>([]);
|
|
|
|
|
|
-const chooseLeft = (item: any, index: number) => {
|
|
|
+const chooseLeft = (item: any, index: number, bool?: boolean) => {
|
|
|
if (loading.value) return;
|
|
|
if (listType.value === "level1") {
|
|
|
curSubject.value = { value: item.subjectCode, label: item.subjectName };
|
|
@@ -276,7 +276,7 @@ const chooseLeft = (item: any, index: number) => {
|
|
|
studentId: item.studentId,
|
|
|
studentName: item.studentName,
|
|
|
};
|
|
|
- _getStuCardDetail();
|
|
|
+ _getStuCardDetail(bool);
|
|
|
}
|
|
|
};
|
|
|
const toggleListType = (type: string, num: number) => {
|
|
@@ -374,7 +374,11 @@ async function onPrevPage() {
|
|
|
window.$message.error("没有上一张了");
|
|
|
return;
|
|
|
} else {
|
|
|
- chooseLeft(leftList.value[activeIndex.value - 1], activeIndex.value - 1);
|
|
|
+ chooseLeft(
|
|
|
+ leftList.value[activeIndex.value - 1],
|
|
|
+ activeIndex.value - 1,
|
|
|
+ true
|
|
|
+ );
|
|
|
return;
|
|
|
}
|
|
|
}
|