SentenceMulModule.vue 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587
  1. <!-- -->
  2. <template>
  3. <div
  4. class="sentence-control"
  5. :class="[
  6. curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
  7. ? 'hasmp3'
  8. : '',
  9. ]"
  10. v-if="isShowTemp"
  11. >
  12. <div
  13. class="out-audioLine-box"
  14. v-if="
  15. curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
  16. "
  17. >
  18. <div class="aduioLine-box aduioLine-practice">
  19. <AudioLine
  20. audioId="fillInforAudioLine"
  21. :mp3="curQue.mp3_list[0].id"
  22. :getCurTime="getCurTime"
  23. :themeColor="themeColor"
  24. :ed="ed"
  25. type="audioLine"
  26. ref="fillInforAudioLine"
  27. @handleListenRead="handleListenRead"
  28. />
  29. </div>
  30. </div>
  31. <div
  32. :class="[
  33. 'container-box',
  34. curQue.img_list &&
  35. curQue.img_list.length > 0 &&
  36. curQue.img_site == 'rightCenter'
  37. ? 'container-box-flex'
  38. : '',
  39. ]"
  40. >
  41. <div
  42. class="fill-img-box"
  43. v-if="
  44. curQue.img_list &&
  45. curQue.img_list.length > 0 &&
  46. curQue.img_site == 'top'
  47. "
  48. >
  49. <el-image
  50. :src="curQue.img_list[0].id"
  51. v-if="curQue.img_list[0].id"
  52. fit="scale-down"
  53. class="fill-img"
  54. :style="{ width: curQue.img_size + 'px' }"
  55. ></el-image>
  56. </div>
  57. <div
  58. v-if="judgeAnswer == 'standardAnswer'"
  59. :class="['container', curQue.sortType == 'row' ? 'ul-flex' : '']"
  60. >
  61. <div :class="['sent-option li-flex sent-option-standardAnswer']">
  62. <div
  63. :class="[
  64. 'sent-option-items',
  65. itemsWidth == 780 ? 'sent-option-items-0' : 'sent-option-items-8',
  66. ]"
  67. v-for="(items, indexs) in userErrorList"
  68. :key="'sent-option-items' + judgeAnswer + indexs"
  69. :style="{
  70. width:
  71. curQue.sortType == 'col'
  72. ? itemsWidth + 'px'
  73. : Math.floor(780 / curQue.option.length) - 16 + 'px',
  74. }"
  75. >
  76. <div
  77. :class="[
  78. 'horn-24',
  79. items.pyNumber &&
  80. items.pyNumber[0] > 0 &&
  81. curQue.pyPosition == 'top'
  82. ? 'horn-hasPY'
  83. : '',
  84. ]"
  85. v-if="
  86. curQue.mp3_list &&
  87. curQue.mp3_list.length > 0 &&
  88. curQue.mp3_list[0].id &&
  89. items.bg &&
  90. items.ed
  91. "
  92. :style="{
  93. height:
  94. items.detail &&
  95. items.detail.length > 0 &&
  96. items.detail[0].maxFontsize
  97. ? (items.detail[0].maxFontsize * 3) / 2 + 'px'
  98. : '32px',
  99. marginTop:
  100. items.detail &&
  101. items.detail.length > 0 &&
  102. items.detail[0].maxFontsize
  103. ? ''
  104. : '0px',
  105. }"
  106. >
  107. <AudioItem
  108. :itemBg="items.bg"
  109. :itemEd="items.ed"
  110. :curTime="curTime"
  111. :handleChangeTime="handleChangeTime"
  112. :stopAudioS="stopAudioS"
  113. :themeColor="themeColor"
  114. />
  115. </div>
  116. <div :class="['sent-stem', bgClassName]">
  117. <!-- 题干 -->
  118. <div class="stem-content">
  119. <!-- items.fn_check_list.judge_check || sdItem.fn_check_list.record_check.indexOf('normal') > -1
  120. ? 'sent-main-138'
  121. : '', -->
  122. <div
  123. :class="[
  124. 'sent-main',
  125. items.fn_check_list.judge_check.indexOf('col') > -1 ||
  126. items.fn_check_list.short_check ||
  127. sdItem.fn_check_list.record_check.indexOf('normal') > -1
  128. ? 'sent-que-flex'
  129. : '',
  130. items.fn_check_list.radio_check.indexOf('row') > -1 ||
  131. items.fn_check_list.checkbox_check.indexOf('row') > -1
  132. ? 'sent-main-bottom'
  133. : '',
  134. ]"
  135. v-for="(sdItem, sdIndex) in items.detail"
  136. :key="'sent-option-items' + indexs + sdIndex"
  137. >
  138. <div class="sent-que-box">
  139. <div
  140. class="sent-que"
  141. v-for="(sddItem, sddIndex) in sdItem.detail"
  142. :key="'sent-option-items' + indexs + sdIndex + sddIndex"
  143. :style="{
  144. paddingLeft:
  145. sddItem.config.wordPadding.indexOf('left') > -1
  146. ? '4px'
  147. : '0px',
  148. paddingRight:
  149. sddItem.config.wordPadding.indexOf('right') > -1
  150. ? '4px'
  151. : '0px',
  152. }"
  153. >
  154. <!-- 补全句子 -->
  155. <OneSentenceTemp
  156. :detail="sddItem"
  157. :pyPosition="curQue.pyPosition"
  158. :TaskModel="TaskModel"
  159. :pyColor="curQue.pyColor"
  160. :Bookanswer="userBookanswer[indexs]"
  161. :judgeAnswer="judgeAnswer"
  162. :correctAnswer="items.correct.complateArr"
  163. :isInput="
  164. items.fn_check_list.sent_check ==
  165. 'sentence_complete_input_chs' ||
  166. items.fn_check_list.sent_check ==
  167. 'sentence_long_input_chs'
  168. "
  169. :fn_check_list="items.fn_check_list"
  170. :bgColor="curQue.bgColor"
  171. :pyNumber="items.pyNumber && items.pyNumber[sdIndex]"
  172. :record_check="sdItem.fn_check_list.record_check"
  173. :hengLeg="sdItem.hengLeg"
  174. :maxFontsize="sdItem.maxFontsize"
  175. :textIndent="sdItem.textindent"
  176. />
  177. <!-- <div class="en" v-if="sdItem.en">{{ sdItem.en }}</div> -->
  178. <div
  179. class="promax-box-div"
  180. v-if="
  181. sdItem.fn_check_list.record_check.indexOf('promax') >
  182. -1
  183. "
  184. >
  185. <Soundrecord
  186. :type="
  187. sdItem.fn_check_list.record_check
  188. ? typeList[sdItem.fn_check_list.record_check]
  189. : 'normal'
  190. "
  191. class="promax-box"
  192. :TaskModel="TaskModel"
  193. :tmIndex="sdIndex"
  194. :answerRecordList="[]"
  195. />
  196. </div>
  197. </div>
  198. </div>
  199. <div
  200. ref="answerpart"
  201. v-if="
  202. items.fn_check_list.judge_check ||
  203. sdItem.fn_check_list.record_check ||
  204. items.fn_check_list.short_check ||
  205. items.fn_check_list.radio_check.indexOf('col') > -1 ||
  206. items.fn_check_list.checkbox_check.indexOf('col') > -1
  207. "
  208. :class="[
  209. 'answer-part',
  210. items.pyNumber && items.pyNumber[1] > 0
  211. ? 'answer-part-hasPY'
  212. : '',
  213. items.fn_check_list.judge_check ||
  214. sdItem.fn_check_list.record_check
  215. ? 'answer-part-138'
  216. : '',
  217. ]"
  218. >
  219. <!-- 短输入 -->
  220. <div
  221. :class="[
  222. 'short-part',
  223. items.pyNumber && items.pyNumber[0] > 0
  224. ? 'short-part-hasPY'
  225. : '',
  226. items.fn_check_list.is_short_auto
  227. ? 'short-part-flex'
  228. : '',
  229. ]"
  230. v-if="sdIndex == 0 && items.fn_check_list.short_check"
  231. >
  232. <ShortInputTemp
  233. :doubleInput="items.correct.doubleInput"
  234. :Bookanswer="userBookanswer[indexs]"
  235. :TaskModel="TaskModel"
  236. :is_short_auto="items.fn_check_list.is_short_auto"
  237. :judgeAnswer="judgeAnswer"
  238. />
  239. </div>
  240. <!-- 判断 -->
  241. <div
  242. :class="[
  243. 'judge-part',
  244. items.fn_check_list.judge_check.indexOf('row') > -1
  245. ? 'answer-part-padding-5'
  246. : '',
  247. ]"
  248. v-if="sdIndex == 0 && items.fn_check_list.judge_check"
  249. >
  250. <JudgeTemp
  251. :isRecord="items.fn_check_list.record_check"
  252. :Bookanswer="userBookanswer[indexs]"
  253. :judge_isNo="items.judge_isNo"
  254. :TaskModel="TaskModel"
  255. :Isexample="items.Isexample"
  256. :judgeCorrectAnswer="items.correct.judge"
  257. :judgeAnswer="judgeAnswer"
  258. />
  259. </div>
  260. <!-- 多选题 -->
  261. <div
  262. :class="[
  263. 'short-part',
  264. items.pyNumber && items.pyNumber[0] > 0
  265. ? 'short-part-hasPY'
  266. : '',
  267. ]"
  268. v-if="
  269. sdIndex == 0 &&
  270. items.fn_check_list.checkbox_check.indexOf('col') > -1
  271. "
  272. >
  273. <OptionTemp
  274. :option="items.checkbox_option"
  275. :row="
  276. items.fn_check_list.checkbox_check.indexOf('row') > -1
  277. "
  278. :Bookanswer="userBookanswer[indexs]"
  279. :TaskModel="TaskModel"
  280. type="checkbox"
  281. :curQue="curQue"
  282. :items="items"
  283. :judgeAnswer="judgeAnswer"
  284. :correctAnswer="items.correct"
  285. />
  286. </div>
  287. <!-- 单选题 -->
  288. <div
  289. :class="[
  290. 'short-part',
  291. items.pyNumber && items.pyNumber[0] > 0
  292. ? 'short-part-hasPY'
  293. : '',
  294. ]"
  295. v-if="
  296. sdIndex == 0 &&
  297. items.fn_check_list.radio_check.indexOf('col') > -1
  298. "
  299. >
  300. <OptionTemp
  301. :option="items.radio_option"
  302. :row="
  303. items.fn_check_list.radio_check.indexOf('row') > -1
  304. "
  305. :Bookanswer="userBookanswer[indexs]"
  306. :correctAnswer="items.correct"
  307. :TaskModel="TaskModel"
  308. type="radio"
  309. :curQue="curQue"
  310. :items="items"
  311. :judgeAnswer="judgeAnswer"
  312. />
  313. </div>
  314. <!-- 录音 -->
  315. <div
  316. class="judge-part record-part"
  317. v-if="
  318. sdItem.fn_check_list.record_check &&
  319. items.fn_check_list.sent_check !=
  320. 'sentence_long_input_chs'
  321. "
  322. >
  323. <Soundrecord
  324. :type="
  325. sdItem.fn_check_list.record_check
  326. ? typeList[sdItem.fn_check_list.record_check]
  327. : 'normal'
  328. "
  329. :class="[
  330. 'record_' +
  331. typeList[sdItem.fn_check_list.record_check],
  332. 'record-common',
  333. items.fn_check_list.short_check
  334. ? 'record-common-40'
  335. : '',
  336. ]"
  337. :TaskModel="TaskModel"
  338. :tmIndex="sdIndex"
  339. :answerRecordList="[]"
  340. />
  341. </div>
  342. </div>
  343. </div>
  344. <!-- 多选题 -->
  345. <div
  346. class="select-que"
  347. v-if="items.fn_check_list.checkbox_check.indexOf('row') > -1"
  348. :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'}"
  349. >
  350. <OptionTemp
  351. :option="items.checkbox_option"
  352. :row="
  353. items.fn_check_list.checkbox_check.indexOf('row') > -1
  354. "
  355. :Bookanswer="userBookanswer[indexs]"
  356. :correctAnswer="items.correct"
  357. :TaskModel="TaskModel"
  358. type="checkbox"
  359. :curQue="curQue"
  360. :items="items"
  361. :judgeAnswer="judgeAnswer"
  362. />
  363. </div>
  364. <!-- 单选题 -->
  365. <div
  366. class="select-que"
  367. v-if="items.fn_check_list.radio_check.indexOf('row') > -1"
  368. :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'}"
  369. >
  370. <OptionTemp
  371. :option="items.radio_option"
  372. :row="items.fn_check_list.radio_check.indexOf('row') > -1"
  373. :Bookanswer="userBookanswer[indexs]"
  374. :correctAnswer="items.correct"
  375. :TaskModel="TaskModel"
  376. type="radio"
  377. :curQue="curQue"
  378. :items="items"
  379. :judgeAnswer="judgeAnswer"
  380. />
  381. </div>
  382. </div>
  383. </div>
  384. <!-- 题干 -->
  385. </div>
  386. </div>
  387. </div>
  388. <div
  389. v-else
  390. :class="['container', curQue.sortType == 'row' ? 'ul-flex' : '']"
  391. >
  392. <div
  393. :class="[
  394. 'sent-option',
  395. curQue.mp3_list &&
  396. curQue.mp3_list.length > 0 &&
  397. curQue.mp3_list[0].id
  398. ? 'sent-option-24'
  399. : '',
  400. curQue.sortType == 'row' ? 'sent-option-row' : 'li-flex',
  401. ]"
  402. v-for="(item, index) in curQue.option"
  403. :key="'sent-option' + index"
  404. >
  405. <div
  406. :class="[
  407. 'sent-option-items',
  408. itemsWidth == 780 ? 'sent-option-items-0' : 'sent-option-items-8',
  409. ]"
  410. v-for="(itemO, indeO) in item"
  411. :key="'sent-option-items' + index + indeO"
  412. :style="{
  413. width: curQue.sortType == 'col' ? itemsWidth + 'px' : '100%',
  414. }"
  415. >
  416. <div
  417. :class="[
  418. 'horn-24',
  419. itemO.pyNumber &&
  420. itemO.pyNumber[0] > 0 &&
  421. curQue.pyPosition == 'top'
  422. ? 'horn-hasPY'
  423. : '',
  424. ]"
  425. v-if="
  426. curQue.mp3_list &&
  427. curQue.mp3_list.length > 0 &&
  428. curQue.mp3_list[0].id &&
  429. itemO.bg &&
  430. itemO.ed
  431. "
  432. :style="{
  433. height:
  434. itemO.detail &&
  435. itemO.detail.length > 0 &&
  436. itemO.detail[0].maxFontsize
  437. ? (itemO.detail[0].maxFontsize * 3) / 2 + 'px'
  438. : '32px',
  439. marginTop:
  440. itemO.detail &&
  441. itemO.detail.length > 0 &&
  442. itemO.detail[0].maxFontsize
  443. ? ''
  444. : '0px',
  445. }"
  446. >
  447. <AudioItem
  448. :itemBg="itemO.bg"
  449. :itemEd="itemO.ed"
  450. :curTime="curTime"
  451. :handleChangeTime="handleChangeTime"
  452. :stopAudioS="stopAudioS"
  453. :themeColor="themeColor"
  454. />
  455. </div>
  456. <div :class="['sent-stem', bgClassName]">
  457. <div
  458. v-if="itemO.numbertotal"
  459. :class="[
  460. 'number-box number-box-hasmp3',
  461. itemO.pyNumber &&
  462. itemO.pyNumber[0] > 0 &&
  463. curQue.pyPosition == 'top'
  464. ? 'number-box-hasPY'
  465. : '',
  466. curQue.numberBg ? '' : 'number-box-nobg',
  467. ]"
  468. :style="{
  469. height:
  470. itemO.detail &&
  471. itemO.detail.length > 0 &&
  472. itemO.detail[0].maxFontsize
  473. ? (itemO.detail[0].maxFontsize * 3) / 2 + 'px'
  474. : '32px',
  475. marginTop:
  476. itemO.detail &&
  477. itemO.detail.length > 0 &&
  478. itemO.detail[0].maxFontsize
  479. ? ''
  480. : '0px',
  481. fontSize: itemO.numberfontSize
  482. }"
  483. >
  484. {{itemO.numbertotal}}
  485. </div>
  486. <div class="stem-maincontent">
  487. <div>
  488. <div
  489. :class="[
  490. 'sent-main',
  491. ]"
  492. v-for="(sdItem, sdIndex) in itemO.detail"
  493. :key="'sent-option-items' + index + indeO + sdIndex"
  494. >
  495. <div class="sent-que-box">
  496. <div
  497. class="sent-que"
  498. v-for="(sddItem, sddIndex) in sdItem.detail"
  499. :key="
  500. 'sent-option-items' +
  501. index +
  502. indeO +
  503. sdIndex +
  504. sddIndex
  505. "
  506. :style="{
  507. paddingLeft:
  508. sddItem.config.wordPadding.indexOf('left') > -1
  509. ? '4px'
  510. : '0px',
  511. paddingRight:
  512. sddItem.config.wordPadding.indexOf('right') > -1
  513. ? '4px'
  514. : '0px',
  515. }"
  516. >
  517. <OneSentenceTemp
  518. :detail="sddItem"
  519. :pyPosition="curQue.pyPosition"
  520. :TaskModel="TaskModel"
  521. :pyColor="curQue.pyColor"
  522. :Bookanswer="curQue.Bookanswer[index][indeO]"
  523. :judgeAnswer="judgeAnswer"
  524. :isInput="
  525. false
  526. "
  527. :fn_check_list="itemO.fn_check_list"
  528. :bgColor="curQue.bgColor"
  529. :pyNumber="itemO.pyNumber && itemO.pyNumber[sdIndex]"
  530. :record_check="sdItem.fn_check_list.record_check"
  531. :hengLeg="sdItem.hengLeg"
  532. :maxFontsize="sdItem.maxFontsize"
  533. :textIndent="sdItem.textindent"
  534. />
  535. <div
  536. class="promax-box-div"
  537. v-if="
  538. sdItem.fn_check_list.record_check.indexOf('promax') >
  539. -1
  540. "
  541. >
  542. <Soundrecord
  543. :type="
  544. sdItem.fn_check_list.record_check
  545. ? typeList[sdItem.fn_check_list.record_check]
  546. : 'normal'
  547. "
  548. class="promax-box"
  549. :TaskModel="TaskModel"
  550. :tmIndex="sdIndex"
  551. :answerRecordList="
  552. curQue.Bookanswer[index][indexs].recordList[sdIndex]
  553. "
  554. :index="index"
  555. :indexs="indexs"
  556. @handleWav="handleWav"
  557. />
  558. </div>
  559. </div>
  560. </div>
  561. </div>
  562. </div>
  563. <div v-for="(items, indexs) in itemO.options" :key="indexs">
  564. <div
  565. :class="[
  566. 'sent-main',
  567. items.fn_check_list.judge_check.indexOf('col') > -1 ||
  568. items.fn_check_list.short_check ||
  569. sdItem.fn_check_list.record_check.indexOf('normal') > -1
  570. ? 'sent-que-flex'
  571. : '',
  572. items.fn_check_list.radio_check.indexOf('row') > -1 ||
  573. items.fn_check_list.checkbox_check.indexOf('row') > -1
  574. ? 'sent-main-bottom'
  575. : '',
  576. ]"
  577. v-for="(sdItem, sdIndex) in items.detail"
  578. :key="'sent-option-items' + index + indexs + sdIndex"
  579. >
  580. <div class="sent-que-box">
  581. <div
  582. class="sent-que"
  583. v-for="(sddItem, sddIndex) in sdItem.detail"
  584. :key="
  585. 'sent-option-items' +
  586. index +
  587. indexs +
  588. sdIndex +
  589. sddIndex
  590. "
  591. :style="{
  592. paddingLeft:
  593. sddItem.config.wordPadding.indexOf('left') > -1
  594. ? '4px'
  595. : '0px',
  596. paddingRight:
  597. sddItem.config.wordPadding.indexOf('right') > -1
  598. ? '4px'
  599. : '0px',
  600. }"
  601. >
  602. <OneSentenceTemp
  603. :detail="sddItem"
  604. :pyPosition="curQue.pyPosition"
  605. :TaskModel="TaskModel"
  606. :pyColor="curQue.pyColor"
  607. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  608. :judgeAnswer="judgeAnswer"
  609. :correctAnswer="items.correct.complateArr"
  610. :isInput="
  611. items.fn_check_list.sent_check ==
  612. 'sentence_complete_input_chs' ||
  613. items.fn_check_list.sent_check ==
  614. 'sentence_long_input_chs'
  615. "
  616. :fn_check_list="items.fn_check_list"
  617. :bgColor="curQue.bgColor"
  618. :pyNumber="items.pyNumber && items.pyNumber[sdIndex]"
  619. :record_check="sdItem.fn_check_list.record_check"
  620. :hengLeg="sdItem.hengLeg"
  621. :maxFontsize="sdItem.maxFontsize"
  622. :textIndent="sdItem.textindent"
  623. />
  624. <div
  625. class="promax-box-div"
  626. v-if="
  627. sdItem.fn_check_list.record_check.indexOf('promax') >
  628. -1
  629. "
  630. >
  631. <Soundrecord
  632. :type="
  633. sdItem.fn_check_list.record_check
  634. ? typeList[sdItem.fn_check_list.record_check]
  635. : 'normal'
  636. "
  637. class="promax-box"
  638. :TaskModel="TaskModel"
  639. :tmIndex="sdIndex"
  640. :answerRecordList="
  641. curQue.Bookanswer[index][indeO][indexs].recordList[sdIndex]
  642. "
  643. :index="index"
  644. :indexs="indexs"
  645. @handleWav="handleWav"
  646. />
  647. </div>
  648. </div>
  649. </div>
  650. <div
  651. ref="answerpart"
  652. v-if="
  653. items.fn_check_list.judge_check ||
  654. sdItem.fn_check_list.record_check ||
  655. items.fn_check_list.short_check ||
  656. items.fn_check_list.radio_check.indexOf('col') > -1 ||
  657. items.fn_check_list.checkbox_check.indexOf('col') > -1
  658. "
  659. :class="[
  660. 'answer-part',
  661. items.pyNumber && items.pyNumber[1] > 0
  662. ? 'answer-part-hasPY'
  663. : '',
  664. items.fn_check_list.judge_check ||
  665. sdItem.fn_check_list.record_check
  666. ? 'answer-part-138'
  667. : '',
  668. ]"
  669. >
  670. <div
  671. :class="[
  672. 'short-part',
  673. items.pyNumber && items.pyNumber[0] > 0
  674. ? 'short-part-hasPY'
  675. : '',
  676. items.fn_check_list.is_short_auto
  677. ? 'short-part-flex'
  678. : '',
  679. ]"
  680. v-if="sdIndex == 0 && items.fn_check_list.short_check"
  681. >
  682. <ShortInputTemp
  683. :doubleInput="items.correct.doubleInput"
  684. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  685. :TaskModel="TaskModel"
  686. :is_short_auto="items.fn_check_list.is_short_auto"
  687. :judgeAnswer="judgeAnswer"
  688. />
  689. </div>
  690. <div
  691. :class="[
  692. 'judge-part',
  693. items.fn_check_list.judge_check.indexOf('row') > -1
  694. ? 'answer-part-padding-5'
  695. : '',
  696. ]"
  697. v-if="sdIndex == 0 && items.fn_check_list.judge_check"
  698. >
  699. <JudgeTemp
  700. :isRecord="items.fn_check_list.record_check"
  701. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  702. :judge_isNo="items.judge_isNo"
  703. :TaskModel="TaskModel"
  704. :Isexample="items.Isexample"
  705. :judgeCorrectAnswer="items.correct.judge"
  706. :judgeAnswer="judgeAnswer"
  707. />
  708. </div>
  709. <div
  710. :class="[
  711. 'short-part',
  712. items.pyNumber && items.pyNumber[0] > 0
  713. ? 'short-part-hasPY'
  714. : '',
  715. ]"
  716. v-if="
  717. sdIndex == 0 &&
  718. items.fn_check_list.checkbox_check.indexOf('col') > -1
  719. "
  720. >
  721. <OptionTemp
  722. :option="items.checkbox_option"
  723. :row="
  724. items.fn_check_list.checkbox_check.indexOf('row') > -1
  725. "
  726. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  727. :TaskModel="TaskModel"
  728. type="checkbox"
  729. :curQue="curQue"
  730. :items="items"
  731. :judgeAnswer="judgeAnswer"
  732. />
  733. </div>
  734. <div
  735. :class="[
  736. 'short-part',
  737. items.pyNumber && items.pyNumber[0] > 0
  738. ? 'short-part-hasPY'
  739. : '',
  740. ]"
  741. v-if="
  742. sdIndex == 0 &&
  743. items.fn_check_list.radio_check.indexOf('col') > -1
  744. "
  745. >
  746. <OptionTemp
  747. :option="items.radio_option"
  748. :row="
  749. items.fn_check_list.radio_check.indexOf('row') > -1
  750. "
  751. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  752. :correctAnswer="items.correct"
  753. :TaskModel="TaskModel"
  754. type="radio"
  755. :curQue="curQue"
  756. :items="items"
  757. :judgeAnswer="judgeAnswer"
  758. />
  759. </div>
  760. <div
  761. class="judge-part record-part"
  762. v-if="
  763. sdItem.fn_check_list.record_check &&
  764. items.fn_check_list.sent_check !=
  765. 'sentence_long_input_chs'
  766. "
  767. >
  768. <Soundrecord
  769. :type="
  770. sdItem.fn_check_list.record_check
  771. ? typeList[sdItem.fn_check_list.record_check]
  772. : 'normal'
  773. "
  774. :class="[
  775. 'record_' +
  776. typeList[sdItem.fn_check_list.record_check],
  777. 'record-common',
  778. items.fn_check_list.short_check
  779. ? 'record-common-40'
  780. : '',
  781. ]"
  782. :TaskModel="TaskModel"
  783. :tmIndex="sdIndex"
  784. :answerRecordList="
  785. curQue.Bookanswer[index][indeO][indexs].recordList[sdIndex]
  786. "
  787. :index="index"
  788. :indexs="indexs"
  789. @handleWav="handleWav"
  790. />
  791. </div>
  792. </div>
  793. </div>
  794. <div
  795. class="select-que"
  796. v-if="items.fn_check_list.checkbox_check.indexOf('row') > -1"
  797. :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'}"
  798. >
  799. <OptionTemp
  800. :option="items.checkbox_option"
  801. :row="
  802. items.fn_check_list.checkbox_check.indexOf('row') > -1
  803. "
  804. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  805. :correctAnswer="items.correct"
  806. :TaskModel="TaskModel"
  807. type="checkbox"
  808. :curQue="curQue"
  809. :items="items"
  810. :judgeAnswer="judgeAnswer"
  811. />
  812. </div>
  813. <div
  814. class="select-que"
  815. v-if="items.fn_check_list.radio_check.indexOf('row') > -1"
  816. :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'}"
  817. >
  818. <OptionTemp
  819. :option="items.radio_option"
  820. :row="items.fn_check_list.radio_check.indexOf('row') > -1"
  821. :Bookanswer="curQue.Bookanswer[index][indeO][indexs]"
  822. :correctAnswer="items.correct"
  823. :TaskModel="TaskModel"
  824. type="radio"
  825. :curQue="curQue"
  826. :items="items"
  827. :judgeAnswer="judgeAnswer"
  828. />
  829. </div>
  830. </div>
  831. </div>
  832. </div>
  833. </div>
  834. </div>
  835. </div>
  836. <div
  837. class="fill-img-box"
  838. v-if="
  839. curQue.img_list &&
  840. curQue.img_list.length > 0 &&
  841. (curQue.img_site == 'rightCenter' || curQue.img_site == 'bottom')
  842. "
  843. >
  844. <el-image
  845. :src="curQue.img_list[0].id"
  846. v-if="curQue.img_list[0].id"
  847. fit="scale-down"
  848. class="fill-img"
  849. :style="{ width: curQue.img_size + 'px' }"
  850. ></el-image>
  851. </div>
  852. </div>
  853. </div>
  854. </template>
  855. <script>
  856. import AudioLine from "./AudioLine.vue";
  857. import AudioItem from "./components/AudioItem.vue";
  858. import OneSentenceTemp from "./components/OneSentenceTemp.vue";
  859. import JudgeTemp from "./components/JudgeTemp.vue";
  860. import ShortInputTemp from "./components/ShortInputTemp.vue";
  861. import NumberStyle from "./components/NumberStyle.vue";
  862. import EditDiv from "./EditDiv.vue";
  863. import Soundrecord from "./Soundrecord.vue"; // 录音模板
  864. import OptionTemp from "./components/OptionTemp.vue";
  865. export default {
  866. components: {
  867. AudioLine,
  868. AudioItem,
  869. NumberStyle,
  870. EditDiv,
  871. Soundrecord,
  872. OneSentenceTemp,
  873. JudgeTemp,
  874. ShortInputTemp,
  875. OptionTemp,
  876. },
  877. props: ["curQue", "themeColor", "TaskModel", "judgeAnswer"],
  878. data() {
  879. return {
  880. curTime: 0,
  881. stopAudioS: false,
  882. ed: null,
  883. userAnswer: {
  884. Isexample: false,
  885. completeInput: [],
  886. shortInput: "",
  887. longInput: "",
  888. doubleInput: [],
  889. judge: {},
  890. checkbox: {},
  891. radio: {},
  892. recordList: {},
  893. completeImage: [],
  894. },
  895. chsFhList: [",", "。", "”", ":", "》", "?", "!", ";"],
  896. itemsWidth: 0,
  897. typeList: {
  898. sentence_record_mini_chs: "mini",
  899. sentence_record_normal_chs: "normal",
  900. sentence_record_pro_chs: "pro",
  901. sentence_record_promax_chs: "promax",
  902. },
  903. answerpart: [],
  904. userErrorList: [],
  905. userBookanswer: [],
  906. userErrorNumberTotal: 0,
  907. };
  908. },
  909. computed: {
  910. isShowTemp() {
  911. let _this = this;
  912. let bool = false;
  913. if (_this.curQue && _this.curQue.Bookanswer) {
  914. if (_this.judgeAnswer == "standardAnswer") {
  915. if (_this.userErrorNumberTotal > 0) {
  916. bool = true;
  917. } else {
  918. bool = false;
  919. }
  920. } else {
  921. bool = true;
  922. }
  923. }
  924. return bool;
  925. },
  926. bgClassName() {
  927. let className = "";
  928. if (this.curQue.bgColor == "grey") {
  929. className = "sent-stem-grey";
  930. } else if (this.curQue.bgColor == "white") {
  931. className = "sent-stem-white";
  932. }
  933. return className;
  934. },
  935. },
  936. watch: {},
  937. //方法集合
  938. methods: {
  939. getCurTime(curTime) {
  940. this.curTime = curTime * 1000;
  941. },
  942. //点击播放某个句子
  943. handleChangeTime(time, edTime) {
  944. let _this = this;
  945. _this.curTime = time;
  946. _this.stopAudioS = true;
  947. _this.$refs.fillInforAudioLine.onTimeupdateTime(time / 1000, true);
  948. _this.ed = edTime;
  949. },
  950. handleListenRead(playFlag) {
  951. this.stopAudioS = playFlag;
  952. },
  953. handleWav(list, tmIndex, index, indexs) {
  954. tmIndex = tmIndex ? tmIndex : 0;
  955. let resList = list.filter((item, index) => index == list.length - 1);
  956. this.$set(
  957. this.curQue.Bookanswer[index][indexs].recordList,
  958. tmIndex,
  959. resList
  960. );
  961. },
  962. handleData() {
  963. let Bookanswer = [];
  964. let itemLeg = 0;
  965. this.totalHasPy = false;
  966. let option = JSON.parse(JSON.stringify(this.curQue.option));
  967. let completeImage = [];
  968. option.forEach((itemO, indexO) => {
  969. Bookanswer.push([]);
  970. completeImage = [];
  971. itemLeg = itemO.length > itemLeg ? itemO.length : itemLeg;
  972. itemO.forEach((item,index)=>{
  973. Bookanswer[indexO].push([])
  974. // this.$set(Bookanswer[indexO][index],'optionsAnswer',[])
  975. if (this.curQue.wordTime && this.curQue.wordTime.length > 0) {
  976. let time = this.curQue.wordTime[item.index];
  977. if (time) {
  978. item.ed = time.ed;
  979. item.bg = time.bg;
  980. }
  981. }
  982. if(item.detail){
  983. item.detail.forEach(itemI=>{
  984. itemI.detail.forEach(itemss=>{
  985. if(itemss.wordsList&&itemss.wordsList.length>0){
  986. itemss.wordsList.forEach(itemsss=>{
  987. this.mergeWordSymbol(itemsss);
  988. })
  989. }
  990. })
  991. })
  992. }
  993. item.options.forEach((items, indexs) => {
  994. let userAnswer = JSON.parse(JSON.stringify(this.userAnswer));
  995. let correct = JSON.parse(JSON.stringify(items.correct));
  996. let complateArr = correct.completeInput.split("\n");
  997. complateArr.forEach((itemI, indexI) => {
  998. if (itemI == "??" || itemI == "??") {
  999. complateArr[indexI] = "";
  1000. }
  1001. });
  1002. items.correct.complateArr = complateArr;
  1003. this.curQue.option[indexO][index].options[indexs].correct.complateArr = complateArr;
  1004. if (items.Isexample) {
  1005. userAnswer.Isexample = true;
  1006. userAnswer.recordList = {};
  1007. }
  1008. Bookanswer[indexO][index].push(userAnswer);
  1009. let hengIndex = 0;
  1010. items.pyNumber = [];
  1011. items.detail.forEach((sdItem, sdIndex) => {
  1012. let isHasPY = 0;
  1013. let maxFontsize = 0;
  1014. sdItem.detail.forEach((sddItem) => {
  1015. if (sddItem.wordsList.length > 0) {
  1016. sddItem.wordsList.forEach((sItem, sIndex) => {
  1017. let reg = /_{2,}/g;
  1018. if (reg.test(sItem.chs)) {
  1019. sItem.index = sIndex;
  1020. sItem.isHeng = true;
  1021. sItem.hengIndex = hengIndex;
  1022. hengIndex++;
  1023. }
  1024. //补全句子
  1025. if (
  1026. !this.curQue.Bookanswer &&
  1027. (items.fn_check_list.sent_check ==
  1028. "sentence_complete_input_chs" ||
  1029. items.fn_check_list.sent_check ==
  1030. "sentence_long_input_chs")
  1031. ) {
  1032. let reg = /_{2,}/g;
  1033. if (reg.test(sItem.chs)) {
  1034. let bool = false;
  1035. if (sddItem.hasOwnProperty("input_Isexample")) {
  1036. bool = sddItem.input_Isexample;
  1037. } else {
  1038. bool = items.Isexample;
  1039. }
  1040. let obj = null;
  1041. if (!sddItem.input_tian) {
  1042. obj = {
  1043. answer:
  1044. bool && complateArr[sItem.hengIndex]
  1045. ? complateArr[sItem.hengIndex]
  1046. : "",
  1047. userAnswerJudge:
  1048. bool || !complateArr[sItem.hengIndex]
  1049. ? ""
  1050. : "[JUDGE##F##JUDGE]",
  1051. input_Isexample: bool ? true : false,
  1052. };
  1053. Bookanswer[indexO][index][indexs].completeInput.push(
  1054. JSON.parse(JSON.stringify(obj))
  1055. );
  1056. } else {
  1057. if (sddItem.hengLeg == "-1") {
  1058. completeImage.push(obj);
  1059. } else {
  1060. for (let i = 0; i < Number(sddItem.hengLeg); i++) {
  1061. completeImage.push(obj);
  1062. }
  1063. }
  1064. Bookanswer[indexO][index][indexs].completeInput.push(
  1065. JSON.parse(JSON.stringify(completeImage))
  1066. );
  1067. }
  1068. }
  1069. }
  1070. this.mergeWordSymbol(sItem);
  1071. if (sItem.pinyin) {
  1072. isHasPY++;
  1073. this.totalHasPy = true;
  1074. }
  1075. let fontSize = JSON.parse(JSON.stringify(sItem.fontSize));
  1076. fontSize = Number(fontSize.replace("px", ""));
  1077. maxFontsize = fontSize > maxFontsize ? fontSize : maxFontsize;
  1078. });
  1079. } else {
  1080. if (sddItem.sentence) {
  1081. let fontSize = JSON.parse(
  1082. JSON.stringify(sddItem.config.fontSize)
  1083. );
  1084. fontSize = Number(fontSize.replace("px", ""));
  1085. maxFontsize = fontSize > maxFontsize ? fontSize : maxFontsize;
  1086. }
  1087. }
  1088. });
  1089. sdItem.maxFontsize = maxFontsize;
  1090. items.pyNumber.push(isHasPY);
  1091. });
  1092. if (!this.curQue.Bookanswer) {
  1093. //双输入/短输入
  1094. if (
  1095. items.fn_check_list.short_check == "sentence_double_input_chs"
  1096. ) {
  1097. items.correct.doubleInput.forEach((cItem) => {
  1098. let obj = {
  1099. correct:
  1100. items.Isexample && cItem.correct ? cItem.correct : "",
  1101. userAnswerJudge:
  1102. !items.Isexample && (cItem.correct || cItem.correct == "0")
  1103. ? "[JUDGE##F##JUDGE]"
  1104. : "",
  1105. };
  1106. Bookanswer[indexO][index][indexs].doubleInput.push(
  1107. JSON.parse(JSON.stringify(obj))
  1108. );
  1109. });
  1110. }
  1111. //判断
  1112. if (items.fn_check_list.judge_check) {
  1113. let judge_obj = {
  1114. correct:
  1115. items.Isexample && items.correct.judge
  1116. ? items.correct.judge
  1117. : "",
  1118. userAnswerJudge:
  1119. !items.Isexample && items.correct.judge
  1120. ? "[JUDGE##F##JUDGE]"
  1121. : "",
  1122. };
  1123. Bookanswer[indexO][index][indexs].judge = JSON.parse(
  1124. JSON.stringify(judge_obj)
  1125. );
  1126. }
  1127. //单选
  1128. if (items.fn_check_list.radio_check) {
  1129. let radio_obj = {
  1130. correct:
  1131. items.Isexample &&
  1132. (items.correct.radio || items.correct.radio === 0)
  1133. ? items.correct.radio
  1134. : "",
  1135. userAnswerJudge:
  1136. !items.Isexample &&
  1137. (items.correct.radio || items.correct.radio === 0)
  1138. ? "[JUDGE##F##JUDGE]"
  1139. : "",
  1140. };
  1141. Bookanswer[indexO][index][indexs].radio = JSON.parse(
  1142. JSON.stringify(radio_obj)
  1143. );
  1144. }
  1145. //多选
  1146. if (items.fn_check_list.checkbox_check) {
  1147. let checkbox_obj = {
  1148. correct:
  1149. items.Isexample &&
  1150. items.correct.checkbox &&
  1151. items.correct.checkbox.length > 0
  1152. ? items.correct.checkbox
  1153. : [],
  1154. userAnswerJudge:
  1155. !items.Isexample &&
  1156. items.correct.checkbox &&
  1157. items.correct.checkbox.length > 0
  1158. ? "[JUDGE##F##JUDGE]"
  1159. : "",
  1160. };
  1161. Bookanswer[indexO][index][indexs].checkbox = JSON.parse(
  1162. JSON.stringify(checkbox_obj)
  1163. );
  1164. }
  1165. }
  1166. items.radio_option.forEach((rItem, rIndex) => {
  1167. rItem.detail.pyNumber = [];
  1168. rItem.detail.wordsList.forEach((rpwItem) => {
  1169. let isHasPY2 = 0;
  1170. rpwItem.forEach((rpsItem) => {
  1171. this.mergeWordSymbol(rpsItem);
  1172. if (rpsItem.pinyin) {
  1173. isHasPY2++;
  1174. }
  1175. });
  1176. rItem.detail.pyNumber.push(isHasPY2);
  1177. });
  1178. });
  1179. items.checkbox_option.forEach((cItem, rIndex) => {
  1180. cItem.detail.pyNumber = [];
  1181. cItem.detail.wordsList.forEach((cpwItem) => {
  1182. let isHasPY3 = 0;
  1183. cpwItem.forEach((cpsItem) => {
  1184. this.mergeWordSymbol(cpsItem);
  1185. if (cpsItem.pinyin) {
  1186. isHasPY3++;
  1187. }
  1188. });
  1189. cItem.detail.pyNumber.push(isHasPY3);
  1190. });
  1191. });
  1192. });
  1193. })
  1194. })
  1195. if (!this.curQue.Bookanswer) {
  1196. this.$nextTick(() => {
  1197. this.$set(
  1198. this.curQue,
  1199. "Bookanswer",
  1200. JSON.parse(JSON.stringify(Bookanswer))
  1201. );
  1202. });
  1203. } else {
  1204. let BookanswerStr = JSON.stringify(this.curQue.Bookanswer);
  1205. let errReg = /\[JUDGE##F##JUDGE\]/g;
  1206. if (errReg.test(BookanswerStr)) {
  1207. let errorArr = BookanswerStr.match(/\[JUDGE##F##JUDGE\]/g);
  1208. this.userErrorNumberTotal = errorArr.length;
  1209. }
  1210. }
  1211. this.$set(this.curQue, "option", option);
  1212. let contentWidth = 780;
  1213. if (this.curQue.img_list && this.curQue.img_list.length > 0) {
  1214. contentWidth = 780 - this.curQue.img_size;
  1215. }
  1216. if(itemLeg==1){
  1217. this.itemsWidth = 780
  1218. }else{
  1219. this.itemsWidth = Math.floor(contentWidth / itemLeg) - 16;
  1220. }
  1221. // 把答错的挑出来
  1222. if (this.judgeAnswer == "standardAnswer") {
  1223. this.userErrorList = [];
  1224. this.userBookanswer = [];
  1225. this.curQue.option.forEach((itemO, indexO) => {
  1226. itemO.forEach((item,index)=>{
  1227. item.options.forEach((items, indexs) => {
  1228. let flag = false;
  1229. // 多输入或者短输入
  1230. items.correct.doubleInput.forEach((itemI, indexI) => {
  1231. if (
  1232. itemI.correct &&
  1233. itemI.correct !=
  1234. this.curQue.Bookanswer[indexO][index][indexs].doubleInput[indexI]
  1235. .correct
  1236. ) {
  1237. flag = true;
  1238. }
  1239. });
  1240. // 句子填空
  1241. items.correct.complateArr.forEach((itemI, indexI) => {
  1242. if (
  1243. itemI &&
  1244. itemI !=
  1245. this.curQue.Bookanswer[indexO][index][indexs].completeInput[indexI]
  1246. .answer
  1247. ) {
  1248. flag = true;
  1249. }
  1250. });
  1251. // 句子判断
  1252. if (
  1253. items.correct.judge &&
  1254. items.correct.judge !=
  1255. this.curQue.Bookanswer[indexO][index][indexs].judge.correct
  1256. ) {
  1257. flag = true;
  1258. }
  1259. // 句子单选
  1260. if (
  1261. items.correct.radio !== "" &&
  1262. items.correct.radio !==
  1263. this.curQue.Bookanswer[indexO][index][indexs].radio.correct
  1264. ) {
  1265. flag = true;
  1266. }
  1267. // 句子多选
  1268. if (
  1269. items.correct &&
  1270. items.correct.checkbox.length > 0 &&
  1271. items.correct.checkbox.sort().toString() !=
  1272. this.curQue.Bookanswer[indexO][index][indexs].checkbox.correct
  1273. .sort()
  1274. .toString()
  1275. ) {
  1276. flag = true;
  1277. }
  1278. if (flag) {
  1279. this.userErrorList.push(items);
  1280. this.userBookanswer.push(this.curQue.Bookanswer[indexO][index][indexs]);
  1281. }
  1282. });
  1283. })
  1284. });
  1285. console.log(this.userErrorList)
  1286. }
  1287. },
  1288. //词和标点合一起
  1289. mergeWordSymbol(sItem) {
  1290. if (this.chsFhList.indexOf(sItem.chs) > -1) {
  1291. sItem.isShow = false;
  1292. } else {
  1293. sItem.isShow = true;
  1294. }
  1295. },
  1296. },
  1297. //生命周期 - 创建完成(可以访问当前this实例)
  1298. created() {},
  1299. //生命周期 - 挂载完成(可以访问DOM元素)
  1300. mounted() {
  1301. let _this = this;
  1302. _this.handleData();
  1303. _this.$nextTick(() => {
  1304. if (_this.$refs.answerpart) {
  1305. _this.$refs.answerpart.forEach((item) => {
  1306. _this.answerpart.push(item.offsetWidth);
  1307. });
  1308. }
  1309. });
  1310. },
  1311. beforeCreate() {}, //生命周期 - 创建之前
  1312. beforeMount() {}, //生命周期 - 挂载之前
  1313. beforeUpdate() {}, //生命周期 - 更新之前
  1314. updated() {}, //生命周期 - 更新之后
  1315. beforeDestroy() {}, //生命周期 - 销毁之前
  1316. destroyed() {}, //生命周期 - 销毁完成
  1317. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  1318. };
  1319. </script>
  1320. <style lang='scss' scoped>
  1321. //@import url(); 引入公共css类
  1322. .sentence-control {
  1323. width: 100%;
  1324. box-sizing: border-box;
  1325. border-radius: 8px;
  1326. overflow: hidden;
  1327. .out-audioLine-box {
  1328. background: #f7f7f7;
  1329. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  1330. }
  1331. .container-box {
  1332. width: 100%;
  1333. &-flex {
  1334. display: flex;
  1335. align-items: stretch;
  1336. }
  1337. &-auto {
  1338. .fill-img-box {
  1339. width: 100%;
  1340. }
  1341. }
  1342. .fill-img-box {
  1343. display: flex;
  1344. justify-content: center;
  1345. align-items: center;
  1346. }
  1347. }
  1348. .container {
  1349. flex: 1;
  1350. padding: 0;
  1351. box-sizing: border-box;
  1352. &.ul-flex {
  1353. display: flex;
  1354. flex-wrap: wrap;
  1355. justify-content: space-between;
  1356. .sent-option-24 {
  1357. padding: 0 24px;
  1358. }
  1359. }
  1360. .sent-option {
  1361. &.li-flex {
  1362. display: flex;
  1363. margin: 0px;
  1364. .sent-option-items {
  1365. &-0 {
  1366. margin: 8px 0; // 单列左右间距去掉
  1367. }
  1368. &-8 {
  1369. margin-left: 8px;
  1370. margin-right: 8px;
  1371. }
  1372. }
  1373. }
  1374. &-row {
  1375. flex: 1;
  1376. }
  1377. &-standardAnswer {
  1378. flex-flow: wrap;
  1379. }
  1380. }
  1381. .sent-option-items {
  1382. width: 100%;
  1383. display: flex;
  1384. flex-direction: row;
  1385. justify-content: flex-start;
  1386. box-sizing: border-box;
  1387. background: #ffffff;
  1388. border: 1px solid rgba(0, 0, 0, 0.1);
  1389. border-radius: 8px;
  1390. margin: 8px 0;
  1391. padding: 8px 12px;
  1392. .number-box {
  1393. width: 16px;
  1394. height: 30px;
  1395. border-radius: 100%;
  1396. display: flex;
  1397. justify-content: center;
  1398. align-items: center;
  1399. margin-right: 8px;
  1400. margin-top: 3px;
  1401. color: #000;
  1402. // &-hasmp3 {
  1403. // margin-top: 8px;
  1404. // }
  1405. &-hasPY {
  1406. margin-top: 21px;
  1407. }
  1408. &-nobg {
  1409. width: 24px;
  1410. justify-content: flex-end;
  1411. }
  1412. }
  1413. > .number-box {
  1414. margin-right: 16px;
  1415. }
  1416. .horn-24 {
  1417. height: 30px;
  1418. display: flex;
  1419. justify-content: center;
  1420. align-items: center;
  1421. margin-right: 8px;
  1422. margin-top: 3px;
  1423. &.horn-hasPY {
  1424. margin-top: 28px;
  1425. }
  1426. }
  1427. }
  1428. .sent-stem {
  1429. flex: 1;
  1430. display: flex;
  1431. background: #fff;
  1432. .stem-maincontent{
  1433. flex: 1;
  1434. }
  1435. .stem-content {
  1436. flex: 1;
  1437. }
  1438. .number-box {
  1439. // &-hasPY {
  1440. // margin-top: 19px;
  1441. // }
  1442. }
  1443. .sent-main {
  1444. position: relative;
  1445. width: 100%;
  1446. display: flex;
  1447. flex-wrap: wrap;
  1448. box-sizing: border-box;
  1449. &-138 {
  1450. padding-right: 138px;
  1451. }
  1452. &-bottom {
  1453. margin-bottom: 9px;
  1454. }
  1455. }
  1456. .sent-que-box {
  1457. display: flex;
  1458. flex-wrap: wrap;
  1459. padding: 4px 0;
  1460. }
  1461. .sent-que {
  1462. &-flex {
  1463. flex: 1;
  1464. display: flex;
  1465. justify-content: space-between;
  1466. align-items: stretch;
  1467. }
  1468. .sentence-part {
  1469. flex: 1;
  1470. }
  1471. }
  1472. .answer-part {
  1473. flex: 1;
  1474. display: flex;
  1475. justify-content: flex-end;
  1476. align-items: center;
  1477. // padding-left: 16px;
  1478. // &-hasPY {
  1479. // padding-top: 9px;
  1480. // }
  1481. // &.answer-part-138 {
  1482. // position: absolute;
  1483. // right: 0px;
  1484. // top: 1px;
  1485. // }
  1486. > div {
  1487. margin-left: 8px;
  1488. }
  1489. .judge-part {
  1490. &-padding-5 {
  1491. padding: 5px 0 16px;
  1492. }
  1493. }
  1494. .record-part {
  1495. padding: 0;
  1496. }
  1497. .short-part {
  1498. display: flex;
  1499. align-items: center;
  1500. margin-left: 0;
  1501. &-flex {
  1502. flex: 1;
  1503. }
  1504. // padding-top: 16px;
  1505. // &-hasPY {
  1506. // padding-top: 24px;
  1507. // }
  1508. }
  1509. }
  1510. }
  1511. }
  1512. .record-common {
  1513. background: #ffffff;
  1514. border: 1px solid rgba(0, 0, 0, 0.1);
  1515. box-sizing: border-box;
  1516. border-radius: 8px;
  1517. padding: 0 12px;
  1518. margin: 0 auto;
  1519. &-40 {
  1520. height: 40px;
  1521. }
  1522. }
  1523. // .record_mini {
  1524. // width: 68px;
  1525. // }
  1526. // .record_normal {
  1527. // width: 126px;
  1528. // }
  1529. .promax-box-div {
  1530. width: 100%;
  1531. background: #ffffff;
  1532. border: 1px solid rgba(0, 0, 0, 0.1);
  1533. box-sizing: border-box;
  1534. border-radius: 0px 0px 8px 8px;
  1535. .promax-box {
  1536. width: 320px;
  1537. height: 40px;
  1538. border-radius: 20px;
  1539. padding: 0 16px;
  1540. }
  1541. }
  1542. &.hasmp3 {
  1543. .sent-option {
  1544. padding: 0px 16px;
  1545. }
  1546. &.sentence-control {
  1547. background: #f7f7f7;
  1548. border: 1px solid rgba(0, 0, 0, 0.1);
  1549. }
  1550. }
  1551. }
  1552. </style>
  1553. <style lang="scss">
  1554. .sentence-control{
  1555. .answer-part{
  1556. .OptionComponents-npc{
  1557. ul{
  1558. justify-content: flex-end;
  1559. }
  1560. }
  1561. }
  1562. }
  1563. </style>