|
@@ -1,29 +1,6 @@
|
|
|
<template>
|
|
|
<div class="school-set-recognition part-box part-box-pad">
|
|
|
- <el-form
|
|
|
- ref="modalFormComp"
|
|
|
- :model="modalForm"
|
|
|
- :rules="rules"
|
|
|
- label-width="160px"
|
|
|
- >
|
|
|
- <el-form-item label="扩展算法:" prop="extendAlgorithm">
|
|
|
- <el-radio-group v-model="modalForm.extendAlgorithm">
|
|
|
- <el-radio
|
|
|
- v-for="item in OPEN_STATUS"
|
|
|
- :key="item.value"
|
|
|
- :label="item.value"
|
|
|
- >{{ item.label }}</el-radio
|
|
|
- >
|
|
|
- </el-radio-group>
|
|
|
- <br />
|
|
|
- <p class="tips-info">
|
|
|
- (开启扩展算法后会对答题卡使用第二套算法进行识别,识别结果仅记录做研发分析,不影响正式算法识别结果)
|
|
|
- </p>
|
|
|
- <el-radio-group v-model="modalForm.extendAlgorithmType">
|
|
|
- <el-radio :key="1" :label="1">仅识别正式算法有嫌疑的题</el-radio>
|
|
|
- <el-radio :key="2" :label="2">识别全部答题卡</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
+ <el-form ref="modalFormComp" :model="modalForm" label-width="160px">
|
|
|
<el-form-item label="客观题检查扩展条件:">
|
|
|
<el-checkbox v-model="modalForm.avoidSingleChoice">
|
|
|
单选题有且仅有一个识别答案不进客观题检查
|
|
@@ -39,7 +16,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { OPEN_STATUS } from "@/constants/enumerate";
|
|
|
import {
|
|
|
schoolSetRecognitionInfo,
|
|
|
schoolSetRecognitionUpdate,
|
|
@@ -58,19 +34,9 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
modalForm: {
|
|
|
- // 扩展算法
|
|
|
- extendAlgorithm: false,
|
|
|
- extendAlgorithmType: 1,
|
|
|
avoidSingleChoice: false,
|
|
|
},
|
|
|
- OPEN_STATUS,
|
|
|
loading: false,
|
|
|
- rules: {
|
|
|
- extendAlgorithm: [{ required: true, message: "请选择扩展算法" }],
|
|
|
- extendAlgorithmType: [
|
|
|
- { required: true, message: "请选择扩展算法类型" },
|
|
|
- ],
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -79,7 +45,7 @@ export default {
|
|
|
methods: {
|
|
|
async initData() {
|
|
|
const data = await schoolSetRecognitionInfo(this.school.id);
|
|
|
- this.modalForm = data.result || {};
|
|
|
+ this.modalForm.avoidSingleChoice = data?.value === "true";
|
|
|
},
|
|
|
async confirm() {
|
|
|
const valid = await this.$refs.modalFormComp.validate().catch(() => {});
|
|
@@ -88,7 +54,7 @@ export default {
|
|
|
if (this.loading) return;
|
|
|
this.loading = true;
|
|
|
const datas = {
|
|
|
- ...this.modalForm,
|
|
|
+ enable: this.modalForm.avoidSingleChoice,
|
|
|
schoolId: this.school.id,
|
|
|
};
|
|
|
const res = await schoolSetRecognitionUpdate(datas).catch(() => {});
|
|
@@ -96,7 +62,6 @@ export default {
|
|
|
if (!res) return;
|
|
|
|
|
|
this.$message.success("修改成功!");
|
|
|
- this.initData();
|
|
|
},
|
|
|
},
|
|
|
};
|