AnswerModel.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622
  1. <!-- -->
  2. <template>
  3. <div
  4. class="NNPE-ArticleView"
  5. :class="['NPC-ArticleAnswerView-' + judgeAnswer]"
  6. v-if="curQue && Bookanswer"
  7. >
  8. <div
  9. class="aduioLine-box"
  10. v-if="
  11. curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].id
  12. "
  13. >
  14. <AudioLine
  15. audioId="'answerAudio'"
  16. :mp3="curQue.mp3_list[0].id"
  17. :getCurTime="getCurTime"
  18. ref="audioLine"
  19. :width="audioWidth"
  20. />
  21. </div>
  22. <template v-if="resArr.length > 0">
  23. <div class="NPC-sentences-list">
  24. <p class="notice" v-if="curQue.notice">{{ curQue.notice }}</p>
  25. <div
  26. :class="[
  27. 'NNPE-detail',
  28. item.isTitle ? 'NNPE-detail-title' : '',
  29. item.timeList.length > 0 &&
  30. curTime >= item.timeList[0].bg &&
  31. curTime <= item.timeList[item.timeList.length - 1].ed
  32. ? 'active'
  33. : ''
  34. ]"
  35. v-for="(item, index) in resArr"
  36. :key="'detail' + index"
  37. >
  38. <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
  39. <RoleChs :curRole="item.roleDetail" :type="1" />
  40. <div class="wordsList-box">
  41. <div
  42. class="roleDetail"
  43. v-if="item.roleDetail.detail.wordsList.length > 0"
  44. >
  45. <span class="pinyin">{{
  46. item.roleDetail.detail.wordsList | handlePinyin
  47. }}</span>
  48. <span class="chs">{{
  49. item.roleDetail.detail.wordsList | handleChs
  50. }}</span>
  51. </div>
  52. <div
  53. class="para-con"
  54. :style="{ background: item.roleDetail.color.bg }"
  55. >
  56. <div
  57. v-if="item.enwords && enPosition && enPosition == 'top'"
  58. class="enwords"
  59. >
  60. {{ item.enwords }}
  61. </div>
  62. <div class="clearFix"></div>
  63. <div
  64. class="NNPE-words"
  65. v-for="(pItem, pIndex) in item.wordsList"
  66. :key="'wordsList' + pIndex"
  67. :class="[
  68. pItem.chs != '“' && pItem.wordIndex == 0
  69. ? 'textLeft'
  70. : 'textCenter',
  71. pItem.chs == '“' ? 'textRight' : ''
  72. ]"
  73. @click="
  74. handleChangeTime(
  75. item.timeList &&
  76. item.timeList.length > 0 &&
  77. item.timeList[pItem.sentIndex].bg,
  78. item,
  79. item.timeList &&
  80. item.timeList.length > 0 &&
  81. item.timeList[pItem.sentIndex].ed
  82. )
  83. "
  84. >
  85. <template v-if="!pItem.width">
  86. <template v-if="pItem.isShow">
  87. <template
  88. v-if="
  89. item.wordsList[pIndex + 1] &&
  90. item.wordsList[pIndex + 1].chs &&
  91. chsFhList.indexOf(item.wordsList[pIndex + 1].chs) >
  92. -1
  93. "
  94. >
  95. <span
  96. class="NNPE-words-box"
  97. :style="boxStyle(pItem.config, item.isHasPY)"
  98. >
  99. <span
  100. v-if="item.isHasPY > 0 && pyPosition == 'top'"
  101. class="NNPE-pinyin"
  102. :class="[
  103. pItem.className ? pItem.className : '',
  104. pItem.pinyin && noFont.indexOf(pItem.pinyin) > -1
  105. ? 'noFont'
  106. : '',
  107. pItem.config.underLine
  108. ? 'NNPE-pinyin-underline'
  109. : ''
  110. ]"
  111. >{{ pItem.pinyin | handlePY }}</span
  112. >
  113. <template v-if="!pItem.isHeng">
  114. <span
  115. v-for="(wItem, wIndex) in pItem.leg"
  116. :key="'ci' + wIndex + pIndex + index"
  117. :class="[
  118. pItem.chstimeList &&
  119. pItem.chstimeList[wIndex] &&
  120. curTime >= pItem.chstimeList[wIndex].wordBg &&
  121. curTime < item.timeList[pItem.sentIndex].ed
  122. ? 'wordActive'
  123. : '',
  124. 'NNPE-chs',
  125. pItem.config.underLine
  126. ? 'NNPE-chs-underline'
  127. : ''
  128. ]"
  129. :style="hengStyle(pItem.config)"
  130. >{{ pItem.chs[wIndex] }}</span
  131. >
  132. <!-- <span
  133. class="NNPE-chs"
  134. :class="[
  135. pItem.chstimeList &&
  136. pItem.chstimeList[wIndex] &&
  137. curTime >= pItem.chstimeList[wIndex].wordBg &&
  138. curTime <= item.timeList[pItem.sentIndex].ed
  139. ? 'wordActive'
  140. : '',
  141. pItem.config.underLine
  142. ? 'NNPE-chs-underline'
  143. : '',
  144. ]"
  145. :style="hengStyle(pItem.config)"
  146. >{{ pItem.chs }}</span
  147. > -->
  148. </template>
  149. <template v-else>
  150. <template v-if="judgeAnswer == 'standardAnswer'">
  151. <EditDiv
  152. :id="
  153. 'dialogue_' +
  154. Math.random()
  155. .toString(36)
  156. .substr(2) +
  157. '_' +
  158. pItem.hengIndex
  159. "
  160. class="answer-input userRight"
  161. v-model="curQue.answerArr[pItem.hengIndex - 1]"
  162. :canEdit="false"
  163. :textAlign="pItem.config.DiaTextAlign"
  164. :style="hengStyle(pItem.config)"
  165. />
  166. </template>
  167. <template v-else>
  168. <EditDiv
  169. :id="
  170. 'dialogue_' +
  171. Math.random()
  172. .toString(36)
  173. .substr(2) +
  174. '_' +
  175. pItem.hengIndex
  176. "
  177. class="answer-input"
  178. :class="[
  179. curQue.answerArr &&
  180. curQue.answerArr[pItem.hengIndex - 1] &&
  181. curQue.answerArr[pItem.hengIndex - 1] ==
  182. Bookanswer.input[pItem.hengIndex - 1].value
  183. ? 'userRight'
  184. : curQue.answerArr &&
  185. curQue.answerArr[pItem.hengIndex - 1] &&
  186. curQue.answerArr[pItem.hengIndex - 1] !=
  187. Bookanswer.input[pItem.hengIndex - 1]
  188. .value
  189. ? 'userError'
  190. : ''
  191. ]"
  192. v-model="
  193. Bookanswer.input[pItem.hengIndex - 1].value
  194. "
  195. :canEdit="
  196. TaskModel == 'ANSWER' || judgeAnswer
  197. ? false
  198. : true
  199. "
  200. :hengIndex="pItem.hengIndex - 1"
  201. @saveBlankTF="saveBlankTF"
  202. :style="hengStyle(pItem.config)"
  203. :textAlign="pItem.config.DiaTextAlign"
  204. />
  205. </template>
  206. </template>
  207. <span
  208. v-if="item.isHasPY > 0 && pyPosition == 'bottom'"
  209. class="NNPE-pinyin"
  210. :class="[
  211. pItem.className ? pItem.className : '',
  212. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  213. pItem.config.underLine
  214. ? 'NNPE-pinyin-underline'
  215. : ''
  216. ]"
  217. >{{ pItem.pinyin | handlePY }}</span
  218. >
  219. </span>
  220. <span
  221. class="NNPE-words-box"
  222. v-if="item.wordsList[pIndex + 1]"
  223. :style="
  224. boxStyle(
  225. item.wordsList[pIndex + 1].config,
  226. item.isHasPY
  227. )
  228. "
  229. >
  230. <span
  231. v-if="item.isHasPY > 0 && pyPosition == 'top'"
  232. class="NNPE-pinyin"
  233. :class="[
  234. noFont.indexOf(
  235. item.wordsList[pIndex + 1].pinyin
  236. ) > -1
  237. ? 'noFont'
  238. : '',
  239. item.wordsList[pIndex + 1].config.underLine
  240. ? 'NNPE-pinyin-underline'
  241. : ''
  242. ]"
  243. style="text-align: left"
  244. >{{
  245. item.wordsList[pIndex + 1].pinyin | handlePY
  246. }}</span
  247. >
  248. <span
  249. class="NNPE-chs"
  250. style="text-align: left"
  251. :class="[
  252. item.timeList.length > 0 &&
  253. pItem.chstimeList &&
  254. pItem.chstimeList[pItem.leg - 1] &&
  255. curTime >=
  256. pItem.chstimeList[pItem.leg - 1].wordBg &&
  257. curQue.wordTime &&
  258. curTime <= item.timeList[pItem.sentIndex].ed
  259. ? 'wordActive'
  260. : ''
  261. ]"
  262. :style="
  263. hengStyle(item.wordsList[pIndex + 1].config)
  264. "
  265. >{{ item.wordsList[pIndex + 1].chs }}</span
  266. >
  267. <span
  268. v-if="item.isHasPY > 0 && pyPosition == 'bottom'"
  269. class="NNPE-pinyin"
  270. :class="[
  271. noFont.indexOf(
  272. item.wordsList[pIndex + 1].pinyin
  273. ) > -1
  274. ? 'noFont'
  275. : '',
  276. item.wordsList[pIndex + 1].config.underLine
  277. ? 'NNPE-pinyin-underline'
  278. : ''
  279. ]"
  280. style="text-align: left"
  281. >{{
  282. item.wordsList[pIndex + 1].pinyin | handlePY
  283. }}</span
  284. >
  285. </span>
  286. <span
  287. class="NNPE-words-box"
  288. v-if="
  289. item.wordsList[pIndex + 2] &&
  290. item.wordsList[pIndex + 2].chs &&
  291. chsFhList.indexOf(
  292. item.wordsList[pIndex + 2].chs
  293. ) > -1
  294. "
  295. :style="
  296. boxStyle(
  297. item.wordsList[pIndex + 2].config,
  298. item.isHasPY
  299. )
  300. "
  301. >
  302. <span
  303. v-if="
  304. item.isHasPY > 0 &&
  305. curQue.pyPosition == 'top' &&
  306. config.isShowPY
  307. "
  308. :class="[
  309. 'NNPE-pinyin',
  310. noFont.indexOf(
  311. item.wordsList[pIndex + 2].pinyin
  312. ) > -1
  313. ? 'noFont'
  314. : '',
  315. item.wordsList[pIndex + 2].config.underLine
  316. ? 'NNPE-pinyin-underline'
  317. : ''
  318. ]"
  319. style="text-align: left"
  320. >{{ item.wordsList[pIndex + 2].pinyin }}</span
  321. >
  322. <span
  323. class="NNPE-chs"
  324. style="text-align: left"
  325. :class="[
  326. item.timeList &&
  327. item.timeList[pItem.sentIndex] &&
  328. curTime >= item.timeList[pItem.sentIndex].bg &&
  329. curTime <= item.timeList[pItem.sentIndex].ed
  330. ? 'active'
  331. : '',
  332. pItem.chstimeList &&
  333. pItem.chstimeList[pItem.leg - 1] &&
  334. curTime >=
  335. pItem.chstimeList[pItem.leg - 1].wordBg &&
  336. curQue.wordTime &&
  337. curTime <= item.timeList[pItem.sentIndex].ed
  338. ? 'wordActive'
  339. : ''
  340. ]"
  341. :style="
  342. hengStyle(item.wordsList[pIndex + 2].config)
  343. "
  344. >{{ item.wordsList[pIndex + 2].chs }}</span
  345. >
  346. <span
  347. v-if="
  348. item.isHasPY > 0 &&
  349. curQue.pyPosition == 'bottom' &&
  350. config.isShowPY
  351. "
  352. :class="[
  353. 'NNPE-pinyin',
  354. noFont.indexOf(
  355. item.wordsList[pIndex + 2].pinyin
  356. ) > -1
  357. ? 'noFont'
  358. : '',
  359. item.wordsList[pIndex + 2].config.underLine
  360. ? 'NNPE-pinyin-underline'
  361. : ''
  362. ]"
  363. style="text-align: left"
  364. >{{ item.wordsList[pIndex + 2].pinyin }}</span
  365. >
  366. </span>
  367. </template>
  368. <!--下一个元素不是标点-->
  369. <template v-else>
  370. <span
  371. v-if="item.isHasPY > 0 && pyPosition == 'top'"
  372. class="NNPE-pinyin"
  373. :class="[
  374. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  375. pItem.className ? pItem.className : '',
  376. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  377. pItem.config.underLine
  378. ? 'NNPE-pinyin-underline'
  379. : ''
  380. ]"
  381. >{{ pItem.pinyin | handlePY }}</span
  382. >
  383. <template v-if="!pItem.isHeng">
  384. <span
  385. v-if="pItem.chs != '#'"
  386. class="NNPE-chs"
  387. :class="[
  388. pItem.chs != '“' && pItem.padding && item.isHasPY
  389. ? 'padding'
  390. : ''
  391. ]"
  392. >
  393. <template>
  394. <span
  395. v-for="(wItem, wIndex) in pItem.leg"
  396. :key="'ci' + wIndex + pIndex + index"
  397. :class="[
  398. pItem.chstimeList &&
  399. pItem.chstimeList[wIndex] &&
  400. curTime >= pItem.chstimeList[wIndex].wordBg &&
  401. curTime <= item.timeList[pItem.sentIndex].ed
  402. ? 'wordActive'
  403. : '',
  404. 'NNPE-chs',
  405. pItem.config.underLine
  406. ? 'NNPE-chs-underline'
  407. : ''
  408. ]"
  409. :style="hengStyle(pItem.config)"
  410. >{{ pItem.chs[wIndex] }}</span
  411. >
  412. </template>
  413. </span>
  414. <!-- <span
  415. v-if="pItem.chs != '#'"
  416. class="NNPE-chs"
  417. :class="[
  418. pItem.chstimeList &&
  419. pItem.chstimeList[wIndex] &&
  420. curTime >= pItem.chstimeList[wIndex].wordBg &&
  421. curTime <= item.timeList[pItem.sentIndex].ed
  422. ? 'wordActive'
  423. : '',
  424. pItem.chs != '“' && pItem.padding && item.isHasPY
  425. ? 'padding'
  426. : '',
  427. pItem.config.underLine
  428. ? 'NNPE-chs-underline'
  429. : '',
  430. ]"
  431. :style="hengStyle(pItem.config)"
  432. >{{ pItem.chs }}</span
  433. > -->
  434. </template>
  435. <template v-else>
  436. <template v-if="judgeAnswer == 'standardAnswer'">
  437. <EditDiv
  438. :id="
  439. 'dialogue_' +
  440. Math.random()
  441. .toString(36)
  442. .substr(2) +
  443. '_' +
  444. pItem.hengIndex
  445. "
  446. class="answer-input userRight"
  447. v-model="curQue.answerArr[pItem.hengIndex - 1]"
  448. :canEdit="false"
  449. :style="hengStyle(pItem.config)"
  450. :textAlign="pItem.config.DiaTextAlign"
  451. />
  452. </template>
  453. <template v-else>
  454. <EditDiv
  455. :id="
  456. 'dialogue_' +
  457. Math.random()
  458. .toString(36)
  459. .substr(2) +
  460. '_' +
  461. pItem.hengIndex
  462. "
  463. class="answer-input"
  464. :class="[
  465. curQue.answerArr &&
  466. curQue.answerArr[pItem.hengIndex - 1] &&
  467. curQue.answerArr[pItem.hengIndex - 1] ==
  468. Bookanswer.input[pItem.hengIndex - 1].value
  469. ? 'userRight'
  470. : curQue.answerArr &&
  471. curQue.answerArr[pItem.hengIndex - 1] &&
  472. curQue.answerArr[pItem.hengIndex - 1] !=
  473. Bookanswer.input[pItem.hengIndex - 1]
  474. .value
  475. ? 'userError'
  476. : ''
  477. ]"
  478. v-model="
  479. Bookanswer.input[pItem.hengIndex - 1].value
  480. "
  481. :canEdit="
  482. TaskModel == 'ANSWER' || judgeAnswer
  483. ? false
  484. : true
  485. "
  486. :hengIndex="pItem.hengIndex - 1"
  487. @saveBlankTF="saveBlankTF"
  488. :style="hengStyle(pItem.config)"
  489. :textAlign="pItem.config.DiaTextAlign"
  490. />
  491. </template>
  492. </template>
  493. <span
  494. v-if="item.isHasPY > 0 && pyPosition == 'bottom'"
  495. class="NNPE-pinyin"
  496. :class="[
  497. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  498. pItem.className ? pItem.className : '',
  499. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  500. pItem.config.underLine
  501. ? 'NNPE-pinyin-underline'
  502. : ''
  503. ]"
  504. >{{ pItem.pinyin | handlePY }}</span
  505. >
  506. </template>
  507. </template>
  508. </template>
  509. <template v-else>
  510. <span
  511. :style="{
  512. height: pItem.height + 'px',
  513. width: pItem.width + 'px'
  514. }"
  515. ></span>
  516. </template>
  517. </div>
  518. <div class="clearFix"></div>
  519. <div
  520. v-if="
  521. item.enwords &&
  522. (!enPosition || (enPosition && enPosition == 'bottom'))
  523. "
  524. class="enwords"
  525. >
  526. {{ item.enwords }}
  527. </div>
  528. </div>
  529. <div class="clearFix"></div>
  530. <div class="answer-box">
  531. <div class="input-record" v-if="item.isRecord">
  532. <Soundrecord
  533. type="normal"
  534. class="normal-box"
  535. :TaskModel="TaskModel"
  536. :answerRecordList="
  537. judgeAnswer != 'standardAnswer'
  538. ? Bookanswer.recordList[index]
  539. : []
  540. "
  541. :tmIndex="index"
  542. @handleWav="handleWav"
  543. />
  544. </div>
  545. <template
  546. class="input-record"
  547. v-if="
  548. curQue.checkList && curQue.checkList.indexOf('judge') > -1
  549. "
  550. >
  551. <div class="judge-box" v-if="curQue.judge[index].isJudge">
  552. <a
  553. :class="[
  554. 'right-btn',
  555. TaskModel != 'ANSWER' ? 'right-btn-hover' : '',
  556. judgeAnswerClass('right', index)
  557. ]"
  558. @click="handleSelectJudge('right', index)"
  559. >
  560. </a>
  561. <a
  562. :class="[
  563. 'error-btn',
  564. TaskModel != 'ANSWER' ? 'error-btn-hover' : '',
  565. judgeAnswerClass('error', index)
  566. ]"
  567. @click="handleSelectJudge('error', index)"
  568. >
  569. </a>
  570. </div>
  571. </template>
  572. </div>
  573. </div>
  574. </div>
  575. <div
  576. class="remarkBox remark-top"
  577. v-if="
  578. item.remarkDetail &&
  579. (item.remarkDetail.chs ||
  580. item.remarkDetail.en ||
  581. (item.remarkDetail.img_list &&
  582. item.remarkDetail.img_list.length > 0))
  583. "
  584. >
  585. <RemarkChs :remarkDetail="item.remarkDetail" />
  586. </div>
  587. </div>
  588. <!-- <div class="dia-article-record">
  589. <Soundrecord @handleWav="handleWav" type="promax" class="luyin-box" />
  590. </div> -->
  591. </div>
  592. </template>
  593. <template v-if="paraArr.length > 0">
  594. <div class="NPC-sentences-list">
  595. <p class="notice" v-if="curQue.notice">{{ curQue.notice }}</p>
  596. <div
  597. :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
  598. v-for="(item, index) in paraArr"
  599. :key="'detail' + index"
  600. >
  601. <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
  602. <RoleChs :curRole="item.roleDetail" :type="1" />
  603. <div class="wordsList-box">
  604. <div
  605. class="roleDetail"
  606. v-if="item.roleDetail.detail.wordsList.length > 0"
  607. >
  608. <span class="pinyin">{{
  609. item.roleDetail.detail.wordsList | handlePinyin
  610. }}</span>
  611. <span class="chs">{{
  612. item.roleDetail.detail.wordsList | handleChs
  613. }}</span>
  614. </div>
  615. <div
  616. class="para-con"
  617. :style="{ background: item.roleDetail.color.bg }"
  618. >
  619. <div
  620. v-if="item.enwords && enPosition && enPosition == 'top'"
  621. class="enwords"
  622. >
  623. {{ item.enwords }}
  624. </div>
  625. <div class="clearFix"></div>
  626. <div
  627. class="NNPE-words"
  628. v-for="(pItem, pIndex) in item.wordsList"
  629. :key="'wordsList' + pIndex"
  630. >
  631. <template v-if="!pItem.isHeng">
  632. <span class="NNPE-para-pinyin padding">{{
  633. pItem.con
  634. }}</span>
  635. </template>
  636. <template v-else>
  637. <template v-if="judgeAnswer == 'standardAnswer'">
  638. <EditDiv
  639. :id="
  640. 'dialogue_' +
  641. Math.random()
  642. .toString(36)
  643. .substr(2) +
  644. '_' +
  645. pItem.hengIndex
  646. "
  647. class="answer-input userRight"
  648. v-model="curQue.answerArr[pItem.hengIndex - 1]"
  649. :canEdit="false"
  650. :style="hengStyle(pItem.config)"
  651. :textAlign="pItem.config.DiaTextAlign"
  652. />
  653. </template>
  654. <template v-else>
  655. <EditDiv
  656. :id="
  657. 'dialogue_' +
  658. Math.random()
  659. .toString(36)
  660. .substr(2) +
  661. '_' +
  662. pItem.hengIndex
  663. "
  664. class="answer-input"
  665. :class="[
  666. curQue.answerArr &&
  667. curQue.answerArr[pItem.hengIndex - 1] &&
  668. curQue.answerArr[pItem.hengIndex - 1] ==
  669. Bookanswer.input[pItem.hengIndex - 1].value
  670. ? 'userRight'
  671. : curQue.answerArr &&
  672. curQue.answerArr[pItem.hengIndex - 1] &&
  673. curQue.answerArr[pItem.hengIndex - 1] !=
  674. Bookanswer.input[pItem.hengIndex - 1].value
  675. ? 'userError'
  676. : ''
  677. ]"
  678. v-model="Bookanswer.input[pItem.hengIndex - 1].value"
  679. :canEdit="
  680. TaskModel == 'ANSWER' || judgeAnswer ? false : true
  681. "
  682. :hengIndex="pItem.hengIndex - 1"
  683. @saveBlankTF="saveBlankTF"
  684. :style="hengStyle(pItem.config)"
  685. :textAlign="pItem.config.DiaTextAlign"
  686. />
  687. </template>
  688. </template>
  689. </div>
  690. <div class="clearFix"></div>
  691. <div
  692. v-if="
  693. item.enwords &&
  694. (!enPosition || (enPosition && enPosition == 'bottom'))
  695. "
  696. class="enwords"
  697. >
  698. {{ item.enwords }}
  699. </div>
  700. </div>
  701. <div class="clearFix"></div>
  702. <div class="answer-box">
  703. <div class="input-record" v-if="item.isRecord">
  704. <Soundrecord
  705. type="normal"
  706. class="normal-box"
  707. :TaskModel="TaskModel"
  708. :answerRecordList="
  709. judgeAnswer != 'standardAnswer'
  710. ? Bookanswer.recordList[index]
  711. : []
  712. "
  713. :tmIndex="index"
  714. @handleWav="handleWav"
  715. />
  716. </div>
  717. <template
  718. class="input-record"
  719. v-if="
  720. curQue.checkList && curQue.checkList.indexOf('judge') > -1
  721. "
  722. >
  723. <div class="judge-box" v-if="curQue.judge[index].isJudge">
  724. <a
  725. :class="[
  726. 'right-btn',
  727. TaskModel != 'ANSWER' ? 'right-btn-hover' : '',
  728. judgeAnswerClass('right', index)
  729. ]"
  730. @click="handleSelectJudge('right', index)"
  731. >
  732. </a>
  733. <a
  734. :class="[
  735. 'error-btn',
  736. TaskModel != 'ANSWER' ? 'error-btn-hover' : '',
  737. judgeAnswerClass('error', index)
  738. ]"
  739. @click="handleSelectJudge('error', index)"
  740. >
  741. </a>
  742. </div>
  743. </template>
  744. </div>
  745. </div>
  746. </div>
  747. <div
  748. class="remarkBox remark-top"
  749. v-if="
  750. item.remarkDetail &&
  751. (item.remarkDetail.chs ||
  752. item.remarkDetail.en ||
  753. (item.remarkDetail.img_list &&
  754. item.remarkDetail.img_list.length > 0))
  755. "
  756. >
  757. <RemarkChs :remarkDetail="item.remarkDetail" />
  758. </div>
  759. </div>
  760. <!-- <div class="dia-article-record">
  761. <Soundrecord @handleWav="handleWav" type="promax" class="luyin-box" />
  762. </div> -->
  763. </div>
  764. </template>
  765. </div>
  766. </template>
  767. <script>
  768. import { timeStrToSen } from "../../../../utils/index";
  769. import AudioLine from "../AudioLine.vue";
  770. import RoleChs from "./RoleChs.vue";
  771. import RemarkChs from "./RemarkChs.vue";
  772. import Soundrecord from "../Soundrecord.vue";
  773. import EditDiv from "../EditDiv.vue";
  774. export default {
  775. name: "DialogueNormalModelChs",
  776. props: [
  777. "curQue",
  778. "pyPosition",
  779. "colorBox",
  780. "listIndex",
  781. "Bookanswer",
  782. "TaskModel",
  783. "judgeAnswer",
  784. "audioWidth",
  785. "enPosition"
  786. ],
  787. components: {
  788. AudioLine,
  789. RoleChs,
  790. RemarkChs,
  791. Soundrecord,
  792. EditDiv
  793. },
  794. filters: {
  795. handlePinyin(wordsList) {
  796. let str = "";
  797. wordsList.forEach((item, index) => {
  798. if (index < wordsList.length - 1) {
  799. str += item.pinyin + " ";
  800. } else {
  801. str += item.pinyin;
  802. }
  803. });
  804. return str;
  805. },
  806. handleChs(wordsList) {
  807. let str = "";
  808. wordsList.forEach((item, index) => {
  809. if (index < wordsList.length - 1) {
  810. str += item.chs + " ";
  811. } else {
  812. str += item.chs;
  813. }
  814. });
  815. return str;
  816. },
  817. handlePY(pinyin) {
  818. let reg = /_{2,}/g;
  819. let py = "";
  820. if (!reg.test(pinyin)) {
  821. py = pinyin;
  822. }
  823. return py;
  824. }
  825. },
  826. data() {
  827. return {
  828. resArr: [],
  829. curTime: 0, //单位s
  830. chsFhList: [",", "。", "”", ":", "》", "?", "!", ";", "、"],
  831. enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
  832. newWords: ["鱼", "辩礼义"],
  833. noFont: ["~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "/", "_"],
  834. oldHz: "",
  835. hz: "",
  836. top: 0,
  837. left: 0,
  838. articleImg: {}, // 文章图片
  839. isHasRemark: false,
  840. paraArr: [],
  841. answer: [],
  842. hengIndex: 0
  843. };
  844. },
  845. computed: {
  846. judgeAnswerClass() {
  847. return function(type, index) {
  848. let _this = this;
  849. let classname = "";
  850. let answer = _this.Bookanswer.judge[index].value;
  851. let correct = _this.curQue.judge[index].judge;
  852. if (_this.judgeAnswer == "standardAnswer") {
  853. if (correct == type) {
  854. classname = "userRight_" + type;
  855. }
  856. } else if (
  857. _this.judgeAnswer == "studentAnswer" ||
  858. _this.judgeAnswer == "userAnswer"
  859. ) {
  860. if (answer == type) {
  861. if (correct) {
  862. if (answer == correct) {
  863. classname = "userRight_" + type;
  864. } else {
  865. classname = "userError_" + type;
  866. }
  867. } else {
  868. classname = "active";
  869. }
  870. }
  871. } else {
  872. if (answer == type) {
  873. classname = "active";
  874. }
  875. }
  876. return classname;
  877. };
  878. },
  879. hengStyle() {
  880. return function(config) {
  881. let sizeVal =
  882. config && config.fontSize ? config.fontSize.replace("px", "") : 20;
  883. return {
  884. minHeight: Number(sizeVal) + 13 + "px",
  885. lineHeight: Number(sizeVal) + 12 + "px",
  886. fontSize: config ? config.fontSize : "20px",
  887. fontFamily: config ? config.fontFamily : "FZJCGFKTK",
  888. textAlign:
  889. config && config.DiaTextAlign ? config.DiaTextAlign : "left",
  890. minWidth:
  891. config && config.DiaInputLength
  892. ? config.DiaInputLength * Number(sizeVal) + 28 + "px"
  893. : ""
  894. };
  895. };
  896. },
  897. boxStyle() {
  898. return function(config, isHasPY) {
  899. let sizeVal =
  900. config && config.fontSize ? config.fontSize.replace("px", "") : 20;
  901. return {
  902. minHeight: Number(sizeVal) + 13 + (isHasPY ? 18 : 0) + "px"
  903. };
  904. };
  905. }
  906. },
  907. watch: {},
  908. //方法集合
  909. methods: {
  910. // 判断题选择
  911. handleSelectJudge(obj, index) {
  912. let _this = this;
  913. if (_this.TaskModel != "ANSWER" || !_this.judgeAnswer) {
  914. _this.$set(_this.Bookanswer.judge[index], "value", obj);
  915. let correct = _this.curQue.judge[index].judge;
  916. if (correct) {
  917. if (correct == obj) {
  918. _this.$set(
  919. _this.Bookanswer.judge[index],
  920. "userAnswerJudge",
  921. "[JUDGE##T##JUDGE]"
  922. );
  923. } else {
  924. _this.$set(
  925. _this.Bookanswer.judge[index],
  926. "userAnswerJudge",
  927. "[JUDGE##F##JUDGE]"
  928. );
  929. }
  930. }
  931. }
  932. _this.$forceUpdate();
  933. },
  934. handleWav(list, tmIndex) {
  935. tmIndex = tmIndex ? tmIndex : 0;
  936. this.$set(this.Bookanswer.recordList, tmIndex, list);
  937. },
  938. saveBlankTF(value, hengIndex) {
  939. let _this = this;
  940. let answerArr = this.curQue.answerArr;
  941. if (answerArr.length > 0) {
  942. if (value.trim() == answerArr[hengIndex]) {
  943. _this.$set(
  944. _this.Bookanswer.input[hengIndex],
  945. "userAnswerJudge",
  946. "[JUDGE##T##JUDGE]"
  947. );
  948. } else {
  949. _this.$set(
  950. _this.Bookanswer.input[hengIndex],
  951. "userAnswerJudge",
  952. "[JUDGE##F##JUDGE]"
  953. );
  954. }
  955. }
  956. },
  957. getCurTime(curTime) {
  958. this.curTime = curTime * 1000;
  959. },
  960. handleData() {
  961. let resArr = [];
  962. let curQue = JSON.parse(JSON.stringify(this.curQue));
  963. let wordTimeList = curQue.wordTime;
  964. let reg = /_{2,}/g;
  965. let leg = this.curQue.detail.length;
  966. let asIndex = 0;
  967. this.curQue.answerArr = this.curQue.answer
  968. ? this.curQue.answer.split("\n")
  969. : [];
  970. let hengIndex = 0;
  971. curQue.detail.forEach((dItem, dIndex) => {
  972. let isHasPY = 0;
  973. let isRecord = 0;
  974. let roleDetail = this.getRole(dItem);
  975. let remarkDetail = dItem.remark;
  976. if (
  977. remarkDetail &&
  978. (remarkDetail.chs ||
  979. remarkDetail.en ||
  980. (remarkDetail.img_list && remarkDetail.img_list.length > 0))
  981. ) {
  982. this.isHasRemark = true;
  983. }
  984. let paraArr = [];
  985. if (dItem.wordsList && dItem.wordsList.length > 0) {
  986. dItem.wordsList.forEach((sItem, sIndex) => {
  987. let sentArr = [];
  988. sItem.forEach((wItem, wIndex) => {
  989. let startIndex =
  990. wIndex == 0
  991. ? 0
  992. : sentArr[wIndex - 1].startIndex +
  993. sentArr[wIndex - 1].chs.length;
  994. let endIndex =
  995. wIndex == 0
  996. ? wItem.chs.length
  997. : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  998. this.mergeWordSymbol(wItem);
  999. if (wItem.pinyin) {
  1000. isHasPY++;
  1001. }
  1002. let obj = {
  1003. paraIndex: dIndex, //段落索引
  1004. sentIndex: sIndex, //在段落中句子索引
  1005. wordIndex: wIndex, //单词的索引
  1006. pinyin: wItem.pinyin,
  1007. chs: wItem.chs,
  1008. isHeng: reg.test(wItem.chs),
  1009. padding: true, //wItem.padding,
  1010. className: wItem.className,
  1011. isShow: wItem.isShow,
  1012. isNewWord: this.newWords.indexOf(wItem.chs) > -1 ? true : false,
  1013. config: {
  1014. fontColor: wItem.fontColor,
  1015. fontFamily: wItem.fontFamily,
  1016. fontSize: wItem.fontSize,
  1017. underLine: wItem.underLine,
  1018. wordPadding: wItem.wordPadding,
  1019. DiaTextAlign: wItem.DiaTextAlign
  1020. ? wItem.DiaTextAlign
  1021. : "left",
  1022. DiaInputLength: wItem.DiaInputLength
  1023. ? wItem.DiaInputLength
  1024. : ""
  1025. },
  1026. leg: wItem.chs.length,
  1027. chstimeList: [],
  1028. startIndex: startIndex,
  1029. endIndex: endIndex
  1030. };
  1031. if (wordTimeList && wordTimeList.length > 0) {
  1032. obj.chstimeList = wordTimeList[asIndex].wordsResultList.slice(
  1033. startIndex,
  1034. endIndex
  1035. );
  1036. }
  1037. if (obj.isHeng) {
  1038. isRecord = isRecord + 1;
  1039. hengIndex = hengIndex + 1;
  1040. obj.hengIndex = hengIndex;
  1041. obj.answer = "";
  1042. }
  1043. sentArr.push(obj);
  1044. paraArr.push(obj);
  1045. if (wIndex == sItem.length - 1) {
  1046. asIndex++;
  1047. }
  1048. });
  1049. });
  1050. let curSentencesLeg = dItem.sentences.length;
  1051. let startLeg = dIndex == 0 ? 0 : curQue.detail[dIndex - 1].endLeg;
  1052. let endLeg = startLeg + curSentencesLeg;
  1053. dItem.endLeg = endLeg;
  1054. let timeList = [];
  1055. if (curQue.wordTime && curQue.wordTime.length > 0) {
  1056. timeList = curQue.wordTime.slice(startLeg, endLeg);
  1057. }
  1058. let enwords =
  1059. dItem.sentencesEn && dItem.sentencesEn.length > 0
  1060. ? dItem.sentencesEn.join(" ").replace(/\'/g, "’")
  1061. : "";
  1062. let paraObj = {
  1063. wordsList: paraArr,
  1064. enwords: enwords,
  1065. timeList: timeList,
  1066. roleDetail: roleDetail,
  1067. remarkDetail: remarkDetail,
  1068. isRecord:
  1069. isRecord > 0 ||
  1070. (curQue.checkList && curQue.checkList.indexOf("record") > -1)
  1071. ? true
  1072. : false,
  1073. isHasPY: isHasPY
  1074. };
  1075. resArr.push(paraObj);
  1076. }
  1077. });
  1078. this.resArr = resArr;
  1079. // 循环文章图片
  1080. if (curQue.img_list) {
  1081. curQue.img_list.forEach(item => {
  1082. this.articleImg[item.imgNumber] = item.id;
  1083. });
  1084. }
  1085. },
  1086. handlePYData() {
  1087. let pararArr = [];
  1088. let curQue = JSON.parse(JSON.stringify(this.curQue));
  1089. this.hengIndex = 0;
  1090. curQue.detail.forEach((dItem, dIndex) => {
  1091. let para = dItem.para;
  1092. let paraObj = this.handlePara(para);
  1093. let roleDetail = this.getRole(dItem);
  1094. let remarkDetail = dItem.remark;
  1095. if (
  1096. remarkDetail &&
  1097. (remarkDetail.chs ||
  1098. remarkDetail.en ||
  1099. (remarkDetail.img_list && remarkDetail.img_list.length > 0))
  1100. ) {
  1101. this.isHasRemark = true;
  1102. }
  1103. let obj = {
  1104. wordsList: paraObj.wordsList,
  1105. roleDetail: roleDetail,
  1106. remarkDetail: remarkDetail,
  1107. isRecord: paraObj.isRecord
  1108. };
  1109. pararArr.push(obj);
  1110. });
  1111. this.paraArr = pararArr;
  1112. },
  1113. //词和标点合一起
  1114. mergeWordSymbol(wItem) {
  1115. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  1116. wItem.isShow = false;
  1117. } else {
  1118. wItem.isShow = true;
  1119. }
  1120. },
  1121. //获取角色
  1122. getRole(dItem) {
  1123. let roleIndex = dItem.roleIndex;
  1124. let resObj = null;
  1125. let roleList = JSON.parse(JSON.stringify(this.curQue.roleList));
  1126. for (let i = 0; i < roleList.length; i++) {
  1127. let item = roleList[i];
  1128. if (item.id == roleIndex) {
  1129. resObj = item;
  1130. resObj.color = this.colorBox[i];
  1131. break;
  1132. }
  1133. }
  1134. return resObj;
  1135. },
  1136. //判断是否有padding
  1137. judgePad(sItem, wItem, curIndex) {
  1138. let leg = sItem.length;
  1139. if (curIndex < leg - 1) {
  1140. let nextIndex = curIndex + 1;
  1141. let chs = sItem[nextIndex].chs;
  1142. if (
  1143. this.chsFhList.indexOf(chs) > -1 ||
  1144. this.chsFhList.indexOf(wItem.chs) > -1
  1145. ) {
  1146. wItem.padding = false;
  1147. } else {
  1148. wItem.padding = true;
  1149. }
  1150. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  1151. wItem.className = "textLeft";
  1152. }
  1153. }
  1154. },
  1155. //转化时间
  1156. handleTimeList(list) {
  1157. let listRes = [];
  1158. list.forEach(item => {
  1159. let res = timeStrToSen(item);
  1160. listRes.push(res);
  1161. });
  1162. return listRes;
  1163. },
  1164. //点击播放某个句子
  1165. handleChangeTime(time, item, ed) {
  1166. if (item.timeList && item.timeList.length > 0) {
  1167. this.curTime = time;
  1168. this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
  1169. }
  1170. this.ed = ed;
  1171. },
  1172. //处理数组
  1173. handlePara(para) {
  1174. para = para.trim();
  1175. para = para.replace(/\s+/g, " ");
  1176. para = para.replace(/_{2,}/g, "^ ");
  1177. let paraArr = para.split(/\s/g);
  1178. let resArr = [];
  1179. paraArr.forEach((item, index) => {
  1180. let obj = {
  1181. isHeng: false,
  1182. con: item
  1183. };
  1184. if (item == "^") {
  1185. obj.isHeng = true;
  1186. obj.answer = "";
  1187. this.hengIndex++;
  1188. obj.hengIndex = this.hengIndex;
  1189. }
  1190. resArr.push(obj);
  1191. });
  1192. let isRecord = /^/g.test(para);
  1193. return { wordsList: resArr, isRecord: isRecord };
  1194. }
  1195. },
  1196. //生命周期 - 创建完成(可以访问当前this实例)
  1197. created() {},
  1198. //生命周期 - 挂载完成(可以访问DOM元素)
  1199. mounted() {
  1200. if (this.curQue) {
  1201. if (this.curQue.font == "cn" || !this.curQue.font) {
  1202. this.handleData();
  1203. } else {
  1204. this.handlePYData();
  1205. }
  1206. }
  1207. },
  1208. beforeCreate() {}, //生命周期 - 创建之前
  1209. beforeMount() {}, //生命周期 - 挂载之前
  1210. beforeUpdate() {}, //生命周期 - 更新之前
  1211. updated() {}, //生命周期 - 更新之后
  1212. beforeDestroy() {}, //生命周期 - 销毁之前
  1213. destroyed() {}, //生命周期 - 销毁完成
  1214. activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  1215. };
  1216. </script>
  1217. <style lang="scss" scoped>
  1218. //@import url(); 引入公共css类
  1219. .NNPE-ArticleView {
  1220. width: 100%;
  1221. .clearFix {
  1222. clear: both;
  1223. overflow: hidden;
  1224. }
  1225. .NPC-sentences-list {
  1226. .NPC-article-empty {
  1227. display: flex;
  1228. justify-content: flex-start;
  1229. align-items: flex-start;
  1230. > div {
  1231. height: 24px;
  1232. &.empty-left {
  1233. width: 100%;
  1234. box-sizing: border-box;
  1235. &.hasRemark {
  1236. width: 553px;
  1237. box-sizing: border-box;
  1238. border-right: 1px rgba(0, 0, 0, 0.1) solid;
  1239. }
  1240. }
  1241. &.empty-right {
  1242. flex: 1;
  1243. }
  1244. }
  1245. &-bottom {
  1246. > div {
  1247. height: 40px;
  1248. }
  1249. }
  1250. }
  1251. .dia-article-record {
  1252. width: 100%;
  1253. border-top: 1px solid rgba(0, 0, 0, 0.1);
  1254. .luyin-box {
  1255. justify-content: start;
  1256. padding: 8px 12px;
  1257. height: 40px;
  1258. width: 280px;
  1259. justify-content: flex-start;
  1260. }
  1261. }
  1262. }
  1263. .NNPE-detail {
  1264. clear: both;
  1265. overflow: hidden;
  1266. display: flex;
  1267. justify-content: flex-start;
  1268. align-items: flex-start;
  1269. &.active {
  1270. background: rgba(0, 0, 0, 0.06);
  1271. }
  1272. .article-content {
  1273. width: 100%;
  1274. box-sizing: border-box;
  1275. padding: 8px 24px 8px 24px;
  1276. display: flex;
  1277. justify-content: flex-start;
  1278. align-items: flex-start;
  1279. &.hasRemark {
  1280. width: 553px;
  1281. border-right: 1px rgba(0, 0, 0, 0.1) solid;
  1282. padding: 8px 0px 8px 23px;
  1283. }
  1284. &.paraLast {
  1285. padding-bottom: 24px;
  1286. }
  1287. }
  1288. .NNPE-words {
  1289. float: left;
  1290. &-box {
  1291. float: left;
  1292. > span {
  1293. // display: block;
  1294. &.NNPE-pinyin {
  1295. font-family: "GB-PINYINOK-B";
  1296. font-weight: normal;
  1297. font-size: 14px;
  1298. line-height: 18px;
  1299. color: #000000;
  1300. height: 18px;
  1301. display: block;
  1302. &.noFont {
  1303. font-family: initial;
  1304. }
  1305. &.textLeft {
  1306. text-align: left;
  1307. }
  1308. &.wordActive {
  1309. color: #de4444;
  1310. }
  1311. &.NNPE-pinyin-underline {
  1312. text-decoration: underline;
  1313. }
  1314. .NNPE-pinyin-underline {
  1315. text-decoration: underline;
  1316. }
  1317. }
  1318. &.NNPE-chs {
  1319. font-family: "FZJCGFKTK";
  1320. font-size: 20px;
  1321. line-height: 32px;
  1322. min-height: 33px;
  1323. color: #000000;
  1324. &.active {
  1325. background: rgba(60, 200, 99, 0.2);
  1326. }
  1327. &.wordActive {
  1328. color: #de4444;
  1329. }
  1330. &.NNPE-chs-underline {
  1331. text-decoration: underline;
  1332. }
  1333. .NNPE-chs-underline {
  1334. text-decoration: underline;
  1335. }
  1336. .wordActive {
  1337. color: #de4444;
  1338. }
  1339. }
  1340. &.padding {
  1341. padding: 0 3px;
  1342. }
  1343. }
  1344. }
  1345. &.textLeft {
  1346. text-align: left;
  1347. }
  1348. &.textCenter {
  1349. text-align: center;
  1350. }
  1351. &.textRight {
  1352. text-align: right;
  1353. }
  1354. > span {
  1355. display: block;
  1356. &.NNPE-pinyin {
  1357. font-family: "GB-PINYINOK-B";
  1358. font-weight: normal;
  1359. font-size: 14px;
  1360. line-height: 18px;
  1361. color: #000000;
  1362. height: 18px;
  1363. display: block;
  1364. &.noFont {
  1365. font-family: initial;
  1366. }
  1367. &.textLeft {
  1368. text-align: left;
  1369. }
  1370. &.wordActive {
  1371. color: #de4444;
  1372. }
  1373. &.NNPE-pinyin-underline {
  1374. text-decoration: underline;
  1375. }
  1376. .NNPE-pinyin-underline {
  1377. text-decoration: underline;
  1378. }
  1379. }
  1380. &.NNPE-chs {
  1381. font-family: "FZJCGFKTK";
  1382. font-size: 20px;
  1383. line-height: 32px;
  1384. min-height: 33px;
  1385. color: #000000;
  1386. &.active {
  1387. background: rgba(60, 200, 99, 0.2);
  1388. }
  1389. &.wordActive {
  1390. color: #de4444;
  1391. }
  1392. &.NNPE-chs-underline {
  1393. text-decoration: underline;
  1394. }
  1395. .NNPE-chs-underline {
  1396. text-decoration: underline;
  1397. }
  1398. .wordActive {
  1399. color: #de4444;
  1400. }
  1401. }
  1402. &.padding {
  1403. padding: 0 3px;
  1404. }
  1405. }
  1406. }
  1407. .enwords {
  1408. font-family: Helvetica;
  1409. font-weight: normal;
  1410. font-size: 14px;
  1411. line-height: 22px;
  1412. color: rgba(0, 0, 0, 0.85);
  1413. word-break: break-word;
  1414. }
  1415. &.NNPE-detail-title {
  1416. .wordsList-box {
  1417. > div {
  1418. display: flex;
  1419. justify-content: center;
  1420. flex-flow: wrap;
  1421. }
  1422. }
  1423. }
  1424. .index {
  1425. width: 48px;
  1426. box-sizing: border-box;
  1427. padding: 8px;
  1428. text-align: right;
  1429. border-right: 1px solid rgba(0, 0, 0, 0.1);
  1430. b {
  1431. font-weight: 400;
  1432. color: #000000;
  1433. line-height: 1.5;
  1434. }
  1435. }
  1436. .wordsList-box {
  1437. width: 100%;
  1438. padding: 0px 24px 0px 8px;
  1439. clear: both;
  1440. overflow: hidden;
  1441. .roleDetail {
  1442. height: 36px;
  1443. display: flex;
  1444. justify-content: flex-start;
  1445. align-items: center;
  1446. .pinyin {
  1447. font-family: "GB-PINYINOK-B";
  1448. font-size: 14px;
  1449. line-height: 18px;
  1450. color: rgba(0, 0, 0, 0.85);
  1451. margin-right: 4px;
  1452. }
  1453. .chs {
  1454. font-family: "FZJCGFKTK";
  1455. font-size: 20px;
  1456. line-height: 24px;
  1457. color: rgba(0, 0, 0, 0.85);
  1458. }
  1459. }
  1460. > .para-con {
  1461. float: left;
  1462. border: 1px solid rgba(0, 0, 0, 0.1);
  1463. box-sizing: border-box;
  1464. padding: 8px 12px 8px 12px;
  1465. border-radius: 8px;
  1466. }
  1467. > img {
  1468. width: 100%;
  1469. display: block;
  1470. }
  1471. .input-record {
  1472. margin-right: 8px;
  1473. .mini-box {
  1474. width: 64px;
  1475. border: 1px solid rgba(0, 0, 0, 0.1);
  1476. border-radius: 8px;
  1477. padding: 0 12px;
  1478. }
  1479. .normal-box {
  1480. width: 129px;
  1481. border: 1px solid rgba(0, 0, 0, 0.1);
  1482. border-radius: 8px;
  1483. padding: 0 12px;
  1484. }
  1485. }
  1486. }
  1487. }
  1488. .remarkBox {
  1489. flex: 1;
  1490. display: flex;
  1491. align-items: center;
  1492. justify-content: center;
  1493. position: relative;
  1494. &.remark72 {
  1495. padding-top: 72px;
  1496. }
  1497. &.remark-top {
  1498. padding-top: 44px;
  1499. }
  1500. }
  1501. .NNPE-para-pinyin {
  1502. font-weight: normal;
  1503. font-size: 20px;
  1504. line-height: 28px;
  1505. color: #000000;
  1506. height: 28px;
  1507. }
  1508. .answer-input {
  1509. min-height: 28px;
  1510. box-sizing: border-box;
  1511. border: 0;
  1512. border-bottom: 1px #000 solid;
  1513. background: 0 0;
  1514. min-width: 100px;
  1515. outline: 0;
  1516. text-align: left;
  1517. font-family: "FZJCGFKTK";
  1518. font-size: 20px;
  1519. padding: 0 10px;
  1520. box-sizing: border-box;
  1521. color: #000000;
  1522. line-height: 26px;
  1523. }
  1524. }
  1525. .NPC-ArticleAnswerView {
  1526. &-userAnswer,
  1527. &-standardAnswer,
  1528. &-studentAnswer {
  1529. .NNPE-detail {
  1530. .NNPE-words {
  1531. .answer-input {
  1532. &.userRight {
  1533. color: #2ca767;
  1534. }
  1535. &.userError {
  1536. color: #ed342d;
  1537. }
  1538. }
  1539. }
  1540. }
  1541. }
  1542. }
  1543. .judge-box {
  1544. display: flex;
  1545. justify-content: center;
  1546. a {
  1547. width: 32px;
  1548. height: 32px;
  1549. background: #fff url("../../../../assets/NPC/right-btn-gray.png") center
  1550. no-repeat;
  1551. background-size: 24px;
  1552. border-radius: 8px;
  1553. border: 1px solid rgba(0, 0, 0, 0.1);
  1554. display: flex;
  1555. justify-content: center;
  1556. align-items: center;
  1557. > img {
  1558. width: 24px;
  1559. height: 24px;
  1560. }
  1561. &.right-btn-hover:hover,
  1562. &.active {
  1563. background: #727272 url("../../../../assets/NPC/right-btn-white.png")
  1564. center no-repeat;
  1565. background-size: 24px;
  1566. border-color: #727272;
  1567. }
  1568. &.error-btn {
  1569. background: #fff url("../../../../assets/NPC/error-btn-gray.png") center
  1570. no-repeat;
  1571. background-size: 24px;
  1572. margin-left: 4px;
  1573. &.error-btn-hover:hover,
  1574. &.active {
  1575. background: #727272 url("../../../../assets/NPC/error-btn-white.png")
  1576. center no-repeat;
  1577. background-size: 24px;
  1578. border-color: #727272;
  1579. }
  1580. }
  1581. &.userRight_right {
  1582. background-color: rgba(44, 167, 103, 0.1);
  1583. border: 1px solid #2ca767;
  1584. }
  1585. &.userError_right {
  1586. border: 1px solid #ed342d;
  1587. background: rgba(237, 52, 45, 0.1)
  1588. url("../../../../assets/newImage/common/judge-dui.png") center no-repeat;
  1589. background-size: 24px;
  1590. }
  1591. &.userRight_error {
  1592. border: 1px solid #2ca767;
  1593. background: rgba(44, 167, 103, 0.1)
  1594. url("../../../../assets/newImage/common/judge-cuo.png") center no-repeat;
  1595. background-size: 24px;
  1596. }
  1597. &.userError_error {
  1598. background-color: rgba(237, 52, 45, 0.1);
  1599. border: 1px solid #ed342d;
  1600. }
  1601. }
  1602. }
  1603. .answer-box {
  1604. display: flex;
  1605. justify-content: flex-start;
  1606. align-items: center;
  1607. margin-top: 8px;
  1608. }
  1609. .NPC-sentences-list {
  1610. .notice {
  1611. word-break: break-word;
  1612. }
  1613. }
  1614. </style>