|
@@ -450,7 +450,7 @@
|
|
curQue.sortType == 'row' ? 'sent-option-row' : 'li-flex',
|
|
curQue.sortType == 'row' ? 'sent-option-row' : 'li-flex',
|
|
itemsWidth == 780 ? 'hasPadding' : ''
|
|
itemsWidth == 780 ? 'hasPadding' : ''
|
|
]"
|
|
]"
|
|
- v-for="(item, index) in curQue.option"
|
|
|
|
|
|
+ v-for="(item, index) in rowOption"
|
|
:key="'sent-option' + index"
|
|
:key="'sent-option' + index"
|
|
>
|
|
>
|
|
<div
|
|
<div
|
|
@@ -585,7 +585,11 @@
|
|
:pyPosition="curQue.pyPosition"
|
|
:pyPosition="curQue.pyPosition"
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
:pyColor="curQue.pyColor"
|
|
:pyColor="curQue.pyColor"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:judgeAnswer="judgeAnswer"
|
|
:judgeAnswer="judgeAnswer"
|
|
:correctAnswer="items.correct.complateArr"
|
|
:correctAnswer="items.correct.complateArr"
|
|
:isInput="
|
|
:isInput="
|
|
@@ -677,7 +681,11 @@
|
|
>
|
|
>
|
|
<ShortInputTemp
|
|
<ShortInputTemp
|
|
:doubleInput="items.correct.doubleInput"
|
|
:doubleInput="items.correct.doubleInput"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
:is_short_auto="items.fn_check_list.is_short_auto"
|
|
:is_short_auto="items.fn_check_list.is_short_auto"
|
|
:judgeAnswer="judgeAnswer"
|
|
:judgeAnswer="judgeAnswer"
|
|
@@ -696,7 +704,11 @@
|
|
>
|
|
>
|
|
<JudgeTemp
|
|
<JudgeTemp
|
|
:isRecord="items.fn_check_list.record_check"
|
|
:isRecord="items.fn_check_list.record_check"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:judge_isNo="items.judge_isNo"
|
|
:judge_isNo="items.judge_isNo"
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
:Isexample="items.Isexample"
|
|
:Isexample="items.Isexample"
|
|
@@ -723,7 +735,11 @@
|
|
:row="
|
|
:row="
|
|
items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
"
|
|
"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
type="checkbox"
|
|
type="checkbox"
|
|
:curQue="curQue"
|
|
:curQue="curQue"
|
|
@@ -751,7 +767,11 @@
|
|
:row="
|
|
:row="
|
|
items.fn_check_list.radio_check.indexOf('row') > -1
|
|
items.fn_check_list.radio_check.indexOf('row') > -1
|
|
"
|
|
"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:correctAnswer="items.correct"
|
|
:correctAnswer="items.correct"
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
type="radio"
|
|
type="radio"
|
|
@@ -787,7 +807,13 @@
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
:tmIndex="sdIndex"
|
|
:tmIndex="sdIndex"
|
|
:answerRecordList="
|
|
:answerRecordList="
|
|
- curQue.Bookanswer[index][indexs].recordList[sdIndex]
|
|
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs].recordList[
|
|
|
|
+ sdIndex
|
|
|
|
+ ]
|
|
|
|
+ : curQue.Bookanswer[indexs][index].recordList[
|
|
|
|
+ sdIndex
|
|
|
|
+ ]
|
|
"
|
|
"
|
|
:index="index"
|
|
:index="index"
|
|
:indexs="indexs"
|
|
:indexs="indexs"
|
|
@@ -808,7 +834,11 @@
|
|
:row="
|
|
:row="
|
|
items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
"
|
|
"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:correctAnswer="items.correct"
|
|
:correctAnswer="items.correct"
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
type="checkbox"
|
|
type="checkbox"
|
|
@@ -826,7 +856,11 @@
|
|
<OptionTemp
|
|
<OptionTemp
|
|
:option="items.radio_option"
|
|
:option="items.radio_option"
|
|
:row="items.fn_check_list.radio_check.indexOf('row') > -1"
|
|
:row="items.fn_check_list.radio_check.indexOf('row') > -1"
|
|
- :Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
|
|
|
+ :Bookanswer="
|
|
|
|
+ curQue.sortType == 'row'
|
|
|
|
+ ? curQue.Bookanswer[index][indexs]
|
|
|
|
+ : curQue.Bookanswer[indexs][index]
|
|
|
|
+ "
|
|
:correctAnswer="items.correct"
|
|
:correctAnswer="items.correct"
|
|
:TaskModel="TaskModel"
|
|
:TaskModel="TaskModel"
|
|
type="radio"
|
|
type="radio"
|
|
@@ -913,7 +947,8 @@ export default {
|
|
answerpart: [],
|
|
answerpart: [],
|
|
userErrorList: [],
|
|
userErrorList: [],
|
|
userBookanswer: [],
|
|
userBookanswer: [],
|
|
- userErrorNumberTotal: 0
|
|
|
|
|
|
+ userErrorNumberTotal: 0,
|
|
|
|
+ rowOption: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -1223,7 +1258,6 @@ export default {
|
|
this.userErrorNumberTotal = errorArr.length;
|
|
this.userErrorNumberTotal = errorArr.length;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
this.$set(this.curQue, "option", option);
|
|
this.$set(this.curQue, "option", option);
|
|
let contentWidth = window.innerWidth;
|
|
let contentWidth = window.innerWidth;
|
|
if (this.curQue.img_list && this.curQue.img_list.length > 0) {
|
|
if (this.curQue.img_list && this.curQue.img_list.length > 0) {
|
|
@@ -1241,68 +1275,158 @@ export default {
|
|
if (this.judgeAnswer == "standardAnswer") {
|
|
if (this.judgeAnswer == "standardAnswer") {
|
|
this.userErrorList = [];
|
|
this.userErrorList = [];
|
|
this.userBookanswer = [];
|
|
this.userBookanswer = [];
|
|
- this.curQue.option.forEach((item, index) => {
|
|
|
|
- item.forEach((items, indexs) => {
|
|
|
|
- let flag = false;
|
|
|
|
- // 多输入或者短输入
|
|
|
|
- items.correct.doubleInput.forEach((itemI, indexI) => {
|
|
|
|
|
|
+ if (this.curQue.sortType === "col") {
|
|
|
|
+ for (let indexs = 0; indexs < itemLeg; indexs++) {
|
|
|
|
+ for (let index = 0; index < this.curQue.option.length; index++) {
|
|
|
|
+ if (this.curQue.option[index][indexs]) {
|
|
|
|
+ let items = this.curQue.option[index][indexs];
|
|
|
|
+ let flag = false;
|
|
|
|
+ // 多输入或者短输入
|
|
|
|
+ items.correct.doubleInput.forEach((itemI, indexI) => {
|
|
|
|
+ if (
|
|
|
|
+ itemI.correct &&
|
|
|
|
+ itemI.correct !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].doubleInput[indexI]
|
|
|
|
+ .correct
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // 句子填空
|
|
|
|
+ items.correct.complateArr.forEach((itemI, indexI) => {
|
|
|
|
+ if (
|
|
|
|
+ itemI &&
|
|
|
|
+ itemI !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].completeInput[
|
|
|
|
+ indexI
|
|
|
|
+ ]
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // 句子判断
|
|
|
|
+ if (
|
|
|
|
+ items.correct.judge &&
|
|
|
|
+ items.correct.judge !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].judge.correct
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 句子单选
|
|
|
|
+ if (
|
|
|
|
+ items.correct.radio !== "" &&
|
|
|
|
+ items.correct.radio !==
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].radio.correct
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ // 句子多选
|
|
|
|
+ if (
|
|
|
|
+ items.correct &&
|
|
|
|
+ items.correct.checkbox.length > 0 &&
|
|
|
|
+ items.correct.checkbox.sort().toString() !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].checkbox.correct
|
|
|
|
+ .sort()
|
|
|
|
+ .toString()
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ // if (flag) {
|
|
|
|
+ this.userErrorList.push(items);
|
|
|
|
+ this.userBookanswer.push(this.curQue.Bookanswer[index][indexs]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.curQue.option.forEach((item, index) => {
|
|
|
|
+ item.forEach((items, indexs) => {
|
|
|
|
+ let flag = false;
|
|
|
|
+ // 多输入或者短输入
|
|
|
|
+ items.correct.doubleInput.forEach((itemI, indexI) => {
|
|
|
|
+ if (
|
|
|
|
+ itemI.correct &&
|
|
|
|
+ itemI.correct !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].doubleInput[indexI]
|
|
|
|
+ .correct
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // 句子填空
|
|
|
|
+ items.correct.complateArr.forEach((itemI, indexI) => {
|
|
|
|
+ if (
|
|
|
|
+ itemI &&
|
|
|
|
+ itemI !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].completeInput[indexI]
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // 句子判断
|
|
if (
|
|
if (
|
|
- itemI.correct &&
|
|
|
|
- itemI.correct !=
|
|
|
|
- this.curQue.Bookanswer[index][indexs].doubleInput[indexI]
|
|
|
|
- .correct
|
|
|
|
|
|
+ items.correct.judge &&
|
|
|
|
+ items.correct.judge !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].judge.correct
|
|
) {
|
|
) {
|
|
flag = true;
|
|
flag = true;
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
|
|
- // 句子填空
|
|
|
|
- items.correct.complateArr.forEach((itemI, indexI) => {
|
|
|
|
|
|
+ // 句子单选
|
|
|
|
+ if (
|
|
|
|
+ items.correct.radio !== "" &&
|
|
|
|
+ items.correct.radio !==
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].radio.correct
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
|
|
+ // 句子多选
|
|
if (
|
|
if (
|
|
- itemI &&
|
|
|
|
- itemI !=
|
|
|
|
- this.curQue.Bookanswer[index][indexs].completeInput[indexI]
|
|
|
|
|
|
+ items.correct &&
|
|
|
|
+ items.correct.checkbox.length > 0 &&
|
|
|
|
+ items.correct.checkbox.sort().toString() !=
|
|
|
|
+ this.curQue.Bookanswer[index][indexs].checkbox.correct
|
|
|
|
+ .sort()
|
|
|
|
+ .toString()
|
|
) {
|
|
) {
|
|
flag = true;
|
|
flag = true;
|
|
}
|
|
}
|
|
|
|
+ // if (flag) {
|
|
|
|
+ this.userErrorList.push(items);
|
|
|
|
+ this.userBookanswer.push(this.curQue.Bookanswer[index][indexs]);
|
|
|
|
+ // }
|
|
});
|
|
});
|
|
-
|
|
|
|
- // 句子判断
|
|
|
|
- if (
|
|
|
|
- items.correct.judge &&
|
|
|
|
- items.correct.judge !=
|
|
|
|
- this.curQue.Bookanswer[index][indexs].judge.correct
|
|
|
|
- ) {
|
|
|
|
- flag = true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 句子单选
|
|
|
|
- if (
|
|
|
|
- items.correct.radio !== "" &&
|
|
|
|
- items.correct.radio !==
|
|
|
|
- this.curQue.Bookanswer[index][indexs].radio.correct
|
|
|
|
- ) {
|
|
|
|
- flag = true;
|
|
|
|
- }
|
|
|
|
- // 句子多选
|
|
|
|
- if (
|
|
|
|
- items.correct &&
|
|
|
|
- items.correct.checkbox.length > 0 &&
|
|
|
|
- items.correct.checkbox.sort().toString() !=
|
|
|
|
- this.curQue.Bookanswer[index][indexs].checkbox.correct
|
|
|
|
- .sort()
|
|
|
|
- .toString()
|
|
|
|
- ) {
|
|
|
|
- flag = true;
|
|
|
|
- }
|
|
|
|
- // if (flag) {
|
|
|
|
- this.userErrorList.push(items);
|
|
|
|
- this.userBookanswer.push(this.curQue.Bookanswer[index][indexs]);
|
|
|
|
- // }
|
|
|
|
});
|
|
});
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (this.curQue.sortType === "col") {
|
|
|
|
+ this.transpose(option);
|
|
|
|
+ } else {
|
|
|
|
+ this.rowOption = option;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ transpose(option) {
|
|
|
|
+ this.rowOption = this.transposeArray(option);
|
|
|
|
+ },
|
|
|
|
+ transposeArray(arr) {
|
|
|
|
+ return arr[0].reduce((acc, _, colIndex) => {
|
|
|
|
+ if (!acc[colIndex]) {
|
|
|
|
+ acc[colIndex] = [];
|
|
|
|
+ }
|
|
|
|
+ arr.forEach(row => {
|
|
|
|
+ if (colIndex < row.length) {
|
|
|
|
+ acc[colIndex].push(row[colIndex]);
|
|
|
|
+ } else {
|
|
|
|
+ acc[colIndex].push(null); // 如果是稀疏矩阵,可以填充null或undefined
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return acc;
|
|
|
|
+ }, []);
|
|
|
|
+ },
|
|
handleData2() {
|
|
handleData2() {
|
|
let Bookanswer = [];
|
|
let Bookanswer = [];
|
|
let itemLeg = 0;
|
|
let itemLeg = 0;
|
|
@@ -1612,7 +1736,7 @@ export default {
|
|
.sent-main {
|
|
.sent-main {
|
|
position: relative;
|
|
position: relative;
|
|
width: 100%;
|
|
width: 100%;
|
|
- display: flex;
|
|
|
|
|
|
+ // display: flex;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|