Practicechs.vue 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372
  1. <!-- -->
  2. <template>
  3. <div v-if="curQue" class="NNPE-ArticleView">
  4. <!-- <a class="ArticleView-full" @click="fullScreen">全屏模式</a> -->
  5. <div
  6. v-if="
  7. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  8. config.isHasPY ||
  9. config.isHasEN) &&
  10. curQue.property.mp3_position === 'top'
  11. "
  12. class="aduioLine-box aduioLine-practice-npc"
  13. >
  14. <div class="aduioLine-content">
  15. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  16. <AudioLine
  17. ref="audioLine"
  18. audio-id="artPraAudio"
  19. :mp3="curQue.mp3_list[0].url"
  20. :get-cur-time="getCurTime"
  21. :stop-audio="stopAudio"
  22. :width="colLength == 2 ? 175 : 700"
  23. :mp3-source="curQue.mp3_list[0].source"
  24. :ed="ed"
  25. type="audioLine"
  26. :attrib="attrib"
  27. @handleChangeStopAudio="handleChangeStopAudio"
  28. @emptyEd="emptyEd"
  29. />
  30. </template>
  31. </div>
  32. <div class="aduioLine-right">
  33. <SvgIcon
  34. v-if="config.isHasPY"
  35. icon-class="repeat-1"
  36. size="16"
  37. :class="['Repeat-16', isRepeat ? '' : 'disabled']"
  38. :style="{ color: isRepeat ? (attrib ? attrib.topic_color : '') : '#DCDFE6', cursor: 'pointer' }"
  39. @click="changeRepeat"
  40. />
  41. <!-- <span
  42. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  43. @click="changePinyin"
  44. v-if="config.isHasPY"
  45. ></span>
  46. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  47. <SvgIcon
  48. v-if="config.isHasPY"
  49. icon-class="pin-btn"
  50. size="16"
  51. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  52. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  53. @click="changePinyin"
  54. />
  55. <!-- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  56. <SvgIcon
  57. v-if="config.isHasEN"
  58. icon-class="en-btn"
  59. size="16"
  60. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  61. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  62. @click="changeEN"
  63. />
  64. </div>
  65. </div>
  66. <div
  67. :style="{
  68. height: curQue.property.content_height ? curQue.property.content_height + 'px' : '',
  69. overflow: 'auto',
  70. }"
  71. >
  72. <template v-if="resObj">
  73. <!-- -->
  74. <div class="NPC-sentences-list">
  75. <div
  76. v-for="(item, index) in resObj.sentList"
  77. :key="'detail' + index"
  78. :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
  79. :style="{
  80. backgroundColor: sentIndex == index && attrib ? attrib.assist_color : '',
  81. }"
  82. >
  83. <div
  84. :class="['NNPE-detail']"
  85. @click="
  86. handleChangeTime(
  87. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  88. index,
  89. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  90. )
  91. "
  92. >
  93. <div
  94. v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
  95. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  96. >
  97. {{ convertText(item.enwords) }}
  98. </div>
  99. <div style="overflow: hidden; clear: both"></div>
  100. <div
  101. v-for="(pItem, pIndex) in item.sentArr"
  102. :key="'wordsList' + pIndex"
  103. class="NNPE-words"
  104. :class="[
  105. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  106. pItem.chs == '“' ? 'textRight' : '',
  107. ]"
  108. >
  109. <template v-if="!pItem.width">
  110. <template v-if="pItem.isShow">
  111. <template
  112. v-if="
  113. item.sentArr[pIndex + 1] &&
  114. item.sentArr[pIndex + 1].chs &&
  115. chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1
  116. "
  117. >
  118. <span class="NNPE-words-box">
  119. <template v-if="curQue.property.pinyin_position == 'top'">
  120. <span
  121. v-if="config.isShowPY"
  122. class="NNPE-pinyin"
  123. :class="[
  124. pItem.className ? pItem.className : '',
  125. sentIndex == index ? 'wordBlank' : '',
  126. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  127. ]"
  128. :style="{
  129. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  130. height:
  131. attrib && attrib.pinyin_size
  132. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  133. : '22px',
  134. }"
  135. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
  136. >
  137. </template>
  138. <span
  139. class="NNPE-chs"
  140. :class="[
  141. pItem.padding && config.isShowPY ? 'padding' : '',
  142. sentIndex == index ? 'wordBlank' : '',
  143. ]"
  144. >
  145. <template v-for="(wItem, wIndex) in pItem.leg">
  146. <span
  147. :key="'ci' + wIndex + pIndex + index"
  148. :class="[
  149. pItem.timeList[wIndex] &&
  150. curTime >= pItem.timeList[wIndex].wordBg &&
  151. curTime <= curQue.wordTime[index].ed
  152. ? 'active'
  153. : '',
  154. sentIndex == index ? 'wordBlank' : '',
  155. ]"
  156. :style="{
  157. fontFamily: pItem.config.fontFamily,
  158. textDecoration: pItem.config.textDecoration,
  159. borderBottom: pItem.config.border === 'dotted' ? '1px dotted' : '',
  160. fontWeight: pItem.config.fontWeight,
  161. height:
  162. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  163. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  164. lineHeight:
  165. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  166. display: 'inline-block',
  167. width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
  168. color:
  169. pItem.timeList[wIndex] &&
  170. curTime >= pItem.timeList[wIndex].wordBg &&
  171. curTime <= curQue.wordTime[index].ed &&
  172. attrib
  173. ? attrib.topic_color
  174. : pItem.config.color,
  175. }"
  176. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : '' }}</span
  177. >
  178. </template>
  179. <img
  180. v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
  181. :src="pItem.img[0].file_url"
  182. :style="{
  183. height: attrib && attrib.font_size ? attrib.font_size : '20px',
  184. }"
  185. />
  186. </span>
  187. <template v-if="curQue.property.pinyin_position == 'bottom'">
  188. <span
  189. v-if="config.isShowPY"
  190. class="NNPE-pinyin"
  191. :class="[
  192. pItem.className ? pItem.className : '',
  193. sentIndex == index ? 'wordBlank' : '',
  194. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  195. ]"
  196. :style="{
  197. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  198. height:
  199. attrib && attrib.pinyin_size
  200. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  201. : '22px',
  202. }"
  203. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
  204. >
  205. </template>
  206. </span>
  207. <span class="NNPE-words-box">
  208. <template v-if="curQue.property.pinyin_position == 'top'">
  209. <span
  210. v-if="config.isShowPY"
  211. :class="[
  212. 'NNPE-pinyin',
  213. sentIndex == index ? 'wordBlank' : '',
  214. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  215. ]"
  216. style="text-align: left"
  217. :style="{
  218. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  219. height:
  220. attrib && attrib.pinyin_size
  221. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  222. : '22px',
  223. }"
  224. >{{
  225. NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
  226. ? item.sentArr[pIndex + 1].pinyin
  227. : ''
  228. }}</span
  229. >
  230. </template>
  231. <span
  232. class="NNPE-chs"
  233. style="text-align: left"
  234. :class="[sentIndex == index ? 'wordBlank' : '']"
  235. >
  236. <span
  237. :class="[
  238. pItem.timeList[pItem.leg - 1] &&
  239. curQue.wordTime &&
  240. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  241. curTime <= curQue.wordTime[index].ed
  242. ? 'active'
  243. : '',
  244. sentIndex == index ? 'wordBlank' : '',
  245. ]"
  246. :style="{
  247. fontFamily: item.sentArr[pIndex + 1].config.fontFamily,
  248. textDecoration: item.sentArr[pIndex + 1].config.textDecoration,
  249. borderBottom: item.sentArr[pIndex + 1].config.border === 'dotted' ? '1px dotted' : '',
  250. fontWeight: item.sentArr[pIndex + 1].config.fontWeight,
  251. height:
  252. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  253. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  254. lineHeight:
  255. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  256. display: 'inline-block',
  257. width: item.sentArr[pIndex + 1].chs.trim() === '' ? '6px' : '',
  258. color:
  259. pItem.timeList[pItem.leg - 1] &&
  260. curQue.wordTime &&
  261. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  262. curTime <= curQue.wordTime[index].ed &&
  263. attrib
  264. ? attrib.topic_color
  265. : item.sentArr[pIndex + 1].config.color,
  266. }"
  267. >
  268. {{
  269. NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
  270. ? convertText(item.sentArr[pIndex + 1].chs)
  271. : ''
  272. }}</span
  273. >
  274. <img
  275. v-if="
  276. item.sentArr[pIndex + 1].img &&
  277. item.sentArr[pIndex + 1].img.length > 0 &&
  278. item.sentArr[pIndex + 1].imgPosition === 'after'
  279. "
  280. :src="item.sentArr[pIndex + 1].img[0].file_url"
  281. :style="{
  282. height: attrib && attrib.font_size ? attrib.font_size : '20px',
  283. }"
  284. />
  285. </span>
  286. <template v-if="curQue.property.pinyin_position == 'bottom'">
  287. <span
  288. v-if="config.isShowPY"
  289. :class="[
  290. 'NNPE-pinyin',
  291. sentIndex == index ? 'wordBlank' : '',
  292. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  293. ]"
  294. style="text-align: left"
  295. :style="{
  296. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  297. height:
  298. attrib && attrib.pinyin_size
  299. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  300. : '22px',
  301. }"
  302. >{{
  303. NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
  304. ? item.sentArr[pIndex + 1].pinyin
  305. : ''
  306. }}</span
  307. >
  308. </template>
  309. </span>
  310. <span
  311. v-if="
  312. item.sentArr[pIndex + 2] &&
  313. item.sentArr[pIndex + 2].chs &&
  314. chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
  315. "
  316. class="NNPE-words-box"
  317. >
  318. <template v-if="curQue.property.pinyin_position == 'top'">
  319. <span
  320. v-if="config.isShowPY"
  321. :class="[
  322. 'NNPE-pinyin',
  323. sentIndex == index ? 'wordBlank' : '',
  324. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  325. ]"
  326. style="text-align: left"
  327. :style="{
  328. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  329. height:
  330. attrib && attrib.pinyin_size
  331. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  332. : '22px',
  333. }"
  334. >{{
  335. NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
  336. ? item.sentArr[pIndex + 2].pinyin
  337. : ''
  338. }}</span
  339. >
  340. </template>
  341. <span
  342. class="NNPE-chs"
  343. style="text-align: left"
  344. :class="[sentIndex == index ? 'wordBlank' : '']"
  345. >
  346. <span
  347. :class="[
  348. pItem.timeList[pItem.leg - 1] &&
  349. curQue.wordTime &&
  350. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  351. curTime <= curQue.wordTime[index].ed
  352. ? 'active'
  353. : '',
  354. sentIndex == index ? 'wordBlank' : '',
  355. ]"
  356. :style="{
  357. fontFamily: item.sentArr[pIndex + 2].config.fontFamily,
  358. textDecoration: item.sentArr[pIndex + 2].config.textDecoration,
  359. borderBottom: item.sentArr[pIndex + 2].config.border === 'dotted' ? '1px dotted' : '',
  360. fontWeight: item.sentArr[pIndex + 2].config.fontWeight,
  361. height:
  362. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  363. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  364. lineHeight:
  365. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  366. display: 'inline-block',
  367. width: item.sentArr[pIndex + 2].chs.trim() === '' ? '6px' : '',
  368. color:
  369. pItem.timeList[pItem.leg - 1] &&
  370. curQue.wordTime &&
  371. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  372. curTime <= curQue.wordTime[index].ed &&
  373. attrib
  374. ? attrib.topic_color
  375. : item.sentArr[pIndex + 2].config.color,
  376. }"
  377. >
  378. {{
  379. NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
  380. ? convertText(item.sentArr[pIndex + 2].chs)
  381. : ''
  382. }}</span
  383. >
  384. <img
  385. v-if="
  386. item.sentArr[pIndex + 2].img &&
  387. item.sentArr[pIndex + 2].img.length > 0 &&
  388. item.sentArr[pIndex + 2].imgPosition === 'after'
  389. "
  390. :src="item.sentArr[pIndex + 2].img[0].file_url"
  391. :style="{
  392. height: attrib && attrib.font_size ? attrib.font_size : '20px',
  393. }"
  394. />
  395. </span>
  396. <template v-if="curQue.property.pinyin_position == 'bottom'">
  397. <span
  398. v-if="config.isShowPY"
  399. :class="[
  400. 'NNPE-pinyin',
  401. sentIndex == index ? 'wordBlank' : '',
  402. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  403. ]"
  404. style="text-align: left"
  405. :style="{
  406. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  407. height:
  408. attrib && attrib.pinyin_size
  409. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  410. : '22px',
  411. }"
  412. >{{
  413. NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
  414. ? item.sentArr[pIndex + 2].pinyin
  415. : ''
  416. }}</span
  417. >
  418. </template>
  419. </span>
  420. </template>
  421. <template v-else>
  422. <template v-if="curQue.property.pinyin_position == 'top'">
  423. <span
  424. v-if="config.isShowPY"
  425. class="NNPE-pinyin"
  426. :class="[
  427. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  428. pItem.className ? pItem.className : '',
  429. sentIndex == index ? 'wordBlank' : '',
  430. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  431. ]"
  432. :style="{
  433. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  434. height:
  435. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  436. }"
  437. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
  438. >
  439. </template>
  440. <span
  441. class="NNPE-chs"
  442. :class="[
  443. pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
  444. sentIndex == index ? 'wordBlank' : '',
  445. ]"
  446. >
  447. <template v-for="(wItem, wIndex) in pItem.leg">
  448. <span
  449. :key="'ci' + wIndex + pIndex + index"
  450. :class="[
  451. pItem.timeList[wIndex] &&
  452. curQue.wordTime &&
  453. curQue.wordTime[index] &&
  454. curTime >= pItem.timeList[wIndex].wordBg &&
  455. curTime <= curQue.wordTime[index].ed
  456. ? 'active'
  457. : '',
  458. sentIndex == index ? 'wordBlank' : '',
  459. ]"
  460. :style="{
  461. fontFamily: pItem.config.fontFamily,
  462. textDecoration: pItem.config.textDecoration,
  463. borderBottom: pItem.config.border === 'dotted' ? '1px dotted' : '',
  464. fontWeight: pItem.config.fontWeight,
  465. height:
  466. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  467. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  468. lineHeight:
  469. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  470. display: 'inline-block',
  471. width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
  472. color:
  473. pItem.timeList[wIndex] &&
  474. curQue.wordTime &&
  475. curQue.wordTime[index] &&
  476. curTime >= pItem.timeList[wIndex].wordBg &&
  477. curTime <= curQue.wordTime[index].ed &&
  478. attrib
  479. ? attrib.topic_color
  480. : pItem.config.color,
  481. }"
  482. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? convertText(pItem.chs[wIndex]) : '' }}
  483. </span>
  484. </template>
  485. <img
  486. v-if="pItem.img && pItem.img.length > 0 && pItem.imgPosition === 'after'"
  487. :src="pItem.img[0].file_url"
  488. :style="{
  489. height: attrib && attrib.font_size ? attrib.font_size : '20px',
  490. }"
  491. />
  492. </span>
  493. <template v-if="curQue.property.pinyin_position == 'bottom'">
  494. <span
  495. v-if="config.isShowPY"
  496. class="NNPE-pinyin"
  497. :class="[
  498. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  499. pItem.className ? pItem.className : '',
  500. sentIndex == index ? 'wordBlank' : '',
  501. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  502. ]"
  503. :style="{
  504. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  505. height:
  506. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  507. }"
  508. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.pinyin : '' }}</span
  509. >
  510. </template>
  511. </template>
  512. </template>
  513. </template>
  514. <template v-else>
  515. <span
  516. :style="{
  517. height: pItem.height + 'px',
  518. width: pItem.width + 'px',
  519. }"
  520. ></span>
  521. </template>
  522. </div>
  523. <div style="overflow: hidden; clear: both"></div>
  524. <div
  525. v-if="
  526. item.enwords &&
  527. config.isShowEN &&
  528. (!curQue.enPosition || (curQue.enPosition && curQue.enPosition == 'bottom'))
  529. "
  530. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  531. >
  532. {{ convertText(item.enwords) }}
  533. </div>
  534. </div>
  535. <div
  536. v-if="curQue.property.multilingual_position === 'para'"
  537. class="multilingual-para"
  538. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  539. >
  540. {{
  541. multilingualTextList[multilingual] && multilingualTextList[multilingual][index]
  542. ? multilingualTextList[multilingual][index]
  543. : ''
  544. }}
  545. </div>
  546. <div
  547. v-show="
  548. (curQue.wordTime &&
  549. curQue.wordTime[index] &&
  550. curTime >= curQue.wordTime[index].bg &&
  551. curTime <= curQue.wordTime[index].ed) ||
  552. sentIndex == index
  553. "
  554. class="Soundrecord-content"
  555. >
  556. <div class="Soundrecord-content-inner">
  557. <Soundrecord
  558. v-if="refresh"
  559. type="promax"
  560. class="luyin-box"
  561. :TaskModel="TaskModel"
  562. :answer-record-list="
  563. curQue.Bookanswer.practiceModel[index] && curQue.Bookanswer.practiceModel[index].recordList
  564. "
  565. :tm-index="index"
  566. :sent-index="sentIndex"
  567. :attrib="attrib"
  568. @getWavblob="getWavblob"
  569. @handleParentPlay="handleParentPlay"
  570. @sentPause="sentPause"
  571. @handleWav="handleWav"
  572. />
  573. <div v-if="curQue.mp3_list && curQue.mp3_list.length > 0" class="compare-box">
  574. <Audio-compare
  575. :theme-color="themeColor"
  576. :index="index"
  577. :sent-index="sentIndex"
  578. :url="curQue.mp3_list[0].url"
  579. :bg="curQue.wordTime[index].bg"
  580. :ed="curQue.wordTime[index].ed"
  581. :wavblob="wavblob"
  582. :get-cur-time="getCurTime"
  583. :sent-pause="sentPause"
  584. :is-record="isRecord"
  585. :handle-change-stop-audio="handleChangeStopAudio"
  586. :get-play-status="getPlayStatus"
  587. :attrib="attrib"
  588. />
  589. </div>
  590. </div>
  591. <span class="full-screen-icon" @click="fullScreen">
  592. <svg-icon
  593. icon-class="icon-full"
  594. size="24"
  595. :style="{
  596. color: attrib && attrib.topic_color ? attrib.topic_color : '',
  597. }"
  598. />
  599. </span>
  600. </div>
  601. </div>
  602. <!-- <div class="multilingual" v-for="(items, indexs) in multilingualTextList" :key="indexs">
  603. {{ items }}
  604. </div> -->
  605. </div>
  606. </template>
  607. <template v-for="(items, indexs) in curQue.detail">
  608. <div
  609. v-if="
  610. curQue.property.multilingual_position === 'all' &&
  611. items.multilingualTextList &&
  612. items.multilingualTextList[multilingual] &&
  613. items.multilingualTextList[multilingual].length > 0
  614. "
  615. :key="indexs"
  616. class="multilingual"
  617. >
  618. <div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
  619. {{
  620. items.multilingualTextList && items.multilingualTextList[multilingual]
  621. ? items.multilingualTextList[multilingual].join(' ')
  622. : ''
  623. }}
  624. </div>
  625. </div>
  626. </template>
  627. </div>
  628. <div
  629. v-if="
  630. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  631. config.isHasPY ||
  632. config.isHasEN) &&
  633. curQue.property.mp3_position === 'bottom'
  634. "
  635. class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
  636. >
  637. <div class="aduioLine-content">
  638. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  639. <AudioLine
  640. ref="audioLine"
  641. audio-id="artPraAudio"
  642. :mp3="curQue.mp3_list[0].url"
  643. :get-cur-time="getCurTime"
  644. :stop-audio="stopAudio"
  645. :width="colLength == 2 ? 175 : 700"
  646. :mp3-source="curQue.mp3_list[0].source"
  647. :ed="ed"
  648. type="audioLine"
  649. :attrib="attrib"
  650. @handleChangeStopAudio="handleChangeStopAudio"
  651. @emptyEd="emptyEd"
  652. />
  653. </template>
  654. </div>
  655. <div class="aduioLine-right">
  656. <!-- <span :class="['Repeat-16', isRepeat ? '' : 'disabled']" @click="changeRepeat"></span>
  657. <span
  658. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  659. @click="changePinyin"
  660. v-if="config.isHasPY"
  661. ></span>
  662. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  663. <SvgIcon
  664. v-if="config.isHasPY"
  665. icon-class="repeat-1"
  666. size="16"
  667. :class="['Repeat-16', isRepeat ? '' : 'disabled']"
  668. :style="{ color: isRepeat ? (attrib ? attrib.topic_color : '') : '#DCDFE6', cursor: 'pointer' }"
  669. @click="changeRepeat"
  670. />
  671. <!-- <span
  672. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  673. @click="changePinyin"
  674. v-if="config.isHasPY"
  675. ></span>
  676. <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  677. <SvgIcon
  678. v-if="config.isHasPY"
  679. icon-class="pin-btn"
  680. size="16"
  681. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  682. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  683. @click="changePinyin"
  684. />
  685. <!-- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  686. <SvgIcon
  687. v-if="config.isHasEN"
  688. icon-class="en-btn"
  689. size="16"
  690. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  691. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  692. @click="changeEN"
  693. />
  694. </div>
  695. </div>
  696. <div :id="'screen-' + mathNum" class="voice-full-screen">
  697. <Voicefullscreen
  698. v-if="isFull && resObj"
  699. :theme-color="themeColor"
  700. :cur-que="curQue"
  701. :sent-list="resObj.sentList"
  702. :sent-index="sentIndex"
  703. :mp3="curQue.mp3_list && curQue.mp3_list[0] ? curQue.mp3_list[0].url : ''"
  704. :no-font="noFont"
  705. :NNPENewWordList="NNPENewWordList"
  706. :NNPEAnnotationList="NNPEAnnotationList"
  707. :current-tree-i-d="currentTreeID"
  708. :config="config"
  709. :TaskModel="TaskModel"
  710. :attrib="attrib"
  711. @handleWav="handleWav"
  712. @changePinyin="changePinyin"
  713. @changeEN="changeEN"
  714. @exitFullscreen="exitFullscreen"
  715. @changeIsFull="changeIsFull"
  716. />
  717. </div>
  718. </div>
  719. </template>
  720. <script>
  721. import AudioLine from '../voice_matrix/components/AudioLine.vue';
  722. import Soundrecord from '../../common/SoundRecord.vue';
  723. import AudioCompare from './components/AudioCompare.vue';
  724. import Voicefullscreen from './Voicefullscreen.vue';
  725. export default {
  726. name: 'ArticleView',
  727. components: {
  728. AudioLine,
  729. Soundrecord,
  730. AudioCompare,
  731. Voicefullscreen,
  732. },
  733. props: [
  734. 'curQue',
  735. 'noFont',
  736. 'themeColor',
  737. 'NNPENewWordList',
  738. 'NNPEAnnotationList',
  739. 'currentTreeID',
  740. 'config',
  741. 'TaskModel',
  742. 'colLength',
  743. 'isFull',
  744. 'multilingual',
  745. 'attrib',
  746. ],
  747. inject: ['convertText'],
  748. data() {
  749. return {
  750. resObj: null,
  751. curTime: 0, // 单位s
  752. chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '、'],
  753. enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
  754. NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
  755. stopAudio: false,
  756. sentIndex: 0,
  757. isRepeat: false,
  758. currSent: null, // 当前句子的时间
  759. isRecord: false,
  760. wavblob: null,
  761. mathNum: Math.random().toString(36).substr(2),
  762. ed: undefined,
  763. refresh: true,
  764. multilingualTextList: {},
  765. };
  766. },
  767. computed: {
  768. isPlaying() {
  769. let playing = false;
  770. if (this.$refs.audioLine) {
  771. playing = this.$refs.audioLine.audio.isPlaying;
  772. }
  773. return playing;
  774. },
  775. },
  776. watch: {
  777. sentIndex: {
  778. handler(newVal, oldVal) {
  779. let _this = this;
  780. if (newVal !== oldVal) {
  781. let Bookanswer = _this.curQue.Bookanswer;
  782. if (
  783. Bookanswer &&
  784. Bookanswer.practiceModel &&
  785. Bookanswer.practiceModel[newVal] &&
  786. Bookanswer.practiceModel[newVal].recordList &&
  787. Bookanswer.practiceModel[newVal].recordList.length > 0
  788. ) {
  789. _this.wavblob = Bookanswer.practiceModel[newVal].recordList[0].wavData;
  790. } else {
  791. _this.wavblob = '';
  792. }
  793. }
  794. },
  795. deep: true,
  796. },
  797. isFull: {
  798. handler(newVal) {
  799. let _this = this;
  800. _this.refresh = false;
  801. if (!newVal) {
  802. _this.$nextTick(() => {
  803. // 重新渲染组件
  804. _this.refresh = true;
  805. });
  806. }
  807. },
  808. deep: true,
  809. },
  810. },
  811. // 生命周期 - 创建完成(可以访问当前this实例)
  812. created() {},
  813. // 生命周期 - 挂载完成(可以访问DOM元素)
  814. mounted() {
  815. if (this.curQue) {
  816. this.handleData();
  817. }
  818. },
  819. beforeCreate() {}, // 生命周期 - 创建之前
  820. beforeMount() {}, // 生命周期 - 挂载之前
  821. beforeUpdate() {}, // 生命周期 - 更新之前
  822. updated() {}, // 生命周期 - 更新之后
  823. beforeDestroy() {}, // 生命周期 - 销毁之前
  824. destroyed() {}, // 生命周期 - 销毁完成
  825. activated() {},
  826. // 方法集合
  827. methods: {
  828. getPlayStatus(val) {
  829. // this.isPlaying = val;
  830. },
  831. // 拼音的显示和隐藏
  832. changePinyin() {
  833. if (this.config.isHasPY) {
  834. this.$emit('changeConfig', 'isShowPY');
  835. }
  836. },
  837. // 英文的显示和隐藏
  838. changeEN() {
  839. if (this.config.isHasEN) {
  840. this.$emit('changeConfig', 'isShowEN');
  841. }
  842. },
  843. pauseAudio() {
  844. let audio = document.getElementsByTagName('audio');
  845. if (audio && audio.length > 0 && window.location.href.indexOf('GCLS-Learn') === -1 && audio.forEach) {
  846. audio.forEach((item) => {
  847. item.pause();
  848. });
  849. }
  850. },
  851. pauseVideo() {
  852. let video = document.getElementsByTagName('video');
  853. if (video && video.length > 0 && window.location.href.indexOf('GCLS-Learn') === -1 && video.forEach) {
  854. video.forEach((item) => {
  855. item.pause();
  856. });
  857. }
  858. },
  859. // 语音全屏
  860. fullScreen() {
  861. this.pauseAudio();
  862. this.pauseVideo();
  863. this.isFull = true;
  864. // this.goFullscreen();
  865. },
  866. goFullscreen() {
  867. let id = `screen-${this.mathNum}`;
  868. let element = document.getElementById(id);
  869. if (element.requestFullscreen) {
  870. element.requestFullscreen();
  871. } else if (element.msRequestFullscreen) {
  872. element.msRequestFullscreen();
  873. } else if (element.mozRequestFullScreen) {
  874. element.mozRequestFullScreen();
  875. } else if (element.webkitRequestFullscreen) {
  876. element.webkitRequestFullscreen();
  877. }
  878. },
  879. exitFullscreen() {
  880. this.isFull = false;
  881. // if (document.exitFullscreen) {
  882. // document.exitFullscreen();
  883. // } else if (document.msExitFullscreen) {
  884. // document.msExitFullscreen();
  885. // } else if (document.mozCancelFullScreen) {
  886. // document.mozCancelFullScreen();
  887. // } else if (document.webkitExitFullscreen) {
  888. // document.webkitExitFullscreen();
  889. // }
  890. },
  891. changeIsFull() {
  892. this.isFull = false;
  893. },
  894. getWavblob(wavblob) {
  895. this.wavblob = wavblob;
  896. },
  897. sentPause(isRecord) {
  898. this.isRecord = isRecord;
  899. },
  900. getCurTime(curTime) {
  901. let _this = this;
  902. if (_this.isRepeat) {
  903. let time = curTime * 1000;
  904. if (time >= _this.currSent.ed || time <= _this.currSent.bg) {
  905. _this.curTime = _this.currSent.bg;
  906. this.$refs.audioLine.onTimeupdateTime(_this.currSent.bg / 1000, true);
  907. } else {
  908. _this.curTime = curTime * 1000;
  909. }
  910. } else {
  911. _this.curTime = curTime * 1000;
  912. _this.getSentIndex(_this.curTime);
  913. }
  914. },
  915. getSentIndex(curTime) {
  916. for (let i = 0; i < this.curQue.wordTime.length; i++) {
  917. let bg = this.curQue.wordTime[i].bg;
  918. let ed = this.curQue.wordTime[i].ed;
  919. if (curTime >= bg && curTime <= ed) {
  920. this.sentIndex = i;
  921. break;
  922. }
  923. }
  924. },
  925. handleData() {
  926. this.curQue.multilingual.forEach((item) => {
  927. let trans_arr = item.translation.split('\n');
  928. this.$set(this.multilingualTextList, item.type, trans_arr);
  929. });
  930. let resArr = [];
  931. let sentArrTotal = [];
  932. let timeArr = [];
  933. let curQue = JSON.parse(JSON.stringify(this.curQue));
  934. let wordTimeList = curQue.wordTime;
  935. let dhaspinyin = false; // 每段是否有拼音
  936. let dhaspinyinArr = [];
  937. curQue.detail.forEach((dItem, dIndex) => {
  938. dhaspinyin = false;
  939. dItem.wordsList.forEach((sItem, sIndex) => {
  940. let sentArr = [];
  941. sItem.forEach((wItem, wIndex) => {
  942. let startIndex = wIndex === 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
  943. let endIndex = wIndex === 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  944. // this.judgePad(sItem, wItem, wIndex);
  945. this.mergeWordSymbol(wItem);
  946. let obj = {
  947. paraIndex: dIndex, // 段落索引
  948. sentIndex: sIndex, // 在段落中句子索引
  949. wordIndex: wIndex, // 单词的索引
  950. pinyin:
  951. curQue.pinyin_type === 'pinyin'
  952. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  953. ? wItem.pinyin_up
  954. : wItem.pinyin
  955. : wItem.pinyin_tone,
  956. chs: wItem.chs,
  957. padding: true,
  958. className: wItem.className,
  959. isShow: wItem.isShow,
  960. startIndex,
  961. endIndex,
  962. leg: wItem.chs.length,
  963. timeList: [],
  964. config: {
  965. fontFamily: wItem.fontFamily,
  966. color: wItem.color,
  967. textDecoration: wItem.textDecoration,
  968. border: wItem.border,
  969. fontWeight: wItem.fontWeight,
  970. },
  971. matchWords: wItem.matchWords,
  972. matchNotes: wItem.matchNotes,
  973. notesColor: wItem.notesColor,
  974. matchNotesObj: wItem.matchNotesObj,
  975. img: wItem.img,
  976. imgPosition: wItem.imgPosition,
  977. };
  978. sentArr.push(obj);
  979. if (wItem.pinyin) dhaspinyin = true;
  980. });
  981. let objs = {
  982. sentArr,
  983. enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/'/g, '’'),
  984. };
  985. sentArrTotal.push(sentArr);
  986. resArr.push(objs);
  987. });
  988. timeArr.push(dItem.timeList);
  989. dhaspinyinArr.push(dhaspinyin);
  990. });
  991. if (wordTimeList && wordTimeList.length > 0) {
  992. this.mergeWordTime(sentArrTotal, wordTimeList);
  993. }
  994. let timeList = [];
  995. timeArr.forEach((item) => {
  996. item.forEach((aItem) => {
  997. if (timeList.indexOf(aItem) < 0) {
  998. timeList.push(aItem);
  999. }
  1000. });
  1001. });
  1002. this.resObj = {
  1003. sentList: resArr,
  1004. timeList,
  1005. dhaspinyinArr,
  1006. };
  1007. },
  1008. mergeWordTime(resArr, wordTimeList) {
  1009. resArr.forEach((item, index) => {
  1010. let wordsResultList = wordTimeList[index].wordsResultList;
  1011. item.forEach((wItem) => {
  1012. let startIndex = wItem.startIndex;
  1013. let endIndex = wItem.endIndex;
  1014. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  1015. });
  1016. });
  1017. },
  1018. // 词和标点合一起
  1019. mergeWordSymbol(wItem) {
  1020. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  1021. wItem.isShow = false;
  1022. } else {
  1023. wItem.isShow = true;
  1024. }
  1025. },
  1026. // 判断是否有padding
  1027. judgePad(sItem, wItem, curIndex) {
  1028. let leg = sItem.length;
  1029. if (curIndex < leg - 1) {
  1030. let nextIndex = curIndex + 1;
  1031. let chs = sItem[nextIndex].chs;
  1032. if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
  1033. wItem.padding = false;
  1034. } else {
  1035. wItem.padding = true;
  1036. }
  1037. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  1038. wItem.className = 'textLeft';
  1039. }
  1040. }
  1041. },
  1042. // 转化时间
  1043. handleTimeList(list) {
  1044. let listRes = [];
  1045. list.forEach((item) => {
  1046. let res = this.timeStrToSen(item);
  1047. listRes.push(res);
  1048. });
  1049. return listRes;
  1050. },
  1051. // 分:秒转秒
  1052. timeStrToSen(time) {
  1053. if (!time) {
  1054. return -1;
  1055. }
  1056. let pos = time.indexOf(':');
  1057. let min = 0;
  1058. let sec = 0;
  1059. if (pos > 0) {
  1060. min = parseInt(time.substring(0, pos));
  1061. sec = parseFloat(time.substring(pos + 1));
  1062. }
  1063. return min * 60 + sec;
  1064. },
  1065. // 计算总时间
  1066. countWordTime(sentArr) {
  1067. let total = 0;
  1068. sentArr.forEach((item) => {
  1069. total += item.endTime;
  1070. });
  1071. return total;
  1072. },
  1073. // 点击播放某个句子
  1074. handleChangeTime(time, index, ed) {
  1075. let _this = this;
  1076. if (this.isRepeat) {
  1077. _this.currSent = _this.curQue.wordTime[index];
  1078. }
  1079. _this.sentIndex = index;
  1080. _this.ed = ed;
  1081. if (time !== null && time !== undefined) {
  1082. _this.curTime = time;
  1083. _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
  1084. }
  1085. },
  1086. emptyEd() {
  1087. this.ed = undefined;
  1088. },
  1089. handleWav(list, tmIndex) {
  1090. let _tmIndex = tmIndex || 0;
  1091. this.curQue.Bookanswer.practiceModel[_tmIndex] = {
  1092. recordList: [],
  1093. };
  1094. this.$set(this.curQue.Bookanswer.practiceModel[_tmIndex], 'recordList', list);
  1095. },
  1096. // 录音时暂停音频播放
  1097. handleParentPlay() {
  1098. this.stopAudio = true;
  1099. },
  1100. // 音频播放时改变布尔值
  1101. handleChangeStopAudio() {
  1102. this.stopAudio = false;
  1103. },
  1104. // 单句是否重复播放
  1105. changeRepeat() {
  1106. let _this = this;
  1107. _this.isRepeat = !_this.isRepeat;
  1108. this.currSent = _this.curQue.wordTime[_this.sentIndex];
  1109. },
  1110. }, // 如果页面有keep-alive缓存功能,这个函数会触发
  1111. };
  1112. </script>
  1113. <style lang="scss" scoped>
  1114. //@import url(); 引入公共css类
  1115. .NNPE-ArticleView {
  1116. position: relative;
  1117. width: 100%;
  1118. .ArticleView-full {
  1119. position: absolute;
  1120. top: -33px;
  1121. left: 0;
  1122. z-index: 99999;
  1123. padding-left: 24px;
  1124. font-size: 14px;
  1125. font-weight: bold;
  1126. line-height: 24px;
  1127. color: #000;
  1128. background: url('@/assets/full-screen-red.png') left center no-repeat;
  1129. background-size: 16px 16px;
  1130. }
  1131. .NPC-sentences-list {
  1132. padding: 16px 0;
  1133. overflow: auto;
  1134. }
  1135. .multilingual {
  1136. padding: 6px 24px 12px;
  1137. word-break: break-word;
  1138. }
  1139. .aduioLine-content {
  1140. flex: 1;
  1141. }
  1142. .NNPE-detail-box {
  1143. box-sizing: border-box;
  1144. width: 100%;
  1145. padding: 8px 24px;
  1146. margin-bottom: 8px;
  1147. &.active {
  1148. background: rgba(222, 68, 68, 15%);
  1149. }
  1150. }
  1151. .aduioLine-practice-npc {
  1152. display: flex;
  1153. align-items: center;
  1154. justify-content: flex-start;
  1155. .aduioLine-right {
  1156. box-sizing: border-box;
  1157. display: flex;
  1158. align-items: center;
  1159. justify-content: space-between;
  1160. width: 92px;
  1161. height: 40px;
  1162. padding: 0 12px;
  1163. border-left: 1px solid rgba(0, 0, 0, 10%);
  1164. .svg-icon {
  1165. width: 16px;
  1166. height: 16px;
  1167. cursor: pointer;
  1168. }
  1169. }
  1170. }
  1171. .NNPE-detail {
  1172. overflow: hidden;
  1173. clear: both;
  1174. .NNPE-words {
  1175. float: left;
  1176. padding-bottom: 5px;
  1177. &-box {
  1178. float: left;
  1179. > span {
  1180. display: block;
  1181. &.NNPE-pinyin {
  1182. height: 20px;
  1183. font-family: 'League';
  1184. font-size: 14px;
  1185. font-weight: normal;
  1186. line-height: 1.5;
  1187. color: rgba(0, 0, 0, 45%);
  1188. &.noFont {
  1189. font-family: initial;
  1190. }
  1191. &.textLeft {
  1192. text-align: left;
  1193. }
  1194. &.wordBlank {
  1195. color: rgba(0, 0, 0, 85%);
  1196. }
  1197. }
  1198. &.NNPE-chs {
  1199. display: flex;
  1200. flex-flow: wrap;
  1201. align-items: center;
  1202. font-family: '楷体';
  1203. font-size: 20px;
  1204. line-height: 1.4;
  1205. color: rgba(0, 0, 0, 45%);
  1206. .active {
  1207. color: #de4444;
  1208. }
  1209. &.wordBlank {
  1210. color: rgba(0, 0, 0, 85%);
  1211. }
  1212. }
  1213. // &.padding {
  1214. // padding-right: 6px;
  1215. // }
  1216. }
  1217. }
  1218. &.textLeft {
  1219. text-align: left;
  1220. }
  1221. &.textCenter {
  1222. text-align: center;
  1223. .NNPE-chs {
  1224. justify-content: center;
  1225. }
  1226. }
  1227. &.textRight {
  1228. text-align: right;
  1229. }
  1230. > span {
  1231. display: block;
  1232. &.NNPE-pinyin {
  1233. height: 20px;
  1234. font-family: 'League';
  1235. font-size: 14px;
  1236. font-weight: normal;
  1237. line-height: 1.5;
  1238. color: rgba(0, 0, 0, 45%);
  1239. &.noFont {
  1240. font-family: initial;
  1241. }
  1242. &.textLeft {
  1243. text-align: left;
  1244. }
  1245. &.wordBlank {
  1246. color: rgba(0, 0, 0, 85%);
  1247. }
  1248. }
  1249. &.NNPE-chs {
  1250. display: flex;
  1251. flex-flow: wrap;
  1252. align-items: center;
  1253. font-family: '楷体';
  1254. font-size: 20px;
  1255. line-height: 1.4;
  1256. color: rgba(0, 0, 0, 45%);
  1257. .active {
  1258. color: #de4444;
  1259. }
  1260. &.wordBlank {
  1261. color: rgba(0, 0, 0, 85%);
  1262. }
  1263. }
  1264. &.padding {
  1265. padding: 0 3px;
  1266. }
  1267. }
  1268. }
  1269. }
  1270. .Soundrecord-content {
  1271. display: flex;
  1272. align-items: center;
  1273. justify-content: space-between;
  1274. margin-top: 8px;
  1275. &-inner {
  1276. display: flex;
  1277. align-items: center;
  1278. justify-content: flex-start;
  1279. // width: 304px;
  1280. padding: 4px 12px;
  1281. background: #fff;
  1282. border: 1px solid rgba(0, 0, 0, 10%);
  1283. border-radius: 8px;
  1284. .luyin-box {
  1285. width: 280px;
  1286. // max-width: 280px;
  1287. }
  1288. .compare-box {
  1289. display: flex;
  1290. align-items: center;
  1291. justify-content: center;
  1292. height: 32px;
  1293. }
  1294. }
  1295. .full-screen-icon {
  1296. width: 24px;
  1297. height: 24px;
  1298. cursor: pointer;
  1299. // background: url('@/assets/full-screen-red.png') no-repeat left top;
  1300. // background-size: 100% 100%;
  1301. }
  1302. }
  1303. .enwords {
  1304. padding-left: 3px;
  1305. font-family: 'Helvetica';
  1306. font-size: 14px;
  1307. font-weight: normal;
  1308. line-height: 22px;
  1309. color: rgba(0, 0, 0, 45%);
  1310. word-break: break-word;
  1311. &.wordBlank {
  1312. color: rgba(0, 0, 0, 85%);
  1313. }
  1314. }
  1315. .multilingual-para {
  1316. word-break: break-word;
  1317. &-center {
  1318. text-align: center;
  1319. text-indent: 0;
  1320. }
  1321. }
  1322. }
  1323. </style>