|
@@ -0,0 +1,129 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="tw-bg-white tw-p-5 tw-rounded-xl tw-mb-5">
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <ProjectSelect :project-id="projectId" v-model:value="projectId" />
|
|
|
+ <CourseSelect :root-org-id="rootOrgId" v-model:value="courseId" />
|
|
|
+ <CourseTypeSelect v-model:value="courseType" />
|
|
|
+ <PaperTypeSelect v-model:value="paperType" />
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <span class="tw-mr-4"></span>
|
|
|
+ <a-button @click="search">查询</a-button>
|
|
|
+
|
|
|
+ <div class="tw-mt-4">
|
|
|
+ <a-button @click="goAllAnalysis">整体分析</a-button>
|
|
|
+ <a-button @click="goBack">返回</a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tw-bg-white tw-p-5 tw-rounded-xl">
|
|
|
+ <a-table
|
|
|
+ row-key="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data-source="data"
|
|
|
+ :pagination="{
|
|
|
+ pageSize: pageSize,
|
|
|
+ current: pageNo,
|
|
|
+ total: totalElements,
|
|
|
+ showTotal: (total: number) => `总数:${total}`,
|
|
|
+ onChange: (pageNoChanged: number, pageSizeChanged: number) => {
|
|
|
+ pageNo = pageNoChanged;
|
|
|
+ pageSize = pageSizeChanged;
|
|
|
+ }
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <template #course="{ record }">
|
|
|
+ <a>{{ `${record.courseName}(${record.courseCode})` }}</a>
|
|
|
+ </template>
|
|
|
+ <template #action="{ record }">
|
|
|
+ <span>
|
|
|
+ <a-button @click="showModal(record)">编辑</a-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import { updateProjectCourse } from "@/api/projectParamsManagementPage";
|
|
|
+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 { Course_Type } from "@/types";
|
|
|
+import { getPaperList } from "@/api/paperManagementPage";
|
|
|
+import router from "@/router";
|
|
|
+
|
|
|
+const store = useMainStore();
|
|
|
+store.currentLocation = "基础管理 / 项目列表";
|
|
|
+
|
|
|
+let rootOrgId = $ref(undefined as unknown as number);
|
|
|
+let courseId = $ref(undefined as undefined | number);
|
|
|
+let courseType = $ref(undefined as unknown as Course_Type);
|
|
|
+let paperType = $ref(undefined as undefined | string);
|
|
|
+const route = useRoute();
|
|
|
+const projectId = +route.params.projectId;
|
|
|
+
|
|
|
+let data = $ref([]);
|
|
|
+let pageSize = $ref(10);
|
|
|
+let pageNo = $ref(1);
|
|
|
+let totalElements = $ref(0);
|
|
|
+
|
|
|
+async function search() {
|
|
|
+ await fetchData();
|
|
|
+}
|
|
|
+
|
|
|
+watch(() => [pageNo, pageSize], fetchData);
|
|
|
+
|
|
|
+async function fetchData() {
|
|
|
+ const res = await getPaperList({
|
|
|
+ projectId,
|
|
|
+ courseId,
|
|
|
+ courseType,
|
|
|
+ paperType,
|
|
|
+ pageSize,
|
|
|
+ pageNo,
|
|
|
+ });
|
|
|
+ // console.log(res);
|
|
|
+ data = res.data.content;
|
|
|
+ pageNo = res.data.pageNo;
|
|
|
+ pageSize = res.data.pageSize;
|
|
|
+ totalElements = res.data.totalElements;
|
|
|
+}
|
|
|
+
|
|
|
+const columns = [
|
|
|
+ {
|
|
|
+ title: "科目",
|
|
|
+ dataIndex: "course",
|
|
|
+ slots: { customRender: "course" },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "试卷类型",
|
|
|
+ dataIndex: "paperType",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "试卷名称",
|
|
|
+ dataIndex: "paperName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "有效样本数",
|
|
|
+ dataIndex: "totalCount",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ key: "action",
|
|
|
+ slots: { customRender: "action" },
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ rootOrgId = store.userInfo.rootOrgId;
|
|
|
+ await search();
|
|
|
+});
|
|
|
+
|
|
|
+async function goAllAnalysis() {
|
|
|
+ router.push("/" + projectId);
|
|
|
+}
|
|
|
+</script>
|