|
@@ -9,6 +9,7 @@
|
|
|
]"
|
|
|
v-if="curQue && curQue.Bookanswer"
|
|
|
>
|
|
|
+ <AnswerTitle :judgeAnswer="judgeAnswer" />
|
|
|
<div
|
|
|
class="out-audioLine-box"
|
|
|
v-if="
|
|
@@ -54,7 +55,384 @@
|
|
|
:style="{ width: curQue.img_size + 'px' }"
|
|
|
></el-image>
|
|
|
</div>
|
|
|
- <div :class="['container', curQue.sortType == 'row' ? 'ul-flex' : '']">
|
|
|
+ {{ curQue.sortType }}
|
|
|
+ <div
|
|
|
+ v-if="judgeAnswer == 'standardAnswer'"
|
|
|
+ :class="['container', curQue.sortType == 'row' ? 'ul-flex' : '']"
|
|
|
+ >
|
|
|
+ <div :class="['sent-option li-flex sent-option-standardAnswer']">
|
|
|
+ {{ curQue.option.length }}
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'sent-option-items',
|
|
|
+ itemsWidth == 748 ? 'sent-option-items-0' : 'sent-option-items-8',
|
|
|
+ ]"
|
|
|
+ v-for="(items, indexs) in userErrorList"
|
|
|
+ :key="'sent-option-items' + judgeAnswer + indexs"
|
|
|
+ :style="{
|
|
|
+ width:
|
|
|
+ curQue.sortType == 'col'
|
|
|
+ ? itemsWidth + 'px'
|
|
|
+ : Math.floor(748 / curQue.option.length) - 24 + 'px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'horn-24',
|
|
|
+ items.pyNumber &&
|
|
|
+ items.pyNumber[0] > 0 &&
|
|
|
+ curQue.pyPosition == 'top'
|
|
|
+ ? 'horn-hasPY'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ v-if="
|
|
|
+ curQue.mp3_list &&
|
|
|
+ curQue.mp3_list.length > 0 &&
|
|
|
+ curQue.mp3_list[0].id &&
|
|
|
+ items.bg &&
|
|
|
+ items.ed
|
|
|
+ "
|
|
|
+ :style="{
|
|
|
+ height:
|
|
|
+ items.detail &&
|
|
|
+ items.detail.length > 0 &&
|
|
|
+ items.detail[0].maxFontsize
|
|
|
+ ? (items.detail[0].maxFontsize * 3) / 2 + 'px'
|
|
|
+ : '40px',
|
|
|
+ marginTop:
|
|
|
+ items.detail &&
|
|
|
+ items.detail.length > 0 &&
|
|
|
+ items.detail[0].maxFontsize
|
|
|
+ ? ''
|
|
|
+ : '0px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <AudioItem
|
|
|
+ :itemBg="items.bg"
|
|
|
+ :itemEd="items.ed"
|
|
|
+ :curTime="curTime"
|
|
|
+ :handleChangeTime="handleChangeTime"
|
|
|
+ :stopAudioS="stopAudioS"
|
|
|
+ :themeColor="themeColor"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div :class="['sent-stem', bgClassName]">
|
|
|
+ <div
|
|
|
+ v-if="curQue.isShowNumber"
|
|
|
+ :class="[
|
|
|
+ 'number-box number-box-hasmp3',
|
|
|
+ items.pyNumber &&
|
|
|
+ items.pyNumber[0] > 0 &&
|
|
|
+ curQue.pyPosition == 'top'
|
|
|
+ ? 'number-box-hasPY'
|
|
|
+ : '',
|
|
|
+ curQue.numberBg ? '' : 'number-box-nobg',
|
|
|
+ ]"
|
|
|
+ :style="{
|
|
|
+ height:
|
|
|
+ items.detail &&
|
|
|
+ items.detail.length > 0 &&
|
|
|
+ items.detail[0].maxFontsize
|
|
|
+ ? (items.detail[0].maxFontsize * 3) / 2 + 'px'
|
|
|
+ : '40px',
|
|
|
+ marginTop:
|
|
|
+ items.detail &&
|
|
|
+ items.detail.length > 0 &&
|
|
|
+ items.detail[0].maxFontsize
|
|
|
+ ? ''
|
|
|
+ : '0px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <NumberStyle
|
|
|
+ :className="curQue.numberBg ? 'number01' : 'number-nobg'"
|
|
|
+ :numberBg="curQue.numberBg"
|
|
|
+ :numberStyle="curQue.numberStyle"
|
|
|
+ :numberIndex="items.index"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 题干 -->
|
|
|
+ <div class="stem-content">
|
|
|
+ <!-- items.fn_check_list.judge_check || sdItem.fn_check_list.record_check.indexOf('normal') > -1
|
|
|
+ ? 'sent-main-138'
|
|
|
+ : '', -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'sent-main',
|
|
|
+ items.fn_check_list.judge_check.indexOf('col') > -1 ||
|
|
|
+ items.fn_check_list.short_check ||
|
|
|
+ sdItem.fn_check_list.record_check.indexOf('normal') > -1
|
|
|
+ ? 'sent-que-flex'
|
|
|
+ : '',
|
|
|
+ items.fn_check_list.radio_check.indexOf('row') > -1 ||
|
|
|
+ items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
|
+ ? 'sent-main-bottom'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ v-for="(sdItem, sdIndex) in items.detail"
|
|
|
+ :key="'sent-option-items' + index + indexs + sdIndex"
|
|
|
+ >
|
|
|
+ <div class="sent-que-box">
|
|
|
+ <div
|
|
|
+ class="sent-que"
|
|
|
+ v-for="(sddItem, sddIndex) in sdItem.detail"
|
|
|
+ :key="
|
|
|
+ 'sent-option-items' +
|
|
|
+ index +
|
|
|
+ indexs +
|
|
|
+ sdIndex +
|
|
|
+ sddIndex
|
|
|
+ "
|
|
|
+ :style="{
|
|
|
+ paddingLeft:
|
|
|
+ sddItem.config.wordPadding.indexOf('left') > -1
|
|
|
+ ? '4px'
|
|
|
+ : '0px',
|
|
|
+ paddingRight:
|
|
|
+ sddItem.config.wordPadding.indexOf('right') > -1
|
|
|
+ ? '4px'
|
|
|
+ : '0px',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <!-- 补全句子 -->
|
|
|
+ <OneSentenceTemp
|
|
|
+ :detail="sddItem"
|
|
|
+ :pyPosition="curQue.pyPosition"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :pyColor="curQue.pyColor"
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ :correctAnswer="items.correct.complateArr"
|
|
|
+ :isInput="
|
|
|
+ items.fn_check_list.sent_check ==
|
|
|
+ 'sentence_complete_input_chs' ||
|
|
|
+ items.fn_check_list.sent_check ==
|
|
|
+ 'sentence_long_input_chs'
|
|
|
+ "
|
|
|
+ :fn_check_list="items.fn_check_list"
|
|
|
+ :bgColor="curQue.bgColor"
|
|
|
+ :pyNumber="items.pyNumber && items.pyNumber[sdIndex]"
|
|
|
+ :record_check="sdItem.fn_check_list.record_check"
|
|
|
+ :hengLeg="sdItem.hengLeg"
|
|
|
+ :maxFontsize="sdItem.maxFontsize"
|
|
|
+ />
|
|
|
+ <!-- <div class="en" v-if="sdItem.en">{{ sdItem.en }}</div> -->
|
|
|
+ <div
|
|
|
+ class="promax-box-div"
|
|
|
+ v-if="
|
|
|
+ sdItem.fn_check_list.record_check.indexOf('promax') >
|
|
|
+ -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <Soundrecord
|
|
|
+ :type="
|
|
|
+ sdItem.fn_check_list.record_check
|
|
|
+ ? typeList[sdItem.fn_check_list.record_check]
|
|
|
+ : 'normal'
|
|
|
+ "
|
|
|
+ class="promax-box"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :tmIndex="sdIndex"
|
|
|
+ :answerRecordList="
|
|
|
+ curQue.Bookanswer[index][indexs].recordList[sdIndex]
|
|
|
+ "
|
|
|
+ :index="index"
|
|
|
+ :indexs="indexs"
|
|
|
+ @handleWav="handleWav"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ ref="answerpart"
|
|
|
+ v-if="
|
|
|
+ items.fn_check_list.judge_check ||
|
|
|
+ sdItem.fn_check_list.record_check ||
|
|
|
+ items.fn_check_list.short_check ||
|
|
|
+ items.fn_check_list.radio_check.indexOf('col') > -1 ||
|
|
|
+ items.fn_check_list.checkbox_check.indexOf('col') > -1
|
|
|
+ "
|
|
|
+ :class="[
|
|
|
+ 'answer-part',
|
|
|
+ items.pyNumber && items.pyNumber[1] > 0
|
|
|
+ ? 'answer-part-hasPY'
|
|
|
+ : '',
|
|
|
+ items.fn_check_list.judge_check ||
|
|
|
+ sdItem.fn_check_list.record_check
|
|
|
+ ? 'answer-part-138'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <!-- 短输入 -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'short-part',
|
|
|
+ items.pyNumber && items.pyNumber[0] > 0
|
|
|
+ ? 'short-part-hasPY'
|
|
|
+ : '',
|
|
|
+ items.fn_check_list.is_short_auto
|
|
|
+ ? 'short-part-flex'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ v-if="sdIndex == 0 && items.fn_check_list.short_check"
|
|
|
+ >
|
|
|
+ <ShortInputTemp
|
|
|
+ :doubleInput="items.correct.doubleInput"
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :is_short_auto="items.fn_check_list.is_short_auto"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 判断 -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'judge-part',
|
|
|
+ items.fn_check_list.judge_check.indexOf('row') > -1
|
|
|
+ ? 'answer-part-padding-5'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ v-if="sdIndex == 0 && items.fn_check_list.judge_check"
|
|
|
+ >
|
|
|
+ <JudgeTemp
|
|
|
+ :isRecord="items.fn_check_list.record_check"
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :judge_isNo="items.judge_isNo"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :Isexample="items.Isexample"
|
|
|
+ :judgeCorrectAnswer="items.correct.judge"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 多选题 -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'short-part',
|
|
|
+ items.pyNumber && items.pyNumber[0] > 0
|
|
|
+ ? 'short-part-hasPY'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ v-if="
|
|
|
+ sdIndex == 0 &&
|
|
|
+ items.fn_check_list.checkbox_check.indexOf('col') > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <OptionTemp
|
|
|
+ :option="items.checkbox_option"
|
|
|
+ :row="
|
|
|
+ items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
|
+ "
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ type="checkbox"
|
|
|
+ :curQue="curQue"
|
|
|
+ :items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 单选题 -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'short-part',
|
|
|
+ items.pyNumber && items.pyNumber[0] > 0
|
|
|
+ ? 'short-part-hasPY'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ v-if="
|
|
|
+ sdIndex == 0 &&
|
|
|
+ items.fn_check_list.radio_check.indexOf('col') > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <OptionTemp
|
|
|
+ :option="items.radio_option"
|
|
|
+ :row="
|
|
|
+ items.fn_check_list.radio_check.indexOf('row') > -1
|
|
|
+ "
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :correctAnswer="items.correct"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ type="radio"
|
|
|
+ :curQue="curQue"
|
|
|
+ :items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 录音 -->
|
|
|
+ <div
|
|
|
+ class="judge-part record-part"
|
|
|
+ v-if="
|
|
|
+ sdItem.fn_check_list.record_check &&
|
|
|
+ items.fn_check_list.sent_check !=
|
|
|
+ 'sentence_long_input_chs'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <Soundrecord
|
|
|
+ :type="
|
|
|
+ sdItem.fn_check_list.record_check
|
|
|
+ ? typeList[sdItem.fn_check_list.record_check]
|
|
|
+ : 'normal'
|
|
|
+ "
|
|
|
+ :class="[
|
|
|
+ 'record_' +
|
|
|
+ typeList[sdItem.fn_check_list.record_check],
|
|
|
+ 'record-common',
|
|
|
+ items.fn_check_list.short_check
|
|
|
+ ? 'record-common-40'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ :tmIndex="sdIndex"
|
|
|
+ answerRecordList="[]
|
|
|
+ "
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 多选题 -->
|
|
|
+ <div
|
|
|
+ class="select-que"
|
|
|
+ v-if="items.fn_check_list.checkbox_check.indexOf('row') > -1"
|
|
|
+ >
|
|
|
+ <OptionTemp
|
|
|
+ :option="items.checkbox_option"
|
|
|
+ :row="
|
|
|
+ items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
|
+ "
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :correctAnswer="items.correct"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ type="checkbox"
|
|
|
+ :curQue="curQue"
|
|
|
+ :items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 单选题 -->
|
|
|
+ <div
|
|
|
+ class="select-que"
|
|
|
+ v-if="items.fn_check_list.radio_check.indexOf('row') > -1"
|
|
|
+ >
|
|
|
+ <OptionTemp
|
|
|
+ :option="items.radio_option"
|
|
|
+ :row="items.fn_check_list.radio_check.indexOf('row') > -1"
|
|
|
+ :Bookanswer="userBookanswer[indexs]"
|
|
|
+ :correctAnswer="items.correct"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ type="radio"
|
|
|
+ :curQue="curQue"
|
|
|
+ :items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 题干 -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-else
|
|
|
+ :class="['container', curQue.sortType == 'row' ? 'ul-flex' : '']"
|
|
|
+ >
|
|
|
<div
|
|
|
:class="[
|
|
|
'sent-option',
|
|
@@ -203,6 +581,8 @@
|
|
|
:TaskModel="TaskModel"
|
|
|
:pyColor="curQue.pyColor"
|
|
|
:Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
+ :correctAnswer="items.correct.complateArr"
|
|
|
:isInput="
|
|
|
items.fn_check_list.sent_check ==
|
|
|
'sentence_complete_input_chs' ||
|
|
@@ -254,7 +634,7 @@
|
|
|
"
|
|
|
:class="[
|
|
|
'answer-part',
|
|
|
- items.pyNumber && items.pyNumber[0] > 0
|
|
|
+ items.pyNumber && items.pyNumber[1] > 0
|
|
|
? 'answer-part-hasPY'
|
|
|
: '',
|
|
|
items.fn_check_list.judge_check ||
|
|
@@ -281,6 +661,7 @@
|
|
|
:Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
:TaskModel="TaskModel"
|
|
|
:is_short_auto="items.fn_check_list.is_short_auto"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 判断 -->
|
|
@@ -299,6 +680,8 @@
|
|
|
:judge_isNo="items.judge_isNo"
|
|
|
:TaskModel="TaskModel"
|
|
|
:Isexample="items.Isexample"
|
|
|
+ :judgeCorrectAnswer="items.correct.judge"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 多选题 -->
|
|
@@ -324,6 +707,7 @@
|
|
|
type="checkbox"
|
|
|
:curQue="curQue"
|
|
|
:items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 单选题 -->
|
|
@@ -345,10 +729,12 @@
|
|
|
items.fn_check_list.radio_check.indexOf('row') > -1
|
|
|
"
|
|
|
:Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
+ :correctAnswer="items.correct"
|
|
|
:TaskModel="TaskModel"
|
|
|
type="radio"
|
|
|
:curQue="curQue"
|
|
|
:items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 录音 -->
|
|
@@ -397,10 +783,12 @@
|
|
|
items.fn_check_list.checkbox_check.indexOf('row') > -1
|
|
|
"
|
|
|
:Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
+ :correctAnswer="items.correct"
|
|
|
:TaskModel="TaskModel"
|
|
|
type="checkbox"
|
|
|
:curQue="curQue"
|
|
|
:items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
/>
|
|
|
</div>
|
|
|
<!-- 单选题 -->
|
|
@@ -412,10 +800,12 @@
|
|
|
:option="items.radio_option"
|
|
|
:row="items.fn_check_list.radio_check.indexOf('row') > -1"
|
|
|
:Bookanswer="curQue.Bookanswer[index][indexs]"
|
|
|
+ :correctAnswer="items.correct"
|
|
|
:TaskModel="TaskModel"
|
|
|
type="radio"
|
|
|
:curQue="curQue"
|
|
|
:items="items"
|
|
|
+ :judgeAnswer="judgeAnswer"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -454,6 +844,7 @@ import NumberStyle from "./components/NumberStyle.vue";
|
|
|
import EditDiv from "../preview/EditDiv.vue";
|
|
|
import Soundrecord from "../preview/Soundrecord.vue"; // 录音模板
|
|
|
import OptionTemp from "./components/OptionTemp.vue";
|
|
|
+import AnswerTitle from "../preview/components/AnswerTitle.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
AudioLine,
|
|
@@ -465,8 +856,9 @@ export default {
|
|
|
JudgeTemp,
|
|
|
ShortInputTemp,
|
|
|
OptionTemp,
|
|
|
+ AnswerTitle,
|
|
|
},
|
|
|
- props: ["curQue", "themeColor", "TaskModel"],
|
|
|
+ props: ["curQue", "themeColor", "TaskModel", "judgeAnswer"],
|
|
|
data() {
|
|
|
return {
|
|
|
curTime: 0,
|
|
@@ -478,10 +870,11 @@ export default {
|
|
|
shortInput: "",
|
|
|
longInput: "",
|
|
|
doubleInput: [],
|
|
|
- judge: "",
|
|
|
- checkbox: [],
|
|
|
- radio: "",
|
|
|
+ judge: {},
|
|
|
+ checkbox: {},
|
|
|
+ radio: {},
|
|
|
recordList: {},
|
|
|
+ completeImage: [],
|
|
|
},
|
|
|
chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";"],
|
|
|
itemsWidth: 0,
|
|
@@ -492,6 +885,8 @@ export default {
|
|
|
sentence_record_promax_chs: "promax",
|
|
|
},
|
|
|
answerpart: [],
|
|
|
+ userErrorList: [],
|
|
|
+ userBookanswer: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -534,6 +929,319 @@ export default {
|
|
|
handleData() {
|
|
|
let Bookanswer = [];
|
|
|
let itemLeg = 0;
|
|
|
+ this.totalHasPy = false;
|
|
|
+ let option = JSON.parse(JSON.stringify(this.curQue.option));
|
|
|
+ let completeImage = [];
|
|
|
+ option.forEach((item, index) => {
|
|
|
+ Bookanswer.push([]);
|
|
|
+ completeImage = [];
|
|
|
+ itemLeg = item.length > itemLeg ? item.length : itemLeg;
|
|
|
+ item.forEach((items, indexs) => {
|
|
|
+ let userAnswer = JSON.parse(JSON.stringify(this.userAnswer));
|
|
|
+ let correct = JSON.parse(JSON.stringify(items.correct));
|
|
|
+ let complateArr = correct.completeInput.split("\n");
|
|
|
+ complateArr.forEach((itemI, indexI) => {
|
|
|
+ if (itemI == "??" || itemI == "??") {
|
|
|
+ complateArr[indexI] = "";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ items.correct.complateArr = complateArr;
|
|
|
+ this.curQue.option[index][indexs].correct.complateArr = complateArr;
|
|
|
+ if (items.Isexample) {
|
|
|
+ userAnswer.Isexample = true;
|
|
|
+ userAnswer.recordList = {};
|
|
|
+ }
|
|
|
+ Bookanswer[index].push(userAnswer);
|
|
|
+ if (this.curQue.wordTime && this.curQue.wordTime.length > 0) {
|
|
|
+ let time = this.curQue.wordTime[items.index];
|
|
|
+ if (time) {
|
|
|
+ items.ed = time.ed;
|
|
|
+ items.bg = time.bg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let hengIndex = 0;
|
|
|
+ items.pyNumber = [];
|
|
|
+
|
|
|
+ items.detail.forEach((sdItem, sdIndex) => {
|
|
|
+ let isHasPY = 0;
|
|
|
+ let maxFontsize = 0;
|
|
|
+ sdItem.detail.forEach((sddItem) => {
|
|
|
+ if (sddItem.wordsList.length > 0) {
|
|
|
+ sddItem.wordsList.forEach((sItem, sIndex) => {
|
|
|
+ let reg = /_{2,}/g;
|
|
|
+ if (reg.test(sItem.chs)) {
|
|
|
+ sItem.index = sIndex;
|
|
|
+ sItem.isHeng = true;
|
|
|
+ sItem.hengIndex = hengIndex;
|
|
|
+ hengIndex++;
|
|
|
+ }
|
|
|
+ //补全句子
|
|
|
+ if (
|
|
|
+ !this.curQue.Bookanswer &&
|
|
|
+ (items.fn_check_list.sent_check ==
|
|
|
+ "sentence_complete_input_chs" ||
|
|
|
+ items.fn_check_list.sent_check ==
|
|
|
+ "sentence_long_input_chs")
|
|
|
+ ) {
|
|
|
+ let reg = /_{2,}/g;
|
|
|
+ if (reg.test(sItem.chs)) {
|
|
|
+ let bool = false;
|
|
|
+ if (sddItem.hasOwnProperty("input_Isexample")) {
|
|
|
+ bool = sddItem.input_Isexample;
|
|
|
+ } else {
|
|
|
+ bool = items.Isexample;
|
|
|
+ }
|
|
|
+ let obj = null;
|
|
|
+ if (!sddItem.input_tian) {
|
|
|
+ obj = {
|
|
|
+ answer:
|
|
|
+ bool && complateArr[sItem.hengIndex]
|
|
|
+ ? complateArr[sItem.hengIndex]
|
|
|
+ : "",
|
|
|
+ userAnswerJudge:
|
|
|
+ bool || !complateArr[sItem.hengIndex]
|
|
|
+ ? ""
|
|
|
+ : "[JUDGE##F##JUDGE]",
|
|
|
+ input_Isexample: bool ? true : false,
|
|
|
+ };
|
|
|
+ Bookanswer[index][indexs].completeInput.push(
|
|
|
+ JSON.parse(JSON.stringify(obj))
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ if (sddItem.hengLeg == "-1") {
|
|
|
+ completeImage.push(obj);
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < Number(sddItem.hengLeg); i++) {
|
|
|
+ completeImage.push(obj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Bookanswer[index][indexs].completeInput.push(
|
|
|
+ JSON.parse(JSON.stringify(completeImage))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.mergeWordSymbol(sItem);
|
|
|
+ if (sItem.pinyin) {
|
|
|
+ isHasPY++;
|
|
|
+ this.totalHasPy = true;
|
|
|
+ }
|
|
|
+ let fontSize = JSON.parse(JSON.stringify(sItem.fontSize));
|
|
|
+ fontSize = Number(fontSize.replace("px", ""));
|
|
|
+ maxFontsize = fontSize > maxFontsize ? fontSize : maxFontsize;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (sddItem.sentence) {
|
|
|
+ let fontSize = JSON.parse(
|
|
|
+ JSON.stringify(sddItem.config.fontSize)
|
|
|
+ );
|
|
|
+ fontSize = Number(fontSize.replace("px", ""));
|
|
|
+ maxFontsize = fontSize > maxFontsize ? fontSize : maxFontsize;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ sdItem.maxFontsize = maxFontsize;
|
|
|
+ items.pyNumber.push(isHasPY);
|
|
|
+ });
|
|
|
+ if (!this.curQue.Bookanswer) {
|
|
|
+ //双输入/短输入
|
|
|
+ if (
|
|
|
+ items.fn_check_list.short_check == "sentence_double_input_chs"
|
|
|
+ ) {
|
|
|
+ items.correct.doubleInput.forEach((cItem) => {
|
|
|
+ let obj = {
|
|
|
+ correct:
|
|
|
+ items.Isexample && cItem.correct ? cItem.correct : "",
|
|
|
+ userAnswerJudge:
|
|
|
+ !items.Isexample && (cItem.correct || cItem.correct == "0")
|
|
|
+ ? "[JUDGE##F##JUDGE]"
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+ Bookanswer[index][indexs].doubleInput.push(
|
|
|
+ JSON.parse(JSON.stringify(obj))
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //判断
|
|
|
+ if (items.fn_check_list.judge_check) {
|
|
|
+ let judge_obj = {
|
|
|
+ correct:
|
|
|
+ items.Isexample && items.correct.judge
|
|
|
+ ? items.correct.judge
|
|
|
+ : "",
|
|
|
+ userAnswerJudge:
|
|
|
+ !items.Isexample && items.correct.judge
|
|
|
+ ? "[JUDGE##F##JUDGE]"
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+ Bookanswer[index][indexs].judge = JSON.parse(
|
|
|
+ JSON.stringify(judge_obj)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ //单选
|
|
|
+ if (items.fn_check_list.radio_check) {
|
|
|
+ let radio_obj = {
|
|
|
+ correct:
|
|
|
+ items.Isexample &&
|
|
|
+ (items.correct.radio || items.correct.radio === 0)
|
|
|
+ ? items.correct.radio
|
|
|
+ : "",
|
|
|
+ userAnswerJudge:
|
|
|
+ !items.Isexample &&
|
|
|
+ (items.correct.radio || items.correct.radio === 0)
|
|
|
+ ? "[JUDGE##F##JUDGE]"
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+ Bookanswer[index][indexs].radio = JSON.parse(
|
|
|
+ JSON.stringify(radio_obj)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ //多选
|
|
|
+ if (items.fn_check_list.checkbox_check) {
|
|
|
+ let checkbox_obj = {
|
|
|
+ correct:
|
|
|
+ items.Isexample &&
|
|
|
+ items.correct.checkbox &&
|
|
|
+ items.correct.checkbox.length > 0
|
|
|
+ ? items.correct.checkbox
|
|
|
+ : [],
|
|
|
+ userAnswerJudge:
|
|
|
+ !items.Isexample &&
|
|
|
+ items.correct.checkbox &&
|
|
|
+ items.correct.checkbox.length > 0
|
|
|
+ ? "[JUDGE##F##JUDGE]"
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+ Bookanswer[index][indexs].checkbox = JSON.parse(
|
|
|
+ JSON.stringify(checkbox_obj)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ items.radio_option.forEach((rItem, rIndex) => {
|
|
|
+ rItem.detail.pyNumber = [];
|
|
|
+ rItem.detail.wordsList.forEach((rpwItem) => {
|
|
|
+ let isHasPY2 = 0;
|
|
|
+ rpwItem.forEach((rpsItem) => {
|
|
|
+ this.mergeWordSymbol(rpsItem);
|
|
|
+ if (rpsItem.pinyin) {
|
|
|
+ isHasPY2++;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ rItem.detail.pyNumber.push(isHasPY2);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ items.checkbox_option.forEach((cItem, rIndex) => {
|
|
|
+ cItem.detail.pyNumber = [];
|
|
|
+ cItem.detail.wordsList.forEach((cpwItem) => {
|
|
|
+ let isHasPY3 = 0;
|
|
|
+ cpwItem.forEach((cpsItem) => {
|
|
|
+ this.mergeWordSymbol(cpsItem);
|
|
|
+ if (cpsItem.pinyin) {
|
|
|
+ isHasPY3++;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ cItem.detail.pyNumber.push(isHasPY3);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ // console.log(Bookanswer);
|
|
|
+ if (!this.curQue.Bookanswer) {
|
|
|
+ this.$set(
|
|
|
+ this.curQue,
|
|
|
+ "Bookanswer",
|
|
|
+ JSON.parse(JSON.stringify(Bookanswer))
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ let BookanswerStr = JSON.stringify(this.curQue.Bookanswer);
|
|
|
+ let errReg = /\[JUDGE##F##JUDGE\]/g;
|
|
|
+ if (errReg.test(BookanswerStr)) {
|
|
|
+ let errorArr = BookanswerStr.match(/\[JUDGE##F##JUDGE\]/g);
|
|
|
+ this.userErrorNumberTotal = errorArr.length;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$set(this.curQue, "option", option);
|
|
|
+ let contentWidth = 748;
|
|
|
+ if (this.curQue.img_list && this.curQue.img_list.length > 0) {
|
|
|
+ contentWidth = 748 - this.curQue.img_size;
|
|
|
+ }
|
|
|
+ this.itemsWidth = Math.floor(contentWidth / itemLeg) - 24;
|
|
|
+
|
|
|
+ // 把答错的挑出来
|
|
|
+ if (this.judgeAnswer == "standardAnswer") {
|
|
|
+ this.userErrorList = [];
|
|
|
+ this.userBookanswer = [];
|
|
|
+ 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]
|
|
|
+ .answer
|
|
|
+ ) {
|
|
|
+ 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]);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleData2() {
|
|
|
+ let Bookanswer = [];
|
|
|
+ let itemLeg = 0;
|
|
|
let option = JSON.parse(JSON.stringify(this.curQue.option));
|
|
|
|
|
|
option.forEach((item, index) => {
|
|
@@ -543,6 +1251,17 @@ export default {
|
|
|
let userAnswer = null;
|
|
|
if (items.Isexample) {
|
|
|
userAnswer = JSON.parse(JSON.stringify(items.correct));
|
|
|
+ let completeInputArr = userAnswer.completeInput
|
|
|
+ ? userAnswer.completeInput.split("\n")
|
|
|
+ : [];
|
|
|
+ let completeInput = [];
|
|
|
+ for (let i = 0; i < completeInputArr.length; i++) {
|
|
|
+ let cObj = {
|
|
|
+ value: completeInputArr[i],
|
|
|
+ userAnswerJudge: "",
|
|
|
+ };
|
|
|
+ completeInput.push(JSON.parse(JSON.stringify(cObj)));
|
|
|
+ }
|
|
|
userAnswer.completeInput = userAnswer.completeInput
|
|
|
? userAnswer.completeInput.split("\n")
|
|
|
: [];
|
|
@@ -687,14 +1406,12 @@ export default {
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
let _this = this;
|
|
|
- console.log(_this.curQue);
|
|
|
_this.handleData();
|
|
|
_this.$nextTick(() => {
|
|
|
if (_this.$refs.answerpart) {
|
|
|
_this.$refs.answerpart.forEach((item) => {
|
|
|
_this.answerpart.push(item.offsetWidth);
|
|
|
});
|
|
|
- console.log(_this.answerpart);
|
|
|
}
|
|
|
});
|
|
|
},
|