Voicefullscreen.vue 48 KB

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