|
@@ -0,0 +1,128 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="tw-bg-white tw-p-5 tw-rounded-xl tw-mb-5">
|
|
|
+ <ProjectSelect :project-id="projectId" v-model:value="projectId" />
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <CourseSelect :root-org-id="rootOrgId" v-model:value="courseId" />
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <PaperTypeSelect v-model:value="paperType" />
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ 试卷名称: <a-input disabled :value="paperName" style="width: 100px" />
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <a-button @click="search">查询</a-button>
|
|
|
+
|
|
|
+ <div class="tw-mt-4">
|
|
|
+ <a-button @click="goBack">返回</a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tw-bg-white tw-p-5 tw-rounded-xl">
|
|
|
+ <a-radio-group v-model:value="activeTab" class="tw-mb-4">
|
|
|
+ <a-radio-button value="1">试卷题目编排</a-radio-button>
|
|
|
+ <a-radio-button value="2">试题特征量数</a-radio-button>
|
|
|
+ <a-radio-button value="3">题型难度分布</a-radio-button>
|
|
|
+ <a-radio-button value="4">题型难度分布</a-radio-button>
|
|
|
+ <a-radio-button value="5">试题难度分组分布</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+
|
|
|
+ <div v-if="activeTab === '1'">
|
|
|
+ <QuestionBianPai :questions="paperQuestions" />
|
|
|
+ </div>
|
|
|
+ <div v-if="activeTab === '2'">
|
|
|
+ <QuestionAttr :questions="paperQuestions" />
|
|
|
+ </div>
|
|
|
+ <div v-if="activeTab === '3'">
|
|
|
+ <QuestionTypeDifficulty
|
|
|
+ :project-id="projectId"
|
|
|
+ :questions="paperQuestionGroups"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div v-if="activeTab === '5'">
|
|
|
+ <QuestionDifficultyGroup
|
|
|
+ :questions="paperQuestions"
|
|
|
+ :project-id="projectId"
|
|
|
+ :courseId="courseId"
|
|
|
+ :paperId="paperId"
|
|
|
+ :range-config="paper.difficulityRangeConfig"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { useMainStore } from "@/store";
|
|
|
+import { goBack } from "@/utils/utils";
|
|
|
+import { watch, onMounted, ref, toRaw } from "vue-demi";
|
|
|
+import { useRoute } from "vue-router";
|
|
|
+import ProjectSelect from "@/components/ProjectSelect.vue";
|
|
|
+import router from "@/router";
|
|
|
+import {
|
|
|
+ getPaper,
|
|
|
+ getPaperQuestionGroups,
|
|
|
+ getPaperQuestions,
|
|
|
+ getSasPaper,
|
|
|
+} from "@/api/paperAnalysisPage";
|
|
|
+import QuestionBianPai from "./QuestionBianPai.vue";
|
|
|
+import QuestionAttr from "./QuestionAttr.vue";
|
|
|
+import QuestionDifficultyGroup from "./QuestionDifficultyGroup.vue";
|
|
|
+import QuestionTypeDifficulty from "./QuestionTypeDifficulty.vue";
|
|
|
+
|
|
|
+const store = useMainStore();
|
|
|
+store.currentLocation = "基础管理 / 试卷分析";
|
|
|
+
|
|
|
+let activeTab = $ref("1");
|
|
|
+
|
|
|
+let rootOrgId = $ref(undefined as unknown as number);
|
|
|
+let courseId = $ref(undefined as undefined | number);
|
|
|
+let paperType = $ref(undefined as undefined | string);
|
|
|
+let paperName = $ref(undefined as undefined | string);
|
|
|
+const route = useRoute();
|
|
|
+const projectId = +route.params.projectId;
|
|
|
+const paperId = +route.params.paperId;
|
|
|
+
|
|
|
+let paper = $ref({});
|
|
|
+let pageSize = $ref(10);
|
|
|
+let pageNo = $ref(1);
|
|
|
+
|
|
|
+let paperQuestions = $ref([]);
|
|
|
+let paperQuestionGroups = $ref([]);
|
|
|
+let sasPaper = $ref({});
|
|
|
+
|
|
|
+async function search() {
|
|
|
+ await fetchData();
|
|
|
+}
|
|
|
+
|
|
|
+watch(() => [pageNo, pageSize], fetchData);
|
|
|
+
|
|
|
+async function fetchData() {
|
|
|
+ const res = await getPaper(paperId);
|
|
|
+ // console.log(res);
|
|
|
+ paperType = res.data.paperType;
|
|
|
+ paperName = res.data.paperName;
|
|
|
+ courseId = res.data.courseId;
|
|
|
+ paper = res.data;
|
|
|
+
|
|
|
+ const res2 = await getPaperQuestions(paperId);
|
|
|
+ res2.data = res2.data.map((q) => {
|
|
|
+ q.difficulityLevel = JSON.parse(q.difficulityLevel || "[]");
|
|
|
+ return q;
|
|
|
+ });
|
|
|
+ paperQuestions = res2.data;
|
|
|
+
|
|
|
+ const res3 = await getPaperQuestionGroups(projectId, paperId);
|
|
|
+ res3.data = res3.data.map((q) => {
|
|
|
+ q.difficulityLevel = JSON.parse(q.difficulityLevel || "[]");
|
|
|
+ return q;
|
|
|
+ });
|
|
|
+ paperQuestionGroups = res3.data;
|
|
|
+
|
|
|
+ const res4 = await getSasPaper(paperId);
|
|
|
+ sasPaper = res4.data;
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ rootOrgId = store.userInfo.rootOrgId;
|
|
|
+ await search();
|
|
|
+});
|
|
|
+</script>
|