|
|
@@ -23,7 +23,8 @@ import FiltersItem from "@/components/FiltersItem.vue";
|
|
|
// 重命名导入的 API 函数以避免冲突
|
|
|
import {
|
|
|
findCommonSelectList,
|
|
|
- getAnalysisExamInfo as fetchAnalysisExamInfo,
|
|
|
+ getAnalysisExamInfo,
|
|
|
+ getIdByAiExamId,
|
|
|
} from "@/api/analysis";
|
|
|
import { onMounted, ref, computed } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
@@ -37,8 +38,12 @@ const reportContentRef = ref<HTMLElement | null>(null);
|
|
|
|
|
|
// 考试科目 code
|
|
|
const subjectCode = computed(() => {
|
|
|
+ console.log(examStore.currentExam, 33333);
|
|
|
return examStore.currentExam?.examSubjectCode;
|
|
|
});
|
|
|
+const aiExamId = computed(() => {
|
|
|
+ return examStore.currentExam?.id || "";
|
|
|
+});
|
|
|
|
|
|
// --- 类型定义 ---
|
|
|
interface FilterOption {
|
|
|
@@ -344,7 +349,7 @@ const loadAnalysisExamInfo = async () => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const res = await fetchAnalysisExamInfo({
|
|
|
+ const res = await getAnalysisExamInfo({
|
|
|
examId: "2036963589738971137",
|
|
|
subjectCode: currentSubjectCode,
|
|
|
});
|
|
|
@@ -405,16 +410,25 @@ const handleSelectChange = (index: number, value: string) => {
|
|
|
analysisStore.setFiltersData(filtersData.value);
|
|
|
buildAndSaveFilterParams();
|
|
|
};
|
|
|
-
|
|
|
+// 根据选择题判分系统ID获取考试的examId
|
|
|
+const GetIdByAiExamId = async () => {
|
|
|
+ const res = await getIdByAiExamId({
|
|
|
+ aiExamId: aiExamId.value,
|
|
|
+ });
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+
|
|
|
+ }
|
|
|
+};
|
|
|
// 回到顶部
|
|
|
const goToPageTop = () => {
|
|
|
reportContentRef.value?.scrollTo({ top: 0, behavior: "smooth" });
|
|
|
};
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- if(analysisStore?.filtersData?.length){
|
|
|
+onMounted(async () => {
|
|
|
+ await GetIdByAiExamId();
|
|
|
+ if (analysisStore?.filtersData?.length) {
|
|
|
filtersData.value = analysisStore.filtersData;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
getCommonSelectList();
|
|
|
}
|
|
|
loadAnalysisExamInfo();
|