Voicefullscreen.vue 52 KB

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