|
@@ -1,24 +1,61 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-button @click="openModal1">说明</a-button>
|
|
|
- <a-button @click="openModal2">说明</a-button>
|
|
|
+ <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="openModal1">说明</a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <table class="custom-table">
|
|
|
- <tr>
|
|
|
- <th>大题号</th>
|
|
|
- <th>小题号</th>
|
|
|
- <!-- <th v-for="(item, index) in props" :key="index"></th> -->
|
|
|
- </tr>
|
|
|
- <tr v-for="(item, index) in props.questions" :key="index">
|
|
|
- <td>{{ item.mainNumber }}</td>
|
|
|
- <td>{{ item.subNumber }}</td>
|
|
|
- <td v-for="(item, index) in item.difficulityLevel" :key="index">
|
|
|
- {{ item }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
+ <div class="tw-overflow-y-scroll">
|
|
|
+ <table class="custom-table">
|
|
|
+ <tr>
|
|
|
+ <td>大题号</td>
|
|
|
+ <td>小题号</td>
|
|
|
+ <td v-for="(item, index) in props.totalScore / 10" :key="index">
|
|
|
+ {{ index * 10 }}-
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(item, index) in props.questions" :key="index">
|
|
|
+ <td>{{ item.mainNumber }}</td>
|
|
|
+ <td>{{ item.subNumber }}</td>
|
|
|
+ <td v-for="(item, index) in item.difficulityLevel" :key="index">
|
|
|
+ {{ item }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <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="openRangeConfigModal">分段设置</a-button>
|
|
|
+ <a-button @click="openModal2">说明</a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="tw-overflow-y-scroll">
|
|
|
+ <table class="custom-table">
|
|
|
+ <tr>
|
|
|
+ <td>大题号</td>
|
|
|
+ <td>小题号</td>
|
|
|
+ <td
|
|
|
+ v-for="(item2, index) in JSON.parse(props.rangeConfig)"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ scoreTitle(item2) }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(item, index) in props.questions" :key="index">
|
|
|
+ <td>{{ item.mainNumber }}</td>
|
|
|
+ <td>{{ item.subNumber }}</td>
|
|
|
+ <td v-for="(item, index) in item.difficulityGroupLevel" :key="index">
|
|
|
+ {{ item }}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
|
|
|
- <a-button @click="openRangeConfigModal">分段设置</a-button>
|
|
|
<CommonRangeConfig
|
|
|
ref="rangeConfigRef"
|
|
|
:project-id="projectId"
|
|
@@ -26,18 +63,19 @@
|
|
|
:range-config="selectedRangeConfig"
|
|
|
@updated="handleRangeConfigUpdate"
|
|
|
/>
|
|
|
- <!-- <table></table> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { setPaperRangeConfig } from "@/api/paperAnalysisPage";
|
|
|
+import { RANGE_POINT_TYPE } from "@/constants/constants";
|
|
|
import EventBus from "@/plugins/eventBus";
|
|
|
import { Question } from "@/types";
|
|
|
import { message } from "ant-design-vue";
|
|
|
|
|
|
const props = defineProps<{
|
|
|
questions: Question[];
|
|
|
+ totalScore: number;
|
|
|
rangeConfig?: string;
|
|
|
projectId: number;
|
|
|
courseId: number;
|
|
@@ -79,6 +117,15 @@ async function handleRangeConfigUpdate(rangeConfig: any) {
|
|
|
});
|
|
|
message.success({ content: "操作成功" });
|
|
|
}
|
|
|
+
|
|
|
+function scoreTitle(rangeConfig: any) {
|
|
|
+ if (!rangeConfig) return false;
|
|
|
+ if (rangeConfig.type === "ZERO") return "0-";
|
|
|
+
|
|
|
+ return `${rangeConfig.baseScore + rangeConfig.adjustScore}(${
|
|
|
+ RANGE_POINT_TYPE[rangeConfig.type]
|
|
|
+ }${rangeConfig.adjustScore > 0 ? "+" : ""}${rangeConfig.adjustScore})-`;
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped></style>
|