Voicefullscreen.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898
  1. <!-- -->
  2. <template>
  3. <div :class="['voicefull', bgIndex == 0 ? 'bg1' : 'bg2']" v-if="sentList">
  4. <div
  5. class="voicefull-top"
  6. @mouseover="setTopShow(true)"
  7. @mouseleave="setTopShow(false)"
  8. >
  9. <div :class="[isTopShow ? 'voicefull-top-show' : 'voicefull-top-hidden']">
  10. <div class="top-left">
  11. <div :class="['select-bg', bgIndex == 1 ? 'select-bg-blue' : '']">
  12. <div :class="['bg-green-box', bgIndex == 1 ? 'active' : '']">
  13. <span
  14. :class="['bg-green', bgIndex == 1 ? 'active' : '']"
  15. @click="changeBg(1)"
  16. ></span>
  17. </div>
  18. <div :class="['bg-white-box', bgIndex == 0 ? 'active' : '']">
  19. <span
  20. :class="['bg-white', bgIndex == 0 ? 'active' : '']"
  21. @click="changeBg(0)"
  22. ></span>
  23. </div>
  24. </div>
  25. <div
  26. :class="['set-fontSize', bgIndex == 1 ? 'set-fontSize-green' : '']"
  27. >
  28. <template v-if="hzSize >= 34">
  29. <span
  30. :class="[
  31. 'font-jian-black',
  32. bgIndex == 1 ? 'font-jian-yellow' : '',
  33. ]"
  34. @click="setFontSize('-')"
  35. ></span>
  36. </template>
  37. <template v-else>
  38. <span
  39. :class="[
  40. 'font-jian-black',
  41. bgIndex == 1
  42. ? 'font-jian-yellow-disabled'
  43. : 'font-jian-white-disabled',
  44. ]"
  45. ></span>
  46. </template>
  47. <span
  48. :class="['font-img-black', bgIndex == 1 ? 'font-img-yellow' : '']"
  49. ></span>
  50. <template v-if="hzSize <= 76">
  51. <span
  52. :class="[
  53. 'font-jia-black',
  54. bgIndex == 1 ? 'font-jia-yellow' : '',
  55. ]"
  56. @click="setFontSize('+')"
  57. ></span>
  58. </template>
  59. <template v-else>
  60. <span
  61. :class="[
  62. 'font-jia-black',
  63. bgIndex == 1
  64. ? 'font-jia-yellow-disabled'
  65. : 'font-jia-white-disabled',
  66. ]"
  67. ></span>
  68. </template>
  69. </div>
  70. <div
  71. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  72. @click="changeStatus('isKeyboard')"
  73. >
  74. <span
  75. :class="[
  76. 'keyboard-icon',
  77. !isKeyboard ? 'disabled' : '',
  78. isKeyboard && bgIndex == 1 ? 'keyboard-icon-yellow' : '',
  79. ]"
  80. ></span>
  81. </div>
  82. </div>
  83. <div class="top-middle">
  84. <template v-if="mp3">
  85. <AudioLineSentence
  86. :key="'sent' + curSentIndex"
  87. :mp3="mp3"
  88. :getCurTime="getCurTime"
  89. ref="audioLineSent"
  90. :audioId="'artPraAudioId' + curSentIndex"
  91. :stopAudio="stopAudio"
  92. :width="120"
  93. :hideSlider="true"
  94. :bg="bg"
  95. :ed="ed"
  96. :curTime="curTime"
  97. :maxTime="maxTime"
  98. :bgIndex="bgIndex"
  99. :isRepeat="isRepeat"
  100. :isAuto="isAuto"
  101. @playChange="playChange"
  102. @rollSentence="rollSentence"
  103. />
  104. </template>
  105. <div
  106. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  107. @click="setStatus"
  108. >
  109. <span
  110. :class="[
  111. 'repeat-icon',
  112. !isRepeat && !isAuto ? 'disabled' : '',
  113. !isRepeat && isAuto ? 'auto-icon' : '',
  114. isRepeat && bgIndex == 1 ? 'repeat-icon-yellow' : '',
  115. !isRepeat && isAuto && bgIndex == 1 ? 'auto-icon-yellow' : '',
  116. ]"
  117. ></span>
  118. </div>
  119. <div
  120. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  121. @click="changePinyin"
  122. >
  123. <span
  124. :class="[
  125. 'pinyin-icon',
  126. !config.isShowPY ? 'disabled' : '',
  127. config.isShowPY && bgIndex == 1 ? 'pinyin-icon-yellow' : '',
  128. ]"
  129. ></span>
  130. </div>
  131. <div
  132. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  133. @click="changeEN"
  134. >
  135. <span
  136. :class="[
  137. 'en-icon',
  138. !enwords ? 'disabled' : '',
  139. !config.isShowEN ? 'disabled' : '',
  140. config.isShowEN && bgIndex == 1 ? 'en-icon-yellow' : '',
  141. ]"
  142. ></span>
  143. </div>
  144. <div
  145. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  146. @click="handleColl"
  147. >
  148. <span
  149. :class="[
  150. 'coll-icon',
  151. !isCollArr[curSentIndex] ? 'disabled' : '',
  152. isCollArr[curSentIndex] && bgIndex == 1
  153. ? 'coll-icon-yellow'
  154. : '',
  155. ]"
  156. ></span>
  157. </div>
  158. </div>
  159. <div
  160. :class="['op-btn', bgIndex == 1 ? 'op-btn-green' : '']"
  161. @click="exitFullScreen"
  162. >
  163. <span
  164. :class="['close-icon', bgIndex == 1 ? 'close-icon-white' : '']"
  165. ></span>
  166. </div>
  167. </div>
  168. </div>
  169. <div class="voicefull-content" v-if="item">
  170. <div
  171. class="vc-box"
  172. @mousemove="showPrevNext(true, 'isShowLeft')"
  173. @mouseleave="showPrevNext(false, 'isShowLeft')"
  174. >
  175. <div
  176. :class="[
  177. 'vc-left vc-left-grey',
  178. isShowLeft && bgIndex == 0 ? 'vc-left-black' : '',
  179. isShowLeft && bgIndex == 1 ? 'vc-left-white' : '',
  180. curSentIndex == 0 ? 'hidden' : '',
  181. ]"
  182. @click="prevSentence"
  183. ></div>
  184. </div>
  185. <div class="vc-main">
  186. <div class="NNPE-words-box">
  187. <div
  188. class="NNPE-words"
  189. v-for="(pItem, pIndex) in item"
  190. :key="'wordsList' + pIndex"
  191. :class="[
  192. pItem.chs != '“' && pItem.wordIndex == 0
  193. ? 'textLeft'
  194. : 'textCenter',
  195. pItem.chs == '“' ? 'textRight' : '',
  196. ]"
  197. @dblclick="showWordDetail($event, pItem)"
  198. @click="playWord(pItem)"
  199. >
  200. <template v-if="!pItem.width">
  201. <template v-if="pItem.isShow">
  202. <template
  203. v-if="
  204. item[pIndex + 1] &&
  205. item[pIndex + 1].chs &&
  206. chsFhList.indexOf(item[pIndex + 1].chs) > -1
  207. "
  208. >
  209. <span class="NNPE-words-box">
  210. <template v-if="curQue.pyPosition == 'top'">
  211. <span
  212. v-if="config.isShowPY"
  213. class="NNPE-pinyin"
  214. :class="[
  215. pItem.className ? pItem.className : '',
  216. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  217. bgIndex == 1 ? 'font-white' : '',
  218. ]"
  219. :style="'font-size:' + pySize + 'px'"
  220. >{{ pItem.pinyin }}</span
  221. >
  222. </template>
  223. <span
  224. class="NNPE-chs"
  225. :class="[
  226. pItem.padding && config.isShowPY ? 'padding' : '',
  227. curQue.pyPosition == 'top' ? 'bottom' : '',
  228. ]"
  229. >
  230. <template>
  231. <span
  232. v-for="(wItem, wIndex) in pItem.leg"
  233. :key="'ci' + wIndex + pIndex"
  234. :class="[
  235. isPlaying &&
  236. pItem.timeList &&
  237. pItem.timeList[wIndex] &&
  238. curTime >= pItem.timeList[wIndex].wordBg &&
  239. curQue.wordTime &&
  240. curQue.wordTime[curSentIndex] &&
  241. curTime <= curQue.wordTime[curSentIndex].ed
  242. ? bgIndex == 0
  243. ? 'active'
  244. : 'active-yellow'
  245. : '',
  246. bgIndex == 1 ? 'font-white' : '',
  247. bgIndex == 0 && wordIndex == pItem.wordIndex
  248. ? 'wordActive'
  249. : '',
  250. bgIndex == 1 && wordIndex == pItem.wordIndex
  251. ? 'wordActive-blue'
  252. : '',
  253. ]"
  254. :style="'font-size:' + hzSize + 'px'"
  255. >{{ pItem.chs[wIndex] }}</span
  256. >
  257. </template>
  258. </span>
  259. <template v-if="curQue.pyPosition == 'bottom'">
  260. <span
  261. v-if="config.isShowPY"
  262. class="NNPE-pinyin bottom"
  263. :class="[
  264. pItem.className ? pItem.className : '',
  265. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  266. bgIndex == 1 ? 'font-white' : '',
  267. ]"
  268. :style="'font-size:' + pySize + 'px'"
  269. >{{ pItem.pinyin }}</span
  270. >
  271. </template>
  272. </span>
  273. <span class="NNPE-words-box">
  274. <template v-if="curQue.pyPosition == 'top'">
  275. <span
  276. v-if="config.isShowPY"
  277. :class="[
  278. 'NNPE-pinyin',
  279. noFont.indexOf(item[pIndex + 1].pinyin) > -1
  280. ? 'noFont'
  281. : '',
  282. bgIndex == 1 ? 'font-white' : '',
  283. ]"
  284. :style="{ fontSize: pySize + 'px', textAlign: left }"
  285. >{{ item[pIndex + 1].pinyin }}</span
  286. >
  287. </template>
  288. <span
  289. :class="[
  290. 'NNPE-chs',
  291. curQue.pyPosition == 'top' ? 'bottom' : '',
  292. ]"
  293. :style="{ fontSize: hzSize + 'px', textAlign: left }"
  294. >
  295. <span
  296. :class="[
  297. isPlaying &&
  298. pItem.timeList[pItem.leg - 1] &&
  299. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  300. curQue.wordTime &&
  301. curQue.wordTime[curSentIndex] &&
  302. curTime <= curQue.wordTime[curSentIndex].ed
  303. ? bgIndex == 0
  304. ? 'active'
  305. : 'active-yellow'
  306. : '',
  307. bgIndex == 1 ? 'font-white' : '',
  308. ]"
  309. :style="{ fontSize: pySize + 'px' }"
  310. >{{ item[pIndex + 1].chs }}</span
  311. >
  312. </span>
  313. <template v-if="curQue.pyPosition == 'bottom'">
  314. <span
  315. v-if="config.isShowPY"
  316. :class="[
  317. 'NNPE-pinyin',
  318. noFont.indexOf(item[pIndex + 1].pinyin) > -1
  319. ? 'noFont'
  320. : '',
  321. bgIndex == 1 ? 'font-white' : '',
  322. 'bottom',
  323. ]"
  324. :style="{ fontSize: pySize + 'px', textAlign: left }"
  325. >{{ item[pIndex + 1].pinyin }}</span
  326. >
  327. </template>
  328. </span>
  329. <span
  330. class="NNPE-words-box"
  331. v-if="
  332. item[pIndex + 2] &&
  333. item[pIndex + 2].chs &&
  334. chsFhList.indexOf(item[pIndex + 2].chs) > -1
  335. "
  336. >
  337. <template v-if="curQue.pyPosition == 'top'">
  338. <span
  339. v-if="config.isShowPY"
  340. :class="[
  341. 'NNPE-pinyin',
  342. noFont.indexOf(item[pIndex + 2].pinyin) > -1
  343. ? 'noFont'
  344. : '',
  345. bgIndex == 1 ? 'font-white' : '',
  346. ]"
  347. :style="{ fontSize: pySize + 'px', textAlign: left }"
  348. >{{ item[pIndex + 2].pinyin }}</span
  349. >
  350. </template>
  351. <span
  352. :class="[
  353. 'NNPE-chs',
  354. curQue.pyPosition == 'top' ? 'bottom' : '',
  355. ]"
  356. :style="{ fontSize: hzSize + 'px', textAlign: left }"
  357. >
  358. <span
  359. :class="[
  360. isPlaying &&
  361. pItem.timeList[pItem.leg - 1] &&
  362. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  363. curQue.wordTime &&
  364. curQue.wordTime[curSentIndex] &&
  365. curTime <= curQue.wordTime[curSentIndex].ed
  366. ? bgIndex == 0
  367. ? 'active'
  368. : 'active-yellow'
  369. : '',
  370. bgIndex == 1 ? 'font-white' : '',
  371. ]"
  372. :style="{ fontSize: pySize + 'px' }"
  373. >{{ item[pIndex + 2].chs }}</span
  374. >
  375. </span>
  376. <template v-if="curQue.pyPosition == 'bottom'">
  377. <span
  378. v-if="config.isShowPY"
  379. :class="[
  380. 'NNPE-pinyin',
  381. noFont.indexOf(item[pIndex + 2].pinyin) > -1
  382. ? 'noFont'
  383. : '',
  384. bgIndex == 1 ? 'font-white' : '',
  385. 'bottom',
  386. ]"
  387. :style="{ fontSize: pySize + 'px', textAlign: left }"
  388. >{{ item[pIndex + 2].pinyin }}</span
  389. >
  390. </template>
  391. </span>
  392. </template>
  393. <template v-else>
  394. <template v-if="curQue.pyPosition == 'top'">
  395. <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
  396. <span
  397. v-if="config.isShowPY"
  398. class="NNPE-pinyin"
  399. :class="[
  400. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  401. pItem.className ? pItem.className : '',
  402. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  403. bgIndex == 1 ? 'font-white' : '',
  404. ]"
  405. :style="{ fontSize: pySize + 'px' }"
  406. >{{ pItem.pinyin }}</span
  407. >
  408. </template>
  409. </template>
  410. <span
  411. v-if="pItem.chs != '#'"
  412. class="NNPE-chs"
  413. :class="[
  414. pItem.chs != '“' && pItem.padding && config.isShowPY
  415. ? 'padding'
  416. : '',
  417. curQue.pyPosition == 'top' ? 'bottom' : '',
  418. ]"
  419. >
  420. <template>
  421. <span
  422. v-for="(wItem, wIndex) in pItem.leg"
  423. :key="'ci' + wIndex + pIndex + curSentIndex"
  424. :class="[
  425. isPlaying &&
  426. pItem.timeList &&
  427. pItem.timeList[wIndex] &&
  428. curTime >= pItem.timeList[wIndex].wordBg &&
  429. curQue.wordTime &&
  430. curQue.wordTime[curSentIndex] &&
  431. curTime <= curQue.wordTime[curSentIndex].ed
  432. ? bgIndex == 0
  433. ? 'active'
  434. : 'active-yellow'
  435. : '',
  436. bgIndex == 1 ? 'font-white' : '',
  437. bgIndex == 0 && wordIndex == pItem.wordIndex
  438. ? 'wordActive'
  439. : '',
  440. bgIndex == 1 && wordIndex == pItem.wordIndex
  441. ? 'wordActive-blue'
  442. : '',
  443. ]"
  444. :style="{ fontSize: hzSize + 'px' }"
  445. >{{ pItem.chs[wIndex] }}</span
  446. >
  447. </template>
  448. </span>
  449. <template v-if="curQue.pyPosition == 'bottom'">
  450. <template v-if="NumberList.indexOf(pItem.pinyin) < 0">
  451. <span
  452. v-if="config.isShowPY"
  453. class="NNPE-pinyin bottom"
  454. :class="[
  455. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  456. pItem.className ? pItem.className : '',
  457. bgIndex == 1 ? 'font-white' : '',
  458. ]"
  459. :style="{ fontSize: pySize + 'px' }"
  460. >{{ pItem.pinyin }}</span
  461. >
  462. </template>
  463. </template>
  464. </template>
  465. </template>
  466. </template>
  467. <template v-else>
  468. <span
  469. :style="{
  470. height: pItem.height + 'px',
  471. width: pItem.width + 'px',
  472. }"
  473. ></span>
  474. </template>
  475. </div>
  476. </div>
  477. <div style="clear: both; overflow: hidden"></div>
  478. <div
  479. v-if="enwords && config.isShowEN"
  480. :class="['enwords', bgIndex == 1 ? 'enwords-green' : '']"
  481. :style="{ fontSize: enSize + 'px' }"
  482. >
  483. {{ enwords }}
  484. </div>
  485. </div>
  486. <div
  487. class="vc-box-right"
  488. @mousemove="showPrevNext(true, 'isShowRight')"
  489. @mouseleave="showPrevNext(false, 'isShowRight')"
  490. >
  491. <div
  492. :class="[
  493. 'vc-left vc-right-grey',
  494. isShowRight && bgIndex == 0 ? 'vc-right-black' : '',
  495. isShowRight && bgIndex == 1 ? 'vc-right-white' : '',
  496. curSentIndex == sentList.length - 1 ? 'hidden' : '',
  497. ]"
  498. @click="nextSentence"
  499. ></div>
  500. </div>
  501. </div>
  502. <div
  503. class="voicefull-bottom"
  504. @mouseover="setBottomShow(true)"
  505. @mouseleave="setBottomShow(false)"
  506. >
  507. <div
  508. :class="[
  509. isBottomShow ? 'voicefull-bottom-show' : 'voicefull-bottom-hidden',
  510. ]"
  511. >
  512. <div
  513. :class="[
  514. 'bottom-left',
  515. TaskModel == 'ANSWER' ? 'bottom-left-margin' : '',
  516. ]"
  517. >
  518. <Soundrecorddiff
  519. ref="Soundrecorddiff"
  520. @handleWav="handleWav"
  521. @getWavblob="getWavblob"
  522. @handleParentPlay="handleParentPlay"
  523. @sentPause="sentPause"
  524. @getRerordStatus="getRerordStatus"
  525. @getMicrophoneStatus="getMicrophoneStatus"
  526. @getPlayStatus="getPlayStatus"
  527. :bgIndex="bgIndex"
  528. :TaskModel="TaskModel"
  529. :answerRecordList="
  530. curQue.Bookanswer.practiceModel[curSentIndex] &&
  531. curQue.Bookanswer.practiceModel[curSentIndex].recordList
  532. "
  533. :tmIndex="curSentIndex"
  534. :key="'Soundrecorddiff' + curSentIndex"
  535. />
  536. <div
  537. :class="['compare-box', bgIndex == 1 ? 'compare-box-white' : '']"
  538. v-if="isShowCompare"
  539. >
  540. <Audio-compare
  541. :bgIndex="bgIndex"
  542. type="full"
  543. :themeColor="themeColor"
  544. :index="curSentIndex"
  545. :sentIndex="curSentIndex"
  546. :url="curQue.mp3_list[0].id"
  547. :bg="bg"
  548. :ed="ed"
  549. :wavblob="wavblob"
  550. :getCurTime="getCurCompareTime"
  551. :sentPause="sentPause"
  552. :isRecord="isRecord"
  553. :handleChangeStopAudio="handleChangeStopAudio"
  554. :getPlayStatus="getPlayStatus"
  555. :key="'mp3Compare' + curSentIndex"
  556. />
  557. </div>
  558. </div>
  559. <div
  560. :class="[
  561. 'page-count',
  562. bgIndex == 0 ? 'page-count-white' : 'page-count-green',
  563. ]"
  564. >
  565. {{ curSentIndex + 1 }}/{{ sentList.length }}
  566. </div>
  567. </div>
  568. </div>
  569. <template v-if="isShow">
  570. <div
  571. ref="wordcard"
  572. class="NNPE-wordDetail"
  573. :style="{ top: top + 'px', left: left + 'px' }"
  574. >
  575. <Wordcard
  576. :word="word"
  577. :changeWordCard="changeWordCard"
  578. :themeColor="themeColor"
  579. :currentTreeID="currentTreeID"
  580. />
  581. </div>
  582. </template>
  583. <div class="word-play-audio" v-if="isWordPlay">
  584. <AudioLineSentence
  585. :mp3="mp3"
  586. :getCurTime="getCurWordTime"
  587. ref="audioLineWord"
  588. :audioId="'artPraAudioId' + curSentIndex + wordIndex"
  589. :stopAudio="stopAudio"
  590. :width="120"
  591. :hideSlider="false"
  592. :bg="wordbg"
  593. :ed="worded"
  594. :maxTime="wordMaxTime"
  595. :bgIndex="bgIndex"
  596. :isRepeat="isRepeat"
  597. :wordPlay="true"
  598. @changePlayStatus="changePlayStatus"
  599. />
  600. </div>
  601. </div>
  602. </template>
  603. <script>
  604. import AudioLineSentence from "./AudioLineSentence.vue";
  605. import Soundrecorddiff from "./Soundrecorddiff.vue";
  606. import AudioCompare from "./AudioCompare.vue";
  607. import Wordcard from "./components/Wordcard.vue";
  608. import { LearnWebSI } from "../../../api/ajax";
  609. export default {
  610. components: {
  611. AudioLineSentence,
  612. Soundrecorddiff,
  613. AudioCompare,
  614. Wordcard,
  615. },
  616. props: [
  617. "sentList",
  618. "sentIndex",
  619. "mp3",
  620. "wordTimeList",
  621. "curQue",
  622. "noFont",
  623. "themeColor",
  624. "NNPENewWordList",
  625. "currentTreeID",
  626. "config",
  627. "TaskModel",
  628. ],
  629. data() {
  630. return {
  631. pySize: 32,
  632. hzSize: 48,
  633. enSize: 24,
  634. bgIndex: 1,
  635. maxTime: 0,
  636. item: null,
  637. bg: 0,
  638. ed: 0,
  639. isRepeat: false,
  640. NumberList: [
  641. "①",
  642. "②",
  643. "③",
  644. "④",
  645. "⑤",
  646. "⑥",
  647. "⑦",
  648. "⑧",
  649. "⑨",
  650. "⑩",
  651. "⑪",
  652. "⑫",
  653. "⑬",
  654. "⑭",
  655. "⑮",
  656. "⑯",
  657. "⑰",
  658. "⑱",
  659. "⑲",
  660. "⑳",
  661. ],
  662. chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";"],
  663. enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
  664. curTime: 0,
  665. wavblob: null,
  666. stopAudio: false,
  667. isRecord: false,
  668. isShowCompare: false,
  669. isShowRight: false,
  670. isShowLeft: false,
  671. curSentIndex: 0,
  672. oldHz: "",
  673. hz: "",
  674. clientY: 0,
  675. top: 0,
  676. left: 0,
  677. newWordList: [],
  678. pinyin: "",
  679. wordIndex: -1,
  680. isShow: false,
  681. wordbg: 0,
  682. worded: 0,
  683. wordMaxTime: 0,
  684. isWordPlay: false,
  685. curWordTime: 0,
  686. isPlaying: false,
  687. isAuto: false,
  688. key: "isRepeat",
  689. isKeyboard: true,
  690. isTopShow: false,
  691. isBottomShow: false,
  692. isRecording: false,
  693. recordPlaying: false,
  694. isCollArr: [],
  695. enwords: "",
  696. };
  697. },
  698. computed: {
  699. // isPlaying: function () {
  700. // let playing = false;
  701. // if (this.$refs.audioLineSent) {
  702. // playing = this.$refs.audioLineSent.audio.isPlaying;
  703. // }
  704. // console.log(playing);
  705. // return playing;
  706. // },
  707. },
  708. watch: {
  709. isRecording: {
  710. handler: function (newVal, oldVal) {
  711. if (newVal) {
  712. this.isBottomShow = newVal;
  713. }
  714. },
  715. deep: true,
  716. },
  717. recordPlaying: {
  718. handler: function (newVal, oldVal) {
  719. if (newVal) {
  720. this.isBottomShow = newVal;
  721. }
  722. },
  723. deep: true,
  724. },
  725. sentIndex: {
  726. handler: function (newVal, oldVal) {
  727. this.curSentIndex = newVal;
  728. this.getSentence();
  729. },
  730. deep: true,
  731. },
  732. hz: {
  733. handler: function (val, oldVal) {
  734. let _this = this;
  735. if (val) {
  736. _this.handleNewWords(val);
  737. }
  738. },
  739. // 深度观察监听
  740. deep: true,
  741. },
  742. isShow: {
  743. handler: function (val, oldVal) {
  744. let _this = this;
  745. if (val) {
  746. setTimeout(() => {
  747. _this.cardHeight = _this.$refs.wordcard.offsetHeight;
  748. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  749. _this.top = _this.clientY + 20;
  750. } else {
  751. _this.top = _this.clientY - _this.cardHeight - 30;
  752. }
  753. }, 50);
  754. }
  755. },
  756. // 深度观察监听
  757. deep: true,
  758. },
  759. },
  760. //方法集合
  761. methods: {
  762. setTopShow(bool) {
  763. this.isTopShow = bool;
  764. },
  765. setBottomShow(bool) {
  766. if (!this.recordPlaying && !this.isRecording) {
  767. this.isBottomShow = bool;
  768. }
  769. },
  770. getPlayStatus(bool) {
  771. this.recordPlaying = bool;
  772. },
  773. setFontSize(type) {
  774. let _this = this;
  775. if (type == "-") {
  776. if (_this.hzSize >= 34) {
  777. this.hzSize = this.hzSize - 4;
  778. }
  779. }
  780. if (type == "+") {
  781. if (_this.hzSize <= 76) {
  782. this.hzSize = this.hzSize + 4;
  783. }
  784. }
  785. _this.pySize = parseInt(_this.hzSize / 1.5);
  786. _this.enSize = parseInt(_this.hzSize / 2);
  787. },
  788. playChange(bool) {
  789. this.isPlaying = bool;
  790. },
  791. handleColl() {
  792. let _this = this;
  793. if (_this.isCollArr[_this.curSentIndex]) {
  794. _this.cancleColl();
  795. } else {
  796. _this.addColl();
  797. }
  798. },
  799. //添加收藏
  800. addColl() {
  801. let Bookdetail = sessionStorage.getItem("Bookdetail");
  802. if (Bookdetail) {
  803. Bookdetail = JSON.parse(Bookdetail);
  804. let MethodName = "order-collection_manager-AddMyCollection";
  805. let text = "";
  806. this.item.forEach((item) => {
  807. if (item.chs != "#") {
  808. text += item.chs;
  809. }
  810. });
  811. let sentence_json = {
  812. item: JSON.stringify(this.item),
  813. bg: this.bg,
  814. ed: this.ed,
  815. mp3: this.mp3,
  816. pyPosition: this.curQue.pyPosition,
  817. };
  818. let data = {
  819. goods_id: this.currentTreeID,
  820. goods_type: 502,
  821. goods_name: Bookdetail.name,
  822. goods_person_name_desc: Bookdetail.description
  823. ? Bookdetail.description
  824. : "",
  825. goods_picture_id: Bookdetail.picture_id ? Bookdetail.picture_id : "",
  826. goods_price: Bookdetail.price,
  827. sentence: {
  828. sentence_text: text,
  829. sentence_json: JSON.stringify(sentence_json),
  830. },
  831. };
  832. LearnWebSI(MethodName, data).then((res) => {
  833. this.$set(this.isCollArr, this.curSentIndex, true);
  834. this.$message.success("收藏成功!");
  835. });
  836. } else {
  837. this.$message.warning("权限不足!");
  838. }
  839. },
  840. //取消收藏
  841. cancleColl() {
  842. let text = "";
  843. this.item.forEach((item) => {
  844. if (item.chs != "#") {
  845. text += item.chs;
  846. }
  847. });
  848. let MethodName = "order-collection_manager-CancelMyGoodsCollection_WS";
  849. let data = {
  850. goods_type: 502,
  851. goods_list: [
  852. {
  853. goods_id: this.currentTreeID, //课件的id
  854. sentence_text: text,
  855. },
  856. ],
  857. };
  858. LearnWebSI(MethodName, data).then((res) => {
  859. this.$set(this.isCollArr, this.curSentIndex, false);
  860. this.$message.success("取消成功!");
  861. });
  862. },
  863. //检查收藏状态
  864. checkCollStatus() {
  865. let text = "";
  866. this.item.forEach((item) => {
  867. if (item.chs != "#") {
  868. text += item.chs;
  869. }
  870. });
  871. let MethodName = "order-collection_manager-CheckMyGoodsCollectionStatus";
  872. let data = {
  873. goods_type: 502,
  874. goods_id: this.currentTreeID, //课件的id
  875. sentence_text: text,
  876. };
  877. LearnWebSI(MethodName, data).then((res) => {
  878. let collFlag = res.is_collection == "true" ? true : false;
  879. this.$set(this.isCollArr, this.curSentIndex, collFlag);
  880. });
  881. },
  882. showPrevNext(bool, key) {
  883. this[key] = bool;
  884. },
  885. prevSentence() {
  886. let _this = this;
  887. if (_this.curSentIndex == 0) {
  888. _this.$message.warning("已经是第一个句子了");
  889. return;
  890. }
  891. _this.curSentIndex = _this.curSentIndex - 1;
  892. _this.getSentence();
  893. if (_this.isAuto) {
  894. _this.curTime = _this.bg;
  895. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  896. }
  897. },
  898. nextSentence() {
  899. if (this.curSentIndex == this.sentList.length - 1) {
  900. this.$message.warning("已经是最后一个句子了");
  901. return;
  902. }
  903. this.curSentIndex = this.curSentIndex + 1;
  904. this.getSentence();
  905. },
  906. rollSentence() {
  907. if (this.curSentIndex == this.sentList.length - 1) {
  908. this.curSentIndex = 0;
  909. } else {
  910. this.curSentIndex = this.curSentIndex + 1;
  911. }
  912. this.getSentence();
  913. },
  914. changeStatus(key) {
  915. if (key == "config.isShowEN") {
  916. if (this.enwords) {
  917. this[key] = !this[key];
  918. }
  919. } else {
  920. this[key] = !this[key];
  921. }
  922. },
  923. changePinyin() {
  924. this.$emit("changePinyin");
  925. },
  926. changeEN() {
  927. this.$emit("changeEN");
  928. },
  929. setStatus() {
  930. let _this = this;
  931. if (_this.key == "isRepeat") {
  932. if (_this.isRepeat) {
  933. _this.isRepeat = false;
  934. _this.isAuto = true;
  935. _this.key = "isAuto";
  936. } else {
  937. _this.isRepeat = true;
  938. _this.key = "isRepeat";
  939. }
  940. } else if (_this.key == "isAuto") {
  941. if (_this.isAuto) {
  942. _this.isRepeat = false;
  943. _this.isAuto = false;
  944. _this.key = "isRepeat";
  945. }
  946. }
  947. },
  948. getRerordStatus(bool) {
  949. this.isShowCompare = bool;
  950. },
  951. getMicrophoneStatus(bool) {
  952. this.isRecording = bool;
  953. },
  954. getWavblob(wavblob) {
  955. this.wavblob = wavblob;
  956. },
  957. sentPause(isRecord) {
  958. this.isRecord = isRecord;
  959. },
  960. getCurTime(curTime) {
  961. let _this = this;
  962. if (_this.isRepeat) {
  963. let time = curTime * 1000;
  964. if (time > _this.ed || time < _this.bg) {
  965. _this.curTime = _this.bg;
  966. this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  967. } else {
  968. _this.curTime = curTime * 1000;
  969. }
  970. } else if (_this.isAuto) {
  971. let time = curTime * 1000;
  972. if (time > _this.ed) {
  973. _this.rollSentence();
  974. _this.curTime = _this.bg;
  975. _this.$refs.audioLineSent.onTimeupdateTime(_this.bg / 1000);
  976. } else {
  977. _this.curTime = curTime * 1000;
  978. }
  979. } else {
  980. _this.curTime = curTime * 1000;
  981. }
  982. },
  983. getCurCompareTime(curTime) {
  984. let _this = this;
  985. _this.curTime = curTime * 1000;
  986. },
  987. getCurWordTime(curTime) {
  988. let _this = this;
  989. _this.curWordTime = curTime * 1000;
  990. },
  991. changeBg(bgIndex) {
  992. this.bgIndex = bgIndex;
  993. },
  994. getSentence() {
  995. let _this = this;
  996. _this.isShowCompare =
  997. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex] &&
  998. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex].recordList &&
  999. _this.curQue.Bookanswer.practiceModel[_this.curSentIndex].recordList
  1000. .length > 0;
  1001. _this.pauseAudio();
  1002. _this.isPlaying = false;
  1003. let item = JSON.parse(JSON.stringify(_this.sentList[_this.curSentIndex]));
  1004. if (item.sentArr) {
  1005. _this.item = item.sentArr;
  1006. _this.enwords = item.enwords;
  1007. } else {
  1008. _this.item = item;
  1009. }
  1010. _this.sentList.forEach((item) => {
  1011. this.isCollArr.push(false);
  1012. });
  1013. _this.bg = _this.curQue.wordTime[_this.curSentIndex].bg;
  1014. _this.ed = _this.curQue.wordTime[_this.curSentIndex].ed;
  1015. let maxTime = (_this.ed - _this.bg) / 1000;
  1016. if (maxTime < 1) {
  1017. _this.maxTime = 1;
  1018. } else {
  1019. _this.maxTime = maxTime;
  1020. }
  1021. _this.checkCollStatus();
  1022. },
  1023. pauseAudio() {
  1024. let audio = document.getElementsByTagName("audio");
  1025. audio.forEach((item) => {
  1026. item.pause();
  1027. });
  1028. },
  1029. exitFullScreen() {
  1030. this.pauseAudio();
  1031. this.$emit("exitFullscreen");
  1032. },
  1033. changeFullScreen() {
  1034. this.pauseAudio();
  1035. this.$emit("changeIsFull");
  1036. },
  1037. handleWav(list, tmIndex) {
  1038. tmIndex = tmIndex ? tmIndex : 0;
  1039. this.$emit("handleWav", list, tmIndex);
  1040. },
  1041. // 录音时暂停音频播放
  1042. handleParentPlay() {
  1043. this.stopAudio = true;
  1044. },
  1045. // 音频播放时改变布尔值
  1046. handleChangeStopAudio() {
  1047. this.stopAudio = false;
  1048. },
  1049. //播放音频
  1050. playWord(item) {
  1051. let _this = this;
  1052. _this.pauseAudio();
  1053. _this.isWordPlay = false;
  1054. _this.wordIndex = item.wordIndex;
  1055. setTimeout(() => {
  1056. let leg = item.timeList.length;
  1057. _this.wordbg = item.timeList[0].wordBg;
  1058. _this.worded = item.timeList[leg - 1].wordEd;
  1059. let wordMaxTime = (_this.worded - _this.wordbg) / 1000;
  1060. if (wordMaxTime < 1) {
  1061. _this.wordMaxTime = 1;
  1062. } else {
  1063. _this.wordMaxTime = wordMaxTime;
  1064. }
  1065. _this.isWordPlay = true;
  1066. }, 50);
  1067. },
  1068. changePlayStatus() {
  1069. this.isWordPlay = false;
  1070. this.wordIndex = -1;
  1071. },
  1072. showWordDetail(e, item) {
  1073. let _this = this;
  1074. if (_this.TaskModel == "ANSWER") {
  1075. return;
  1076. }
  1077. if (_this.chsFhList.indexOf(item.chs) > -1) {
  1078. return;
  1079. }
  1080. if (_this.oldHz != item.chs) {
  1081. this.isShow = false;
  1082. setTimeout(() => {
  1083. _this.hz = item.chs;
  1084. _this.pinyin = item.pinyin;
  1085. _this.wordIndex = item.wordIndex;
  1086. }, 50);
  1087. }
  1088. _this.clientY = e.clientY;
  1089. let left = e.clientX;
  1090. let width = 0;
  1091. if (item.chs.length == 1 || item.chs.length == 2) {
  1092. width = 304;
  1093. } else if (item.chs.length == 3 || item.chs.length == 4) {
  1094. width = 432;
  1095. } else if (item.chs.length > 3) {
  1096. width = 560;
  1097. }
  1098. // if (left - this.bodyLeft > this.contentWidth / 2) {
  1099. // _this.left = left - width + 10;
  1100. // } else {
  1101. _this.left = left - width / 2;
  1102. //}
  1103. },
  1104. changeWordCard(isShow) {
  1105. let _this = this;
  1106. _this.isShow = isShow;
  1107. _this.oldHz = "";
  1108. _this.hz = "";
  1109. _this.wordIndex = -1;
  1110. },
  1111. // 处理分词数据
  1112. handleNewWords(val) {
  1113. let _this = this;
  1114. _this.isShow = true;
  1115. _this.word = null;
  1116. if (_this.newWordList.indexOf(val) > -1) {
  1117. for (let i = 0; i < this.NNPENewWordList.length; i++) {
  1118. let pItem = this.NNPENewWordList[i];
  1119. for (let j = 0; j < pItem.length; j++) {
  1120. let item = pItem[j];
  1121. if (item.new_word.trim() == val.trim()) {
  1122. let wordlist = val.split("");
  1123. this.word = { list: wordlist, detail: item };
  1124. break;
  1125. }
  1126. }
  1127. }
  1128. } else {
  1129. let wordlist = val.split("");
  1130. let option = {
  1131. definition_list: [],
  1132. mp3_list: [],
  1133. new_word: val,
  1134. pinyin: _this.pinyin,
  1135. };
  1136. _this.word = { list: wordlist, detail: option };
  1137. }
  1138. _this.oldHz = val;
  1139. },
  1140. handleNewword() {
  1141. let NewWordList = [];
  1142. this.NNPENewWordList.forEach((item) => {
  1143. item.forEach((wItem) => {
  1144. NewWordList.push(wItem.new_word);
  1145. });
  1146. });
  1147. this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  1148. },
  1149. },
  1150. //生命周期 - 创建完成(可以访问当前this实例)
  1151. created() {
  1152. let _this = this;
  1153. },
  1154. //生命周期 - 挂载完成(可以访问DOM元素)
  1155. mounted() {
  1156. let _this = this;
  1157. document.addEventListener("keyup", function (e) {
  1158. if (_this.isKeyboard) {
  1159. if (e.keyCode == 32) {
  1160. //空格
  1161. _this.$nextTick(() => {
  1162. if (_this.$refs.audioLineSent) {
  1163. _this.$refs.audioLineSent.PlayAudio();
  1164. }
  1165. });
  1166. } else if (e.keyCode == 38) {
  1167. _this.prevSentence();
  1168. } else if (e.keyCode == 40) {
  1169. _this.nextSentence();
  1170. } else if (e.keyCode == 13) {
  1171. _this.$nextTick(() => {
  1172. _this.$refs.Soundrecorddiff.microphone();
  1173. });
  1174. }
  1175. }
  1176. });
  1177. if (_this.NNPENewWordList) {
  1178. _this.handleNewword();
  1179. }
  1180. _this.curSentIndex = _this.sentIndex;
  1181. _this.getSentence();
  1182. let isFullscreen =
  1183. document.fullscreenElement ||
  1184. document.mozFullScreenElement ||
  1185. document.webkitFullscreenElement ||
  1186. document.fullScreen ||
  1187. document.mozFullScreen ||
  1188. document.webkitIsFullScreen;
  1189. isFullscreen = !!isFullscreen;
  1190. document.addEventListener("fullscreenchange", () => {
  1191. let isFullscreen =
  1192. document.fullscreenElement ||
  1193. document.mozFullScreenElement ||
  1194. document.webkitFullscreenElement ||
  1195. document.fullScreen ||
  1196. document.mozFullScreen ||
  1197. document.webkitIsFullScreen;
  1198. if (!isFullscreen) {
  1199. _this.changeFullScreen();
  1200. }
  1201. });
  1202. document.addEventListener("mozfullscreenchange", () => {
  1203. let isFullscreen =
  1204. document.fullscreenElement ||
  1205. document.mozFullScreenElement ||
  1206. document.webkitFullscreenElement ||
  1207. document.fullScreen ||
  1208. document.mozFullScreen ||
  1209. document.webkitIsFullScreen;
  1210. if (!isFullscreen) {
  1211. _this.changeFullScreen();
  1212. }
  1213. });
  1214. document.addEventListener("webkitfullscreenchange", () => {
  1215. let isFullscreen =
  1216. document.fullscreenElement ||
  1217. document.mozFullScreenElement ||
  1218. document.webkitFullscreenElement ||
  1219. document.fullScreen ||
  1220. document.mozFullScreen ||
  1221. document.webkitIsFullScreen;
  1222. if (!isFullscreen) {
  1223. _this.changeFullScreen();
  1224. }
  1225. });
  1226. document.addEventListener("msfullscreenchange", () => {
  1227. let isFullscreen =
  1228. document.fullscreenElement ||
  1229. document.mozFullScreenElement ||
  1230. document.webkitFullscreenElement ||
  1231. document.fullScreen ||
  1232. document.mozFullScreen ||
  1233. document.webkitIsFullScreen;
  1234. if (!isFullscreen) {
  1235. _this.changeFullScreen();
  1236. }
  1237. });
  1238. },
  1239. beforeCreate() {}, //生命周期 - 创建之前
  1240. beforeMount() {}, //生命周期 - 挂载之前
  1241. beforeUpdate() {}, //生命周期 - 更新之前
  1242. updated() {}, //生命周期 - 更新之后
  1243. beforeDestroy() {}, //生命周期 - 销毁之前
  1244. destroyed() {}, //生命周期 - 销毁完成
  1245. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  1246. };
  1247. </script>
  1248. <style lang='scss' scoped>
  1249. //@import url(); 引入公共css类
  1250. .voicefull {
  1251. width: 100%;
  1252. height: 100vh;
  1253. overflow: hidden;
  1254. display: flex;
  1255. flex-direction: column;
  1256. .NNPE-wordDetail {
  1257. position: fixed;
  1258. z-index: 9999;
  1259. }
  1260. &.bg1 {
  1261. background: #fff;
  1262. }
  1263. &.bg2 {
  1264. background: linear-gradient(180deg, #274533 0%, #385f45 100%);
  1265. }
  1266. &-top {
  1267. height: 136px;
  1268. width: 100%;
  1269. box-sizing: border-box;
  1270. padding: 0 40px;
  1271. .voicefull-top-hidden {
  1272. width: 100%;
  1273. height: 136px;
  1274. visibility: hidden;
  1275. display: flex;
  1276. justify-content: space-between;
  1277. align-items: center;
  1278. }
  1279. .voicefull-top-show {
  1280. width: 100%;
  1281. height: 136px;
  1282. visibility: visible;
  1283. display: flex;
  1284. justify-content: space-between;
  1285. align-items: center;
  1286. }
  1287. .top-left {
  1288. display: flex;
  1289. justify-content: flex-start;
  1290. align-items: center;
  1291. }
  1292. .select-bg {
  1293. display: flex;
  1294. justify-content: space-between;
  1295. align-items: center;
  1296. width: 96px;
  1297. height: 56px;
  1298. border: 1px solid rgba(0, 0, 0, 0.1);
  1299. border-radius: 40px;
  1300. display: flex;
  1301. justify-content: center;
  1302. align-items: center;
  1303. box-sizing: border-box;
  1304. margin-right: 32px;
  1305. &.select-bg-blue {
  1306. background: rgba(255, 255, 255, 0.1);
  1307. border: 1px solid rgba(0, 0, 0, 0.1);
  1308. }
  1309. > div {
  1310. width: 36px;
  1311. height: 36px;
  1312. border-radius: 100%;
  1313. display: flex;
  1314. justify-content: center;
  1315. align-items: center;
  1316. &.bg-white-box {
  1317. background: 0 0;
  1318. margin-right: 4px;
  1319. &.active {
  1320. background: #de4444;
  1321. }
  1322. }
  1323. &.bg-green-box {
  1324. background: #fff;
  1325. &.active {
  1326. background: #ffc600;
  1327. }
  1328. }
  1329. > span {
  1330. width: 24px;
  1331. height: 24px;
  1332. border-radius: 100%;
  1333. box-sizing: border-box;
  1334. cursor: pointer;
  1335. &.bg-white {
  1336. background: #fff;
  1337. }
  1338. &.bg-green {
  1339. background: linear-gradient(180deg, #274533 0%, #385f45 100%);
  1340. }
  1341. }
  1342. }
  1343. }
  1344. .set-fontSize {
  1345. padding: 0 20px;
  1346. height: 56px;
  1347. background: #ffffff;
  1348. border: 1px solid rgba(0, 0, 0, 0.1);
  1349. border-radius: 40px;
  1350. display: flex;
  1351. justify-content: center;
  1352. align-items: center;
  1353. &-green {
  1354. background: rgba(255, 255, 255, 0.1);
  1355. border: 1px solid rgba(0, 0, 0, 0.1);
  1356. }
  1357. > span {
  1358. width: 24px;
  1359. height: 24px;
  1360. margin: 0 4px;
  1361. &.font-jian {
  1362. &-black {
  1363. background: url("../../../assets/NPC/jian-black.png") no-repeat left
  1364. top;
  1365. background-size: 100% 100%;
  1366. cursor: pointer;
  1367. }
  1368. &-yellow {
  1369. background: url("../../../assets/NPC/jian-white.png") no-repeat left
  1370. top;
  1371. background-size: 100% 100%;
  1372. cursor: pointer;
  1373. }
  1374. &-white-disabled {
  1375. background: url("../../../assets/NPC/jian-white-disabled.png")
  1376. no-repeat left top;
  1377. background-size: 100% 100%;
  1378. cursor: pointer;
  1379. }
  1380. &-yellow-disabled {
  1381. background: url("../../../assets/NPC/jian-yellow-disabled.png")
  1382. no-repeat left top;
  1383. background-size: 100% 100%;
  1384. cursor: pointer;
  1385. }
  1386. }
  1387. &.font-img {
  1388. &-black {
  1389. background: url("../../../assets/NPC/fontSize-black.png") no-repeat
  1390. left top;
  1391. background-size: 100% 100%;
  1392. }
  1393. &-yellow {
  1394. background: url("../../../assets/NPC/fontSize-white.png") no-repeat
  1395. left top;
  1396. background-size: 100% 100%;
  1397. }
  1398. }
  1399. &.font-jia {
  1400. &-black {
  1401. background: url("../../../assets/NPC/jia-black.png") no-repeat left
  1402. top;
  1403. background-size: 100% 100%;
  1404. cursor: pointer;
  1405. }
  1406. &-yellow {
  1407. background: url("../../../assets/NPC/jia-white.png") no-repeat left
  1408. top;
  1409. background-size: 100% 100%;
  1410. cursor: pointer;
  1411. }
  1412. &-white-disabled {
  1413. background: url("../../../assets/NPC/jia-white-disabled.png")
  1414. no-repeat left top;
  1415. background-size: 100% 100%;
  1416. cursor: pointer;
  1417. }
  1418. &-yellow-disabled {
  1419. background: url("../../../assets/NPC/jia-yellow-disabled.png")
  1420. no-repeat left top;
  1421. background-size: 100% 100%;
  1422. cursor: pointer;
  1423. }
  1424. }
  1425. }
  1426. }
  1427. .top-middle {
  1428. display: flex;
  1429. justify-content: center;
  1430. align-items: center;
  1431. .audio-box {
  1432. width: 56px;
  1433. height: 56px;
  1434. background: #ffffff;
  1435. border: 1px solid rgba(0, 0, 0, 0.1);
  1436. border-radius: 40px;
  1437. display: flex;
  1438. justify-content: center;
  1439. align-items: center;
  1440. &-green {
  1441. background: rgba(255, 255, 255, 0.1);
  1442. border: 1px solid rgba(0, 0, 0, 0.1);
  1443. }
  1444. }
  1445. }
  1446. }
  1447. .op-btn {
  1448. width: 56px;
  1449. height: 56px;
  1450. border-radius: 100%;
  1451. display: flex;
  1452. justify-content: center;
  1453. align-items: center;
  1454. cursor: pointer;
  1455. margin-left: 32px;
  1456. background: #ffffff;
  1457. border: 1px solid rgba(0, 0, 0, 0.1);
  1458. box-sizing: border-box;
  1459. &-green {
  1460. background: rgba(255, 255, 255, 0.1);
  1461. border: 1px solid rgba(0, 0, 0, 0.1);
  1462. }
  1463. &.close-btn {
  1464. background: #274533;
  1465. border: 1px solid rgba(0, 0, 0, 0.1);
  1466. }
  1467. > span {
  1468. width: 24px;
  1469. height: 24px;
  1470. &.close-icon {
  1471. background: url("../../../assets/icon/cross-24-normal-black.png")
  1472. no-repeat left top;
  1473. background-size: 100% 100%;
  1474. &-white {
  1475. background: url("../../../assets/icon/cross-24-normal-white.png")
  1476. no-repeat left top;
  1477. background-size: 100% 100%;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. .repeat-icon {
  1483. background: url("../../../assets/icon/Repeat-24-normal-red.png") no-repeat
  1484. left top;
  1485. background-size: 100% 100%;
  1486. &.disabled {
  1487. background: url("../../../assets/icon/Repeat-24-disable-Black.png")
  1488. no-repeat left top;
  1489. background-size: 100% 100%;
  1490. }
  1491. &-yellow {
  1492. background: url("../../../assets/icon/Repeat-24-normal-yellow.png")
  1493. no-repeat left top;
  1494. background-size: 100% 100%;
  1495. }
  1496. &.auto-icon {
  1497. background: url("../../../assets/icon/Auto-24-next-red.png") no-repeat
  1498. left top;
  1499. background-size: 100% 100%;
  1500. &-yellow {
  1501. background: url("../../../assets/icon/Auto-24-next-yellow.png")
  1502. no-repeat left top;
  1503. background-size: 100% 100%;
  1504. }
  1505. }
  1506. }
  1507. .pinyin-icon {
  1508. background: url("../../../assets/icon/pinyin-24-normal-red.png") no-repeat
  1509. left top;
  1510. background-size: 100% 100%;
  1511. &.disabled {
  1512. background: url("../../../assets/icon/pinyin-24-disable-Black.png")
  1513. no-repeat left top;
  1514. background-size: 100% 100%;
  1515. }
  1516. &-yellow {
  1517. background: url("../../../assets/icon/pinyin-24-normal-yellow.png")
  1518. no-repeat left top;
  1519. background-size: 100% 100%;
  1520. }
  1521. }
  1522. .en-icon {
  1523. background: url("../../../assets/icon/EN-24-normal-Red.png") no-repeat left
  1524. top;
  1525. background-size: 100% 100%;
  1526. &.disabled {
  1527. background: url("../../../assets/icon/EN-24-disable-Black.png") no-repeat
  1528. left top;
  1529. background-size: 100% 100%;
  1530. }
  1531. &-yellow {
  1532. background: url("../../../assets/icon/EN-24-normal-yellow.png") no-repeat
  1533. left top;
  1534. background-size: 100% 100%;
  1535. }
  1536. }
  1537. .coll-icon {
  1538. background: url("../../../assets/icon/bookmarkfill-24-normal-red.png")
  1539. no-repeat left top;
  1540. background-size: 100% 100%;
  1541. &.disabled {
  1542. background: url("../../../assets/icon/bookmarkfill-24-disable-Black.png")
  1543. no-repeat left top;
  1544. background-size: 100% 100%;
  1545. }
  1546. &-yellow {
  1547. background: url("../../../assets/icon/bookmarkfill-24-normal-yellow.png")
  1548. no-repeat left top;
  1549. background-size: 100% 100%;
  1550. }
  1551. }
  1552. .keyboard-icon {
  1553. background: url("../../../assets/icon/enter-24-keyboard-red.png") no-repeat
  1554. left top;
  1555. background-size: 100% 100%;
  1556. &.disabled {
  1557. background: url("../../../assets/icon/enter-24-keyboard-disable-Black.png")
  1558. no-repeat left top;
  1559. background-size: 100% 100%;
  1560. }
  1561. &-yellow {
  1562. background: url("../../../assets/icon/enter-24-keyboard-yellow.png")
  1563. no-repeat left top;
  1564. background-size: 100% 100%;
  1565. }
  1566. }
  1567. &-content {
  1568. flex: 1;
  1569. width: 100%;
  1570. box-sizing: border-box;
  1571. display: flex;
  1572. align-items: center;
  1573. .vc-box {
  1574. padding: 0 8px 0 36px;
  1575. &-right {
  1576. padding: 0 36px 0 8px;
  1577. }
  1578. }
  1579. .vc-left {
  1580. width: 64px;
  1581. height: 64px;
  1582. cursor: pointer;
  1583. &-grey {
  1584. background: url("../../../assets/NPC/left-grey.png") no-repeat left top;
  1585. background-size: 100% 100%;
  1586. }
  1587. &-black {
  1588. background: url("../../../assets/NPC/left-black.png") no-repeat left top;
  1589. background-size: 100% 100%;
  1590. }
  1591. &-white {
  1592. background: url("../../../assets/NPC/left-white.png") no-repeat left top;
  1593. background-size: 100% 100%;
  1594. }
  1595. &.hidden {
  1596. visibility: hidden;
  1597. }
  1598. }
  1599. .vc-right {
  1600. width: 64px;
  1601. height: 64px;
  1602. cursor: pointer;
  1603. &-grey {
  1604. background: url("../../../assets/NPC/right-grey.png") no-repeat left top;
  1605. background-size: 100% 100%;
  1606. }
  1607. &-black {
  1608. background: url("../../../assets/NPC/right-black.png") no-repeat left
  1609. top;
  1610. background-size: 100% 100%;
  1611. }
  1612. &-white {
  1613. background: url("../../../assets/NPC/right-white.png") no-repeat left
  1614. top;
  1615. background-size: 100% 100%;
  1616. }
  1617. }
  1618. .vc-main {
  1619. width: fit-content;
  1620. margin: 0 auto;
  1621. padding: 0 67px;
  1622. .enwords {
  1623. padding: 0 3px;
  1624. margin-top: 24px;
  1625. color: rgba(0, 0, 0, 0.45);
  1626. font-size: 24px;
  1627. line-height: 32px;
  1628. font-family: "robot";
  1629. &-green {
  1630. color: rgba(255, 255, 255, 0.65);
  1631. }
  1632. }
  1633. }
  1634. .NNPE-words {
  1635. float: left;
  1636. user-select: none;
  1637. -webkit-user-select: none;
  1638. -moz-user-select: none;
  1639. -ms-user-select: none;
  1640. &-box {
  1641. float: left;
  1642. > span {
  1643. display: block;
  1644. &.NNPE-pinyin {
  1645. font-family: "GB-PINYINOK-B";
  1646. font-weight: normal;
  1647. font-size: 32px;
  1648. line-height: 1.25;
  1649. box-sizing: border-box;
  1650. color: rgba(0, 0, 0, 0.85);
  1651. &.bottom {
  1652. padding-bottom: 16px;
  1653. }
  1654. &.noFont {
  1655. font-family: initial;
  1656. }
  1657. &.textLeft {
  1658. text-align: left;
  1659. }
  1660. &.font-white {
  1661. color: #fff;
  1662. }
  1663. &.wordBlank {
  1664. color: rgba(0, 0, 0, 0.85);
  1665. }
  1666. }
  1667. &.NNPE-chs {
  1668. font-family: "FZJCGFKTK";
  1669. font-size: 48px;
  1670. line-height: 1.17;
  1671. color: rgba(0, 0, 0, 0.85);
  1672. &.bottom {
  1673. padding-bottom: 16px;
  1674. }
  1675. .font-white {
  1676. color: #fff;
  1677. }
  1678. .active {
  1679. color: #de4444;
  1680. &-yellow {
  1681. color: #ffc600;
  1682. }
  1683. }
  1684. .wordActive {
  1685. color: #de4444;
  1686. }
  1687. .wordActive-blue {
  1688. color: #ffc600;
  1689. }
  1690. }
  1691. // &.padding {
  1692. // padding-right: 6px;
  1693. // }
  1694. }
  1695. }
  1696. &.textLeft {
  1697. text-align: left;
  1698. }
  1699. &.textCenter {
  1700. text-align: center;
  1701. }
  1702. &.textRight {
  1703. text-align: right;
  1704. }
  1705. > span {
  1706. display: block;
  1707. &.NNPE-pinyin {
  1708. font-family: "GB-PINYINOK-B";
  1709. font-weight: normal;
  1710. font-size: 32px;
  1711. line-height: 1.25;
  1712. box-sizing: border-box;
  1713. color: rgba(0, 0, 0, 0.85);
  1714. &.bottom {
  1715. padding-bottom: 16px;
  1716. }
  1717. &.font-white {
  1718. color: #fff;
  1719. }
  1720. &.noFont {
  1721. font-family: initial;
  1722. }
  1723. &.textLeft {
  1724. text-align: left;
  1725. }
  1726. &.wordBlank {
  1727. color: rgba(0, 0, 0, 0.85);
  1728. }
  1729. }
  1730. &.NNPE-chs {
  1731. font-family: "FZJCGFKTK";
  1732. font-size: 48px;
  1733. line-height: 1.17;
  1734. color: rgba(0, 0, 0, 0.85);
  1735. &.bottom {
  1736. padding-bottom: 16px;
  1737. }
  1738. .font-white {
  1739. color: #fff;
  1740. }
  1741. .active {
  1742. color: #de4444;
  1743. &-yellow {
  1744. color: #ffc600;
  1745. }
  1746. }
  1747. .wordActive {
  1748. color: #de4444;
  1749. }
  1750. .wordActive-blue {
  1751. color: #ffc600;
  1752. }
  1753. }
  1754. &.padding {
  1755. padding-left: 3px;
  1756. padding-right: 3px;
  1757. }
  1758. }
  1759. }
  1760. }
  1761. &-bottom {
  1762. height: 136px;
  1763. width: 100%;
  1764. box-sizing: border-box;
  1765. display: flex;
  1766. justify-content: space-between;
  1767. align-items: center;
  1768. padding-right: 40px;
  1769. .voicefull-bottom-show {
  1770. height: 136px;
  1771. width: 100%;
  1772. display: flex;
  1773. justify-content: space-between;
  1774. align-items: center;
  1775. visibility: visible;
  1776. }
  1777. .voicefull-bottom-hidden {
  1778. height: 136px;
  1779. width: 100%;
  1780. display: flex;
  1781. justify-content: space-between;
  1782. align-items: center;
  1783. visibility: hidden;
  1784. }
  1785. .bottom-left {
  1786. display: flex;
  1787. justify-content: flex-start;
  1788. align-items: center;
  1789. &-margin {
  1790. margin-left: 40px;
  1791. }
  1792. .compare-box {
  1793. height: 56px;
  1794. padding: 16px 16px;
  1795. box-sizing: border-box;
  1796. border: 1px solid rgba(0, 0, 0, 0.1);
  1797. border-radius: 0 40px 40px 0;
  1798. border-left: 0px solid rgba(0, 0, 0, 0.1);
  1799. &-white {
  1800. background: rgba(255, 255, 255, 0.1);
  1801. border: 1px solid rgba(0, 0, 0, 0.1);
  1802. border-left: 0;
  1803. }
  1804. &-answer {
  1805. border-radius: 40px;
  1806. }
  1807. }
  1808. }
  1809. .page-count {
  1810. padding: 8px;
  1811. font-size: 16px;
  1812. line-height: 24px;
  1813. font-family: "robot";
  1814. color: #000000;
  1815. min-width: 60px;
  1816. box-sizing: border-box;
  1817. border-radius: 8px;
  1818. background: #fff;
  1819. text-align: center;
  1820. &-green {
  1821. color: #ffffff;
  1822. background: rgba(255, 255, 255, 0.2);
  1823. }
  1824. }
  1825. }
  1826. }
  1827. .word-play-audio {
  1828. position: absolute;
  1829. left: -1000px;
  1830. }
  1831. </style>
  1832. <style lang="scss">
  1833. .NPC-Big-Book-preview-green {
  1834. .bg1 {
  1835. .repeat-icon {
  1836. background: url("../../../assets/icon/Repeat-24-normal-Green.png")
  1837. no-repeat left top;
  1838. background-size: 100% 100%;
  1839. }
  1840. .pinyin-icon {
  1841. background: url("../../../assets/icon/pinyin-24-normal-green.png")
  1842. no-repeat left top;
  1843. background-size: 100% 100%;
  1844. }
  1845. .en-icon {
  1846. background: url("../../../assets/icon/EN-24-normal-Green.png") no-repeat
  1847. left top;
  1848. background-size: 100% 100%;
  1849. }
  1850. .coll-icon {
  1851. background: url("../../../assets/icon/bookmarkfill-24-normal-green.png")
  1852. no-repeat left top;
  1853. background-size: 100% 100%;
  1854. }
  1855. }
  1856. }
  1857. .NPC-Big-Book-preview-brown {
  1858. .bg1 {
  1859. .repeat-icon {
  1860. background: url("../../../assets/icon/Repeat-24-normal-Brown.png")
  1861. no-repeat left top;
  1862. background-size: 100% 100%;
  1863. }
  1864. .pinyin-icon {
  1865. background: url("../../../assets/icon/pinyin-24-normal-brown.png")
  1866. no-repeat left top;
  1867. background-size: 100% 100%;
  1868. }
  1869. .en-icon {
  1870. background: url("../../../assets/icon/EN-24-normal-Brown.png") no-repeat
  1871. left top;
  1872. background-size: 100% 100%;
  1873. }
  1874. .coll-icon {
  1875. background: url("../../../assets/icon/bookmarkfill-24-normal-brown.png")
  1876. no-repeat left top;
  1877. background-size: 100% 100%;
  1878. }
  1879. }
  1880. }
  1881. </style>