|
@@ -1,13 +1,15 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="tw-bg-white tw-p-5 tw-rounded-xl tw-mb-5">
|
|
|
- <ProjectSelect v-model:value="projectId" :projectId="projectId" />
|
|
|
+ <a-input v-model:value="curProject.name" disabled style="width: 200px" />
|
|
|
<span class="tw-mr-4"></span>
|
|
|
<ProjectCourseSelect v-model:value="courseId" :projectId="projectId" />
|
|
|
<span class="tw-mr-4"></span>
|
|
|
<a-button class="query-btn" @click="search">查询</a-button>
|
|
|
<span class="tw-mr-4"></span>
|
|
|
<a-button @click="exportExcel">导出excel</a-button>
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <a-button @click="exportReport">导出报告</a-button>
|
|
|
|
|
|
<div class="tw-float-right tw-flex tw-gap-2">
|
|
|
<!-- <a-button @click="goProjectPapers(projectId)"> 试卷列表 </a-button> -->
|
|
@@ -54,6 +56,8 @@
|
|
|
<ScoreFirstTryRate :courseId="courseId" />
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <SelectProject ref="selectProjectRef" @confirm="projectSelected" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -64,10 +68,14 @@ import { onMounted } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import router from "@/router";
|
|
|
import { getSasPaperList } from "@/api/allAnalysisPage";
|
|
|
+import { getProjectList } from "@/api/projectManagementPage";
|
|
|
// import EventBus from "@/plugins/eventBus";
|
|
|
import ScoreRate from "./ScoreRate.vue";
|
|
|
import ScoreFirstTryRate from "./ScoreFirstTryRate.vue";
|
|
|
-import { SASPaper } from "@/types";
|
|
|
+import SelectProject from "../paperAnalysis/SelectProject.vue";
|
|
|
+import { message } from "ant-design-vue";
|
|
|
+
|
|
|
+import { SASPaper, Project } from "@/types";
|
|
|
|
|
|
type PaginationType = {
|
|
|
current: number;
|
|
@@ -91,6 +99,8 @@ store.currentLocation = "项目管理 / 项目列表 / 结果查询";
|
|
|
let courseId = $ref(undefined as unknown as number);
|
|
|
const route = useRoute();
|
|
|
const projectId = +route.params.projectId;
|
|
|
+let curProject = $ref<Project>({} as Project);
|
|
|
+let compareProjectId = $ref<number>();
|
|
|
|
|
|
let activeTab = $ref("1");
|
|
|
|
|
@@ -244,6 +254,7 @@ const columns = [
|
|
|
|
|
|
onMounted(async () => {
|
|
|
// rootOrgId = store.userInfo.rootOrgId;
|
|
|
+ await getProject();
|
|
|
await search();
|
|
|
// if (sessionStorage.getItem("allAnalysisReload")) {
|
|
|
// activeTab = "2";
|
|
@@ -292,4 +303,28 @@ async function tableChange(
|
|
|
// },
|
|
|
// });
|
|
|
// }
|
|
|
+
|
|
|
+let selectProjectRef = $ref(null);
|
|
|
+
|
|
|
+async function getProject() {
|
|
|
+ const res = await getProjectList({
|
|
|
+ id: projectId,
|
|
|
+ rootOrgId: -1,
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ });
|
|
|
+ curProject = res.data.content[0];
|
|
|
+}
|
|
|
+function exportReport() {
|
|
|
+ if (curProject && curProject.needCompute) {
|
|
|
+ void message.info("有数据更新请重新计算");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // @ts-ignore
|
|
|
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
|
+ selectProjectRef.showModal();
|
|
|
+}
|
|
|
+function projectSelected(projectId: number) {
|
|
|
+ compareProjectId = projectId;
|
|
|
+}
|
|
|
</script>
|