Voicefullscreen.vue 69 KB

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