Practicechs.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370
  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].id"
  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. img: wItem.img,
  974. imgPosition: wItem.imgPosition,
  975. };
  976. sentArr.push(obj);
  977. if (wItem.pinyin) dhaspinyin = true;
  978. });
  979. let objs = {
  980. sentArr,
  981. enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/'/g, '’'),
  982. };
  983. sentArrTotal.push(sentArr);
  984. resArr.push(objs);
  985. });
  986. timeArr.push(dItem.timeList);
  987. dhaspinyinArr.push(dhaspinyin);
  988. });
  989. if (wordTimeList && wordTimeList.length > 0) {
  990. this.mergeWordTime(sentArrTotal, wordTimeList);
  991. }
  992. let timeList = [];
  993. timeArr.forEach((item) => {
  994. item.forEach((aItem) => {
  995. if (timeList.indexOf(aItem) < 0) {
  996. timeList.push(aItem);
  997. }
  998. });
  999. });
  1000. this.resObj = {
  1001. sentList: resArr,
  1002. timeList,
  1003. dhaspinyinArr,
  1004. };
  1005. },
  1006. mergeWordTime(resArr, wordTimeList) {
  1007. resArr.forEach((item, index) => {
  1008. let wordsResultList = wordTimeList[index].wordsResultList;
  1009. item.forEach((wItem) => {
  1010. let startIndex = wItem.startIndex;
  1011. let endIndex = wItem.endIndex;
  1012. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  1013. });
  1014. });
  1015. },
  1016. // 词和标点合一起
  1017. mergeWordSymbol(wItem) {
  1018. if (this.chsFhList.indexOf(wItem.chs) > -1) {
  1019. wItem.isShow = false;
  1020. } else {
  1021. wItem.isShow = true;
  1022. }
  1023. },
  1024. // 判断是否有padding
  1025. judgePad(sItem, wItem, curIndex) {
  1026. let leg = sItem.length;
  1027. if (curIndex < leg - 1) {
  1028. let nextIndex = curIndex + 1;
  1029. let chs = sItem[nextIndex].chs;
  1030. if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
  1031. wItem.padding = false;
  1032. } else {
  1033. wItem.padding = true;
  1034. }
  1035. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  1036. wItem.className = 'textLeft';
  1037. }
  1038. }
  1039. },
  1040. // 转化时间
  1041. handleTimeList(list) {
  1042. let listRes = [];
  1043. list.forEach((item) => {
  1044. let res = this.timeStrToSen(item);
  1045. listRes.push(res);
  1046. });
  1047. return listRes;
  1048. },
  1049. // 分:秒转秒
  1050. timeStrToSen(time) {
  1051. if (!time) {
  1052. return -1;
  1053. }
  1054. let pos = time.indexOf(':');
  1055. let min = 0;
  1056. let sec = 0;
  1057. if (pos > 0) {
  1058. min = parseInt(time.substring(0, pos));
  1059. sec = parseFloat(time.substring(pos + 1));
  1060. }
  1061. return min * 60 + sec;
  1062. },
  1063. // 计算总时间
  1064. countWordTime(sentArr) {
  1065. let total = 0;
  1066. sentArr.forEach((item) => {
  1067. total += item.endTime;
  1068. });
  1069. return total;
  1070. },
  1071. // 点击播放某个句子
  1072. handleChangeTime(time, index, ed) {
  1073. let _this = this;
  1074. if (this.isRepeat) {
  1075. _this.currSent = _this.curQue.wordTime[index];
  1076. }
  1077. _this.sentIndex = index;
  1078. _this.ed = ed;
  1079. if (time) {
  1080. _this.curTime = time;
  1081. _this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
  1082. }
  1083. },
  1084. emptyEd() {
  1085. this.ed = undefined;
  1086. },
  1087. handleWav(list, tmIndex) {
  1088. let _tmIndex = tmIndex || 0;
  1089. this.curQue.Bookanswer.practiceModel[_tmIndex] = {
  1090. recordList: [],
  1091. };
  1092. this.$set(this.curQue.Bookanswer.practiceModel[_tmIndex], 'recordList', list);
  1093. },
  1094. // 录音时暂停音频播放
  1095. handleParentPlay() {
  1096. this.stopAudio = true;
  1097. },
  1098. // 音频播放时改变布尔值
  1099. handleChangeStopAudio() {
  1100. this.stopAudio = false;
  1101. },
  1102. // 单句是否重复播放
  1103. changeRepeat() {
  1104. let _this = this;
  1105. _this.isRepeat = !_this.isRepeat;
  1106. this.currSent = _this.curQue.wordTime[_this.sentIndex];
  1107. },
  1108. }, // 如果页面有keep-alive缓存功能,这个函数会触发
  1109. };
  1110. </script>
  1111. <style lang="scss" scoped>
  1112. //@import url(); 引入公共css类
  1113. .NNPE-ArticleView {
  1114. position: relative;
  1115. width: 100%;
  1116. .ArticleView-full {
  1117. position: absolute;
  1118. top: -33px;
  1119. left: 0;
  1120. z-index: 99999;
  1121. padding-left: 24px;
  1122. font-size: 14px;
  1123. font-weight: bold;
  1124. line-height: 24px;
  1125. color: #000;
  1126. background: url('@/assets/full-screen-red.png') left center no-repeat;
  1127. background-size: 16px 16px;
  1128. }
  1129. .NPC-sentences-list {
  1130. padding: 16px 0;
  1131. overflow: auto;
  1132. }
  1133. .multilingual {
  1134. padding: 6px 24px 12px;
  1135. word-break: break-word;
  1136. }
  1137. .aduioLine-content {
  1138. flex: 1;
  1139. }
  1140. .NNPE-detail-box {
  1141. box-sizing: border-box;
  1142. width: 100%;
  1143. padding: 8px 24px;
  1144. margin-bottom: 8px;
  1145. &.active {
  1146. background: rgba(222, 68, 68, 15%);
  1147. }
  1148. }
  1149. .aduioLine-practice-npc {
  1150. display: flex;
  1151. align-items: center;
  1152. justify-content: flex-start;
  1153. .aduioLine-right {
  1154. box-sizing: border-box;
  1155. display: flex;
  1156. align-items: center;
  1157. justify-content: space-between;
  1158. width: 92px;
  1159. height: 40px;
  1160. padding: 0 12px;
  1161. border-left: 1px solid rgba(0, 0, 0, 10%);
  1162. .svg-icon {
  1163. width: 16px;
  1164. height: 16px;
  1165. cursor: pointer;
  1166. }
  1167. }
  1168. }
  1169. .NNPE-detail {
  1170. overflow: hidden;
  1171. clear: both;
  1172. .NNPE-words {
  1173. float: left;
  1174. padding-bottom: 5px;
  1175. &-box {
  1176. float: left;
  1177. > span {
  1178. display: block;
  1179. &.NNPE-pinyin {
  1180. height: 20px;
  1181. font-family: 'League';
  1182. font-size: 14px;
  1183. font-weight: normal;
  1184. line-height: 1.5;
  1185. color: rgba(0, 0, 0, 45%);
  1186. &.noFont {
  1187. font-family: initial;
  1188. }
  1189. &.textLeft {
  1190. text-align: left;
  1191. }
  1192. &.wordBlank {
  1193. color: rgba(0, 0, 0, 85%);
  1194. }
  1195. }
  1196. &.NNPE-chs {
  1197. display: flex;
  1198. flex-flow: wrap;
  1199. align-items: center;
  1200. font-family: '楷体';
  1201. font-size: 20px;
  1202. line-height: 1.4;
  1203. color: rgba(0, 0, 0, 45%);
  1204. .active {
  1205. color: #de4444;
  1206. }
  1207. &.wordBlank {
  1208. color: rgba(0, 0, 0, 85%);
  1209. }
  1210. }
  1211. // &.padding {
  1212. // padding-right: 6px;
  1213. // }
  1214. }
  1215. }
  1216. &.textLeft {
  1217. text-align: left;
  1218. }
  1219. &.textCenter {
  1220. text-align: center;
  1221. .NNPE-chs {
  1222. justify-content: center;
  1223. }
  1224. }
  1225. &.textRight {
  1226. text-align: right;
  1227. }
  1228. > span {
  1229. display: block;
  1230. &.NNPE-pinyin {
  1231. height: 20px;
  1232. font-family: 'League';
  1233. font-size: 14px;
  1234. font-weight: normal;
  1235. line-height: 1.5;
  1236. color: rgba(0, 0, 0, 45%);
  1237. &.noFont {
  1238. font-family: initial;
  1239. }
  1240. &.textLeft {
  1241. text-align: left;
  1242. }
  1243. &.wordBlank {
  1244. color: rgba(0, 0, 0, 85%);
  1245. }
  1246. }
  1247. &.NNPE-chs {
  1248. display: flex;
  1249. flex-flow: wrap;
  1250. align-items: center;
  1251. font-family: '楷体';
  1252. font-size: 20px;
  1253. line-height: 1.4;
  1254. color: rgba(0, 0, 0, 45%);
  1255. .active {
  1256. color: #de4444;
  1257. }
  1258. &.wordBlank {
  1259. color: rgba(0, 0, 0, 85%);
  1260. }
  1261. }
  1262. &.padding {
  1263. padding: 0 3px;
  1264. }
  1265. }
  1266. }
  1267. }
  1268. .Soundrecord-content {
  1269. display: flex;
  1270. align-items: center;
  1271. justify-content: space-between;
  1272. margin-top: 8px;
  1273. &-inner {
  1274. display: flex;
  1275. align-items: center;
  1276. justify-content: flex-start;
  1277. // width: 304px;
  1278. padding: 4px 12px;
  1279. background: #fff;
  1280. border: 1px solid rgba(0, 0, 0, 10%);
  1281. border-radius: 8px;
  1282. .luyin-box {
  1283. width: 280px;
  1284. // max-width: 280px;
  1285. }
  1286. .compare-box {
  1287. display: flex;
  1288. align-items: center;
  1289. justify-content: center;
  1290. height: 32px;
  1291. }
  1292. }
  1293. .full-screen-icon {
  1294. width: 24px;
  1295. height: 24px;
  1296. cursor: pointer;
  1297. // background: url('@/assets/full-screen-red.png') no-repeat left top;
  1298. // background-size: 100% 100%;
  1299. }
  1300. }
  1301. .enwords {
  1302. padding-left: 3px;
  1303. font-family: 'Helvetica';
  1304. font-size: 14px;
  1305. font-weight: normal;
  1306. line-height: 22px;
  1307. color: rgba(0, 0, 0, 45%);
  1308. word-break: break-word;
  1309. &.wordBlank {
  1310. color: rgba(0, 0, 0, 85%);
  1311. }
  1312. }
  1313. .multilingual-para {
  1314. word-break: break-word;
  1315. &-center {
  1316. text-align: center;
  1317. text-indent: 0;
  1318. }
  1319. }
  1320. }
  1321. </style>