|
@@ -10,11 +10,12 @@
|
|
|
<a-form :label-col="{ style: { width: '83px' } }">
|
|
|
<a-form-item label="科目">
|
|
|
<a-select
|
|
|
- v-model:value="searchSubjectCode"
|
|
|
+ v-model:value="searchModel.subjectCode"
|
|
|
placeholder="请选择"
|
|
|
:options="courses"
|
|
|
:field-names="fieldNames"
|
|
|
filter-option
|
|
|
+ allow-clear
|
|
|
style="width: 150px"
|
|
|
></a-select>
|
|
|
</a-form-item>
|
|
@@ -23,6 +24,8 @@
|
|
|
v-model:value="searchDataCheckType"
|
|
|
placeholder="请选择"
|
|
|
:options="dataCheckOptions"
|
|
|
+ allow-clear
|
|
|
+ @change="dataCheckTypeChange"
|
|
|
></a-select>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
@@ -43,7 +46,7 @@
|
|
|
<a-form-item label="准考证号">
|
|
|
<div class="exam-number">
|
|
|
<a-textarea
|
|
|
- v-model:value="searchModel.examNumber"
|
|
|
+ v-model:value="customSearchModel.examNumber"
|
|
|
placeholder="请输入"
|
|
|
:auto-size="{ minRows: 1, maxRows: 1 }"
|
|
|
></a-textarea>
|
|
@@ -53,18 +56,19 @@
|
|
|
</a-form-item>
|
|
|
<a-form-item label="姓名">
|
|
|
<a-input
|
|
|
- v-model:value="searchModel.name"
|
|
|
+ v-model:value="customSearchModel.name"
|
|
|
placeholder="请输入"
|
|
|
style="width: 150px"
|
|
|
></a-input>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="科目">
|
|
|
<a-select
|
|
|
- v-model:value="searchCustomSubjectCode"
|
|
|
+ v-model:value="customSearchModel.subjectCode"
|
|
|
placeholder="请选择"
|
|
|
:options="courses"
|
|
|
:field-names="fieldNames"
|
|
|
filter-option
|
|
|
+ allow-clear
|
|
|
style="width: 150px"
|
|
|
></a-select>
|
|
|
</a-form-item>
|
|
@@ -72,7 +76,7 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="客观题作答">
|
|
|
<a-select
|
|
|
- v-model:value="searchModel.questionFilled"
|
|
|
+ v-model:value="customSearchModel.questionFilled"
|
|
|
placeholder="请选择"
|
|
|
:options="booleanOptions"
|
|
|
style="width: 85px"
|
|
@@ -83,7 +87,7 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="主观题作答">
|
|
|
<a-select
|
|
|
- v-model:value="searchModel.subjectiveFilled"
|
|
|
+ v-model:value="customSearchModel.subjectiveFilled"
|
|
|
placeholder="请选择"
|
|
|
:options="booleanOptions"
|
|
|
style="width: 100%"
|
|
@@ -94,7 +98,7 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="有作答">
|
|
|
<a-select
|
|
|
- v-model:value="searchModel.subjectiveFilled"
|
|
|
+ v-model:value="customSearchModel.hasFilled"
|
|
|
placeholder="请选择"
|
|
|
:options="booleanOptions"
|
|
|
style="width: 85px"
|
|
@@ -105,7 +109,7 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="试卷类型">
|
|
|
<a-select
|
|
|
- v-model:value="searchModel.paperTypeStatus"
|
|
|
+ v-model:value="customSearchModel.paperTypeStatus"
|
|
|
placeholder="请选择"
|
|
|
:options="paperTypeOptions"
|
|
|
style="width: 100%"
|
|
@@ -118,11 +122,12 @@
|
|
|
<a-col :span="16">
|
|
|
<a-form-item label="缺考">
|
|
|
<a-select
|
|
|
- v-model:value="searchModel.examStatus"
|
|
|
+ v-model:value="customExamStatus"
|
|
|
placeholder="请选择"
|
|
|
:options="examStatusOptions"
|
|
|
style="width: 85px"
|
|
|
allow-clear
|
|
|
+ @change="customExamStatusChange"
|
|
|
></a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -188,6 +193,7 @@ import { ImageType, booleanOptionList } from "@/constants/enumerate";
|
|
|
|
|
|
import ExportTypeDialog from "../Review/ExportTypeDialog.vue";
|
|
|
import QuestionPanel from "./QuestionPanel.vue";
|
|
|
+import { objModifyAssign } from "@/utils/tool";
|
|
|
|
|
|
defineOptions({
|
|
|
name: "CheckAction",
|
|
@@ -211,13 +217,14 @@ async function getCourses() {
|
|
|
const res = await getSubjectList({ examId: userStore.curExam.id });
|
|
|
courses.value = res || [];
|
|
|
}
|
|
|
+getCourses();
|
|
|
const fieldNames = { label: "name", value: "code" };
|
|
|
|
|
|
// search
|
|
|
const initSearchModel = {
|
|
|
examId: userStore.curExam.id,
|
|
|
status: "",
|
|
|
- examStatus: "",
|
|
|
+ examStatus: [],
|
|
|
examNumber: "",
|
|
|
studentCode: "",
|
|
|
name: "",
|
|
@@ -235,12 +242,13 @@ const initSearchModel = {
|
|
|
incomplete: null,
|
|
|
questionFilled: null,
|
|
|
subjectiveFilled: null,
|
|
|
+ hasFilled: null,
|
|
|
withOmrDetail: null,
|
|
|
};
|
|
|
const searchModel = reactive<DataCheckListFilter>({ ...initSearchModel });
|
|
|
-const searchSubjectCode = ref("");
|
|
|
-const searchCustomSubjectCode = ref("");
|
|
|
+const customSearchModel = reactive<DataCheckListFilter>({ ...initSearchModel });
|
|
|
const searchDataCheckType = ref();
|
|
|
+const customExamStatus = ref<ExamStatus>();
|
|
|
const imageType = ref(dataCheckStore.imageType);
|
|
|
const actionType = ref("common");
|
|
|
|
|
@@ -250,26 +258,66 @@ const isSliceImage = computed(() => {
|
|
|
});
|
|
|
|
|
|
const examNumberCountCont = computed(() => {
|
|
|
- const examNumbers = (searchModel.examNumber || "")
|
|
|
+ const examNumbers = (customSearchModel.examNumber || "")
|
|
|
.split("\n")
|
|
|
.filter((item) => item);
|
|
|
return `${examNumbers.length}/100`;
|
|
|
});
|
|
|
|
|
|
-function getSearchModel() {
|
|
|
- return { ...searchModel, subjectCode: searchSubjectCode.value };
|
|
|
+function dataCheckTypeChange() {
|
|
|
+ switch (searchDataCheckType.value) {
|
|
|
+ // 缺考有作答
|
|
|
+ case "1":
|
|
|
+ searchModel.examStatus = ["ABSENT"];
|
|
|
+ searchModel.hasFilled = true;
|
|
|
+ break;
|
|
|
+ // 客观题无作答,主观题有作答;
|
|
|
+ case "2":
|
|
|
+ searchModel.questionFilled = false;
|
|
|
+ searchModel.subjectiveFilled = true;
|
|
|
+ break;
|
|
|
+ // 不缺考,无条码,有作答;(正常或待审核考生,条码为空,有作答)
|
|
|
+ case "3":
|
|
|
+ searchModel.examStatus = ["OK", "UNCHECK"];
|
|
|
+ searchModel.paperTypeStatus = "BLANK";
|
|
|
+ searchModel.hasFilled = true;
|
|
|
+ break;
|
|
|
+ // 不缺考,无条码,无作答;(正常或待审核考生,条码为空,没有作答)
|
|
|
+ case "4":
|
|
|
+ searchModel.examStatus = ["OK", "UNCHECK"];
|
|
|
+ searchModel.paperTypeStatus = "BLANK";
|
|
|
+ searchModel.hasFilled = false;
|
|
|
+ break;
|
|
|
+ // 条码异常(识别的条码没与库中匹配上)
|
|
|
+ case "5":
|
|
|
+ searchModel.paperTypeStatus = "ERROR";
|
|
|
+ break;
|
|
|
+ // 缺考有条码
|
|
|
+ case "6":
|
|
|
+ searchModel.paperTypeStatus = "OK";
|
|
|
+ searchModel.examStatus = ["ABSENT"];
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ objModifyAssign(searchModel, {
|
|
|
+ ...initSearchModel,
|
|
|
+ subjectCode: searchModel.subjectCode,
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
-function getCustomSearchModel() {
|
|
|
- return {
|
|
|
- ...searchModel,
|
|
|
- subjectCode: searchCustomSubjectCode.value,
|
|
|
- };
|
|
|
+
|
|
|
+function customExamStatusChange() {
|
|
|
+ customSearchModel.examStatus = customExamStatus.value
|
|
|
+ ? [customExamStatus.value]
|
|
|
+ : [];
|
|
|
}
|
|
|
+
|
|
|
function onSearch() {
|
|
|
- emit("search", getSearchModel());
|
|
|
+ emit("search", searchModel);
|
|
|
}
|
|
|
function onCustomSearch() {
|
|
|
- emit("search", getCustomSearchModel());
|
|
|
+ emit("search", customSearchModel);
|
|
|
}
|
|
|
|
|
|
function onImageTypeChange() {
|
|
@@ -294,19 +342,20 @@ watch(
|
|
|
() => dataCheckStore.curPageIndex,
|
|
|
(val, oldval) => {
|
|
|
if (val !== oldval) {
|
|
|
- questions.value = [...dataCheckStore.curPage?.question];
|
|
|
+ if (!dataCheckStore.curPage || !dataCheckStore.curPage.question) return;
|
|
|
+ questions.value = [...dataCheckStore.curPage.question.result];
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
|
|
|
async function onQuestionsChange() {
|
|
|
if (!dataCheckStore.curPage) return;
|
|
|
- dataCheckStore.curPage.question = [...questions.value];
|
|
|
+ dataCheckStore.curPage.question.result = [...questions.value];
|
|
|
|
|
|
await dataCheckStore
|
|
|
.updateField({
|
|
|
field: "QUESTION",
|
|
|
- value: questions.value,
|
|
|
+ value: JSON.stringify(dataCheckStore.curPage.question),
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
}
|
|
@@ -334,7 +383,7 @@ async function onExportConfirm(type: "student" | "room") {
|
|
|
const func =
|
|
|
type === "student" ? dataCheckStudentExport : dataCheckRoomExport;
|
|
|
const params =
|
|
|
- actionType.value === "common" ? getSearchModel() : getCustomSearchModel();
|
|
|
+ actionType.value === "common" ? searchModel : customSearchModel;
|
|
|
|
|
|
const res = await func(params).catch((e: Error) => {
|
|
|
message.error(e.message || "下载失败,请重新尝试!");
|