From 8c739c86e6c6142881ebb2b1615f6b5ccf9aca55 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 31 十月 2024 20:03:12 +0800
Subject: [PATCH] 查看试卷bug
---
src/views/grade-list/index.vue | 7 ++++---
src/store/modules/grade.js | 5 +++--
src/views/grade-list/data-list/index.vue | 4 ++--
src/views/grade/index.vue | 6 +++---
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/store/modules/grade.js b/src/store/modules/grade.js
index 737f735..9096658 100644
--- a/src/store/modules/grade.js
+++ b/src/store/modules/grade.js
@@ -19,6 +19,7 @@
const currentIndex = ref(0);
const getActiveQuestion = computed(() => {
+ console.log("sb", currentType.value)
const temp = examDetail.value.find(item => item.questionType === currentType.value);
if (temp) {
return temp.questionList[currentIndex.value];
@@ -32,9 +33,9 @@
const setExamDetail = (detail) => {
examDetail.value = detail;
};
- const initExam = () => {
+ const initExam = (questionType) => {
currentIndex.value = 0;
- currentType.value = 1;
+ currentType.value = questionType;
}
return {
examInfo,
diff --git a/src/views/grade-list/data-list/index.vue b/src/views/grade-list/data-list/index.vue
index 698bf01..82e60b0 100644
--- a/src/views/grade-list/data-list/index.vue
+++ b/src/views/grade-list/data-list/index.vue
@@ -100,7 +100,7 @@
navbar
});
gradeStore.setExamDetail(titleItems);
- gradeStore.initExam();
+ gradeStore.initExam(res.data.titleItems[0].questionType);
router.push('/grade');
}).catch(err => {
@@ -118,4 +118,4 @@
.bottom-item {
margin-right: 30px;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/grade-list/index.vue b/src/views/grade-list/index.vue
index 3e865f1..c40a0d3 100644
--- a/src/views/grade-list/index.vue
+++ b/src/views/grade-list/index.vue
@@ -30,8 +30,8 @@
</div>
<div class="card-footer flex justify-center mb-7 shrink-0">
- <el-pagination background layout="prev, pager, next"
- :total="dataList.length"
+ <el-pagination background layout="prev, pager, next"
+ :total="dataList.length"
:default-page-size="currentSize"
:currentPage="currentIndex"
:hide-on-single-page="true"
@@ -65,6 +65,7 @@
loading.value = true;
getGradeList({examName: searchText.value, pageIndex: currentIndex.value, pageSize: currentSize.value}).then(res => {
dataList.value = res.data.list;
+ console.log(dataList.value, "wwww")
loading.value = false;
}).catch(err => {
loading.value = false;
@@ -89,4 +90,4 @@
:deep(.el-tabs__nav-wrap:after) {
display: none;
}
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/grade/index.vue b/src/views/grade/index.vue
index b7ad27e..07b4042 100644
--- a/src/views/grade/index.vue
+++ b/src/views/grade/index.vue
@@ -8,7 +8,7 @@
{{ examInfo.examName }}
</div>
<AnswerGrade></AnswerGrade>
-
+
<div class="return-container grow flex justify-end">
<el-button type="danger" size="large" circle @click="closeClick">
<template #icon>
@@ -97,7 +97,7 @@
const gradeStore = useGradeStore();
const { currentType, currentIndex, examDetail, examType, examInfo } = storeToRefs(gradeStore);
-
+console.log("鎴戣崏娉ラ┈锛�", storeToRefs(gradeStore))
const typeComponent = {
1: AnswerSingle,
2: AnswerMultiple,
@@ -222,4 +222,4 @@
background-color: rgba($color: #3680fa, $alpha: 0.2);
margin-bottom: 20px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0