Voicefullscreen.vue 56 KB

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