|
@@ -189,6 +189,7 @@
|
|
|
</p>
|
|
|
<el-checkbox
|
|
|
v-model="onlyErrorQuestion"
|
|
|
+ :disabled="!hasErrorTips"
|
|
|
@change="onlyErrorQuestionChange"
|
|
|
>仅查看识别有误试题</el-checkbox
|
|
|
>
|
|
@@ -331,36 +332,7 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
hasErrorTips() {
|
|
|
- // return (this.paperRichJsonGroup || []).some((item) => {
|
|
|
- // return item?.exceptions?.length;
|
|
|
- // });
|
|
|
- let detailInfo = this.paperData;
|
|
|
- if (!Array.isArray(detailInfo)) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- return detailInfo.some((detail) => {
|
|
|
- return detail?.questions?.some((item) => {
|
|
|
- let questionExceptions = item.questionExceptions;
|
|
|
- let arr = item.ignoreOptionRepeat
|
|
|
- ? questionExceptions.filter(
|
|
|
- (v) => !v.cause.includes("选项内容相同")
|
|
|
- )
|
|
|
- : questionExceptions;
|
|
|
- if (!item.subQuestions?.length) {
|
|
|
- return !!arr.length;
|
|
|
- } else {
|
|
|
- return item.subQuestions.some((sub) => {
|
|
|
- let { questionExceptions = [] } = sub;
|
|
|
- let ar = sub.ignoreOptionRepeat
|
|
|
- ? questionExceptions.filter(
|
|
|
- (v) => !v.cause.includes("选项内容相同")
|
|
|
- )
|
|
|
- : questionExceptions;
|
|
|
- return !!ar.length;
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ return this.questionStatData.errorCount > 0;
|
|
|
},
|
|
|
accept() {
|
|
|
return this.importFileTypes.map((item) => `.${item}`).join(",");
|
|
@@ -429,15 +401,6 @@ export default {
|
|
|
created() {
|
|
|
this.$bus.on("markIgnoreRepeatQuestion", this.markIgnoreRepeat);
|
|
|
},
|
|
|
- watch: {
|
|
|
- paperData: {
|
|
|
- handler() {
|
|
|
- this.parseQuestionStatData();
|
|
|
- this.filterQuestionTypeChange(this.filterQuestionType);
|
|
|
- this.questionKey = randomCode();
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
methods: {
|
|
|
getInitForm() {
|
|
|
return {
|
|
@@ -607,6 +570,8 @@ export default {
|
|
|
this.paperRichJsonGroup = this.getRichTextGroup();
|
|
|
|
|
|
this.uploadData = { courseId: this.modalForm.courseId };
|
|
|
+ this.parseQuestionStatData();
|
|
|
+ this.filterQuestionTypeChange("all");
|
|
|
this.questionKey = randomCode();
|
|
|
|
|
|
this.$nextTick(() => {
|