Voicefullscreen.vue 70 KB

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