|
@@ -1,7 +1,11 @@
|
|
|
<template>
|
|
|
<div class="paper-analysis">
|
|
|
<a-card>
|
|
|
- <template #title> {{}} </template>
|
|
|
+ <template #title>
|
|
|
+ {{ store.paperAnalysisDetail.courseName }}({{
|
|
|
+ store.paperAnalysisDetail.courseCode
|
|
|
+ }})
|
|
|
+ </template>
|
|
|
<template #extra>
|
|
|
<a-button type="primary" @click="toViewReport">
|
|
|
<template #icon>
|
|
@@ -14,10 +18,10 @@
|
|
|
|
|
|
<a-form class="tiny" :labelCol="{ style: { width: '72px' } }">
|
|
|
<a-form-item label="项目名称">
|
|
|
- <span>{{ curProject.name }}</span>
|
|
|
+ <span>{{ store.paperAnalysisDetail.projectName }}</span>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="试卷类型">
|
|
|
- <span>{{ paperType }}</span>
|
|
|
+ <span>{{ store.paperAnalysisDetail.paperType }}</span>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
</a-card>
|
|
@@ -59,15 +63,6 @@
|
|
|
</a-tabs>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="activeTab === '7'">
|
|
|
- <!-- TODO: -->
|
|
|
- <PaperReport
|
|
|
- :projectId="projectId"
|
|
|
- viewType="view"
|
|
|
- :paperId="paperId"
|
|
|
- :compareProjectId="compareProjectId"
|
|
|
- />
|
|
|
- </div>
|
|
|
<SelectProject
|
|
|
ref="selectProjectRef"
|
|
|
:disableIds="[projectId]"
|
|
@@ -79,8 +74,8 @@
|
|
|
<script setup lang="ts">
|
|
|
import { useMainStore } from "@/store";
|
|
|
import { goBack } from "@/utils/utils";
|
|
|
-import { watch, onMounted, nextTick } from "vue";
|
|
|
-import { useRoute } from "vue-router";
|
|
|
+import { watch, onMounted } from "vue";
|
|
|
+import { useRoute, useRouter } from "vue-router";
|
|
|
import {
|
|
|
getPaper,
|
|
|
getPaperQuestionGroups,
|
|
@@ -95,7 +90,6 @@ import QuestionTypeDifficulty from "./QuestionTypeDifficulty.vue";
|
|
|
import QuestionTypeDiscrimination from "./QuestionTypeDiscrimination.vue";
|
|
|
import ScoreRate from "../allAnalysis/ScoreRate.vue";
|
|
|
import SelectProject from "./SelectProject.vue";
|
|
|
-import PaperReport from "../report/ReportMain.vue";
|
|
|
import { Paper, SASQuestion, SASQuestionGroup, Project } from "@/types";
|
|
|
import { message } from "ant-design-vue";
|
|
|
|
|
@@ -105,8 +99,8 @@ store.currentLocation = "项目列表 / 查询结果 / 详情";
|
|
|
let activeTab = $ref("5");
|
|
|
let courseId = $ref(undefined as unknown as number);
|
|
|
let startScore = $ref(undefined as unknown as number);
|
|
|
-let paperType = $ref(undefined as undefined | string);
|
|
|
const route = useRoute();
|
|
|
+const router = useRouter();
|
|
|
const projectId = +route.params.projectId;
|
|
|
const paperId = +route.params.paperId;
|
|
|
|
|
@@ -117,7 +111,6 @@ let pageNo = $ref(1);
|
|
|
let paperQuestions = $ref<SASQuestion[]>([]);
|
|
|
let paperQuestionGroups = $ref<SASQuestionGroup[]>([]);
|
|
|
let curProject = $ref<Project>({} as Project);
|
|
|
-let compareProjectId = $ref<number[]>([]);
|
|
|
// let sasPaper = $ref<SASPaper>({} as SASPaper);
|
|
|
|
|
|
async function search() {
|
|
@@ -129,9 +122,6 @@ 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;
|
|
|
|
|
@@ -202,12 +192,16 @@ function toViewReport() {
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
|
selectProjectRef.showModal();
|
|
|
}
|
|
|
-function projectSelected(projectId: number[]) {
|
|
|
- compareProjectId = projectId;
|
|
|
- activeTab = "";
|
|
|
-
|
|
|
- nextTick(() => {
|
|
|
- activeTab = "7";
|
|
|
+function projectSelected(pids: number[]) {
|
|
|
+ console.log(pids);
|
|
|
+
|
|
|
+ router.push({
|
|
|
+ name: "ProjectPaperReport",
|
|
|
+ params: {
|
|
|
+ projectId: projectId,
|
|
|
+ paperId,
|
|
|
+ compareProjectId: pids.join(),
|
|
|
+ },
|
|
|
});
|
|
|
}
|
|
|
</script>
|