123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587 |
- <!-- -->
- <template>
- <div
- class="sentence-control"
- :class="[
- curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
- ? 'hasmp3'
- : '',
- ]"
- v-if="isShowTemp"
- >
- <div
- class="out-audioLine-box"
- v-if="
- curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
- "
- >
- <div class="aduioLine-box aduioLine-practice">
- <AudioLine
- audioId="fillInforAudioLine"
- :mp3="curQue.mp3_list[0].id"
- :getCurTime="getCurTime"
- :themeColor="themeColor"
- :ed="ed"
- type="audioLine"
- ref="fillInforAudioLine"
- @handleListenRead="handleListenRead"
- />
- </div>
- </div>
- <div
- :class="[
- 'container-box',
- curQue.img_list &&
- curQue.img_list.length > 0 &&
- curQue.img_site == 'rightCenter'
- ? 'container-box-flex'
- : '',
- ]"
- >
- <div
- class="fill-img-box"
- v-if="
- curQue.img_list &&
- curQue.img_list.length > 0 &&
- curQue.img_site == 'top'
- "
- >
- <el-image
- :src="curQue.img_list[0].id"
- v-if="curQue.img_list[0].id"
- fit="scale-down"
- class="fill-img"
- :style="{ width: curQue.img_size + 'px' }"
- ></el-image>
- </div>
- <div
- v-if="judgeAnswer == 'standardAnswer'"
- :class="['container', curQue.sortType == 'row' ? 'ul-flex' : '']"
- >
- <div :class="['sent-option li-flex sent-option-standardAnswer']">
- <div
- :class="[
- 'sent-option-items',
- itemsWidth == 780 ? '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(780 / curQue.option.length) - 16 + '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'
- : '32px',
- 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 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' + indexs + sdIndex"
- >
- <div class="sent-que-box">
- <div
- class="sent-que"
- v-for="(sddItem, sddIndex) in sdItem.detail"
- :key="'sent-option-items' + 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"
- :textIndent="sdItem.textindent"
- />
- <!-- <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="[]"
- />
- </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"
- :correctAnswer="items.correct"
- />
- </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"
- :style="{paddingLeft:items.detail&&items.detail[0]&&items.detail[0].textindent&&items.detail[0].detail&&items.detail[0].detail[0]?items.detail[0].detail[0].config.fontSize.replace('px','')*2+'px':'0'}"
- >
- <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"
- :style="{paddingLeft:items.detail&&items.detail[0]&&items.detail[0].textindent&&items.detail[0].detail&&items.detail[0].detail[0]?items.detail[0].detail[0].config.fontSize.replace('px','')*2+'px':'0'}"
- >
- <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',
- curQue.mp3_list &&
- curQue.mp3_list.length > 0 &&
- curQue.mp3_list[0].id
- ? 'sent-option-24'
- : '',
- curQue.sortType == 'row' ? 'sent-option-row' : 'li-flex',
- ]"
- v-for="(item, index) in curQue.option"
- :key="'sent-option' + index"
- >
- <div
- :class="[
- 'sent-option-items',
- itemsWidth == 780 ? 'sent-option-items-0' : 'sent-option-items-8',
- ]"
- v-for="(itemO, indeO) in item"
- :key="'sent-option-items' + index + indeO"
- :style="{
- width: curQue.sortType == 'col' ? itemsWidth + 'px' : '100%',
- }"
- >
- <div
- :class="[
- 'horn-24',
- itemO.pyNumber &&
- itemO.pyNumber[0] > 0 &&
- curQue.pyPosition == 'top'
- ? 'horn-hasPY'
- : '',
- ]"
- v-if="
- curQue.mp3_list &&
- curQue.mp3_list.length > 0 &&
- curQue.mp3_list[0].id &&
- itemO.bg &&
- itemO.ed
- "
- :style="{
- height:
- itemO.detail &&
- itemO.detail.length > 0 &&
- itemO.detail[0].maxFontsize
- ? (itemO.detail[0].maxFontsize * 3) / 2 + 'px'
- : '32px',
- marginTop:
- itemO.detail &&
- itemO.detail.length > 0 &&
- itemO.detail[0].maxFontsize
- ? ''
- : '0px',
- }"
- >
- <AudioItem
- :itemBg="itemO.bg"
- :itemEd="itemO.ed"
- :curTime="curTime"
- :handleChangeTime="handleChangeTime"
- :stopAudioS="stopAudioS"
- :themeColor="themeColor"
- />
- </div>
- <div :class="['sent-stem', bgClassName]">
- <div
- v-if="itemO.numbertotal"
- :class="[
- 'number-box number-box-hasmp3',
- itemO.pyNumber &&
- itemO.pyNumber[0] > 0 &&
- curQue.pyPosition == 'top'
- ? 'number-box-hasPY'
- : '',
- curQue.numberBg ? '' : 'number-box-nobg',
- ]"
- :style="{
- height:
- itemO.detail &&
- itemO.detail.length > 0 &&
- itemO.detail[0].maxFontsize
- ? (itemO.detail[0].maxFontsize * 3) / 2 + 'px'
- : '32px',
- marginTop:
- itemO.detail &&
- itemO.detail.length > 0 &&
- itemO.detail[0].maxFontsize
- ? ''
- : '0px',
- fontSize: itemO.numberfontSize
- }"
- >
- {{itemO.numbertotal}}
- </div>
- <div class="stem-maincontent">
- <div>
- <div
- :class="[
- 'sent-main',
- ]"
- v-for="(sdItem, sdIndex) in itemO.detail"
- :key="'sent-option-items' + index + indeO + sdIndex"
- >
- <div class="sent-que-box">
- <div
- class="sent-que"
- v-for="(sddItem, sddIndex) in sdItem.detail"
- :key="
- 'sent-option-items' +
- index +
- indeO +
- 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="curQue.Bookanswer[index][indeO]"
- :judgeAnswer="judgeAnswer"
- :isInput="
- false
- "
- :fn_check_list="itemO.fn_check_list"
- :bgColor="curQue.bgColor"
- :pyNumber="itemO.pyNumber && itemO.pyNumber[sdIndex]"
- :record_check="sdItem.fn_check_list.record_check"
- :hengLeg="sdItem.hengLeg"
- :maxFontsize="sdItem.maxFontsize"
- :textIndent="sdItem.textindent"
- />
- <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>
- </div>
- <div v-for="(items, indexs) in itemO.options" :key="indexs">
- <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="curQue.Bookanswer[index][indeO][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"
- :textIndent="sdItem.textindent"
- />
- <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][indeO][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="curQue.Bookanswer[index][indeO][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="curQue.Bookanswer[index][indeO][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="curQue.Bookanswer[index][indeO][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="curQue.Bookanswer[index][indeO][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="
- curQue.Bookanswer[index][indeO][indexs].recordList[sdIndex]
- "
- :index="index"
- :indexs="indexs"
- @handleWav="handleWav"
- />
- </div>
- </div>
- </div>
- <div
- class="select-que"
- v-if="items.fn_check_list.checkbox_check.indexOf('row') > -1"
- :style="{paddingLeft:items.detail&&items.detail[0]&&items.detail[0].textindent&&items.detail[0].detail&&items.detail[0].detail[0]?items.detail[0].detail[0].config.fontSize.replace('px','')*2+'px':'0'}"
- >
- <OptionTemp
- :option="items.checkbox_option"
- :row="
- items.fn_check_list.checkbox_check.indexOf('row') > -1
- "
- :Bookanswer="curQue.Bookanswer[index][indeO][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"
- :style="{paddingLeft:items.detail&&items.detail[0]&&items.detail[0].textindent&&items.detail[0].detail&&items.detail[0].detail[0]?items.detail[0].detail[0].config.fontSize.replace('px','')*2+'px':'0'}"
- >
- <OptionTemp
- :option="items.radio_option"
- :row="items.fn_check_list.radio_check.indexOf('row') > -1"
- :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
- :correctAnswer="items.correct"
- :TaskModel="TaskModel"
- type="radio"
- :curQue="curQue"
- :items="items"
- :judgeAnswer="judgeAnswer"
- />
- </div>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- </div>
- <div
- class="fill-img-box"
- v-if="
- curQue.img_list &&
- curQue.img_list.length > 0 &&
- (curQue.img_site == 'rightCenter' || curQue.img_site == 'bottom')
- "
- >
- <el-image
- :src="curQue.img_list[0].id"
- v-if="curQue.img_list[0].id"
- fit="scale-down"
- class="fill-img"
- :style="{ width: curQue.img_size + 'px' }"
- ></el-image>
- </div>
- </div>
- </div>
- </template>
- <script>
- import AudioLine from "./AudioLine.vue";
- import AudioItem from "./components/AudioItem.vue";
- import OneSentenceTemp from "./components/OneSentenceTemp.vue";
- import JudgeTemp from "./components/JudgeTemp.vue";
- import ShortInputTemp from "./components/ShortInputTemp.vue";
- import NumberStyle from "./components/NumberStyle.vue";
- import EditDiv from "./EditDiv.vue";
- import Soundrecord from "./Soundrecord.vue"; // 录音模板
- import OptionTemp from "./components/OptionTemp.vue";
- export default {
- components: {
- AudioLine,
- AudioItem,
- NumberStyle,
- EditDiv,
- Soundrecord,
- OneSentenceTemp,
- JudgeTemp,
- ShortInputTemp,
- OptionTemp,
- },
- props: ["curQue", "themeColor", "TaskModel", "judgeAnswer"],
- data() {
- return {
- curTime: 0,
- stopAudioS: false,
- ed: null,
- userAnswer: {
- Isexample: false,
- completeInput: [],
- shortInput: "",
- longInput: "",
- doubleInput: [],
- judge: {},
- checkbox: {},
- radio: {},
- recordList: {},
- completeImage: [],
- },
- chsFhList: [",", "。", "”", ":", "》", "?", "!", ";"],
- itemsWidth: 0,
- typeList: {
- sentence_record_mini_chs: "mini",
- sentence_record_normal_chs: "normal",
- sentence_record_pro_chs: "pro",
- sentence_record_promax_chs: "promax",
- },
- answerpart: [],
- userErrorList: [],
- userBookanswer: [],
- userErrorNumberTotal: 0,
- };
- },
- computed: {
- isShowTemp() {
- let _this = this;
- let bool = false;
- if (_this.curQue && _this.curQue.Bookanswer) {
- if (_this.judgeAnswer == "standardAnswer") {
- if (_this.userErrorNumberTotal > 0) {
- bool = true;
- } else {
- bool = false;
- }
- } else {
- bool = true;
- }
- }
- return bool;
- },
- bgClassName() {
- let className = "";
- if (this.curQue.bgColor == "grey") {
- className = "sent-stem-grey";
- } else if (this.curQue.bgColor == "white") {
- className = "sent-stem-white";
- }
- return className;
- },
- },
- watch: {},
- //方法集合
- methods: {
- getCurTime(curTime) {
- this.curTime = curTime * 1000;
- },
- //点击播放某个句子
- handleChangeTime(time, edTime) {
- let _this = this;
- _this.curTime = time;
- _this.stopAudioS = true;
- _this.$refs.fillInforAudioLine.onTimeupdateTime(time / 1000, true);
- _this.ed = edTime;
- },
- handleListenRead(playFlag) {
- this.stopAudioS = playFlag;
- },
- handleWav(list, tmIndex, index, indexs) {
- tmIndex = tmIndex ? tmIndex : 0;
- let resList = list.filter((item, index) => index == list.length - 1);
- this.$set(
- this.curQue.Bookanswer[index][indexs].recordList,
- tmIndex,
- resList
- );
- },
- handleData() {
- let Bookanswer = [];
- let itemLeg = 0;
- this.totalHasPy = false;
- let option = JSON.parse(JSON.stringify(this.curQue.option));
- let completeImage = [];
- option.forEach((itemO, indexO) => {
- Bookanswer.push([]);
- completeImage = [];
- itemLeg = itemO.length > itemLeg ? itemO.length : itemLeg;
- itemO.forEach((item,index)=>{
- Bookanswer[indexO].push([])
- // this.$set(Bookanswer[indexO][index],'optionsAnswer',[])
- if (this.curQue.wordTime && this.curQue.wordTime.length > 0) {
- let time = this.curQue.wordTime[item.index];
- if (time) {
- item.ed = time.ed;
- item.bg = time.bg;
- }
- }
- if(item.detail){
- item.detail.forEach(itemI=>{
- itemI.detail.forEach(itemss=>{
- if(itemss.wordsList&&itemss.wordsList.length>0){
- itemss.wordsList.forEach(itemsss=>{
- this.mergeWordSymbol(itemsss);
- })
- }
- })
-
- })
- }
-
- item.options.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[indexO][index].options[indexs].correct.complateArr = complateArr;
- if (items.Isexample) {
- userAnswer.Isexample = true;
- userAnswer.recordList = {};
- }
- Bookanswer[indexO][index].push(userAnswer);
- 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[indexO][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[indexO][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[indexO][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[indexO][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[indexO][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[indexO][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);
- });
- });
- });
-
- })
- })
- if (!this.curQue.Bookanswer) {
- this.$nextTick(() => {
- 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 = 780;
- if (this.curQue.img_list && this.curQue.img_list.length > 0) {
- contentWidth = 780 - this.curQue.img_size;
- }
- if(itemLeg==1){
- this.itemsWidth = 780
- }else{
- this.itemsWidth = Math.floor(contentWidth / itemLeg) - 16;
- }
-
- // 把答错的挑出来
- if (this.judgeAnswer == "standardAnswer") {
- this.userErrorList = [];
- this.userBookanswer = [];
- this.curQue.option.forEach((itemO, indexO) => {
- itemO.forEach((item,index)=>{
- item.options.forEach((items, indexs) => {
- let flag = false;
- // 多输入或者短输入
- items.correct.doubleInput.forEach((itemI, indexI) => {
- if (
- itemI.correct &&
- itemI.correct !=
- this.curQue.Bookanswer[indexO][index][indexs].doubleInput[indexI]
- .correct
- ) {
- flag = true;
- }
- });
- // 句子填空
- items.correct.complateArr.forEach((itemI, indexI) => {
- if (
- itemI &&
- itemI !=
- this.curQue.Bookanswer[indexO][index][indexs].completeInput[indexI]
- .answer
- ) {
- flag = true;
- }
- });
- // 句子判断
- if (
- items.correct.judge &&
- items.correct.judge !=
- this.curQue.Bookanswer[indexO][index][indexs].judge.correct
- ) {
- flag = true;
- }
- // 句子单选
- if (
- items.correct.radio !== "" &&
- items.correct.radio !==
- this.curQue.Bookanswer[indexO][index][indexs].radio.correct
- ) {
- flag = true;
- }
- // 句子多选
- if (
- items.correct &&
- items.correct.checkbox.length > 0 &&
- items.correct.checkbox.sort().toString() !=
- this.curQue.Bookanswer[indexO][index][indexs].checkbox.correct
- .sort()
- .toString()
- ) {
- flag = true;
- }
- if (flag) {
- this.userErrorList.push(items);
- this.userBookanswer.push(this.curQue.Bookanswer[indexO][index][indexs]);
- }
- });
-
- })
-
-
- });
- console.log(this.userErrorList)
- }
- },
- //词和标点合一起
- mergeWordSymbol(sItem) {
- if (this.chsFhList.indexOf(sItem.chs) > -1) {
- sItem.isShow = false;
- } else {
- sItem.isShow = true;
- }
- },
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- let _this = this;
- _this.handleData();
- _this.$nextTick(() => {
- if (_this.$refs.answerpart) {
- _this.$refs.answerpart.forEach((item) => {
- _this.answerpart.push(item.offsetWidth);
- });
- }
- });
- },
- beforeCreate() {}, //生命周期 - 创建之前
- beforeMount() {}, //生命周期 - 挂载之前
- beforeUpdate() {}, //生命周期 - 更新之前
- updated() {}, //生命周期 - 更新之后
- beforeDestroy() {}, //生命周期 - 销毁之前
- destroyed() {}, //生命周期 - 销毁完成
- activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang='scss' scoped>
- //@import url(); 引入公共css类
- .sentence-control {
- width: 100%;
- box-sizing: border-box;
- border-radius: 8px;
- overflow: hidden;
- .out-audioLine-box {
- background: #f7f7f7;
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
- }
- .container-box {
- width: 100%;
- &-flex {
- display: flex;
- align-items: stretch;
- }
- &-auto {
- .fill-img-box {
- width: 100%;
- }
- }
- .fill-img-box {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- .container {
- flex: 1;
- padding: 0;
- box-sizing: border-box;
- &.ul-flex {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .sent-option-24 {
- padding: 0 24px;
- }
- }
- .sent-option {
- &.li-flex {
- display: flex;
- margin: 0px;
- .sent-option-items {
- &-0 {
- margin: 8px 0; // 单列左右间距去掉
- }
- &-8 {
- margin-left: 8px;
- margin-right: 8px;
- }
- }
- }
- &-row {
- flex: 1;
- }
- &-standardAnswer {
- flex-flow: wrap;
- }
- }
- .sent-option-items {
- width: 100%;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- box-sizing: border-box;
- background: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 8px;
- margin: 8px 0;
- padding: 8px 12px;
- .number-box {
- width: 16px;
- height: 30px;
- border-radius: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 8px;
- margin-top: 3px;
- color: #000;
- // &-hasmp3 {
- // margin-top: 8px;
- // }
- &-hasPY {
- margin-top: 21px;
- }
- &-nobg {
- width: 24px;
- justify-content: flex-end;
- }
- }
- > .number-box {
- margin-right: 16px;
- }
- .horn-24 {
- height: 30px;
- display: flex;
- justify-content: center;
- align-items: center;
- margin-right: 8px;
- margin-top: 3px;
- &.horn-hasPY {
- margin-top: 28px;
- }
- }
- }
- .sent-stem {
- flex: 1;
- display: flex;
- background: #fff;
- .stem-maincontent{
- flex: 1;
- }
- .stem-content {
- flex: 1;
- }
- .number-box {
- // &-hasPY {
- // margin-top: 19px;
- // }
- }
- .sent-main {
- position: relative;
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- box-sizing: border-box;
- &-138 {
- padding-right: 138px;
- }
- &-bottom {
- margin-bottom: 9px;
- }
- }
- .sent-que-box {
- display: flex;
- flex-wrap: wrap;
- padding: 4px 0;
- }
- .sent-que {
- &-flex {
- flex: 1;
- display: flex;
- justify-content: space-between;
- align-items: stretch;
- }
- .sentence-part {
- flex: 1;
- }
- }
- .answer-part {
- flex: 1;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- // padding-left: 16px;
- // &-hasPY {
- // padding-top: 9px;
- // }
- // &.answer-part-138 {
- // position: absolute;
- // right: 0px;
- // top: 1px;
- // }
- > div {
- margin-left: 8px;
- }
- .judge-part {
- &-padding-5 {
- padding: 5px 0 16px;
- }
- }
- .record-part {
- padding: 0;
- }
- .short-part {
- display: flex;
- align-items: center;
- margin-left: 0;
- &-flex {
- flex: 1;
- }
- // padding-top: 16px;
- // &-hasPY {
- // padding-top: 24px;
- // }
- }
- }
- }
- }
- .record-common {
- background: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- box-sizing: border-box;
- border-radius: 8px;
- padding: 0 12px;
- margin: 0 auto;
- &-40 {
- height: 40px;
- }
- }
- // .record_mini {
- // width: 68px;
- // }
- // .record_normal {
- // width: 126px;
- // }
- .promax-box-div {
- width: 100%;
- background: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- box-sizing: border-box;
- border-radius: 0px 0px 8px 8px;
- .promax-box {
- width: 320px;
- height: 40px;
- border-radius: 20px;
- padding: 0 16px;
- }
- }
- &.hasmp3 {
- .sent-option {
- padding: 0px 16px;
- }
- &.sentence-control {
- background: #f7f7f7;
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- }
- }
- </style>
- <style lang="scss">
- .sentence-control{
- .answer-part{
- .OptionComponents-npc{
- ul{
- justify-content: flex-end;
- }
- }
- }
- }
- </style>
|