|
@@ -0,0 +1,220 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <a-button @click="importModalVisible = true">题型分布设置</a-button>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'TYPE1')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">题型题目区分度等级构成分布(一)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE160">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'TYPE1' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'TYPE2')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">题型题目区分度等级构成分布(二)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE170">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'TYPE2' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'TYPE3')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">题型题目区分度等级构成分布(三)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE180">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'TYPE3' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'CONTENT1')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">内容题目区分度等级构成分布(一)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE190">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'CONTENT1' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'CONTENT2')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">内容题目区分度等级构成分布(二)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE200">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'CONTENT2' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'CONTENT3')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">内容题目区分度等级构成分布(三)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE210">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'CONTENT3' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'ABILITY1')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">能力题目区分度等级构成分布(一)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE220">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'ABILITY1' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'ABILITY2')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">能力题目区分度等级构成分布(二)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE230">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'ABILITY2' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div v-if="props.questions.some((q) => q.type === 'ABILITY3')">
|
|
|
|
+ <div class="tw-flex tw-justify-between tw-items-center tw-my-4">
|
|
|
|
+ <h3 class="section-title">能力题目区分度等级构成分布(三)</h3>
|
|
|
|
+ <div class="tw-flex tw-gap-2">
|
|
|
|
+ <a-button @click="openModalDESCRIBE240">说明</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <DistriTable
|
|
|
|
+ :questions="
|
|
|
|
+ props.questions.filter((q) => q.type === 'ABILITY3' || !q.type)
|
|
|
|
+ "
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <a-modal
|
|
|
|
+ v-model:visible="importModalVisible"
|
|
|
|
+ title="题型设置导入"
|
|
|
|
+ @ok="handleImport"
|
|
|
|
+ ok-text="确定"
|
|
|
|
+ cancel-text="取消"
|
|
|
|
+ >
|
|
|
|
+ <a-form>
|
|
|
|
+ <a-form-item label="文件地址">
|
|
|
|
+ <input id="file-input" :multiple="false" type="file" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <a-form-item label="下载模板">
|
|
|
|
+ <a-button class="download-tpl-btn" @click="downloadTpl">
|
|
|
|
+ 下载模板
|
|
|
|
+ </a-button>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-form>
|
|
|
|
+ </a-modal>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup lang="ts">
|
|
|
|
+import { importQuestionGroups } from "@/api/paperAnalysisPage";
|
|
|
|
+import EventBus from "@/plugins/eventBus";
|
|
|
|
+import { QuestionGroup } from "@/types";
|
|
|
|
+import { downloadFileURL } from "@/utils/utils";
|
|
|
|
+import { message } from "ant-design-vue";
|
|
|
|
+import DistriTable from "./DistriTable.vue";
|
|
|
|
+
|
|
|
|
+const props = defineProps<{ questions: QuestionGroup[]; projectId: number }>();
|
|
|
|
+
|
|
|
|
+function openModalDESCRIBE160() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE160");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE170() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE170");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE180() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE180");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE190() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE190");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE200() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE200");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE210() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE210");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE220() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE220");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE230() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE230");
|
|
|
|
+}
|
|
|
|
+function openModalDESCRIBE240() {
|
|
|
|
+ EventBus.emit("SHOW_SETTING", "DESCRIBE240");
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** <handleImport> */
|
|
|
|
+let importModalVisible = $ref<boolean>(false);
|
|
|
|
+async function handleImport() {
|
|
|
|
+ const files = (document.querySelector("#file-input") as HTMLInputElement)
|
|
|
|
+ .files;
|
|
|
|
+ const fileToImport = files && files[0];
|
|
|
|
+ if (!fileToImport) {
|
|
|
|
+ message.warn({ content: "请选择文件" });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ await importQuestionGroups(props.projectId, fileToImport);
|
|
|
|
+ message.success({ content: "导入成功" });
|
|
|
|
+}
|
|
|
|
+/** </handleImport> */
|
|
|
|
+
|
|
|
|
+async function downloadTpl() {
|
|
|
|
+ downloadFileURL("/api/ess/sasQuestionGroup/template");
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped></style>
|