NormalModelChs.vue 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120
  1. <!-- -->
  2. <template>
  3. <div v-if="curQue" class="NNPE-ArticleView">
  4. <div
  5. v-if="
  6. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  7. config.isHasPY ||
  8. config.isHasEN) &&
  9. curQue.property.mp3_position === 'top'
  10. "
  11. class="aduioLine-box aduioLine-practice-npc"
  12. >
  13. <div class="aduioLine-content">
  14. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  15. <AudioLine
  16. ref="audioLine"
  17. audio-id="artNormalAudio"
  18. :mp3="curQue.mp3_list[0].url"
  19. :get-cur-time="getCurTime"
  20. :duration="curQue.mp3_list[0].media_duration"
  21. :mp3-source="curQue.mp3_list[0].source"
  22. :width="colLength == 2 ? 200 : 700"
  23. :ed="ed"
  24. type="audioLine"
  25. :attrib="attrib"
  26. @emptyEd="emptyEd"
  27. />
  28. </template>
  29. </div>
  30. <div class="aduioLine-right">
  31. <SvgIcon
  32. v-if="config.isHasPY"
  33. icon-class="pin-btn"
  34. size="16"
  35. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  36. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  37. @click="changePinyin"
  38. />
  39. <SvgIcon
  40. v-if="config.isHasEN"
  41. icon-class="en-btn"
  42. size="16"
  43. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  44. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  45. @click="changeEN"
  46. />
  47. </div>
  48. </div>
  49. <template v-if="!config.isHasEN || (config.isHasEN && !config.isShowEN)">
  50. <template v-if="resArr.length > 0">
  51. <div class="NPC-sentences-list">
  52. <div
  53. v-for="(item, index) in resArr"
  54. :key="'detail' + index"
  55. :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
  56. >
  57. <div
  58. class="wordsList-box"
  59. :class="[
  60. curQue.detail[index].paragraphAttr
  61. ? 'wordsList-box-' + curQue.detail[index].paragraphAttr.paragraphAlign
  62. : '',
  63. ]"
  64. >
  65. <img v-if="articleImg[0] && index == 0" :src="articleImg[index]" />
  66. <div :class="[item.isTitle ? 'NNPE-title' : '']">
  67. <div
  68. v-for="(pItem, pIndex) in item.wordsList"
  69. :key="'wordsList' + pIndex"
  70. class="NNPE-words"
  71. :class="[
  72. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  73. pItem.chs == '“' ? 'textRight' : '',
  74. ]"
  75. @click="
  76. handleChangeTime(
  77. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  78. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  79. pItem.articleSentIndex,
  80. )
  81. "
  82. @mouseover="handleMouseover(pItem)"
  83. @mouseleave="handleMouseleave"
  84. >
  85. <template v-if="!pItem.width">
  86. <template v-if="pItem.isShow">
  87. <template
  88. v-if="
  89. item.wordsList[pIndex + 1] &&
  90. item.wordsList[pIndex + 1].chs &&
  91. (chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1 ||
  92. NumberList.indexOf(item.wordsList[pIndex + 1].chs) > -1)
  93. "
  94. >
  95. <span v-if="pItem.leg > 0" class="NNPE-words-box">
  96. <span
  97. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  98. :class="[
  99. 'NNPE-pinyin',
  100. pItem.className ? pItem.className : '',
  101. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  102. ]"
  103. @click.stop="
  104. viewNotes(
  105. $event,
  106. pItem.pinyin,
  107. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  108. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  109. pItem.articleSentIndex,
  110. )
  111. "
  112. :style="{
  113. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  114. height:
  115. attrib && attrib.pinyin_size
  116. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  117. : '22px',
  118. }"
  119. >{{ pItem.pinyin }}</span
  120. >
  121. <span
  122. class="NNPE-chs"
  123. :class="[
  124. item.timeList &&
  125. item.timeList[pItem.sentIndex] &&
  126. curTime >= item.timeList[pItem.sentIndex].bg &&
  127. curTime <= item.timeList[pItem.sentIndex].ed &&
  128. curTime
  129. ? 'active'
  130. : '',
  131. pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
  132. ]"
  133. :style="{
  134. fontFamily: pItem.config.fontFamily,
  135. height:
  136. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  137. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  138. lineHeight:
  139. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  140. display: 'inline-block',
  141. backgroundColor:
  142. item.timeList &&
  143. item.timeList[pItem.sentIndex] &&
  144. curTime >= item.timeList[pItem.sentIndex].bg &&
  145. curTime <= item.timeList[pItem.sentIndex].ed &&
  146. curTime &&
  147. attrib
  148. ? attrib.assist_color
  149. : '',
  150. }"
  151. >
  152. <template>
  153. <span
  154. v-for="(wItem, wIndex) in pItem.leg"
  155. :key="'ci' + wIndex + pIndex + index"
  156. :class="[
  157. isPlaying &&
  158. pItem.chstimeList &&
  159. pItem.chstimeList[wIndex] &&
  160. curTime >= pItem.chstimeList[wIndex].wordBg &&
  161. curTime < item.timeList[pItem.sentIndex].ed
  162. ? 'wordActive'
  163. : '',
  164. ]"
  165. :style="{
  166. color:
  167. isPlaying &&
  168. pItem.chstimeList &&
  169. pItem.chstimeList[wIndex] &&
  170. curTime >= pItem.chstimeList[wIndex].wordBg &&
  171. curTime < item.timeList[pItem.sentIndex].ed &&
  172. attrib
  173. ? attrib.topic_color
  174. : '',
  175. }"
  176. @click.stop="
  177. viewNotes(
  178. $event,
  179. pItem.chs[wIndex],
  180. item.timeList &&
  181. item.timeList[pItem.sentIndex] &&
  182. item.timeList[pItem.sentIndex].bg,
  183. item.timeList &&
  184. item.timeList[pItem.sentIndex] &&
  185. item.timeList[pItem.sentIndex].ed,
  186. pItem.articleSentIndex,
  187. )
  188. "
  189. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  190. >
  191. </template>
  192. </span>
  193. <span
  194. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  195. :class="[
  196. 'NNPE-pinyin',
  197. pItem.className ? pItem.className : '',
  198. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  199. ]"
  200. @click.stop="
  201. viewNotes(
  202. $event,
  203. pItem.pinyin,
  204. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  205. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  206. pItem.articleSentIndex,
  207. )
  208. "
  209. :style="{
  210. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  211. height:
  212. attrib && attrib.pinyin_size
  213. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  214. : '22px',
  215. }"
  216. >{{ pItem.pinyin }}</span
  217. >
  218. </span>
  219. <span class="NNPE-words-box">
  220. <span
  221. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  222. :class="[
  223. 'NNPE-pinyin',
  224. noFont.indexOf(item.wordsList[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  225. ]"
  226. style="text-align: left"
  227. @click.stop="
  228. viewNotes(
  229. $event,
  230. item.wordsList[pIndex + 1].pinyin,
  231. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  232. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  233. pItem.articleSentIndex,
  234. )
  235. "
  236. :style="{
  237. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  238. height:
  239. attrib && attrib.pinyin_size
  240. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  241. : '22px',
  242. }"
  243. >{{ item.wordsList[pIndex + 1].pinyin }}</span
  244. >
  245. <span
  246. class="NNPE-chs"
  247. style="text-align: left"
  248. :class="[
  249. isPlaying &&
  250. item.timeList &&
  251. item.timeList[pItem.sentIndex] &&
  252. curTime >= item.timeList[pItem.sentIndex].bg &&
  253. curTime <= item.timeList[pItem.sentIndex].ed &&
  254. curTime
  255. ? 'active'
  256. : '',
  257. pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
  258. pItem.chstimeList &&
  259. pItem.chstimeList[pItem.leg - 1] &&
  260. curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
  261. curQue.wordTime &&
  262. curTime <= item.timeList[pItem.sentIndex].ed
  263. ? 'wordActive'
  264. : '',
  265. ]"
  266. :style="{
  267. fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
  268. height:
  269. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  270. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  271. lineHeight:
  272. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  273. display: 'inline-block',
  274. width: item.wordsList[pIndex + 1].chs.trim() === '' ? '6px' : '',
  275. backgroundColor:
  276. isPlaying &&
  277. item.timeList &&
  278. item.timeList[pItem.sentIndex] &&
  279. curTime >= item.timeList[pItem.sentIndex].bg &&
  280. curTime <= item.timeList[pItem.sentIndex].ed &&
  281. curTime &&
  282. attrib
  283. ? attrib.assist_color
  284. : '',
  285. color:
  286. pItem.chstimeList &&
  287. pItem.chstimeList[pItem.leg - 1] &&
  288. curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
  289. curQue.wordTime &&
  290. curTime <= item.timeList[pItem.sentIndex].ed &&
  291. attrib
  292. ? attrib.topic_color
  293. : '',
  294. }"
  295. @click.stop="
  296. viewNotes(
  297. $event,
  298. item.wordsList[pIndex + 1].chs,
  299. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  300. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  301. pItem.articleSentIndex,
  302. )
  303. "
  304. >{{
  305. NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) == -1
  306. ? item.wordsList[pIndex + 1].chs
  307. : ''
  308. }}</span
  309. >
  310. <span
  311. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  312. :class="[
  313. 'NNPE-pinyin',
  314. noFont.indexOf(item.wordsList[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  315. ]"
  316. style="text-align: left"
  317. @click.stop="
  318. viewNotes(
  319. $event,
  320. item.wordsList[pIndex + 1].pinyin,
  321. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  322. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  323. pItem.articleSentIndex,
  324. )
  325. "
  326. :style="{
  327. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  328. height:
  329. attrib && attrib.pinyin_size
  330. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  331. : '22px',
  332. }"
  333. >{{ item.wordsList[pIndex + 1].pinyin }}</span
  334. >
  335. </span>
  336. <span
  337. v-if="
  338. item.wordsList[pIndex + 2] &&
  339. item.wordsList[pIndex + 2].chs &&
  340. (chsFhList.indexOf(item.wordsList[pIndex + 2].chs) > -1 ||
  341. NumberList.indexOf(item.wordsList[pIndex + 2].chs) > -1)
  342. "
  343. class="NNPE-words-box"
  344. >
  345. <span
  346. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  347. :class="[
  348. 'NNPE-pinyin',
  349. noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  350. ]"
  351. style="text-align: left"
  352. @click.stop="
  353. viewNotes(
  354. $event,
  355. item.wordsList[pIndex + 2].pinyin,
  356. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  357. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  358. pItem.articleSentIndex,
  359. )
  360. "
  361. :style="{
  362. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  363. height:
  364. attrib && attrib.pinyin_size
  365. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  366. : '22px',
  367. }"
  368. >{{ item.wordsList[pIndex + 2].pinyin }}</span
  369. >
  370. <span
  371. class="NNPE-chs"
  372. style="text-align: left"
  373. :class="[
  374. isPlaying &&
  375. item.timeList &&
  376. item.timeList[pItem.sentIndex] &&
  377. curTime >= item.timeList[pItem.sentIndex].bg &&
  378. curTime <= item.timeList[pItem.sentIndex].ed &&
  379. curTime
  380. ? 'active'
  381. : '',
  382. pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
  383. pItem.chstimeList &&
  384. pItem.chstimeList[pItem.leg - 1] &&
  385. curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
  386. curQue.wordTime &&
  387. curTime <= item.timeList[pItem.sentIndex].ed
  388. ? 'wordActive'
  389. : '',
  390. ]"
  391. :style="{
  392. fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
  393. height:
  394. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  395. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  396. lineHeight:
  397. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  398. display: 'inline-block',
  399. width: item.wordsList[pIndex + 2].chs.trim() === '' ? '6px' : '',
  400. backgroundColor:
  401. isPlaying &&
  402. item.timeList &&
  403. item.timeList[pItem.sentIndex] &&
  404. curTime >= item.timeList[pItem.sentIndex].bg &&
  405. curTime <= item.timeList[pItem.sentIndex].ed &&
  406. curTime &&
  407. attrib
  408. ? attrib.assist_color
  409. : '',
  410. color:
  411. pItem.chstimeList &&
  412. pItem.chstimeList[pItem.leg - 1] &&
  413. curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
  414. curQue.wordTime &&
  415. curTime <= item.timeList[pItem.sentIndex].ed &&
  416. attrib
  417. ? attrib.topic_color
  418. : '',
  419. }"
  420. @click.stop="
  421. viewNotes(
  422. $event,
  423. item.wordsList[pIndex + 2].chs,
  424. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  425. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  426. pItem.articleSentIndex,
  427. )
  428. "
  429. >{{
  430. NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) == -1
  431. ? item.wordsList[pIndex + 2].chs
  432. : ''
  433. }}</span
  434. >
  435. <span
  436. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  437. :class="[
  438. 'NNPE-pinyin',
  439. noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  440. ]"
  441. style="text-align: left"
  442. @click.stop="
  443. viewNotes(
  444. $event,
  445. item.wordsList[pIndex + 2].pinyin,
  446. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  447. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  448. pItem.articleSentIndex,
  449. )
  450. "
  451. :style="{
  452. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  453. height:
  454. attrib && attrib.pinyin_size
  455. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  456. : '22px',
  457. }"
  458. >{{ item.wordsList[pIndex + 2].pinyin }}</span
  459. >
  460. </span>
  461. </template>
  462. <template v-else>
  463. <span
  464. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  465. class="NNPE-pinyin"
  466. :class="[
  467. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  468. pItem.className ? pItem.className : '',
  469. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  470. ]"
  471. @click.stop="
  472. viewNotes(
  473. $event,
  474. pItem.pinyin,
  475. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  476. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  477. pItem.articleSentIndex,
  478. )
  479. "
  480. :style="{
  481. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  482. height:
  483. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  484. }"
  485. >{{ pItem.pinyin }}</span
  486. >
  487. <span
  488. class="NNPE-chs"
  489. :class="[
  490. item.timeList &&
  491. item.timeList[pItem.sentIndex] &&
  492. curTime >= item.timeList[pItem.sentIndex].bg &&
  493. curTime <= item.timeList[pItem.sentIndex].ed &&
  494. curTime
  495. ? 'active'
  496. : '',
  497. pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
  498. pItem.paraIndex == paraIndex && pItem.sentIndex == sentIndex ? 'overActive' : '',
  499. ]"
  500. :style="{
  501. backgroundColor:
  502. item.timeList &&
  503. item.timeList[pItem.sentIndex] &&
  504. curTime >= item.timeList[pItem.sentIndex].bg &&
  505. curTime <= item.timeList[pItem.sentIndex].ed &&
  506. curTime &&
  507. attrib
  508. ? attrib.assist_color
  509. : '',
  510. }"
  511. >
  512. <template>
  513. <span
  514. v-for="(wItem, wIndex) in pItem.leg"
  515. :key="'ci' + wIndex + pIndex + index"
  516. :class="[
  517. isPlaying &&
  518. pItem.chstimeList &&
  519. pItem.chstimeList[wIndex] &&
  520. curTime >= pItem.chstimeList[wIndex].wordBg &&
  521. curTime < item.timeList[pItem.sentIndex].ed
  522. ? 'wordActive'
  523. : '',
  524. ]"
  525. :style="{
  526. fontFamily: pItem.config.fontFamily,
  527. height:
  528. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  529. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  530. lineHeight:
  531. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  532. display: 'inline-block',
  533. width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
  534. color:
  535. isPlaying &&
  536. pItem.chstimeList &&
  537. pItem.chstimeList[wIndex] &&
  538. curTime >= pItem.chstimeList[wIndex].wordBg &&
  539. curTime < item.timeList[pItem.sentIndex].ed &&
  540. attrib
  541. ? attrib.topic_color
  542. : '',
  543. }"
  544. @click.stop="
  545. viewNotes(
  546. $event,
  547. pItem.chs[wIndex],
  548. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  549. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  550. pItem.articleSentIndex,
  551. )
  552. "
  553. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  554. >
  555. </template>
  556. </span>
  557. <span
  558. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  559. class="NNPE-pinyin"
  560. :class="[
  561. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  562. pItem.className ? pItem.className : '',
  563. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  564. ]"
  565. @click.stop="
  566. viewNotes(
  567. $event,
  568. pItem.pinyin,
  569. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].bg,
  570. item.timeList && item.timeList[pItem.sentIndex] && item.timeList[pItem.sentIndex].ed,
  571. pItem.articleSentIndex,
  572. )
  573. "
  574. :style="{
  575. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  576. height:
  577. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  578. }"
  579. >{{ pItem.pinyin }}</span
  580. >
  581. </template>
  582. </template>
  583. </template>
  584. <template v-else>
  585. <span
  586. :style="{
  587. height: pItem.height + 'px',
  588. width: pItem.width + 'px',
  589. }"
  590. ></span>
  591. </template>
  592. </div>
  593. </div>
  594. <div
  595. v-if="curQue.property.multilingual_position === 'para'"
  596. class="multilingual-para"
  597. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  598. >
  599. {{
  600. curQue.detail[index].multilingualTextList && curQue.detail[index].multilingualTextList[multilingual]
  601. ? curQue.detail[index].multilingualTextList[multilingual].join(' ')
  602. : ''
  603. }}
  604. </div>
  605. <img v-if="articleImg[index + 1]" :src="articleImg[index + 1]" />
  606. </div>
  607. </div>
  608. </div>
  609. </template>
  610. </template>
  611. <template v-else>
  612. <template v-if="resObj">
  613. <!-- -->
  614. <div class="NPC-sentences-list">
  615. <div
  616. v-for="(item, index) in resObj.sentList"
  617. :key="'detail' + index"
  618. :class="['NNPE-detail-box', sentIndex == index ? 'active' : '']"
  619. >
  620. <div
  621. :class="['NNPE-details']"
  622. @click="
  623. handleChangeTime(
  624. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  625. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  626. index,
  627. )
  628. "
  629. >
  630. <div
  631. v-if="item.enwords && config.isShowEN && curQue.enPosition && curQue.enPosition == 'top'"
  632. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  633. >
  634. {{ item.enwords }}
  635. </div>
  636. <div style="overflow: hidden; clear: both"></div>
  637. <div
  638. v-for="(pItem, pIndex) in item.sentArr"
  639. :key="'wordsList' + pIndex"
  640. class="NNPE-words"
  641. :class="[
  642. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  643. pItem.chs == '“' ? 'textRight' : '',
  644. ]"
  645. >
  646. <template v-if="!pItem.width">
  647. <template v-if="pItem.isShow">
  648. <template
  649. v-if="
  650. item.sentArr[pIndex + 1] &&
  651. item.sentArr[pIndex + 1].chs &&
  652. (chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1 ||
  653. NumberList.indexOf(item.sentArr[pIndex + 1].chs) > -1)
  654. "
  655. >
  656. <span class="NNPE-words-box">
  657. <template v-if="curQue.property.pinyin_position == 'top'">
  658. <span
  659. v-if="config.isShowPY"
  660. class="NNPE-pinyin"
  661. :class="[
  662. pItem.className ? pItem.className : '',
  663. sentIndex == index ? 'wordBlank' : '',
  664. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  665. ]"
  666. @click.stop="
  667. viewNotes(
  668. $event,
  669. pItem.pinyin,
  670. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  671. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  672. index,
  673. )
  674. "
  675. :style="{
  676. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  677. height:
  678. attrib && attrib.pinyin_size
  679. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  680. : '22px',
  681. }"
  682. >{{ pItem.pinyin }}</span
  683. >
  684. </template>
  685. <span
  686. class="NNPE-chs"
  687. :class="[
  688. pItem.padding && config.isShowPY ? 'padding' : '',
  689. sentIndex == index ? 'wordBlank' : '',
  690. ]"
  691. >
  692. <template>
  693. <span
  694. v-for="(wItem, wIndex) in pItem.leg"
  695. :key="'ci' + wIndex + pIndex + index"
  696. :class="[
  697. pItem.timeList[wIndex] &&
  698. curTime >= pItem.timeList[wIndex].wordBg &&
  699. curTime <= curQue.wordTime[index].ed &&
  700. curTime
  701. ? 'active'
  702. : '',
  703. sentIndex == index ? 'wordBlank' : '',
  704. ]"
  705. :style="{
  706. fontFamily: pItem.config.fontFamily,
  707. height:
  708. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  709. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  710. lineHeight:
  711. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  712. display: 'inline-block',
  713. width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
  714. }"
  715. @click.stop="
  716. viewNotes(
  717. $event,
  718. pItem.chs[wIndex],
  719. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  720. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  721. index,
  722. )
  723. "
  724. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  725. >
  726. </template>
  727. </span>
  728. <template v-if="curQue.property.pinyin_position == 'bottom'">
  729. <span
  730. v-if="config.isShowPY"
  731. class="NNPE-pinyin"
  732. :class="[
  733. pItem.className ? pItem.className : '',
  734. sentIndex == index ? 'wordBlank' : '',
  735. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  736. ]"
  737. @click.stop="
  738. viewNotes(
  739. $event,
  740. pItem.pinyin,
  741. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  742. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  743. index,
  744. )
  745. "
  746. :style="{
  747. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  748. height:
  749. attrib && attrib.pinyin_size
  750. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  751. : '22px',
  752. }"
  753. >{{ pItem.pinyin }}</span
  754. >
  755. </template>
  756. </span>
  757. <span class="NNPE-words-box">
  758. <template v-if="curQue.property.pinyin_position == 'top'">
  759. <span
  760. v-if="config.isShowPY"
  761. :class="[
  762. 'NNPE-pinyin',
  763. sentIndex == index ? 'wordBlank' : '',
  764. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  765. ]"
  766. style="text-align: left"
  767. @click.stop="
  768. viewNotes(
  769. $event,
  770. item.sentArr[pIndex + 1].pinyin,
  771. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  772. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  773. index,
  774. )
  775. "
  776. :style="{
  777. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  778. height:
  779. attrib && attrib.pinyin_size
  780. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  781. : '22px',
  782. }"
  783. >{{ item.sentArr[pIndex + 1].pinyin }}</span
  784. >
  785. </template>
  786. <span
  787. class="NNPE-chs"
  788. style="text-align: left"
  789. :style="{
  790. height:
  791. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  792. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  793. lineHeight:
  794. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  795. }"
  796. >
  797. <span
  798. :class="[
  799. pItem.timeList[pItem.leg - 1] &&
  800. curQue.wordTime &&
  801. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  802. curTime <= curQue.wordTime[index].ed &&
  803. curTime
  804. ? 'active'
  805. : '',
  806. sentIndex == index ? 'wordBlank' : '',
  807. ]"
  808. :style="{
  809. fontFamily: item.sentArr[pIndex + 1].config.fontFamily,
  810. height:
  811. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  812. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  813. lineHeight:
  814. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  815. display: 'inline-block',
  816. width: item.sentArr[pIndex + 1].chs.trim() === '' ? '6px' : '',
  817. }"
  818. @click.stop="
  819. viewNotes(
  820. $event,
  821. item.sentArr[pIndex + 1].chs,
  822. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  823. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  824. index,
  825. )
  826. "
  827. >
  828. {{
  829. NumberList.indexOf(item.sentArr[pIndex + 1].pinyin) == -1
  830. ? item.sentArr[pIndex + 1].chs
  831. : ''
  832. }}</span
  833. >
  834. </span>
  835. <template v-if="curQue.property.pinyin_position == 'bottom'">
  836. <span
  837. v-if="config.isShowPY"
  838. :class="[
  839. 'NNPE-pinyin',
  840. sentIndex == index ? 'wordBlank' : '',
  841. noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1 ? 'noFont' : '',
  842. ]"
  843. style="text-align: left"
  844. @click.stop="
  845. viewNotes(
  846. $event,
  847. item.sentArr[pIndex + 1].pinyin,
  848. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  849. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  850. index,
  851. )
  852. "
  853. :style="{
  854. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  855. height:
  856. attrib && attrib.pinyin_size
  857. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  858. : '22px',
  859. }"
  860. >{{ item.sentArr[pIndex + 1].pinyin }}</span
  861. >
  862. </template>
  863. </span>
  864. <span
  865. v-if="
  866. item.sentArr[pIndex + 2] &&
  867. item.sentArr[pIndex + 2].chs &&
  868. chsFhList.indexOf(item.sentArr[pIndex + 2].chs) > -1
  869. "
  870. class="NNPE-words-box"
  871. >
  872. <template v-if="curQue.property.pinyin_position == 'top'">
  873. <span
  874. v-if="config.isShowPY"
  875. :class="[
  876. 'NNPE-pinyin',
  877. sentIndex == index ? 'wordBlank' : '',
  878. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  879. ]"
  880. style="text-align: left"
  881. @click.stop="
  882. viewNotes(
  883. $event,
  884. item.sentArr[pIndex + 2].pinyin,
  885. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  886. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  887. index,
  888. )
  889. "
  890. :style="{
  891. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  892. height:
  893. attrib && attrib.pinyin_size
  894. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  895. : '22px',
  896. }"
  897. >{{ item.sentArr[pIndex + 2].pinyin }}</span
  898. >
  899. </template>
  900. <span class="NNPE-chs" style="text-align: left">
  901. <span
  902. :class="[
  903. pItem.timeList[pItem.leg - 1] &&
  904. curQue.wordTime &&
  905. curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
  906. curTime <= curQue.wordTime[index].ed &&
  907. curTime
  908. ? 'active'
  909. : '',
  910. sentIndex == index ? 'wordBlank' : '',
  911. ]"
  912. :style="{
  913. fontFamily: item.sentArr[pIndex + 2].config.fontFamily,
  914. height:
  915. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  916. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  917. lineHeight:
  918. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  919. display: 'inline-block',
  920. width: item.sentArr[pIndex + 2].chs.trim() === '' ? '6px' : '',
  921. }"
  922. @click.stop="
  923. viewNotes(
  924. $event,
  925. item.sentArr[pIndex + 2].chs,
  926. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  927. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  928. index,
  929. )
  930. "
  931. >
  932. {{
  933. NumberList.indexOf(item.sentArr[pIndex + 2].pinyin) == -1
  934. ? item.sentArr[pIndex + 2].chs
  935. : ''
  936. }}</span
  937. >
  938. </span>
  939. <template v-if="curQue.property.pinyin_position == 'bottom'">
  940. <span
  941. v-if="config.isShowPY"
  942. :class="[
  943. 'NNPE-pinyin',
  944. sentIndex == index ? 'wordBlank' : '',
  945. noFont.indexOf(item.sentArr[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  946. ]"
  947. style="text-align: left"
  948. @click.stop="
  949. viewNotes(
  950. $event,
  951. item.sentArr[pIndex + 2].pinyin,
  952. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  953. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  954. index,
  955. )
  956. "
  957. :style="{
  958. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  959. height:
  960. attrib && attrib.pinyin_size
  961. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  962. : '22px',
  963. }"
  964. >{{ item.sentArr[pIndex + 2].pinyin }}</span
  965. >
  966. </template>
  967. </span>
  968. </template>
  969. <template v-else>
  970. <template v-if="curQue.property.pinyin_position == 'top'">
  971. <span
  972. v-if="config.isShowPY"
  973. class="NNPE-pinyin"
  974. :class="[
  975. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  976. pItem.className ? pItem.className : '',
  977. sentIndex == index ? 'wordBlank' : '',
  978. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  979. ]"
  980. @click.stop="
  981. viewNotes(
  982. $event,
  983. pItem.pinyin,
  984. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  985. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  986. index,
  987. )
  988. "
  989. :style="{
  990. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  991. height:
  992. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  993. }"
  994. >{{ pItem.pinyin }}</span
  995. >
  996. </template>
  997. <span
  998. class="NNPE-chs"
  999. :class="[
  1000. pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
  1001. sentIndex == index ? 'wordBlank' : '',
  1002. ]"
  1003. :style="{
  1004. height: attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  1005. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  1006. lineHeight:
  1007. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  1008. }"
  1009. >
  1010. <template>
  1011. <span
  1012. v-for="(wItem, wIndex) in pItem.leg"
  1013. :key="'ci' + wIndex + pIndex + index"
  1014. :class="[
  1015. pItem.timeList[wIndex] &&
  1016. curQue.wordTime &&
  1017. curQue.wordTime[index] &&
  1018. curTime >= pItem.timeList[wIndex].wordBg &&
  1019. curTime <= curQue.wordTime[index].ed
  1020. ? 'active'
  1021. : '',
  1022. sentIndex == index ? 'wordBlank' : '',
  1023. ]"
  1024. :style="{
  1025. fontFamily: pItem.config.fontFamily,
  1026. height:
  1027. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  1028. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  1029. lineHeight:
  1030. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  1031. display: 'inline-block',
  1032. width: pItem.chs[wIndex].trim() === '' ? '6px' : '',
  1033. }"
  1034. @click.stop="
  1035. viewNotes(
  1036. $event,
  1037. pItem.chs[wIndex],
  1038. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  1039. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  1040. index,
  1041. )
  1042. "
  1043. >{{ NumberList.indexOf(pItem.pinyin) == -1 ? pItem.chs[wIndex] : '' }}</span
  1044. >
  1045. </template>
  1046. </span>
  1047. <template v-if="curQue.property.pinyin_position == 'bottom'">
  1048. <span
  1049. v-if="config.isShowPY"
  1050. class="NNPE-pinyin"
  1051. :class="[
  1052. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  1053. pItem.className ? pItem.className : '',
  1054. sentIndex == index ? 'wordBlank' : '',
  1055. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  1056. ]"
  1057. @click.stop="
  1058. viewNotes(
  1059. $event,
  1060. pItem.pinyin,
  1061. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].bg,
  1062. curQue.wordTime && curQue.wordTime[index] && curQue.wordTime[index].ed,
  1063. index,
  1064. )
  1065. "
  1066. :style="{
  1067. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  1068. height:
  1069. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  1070. }"
  1071. >{{ pItem.pinyin }}</span
  1072. >
  1073. </template>
  1074. </template>
  1075. </template>
  1076. </template>
  1077. <template v-else>
  1078. <span
  1079. :style="{
  1080. height: pItem.height + 'px',
  1081. width: pItem.width + 'px',
  1082. }"
  1083. ></span>
  1084. </template>
  1085. </div>
  1086. <div style="overflow: hidden; clear: both"></div>
  1087. <div
  1088. v-if="
  1089. item.enwords &&
  1090. config.isShowEN &&
  1091. (!curQue.enPosition || (curQue.enPosition && curQue.enPosition == 'bottom'))
  1092. "
  1093. :class="['enwords', sentIndex == index ? 'wordBlank' : '']"
  1094. >
  1095. {{ item.enwords }}
  1096. </div>
  1097. </div>
  1098. <div
  1099. v-if="curQue.property.multilingual_position === 'para'"
  1100. class="multilingual-para"
  1101. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  1102. >
  1103. {{ multilingualTextList[multilingual] ? multilingualTextList[multilingual].join(' ') : '' }}
  1104. </div>
  1105. </div>
  1106. </div>
  1107. </template>
  1108. </template>
  1109. <template v-for="(items, indexs) in curQue.detail">
  1110. <div
  1111. v-if="
  1112. curQue.property.multilingual_position === 'all' &&
  1113. items.multilingualTextList &&
  1114. items.multilingualTextList[multilingual] &&
  1115. items.multilingualTextList[multilingual].length > 0
  1116. "
  1117. :key="indexs"
  1118. class="multilingual"
  1119. >
  1120. <div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
  1121. {{
  1122. items.multilingualTextList && items.multilingualTextList[multilingual]
  1123. ? items.multilingualTextList[multilingual].join(' ')
  1124. : ''
  1125. }}
  1126. </div>
  1127. </div>
  1128. </template>
  1129. <div
  1130. v-if="
  1131. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  1132. config.isHasPY ||
  1133. config.isHasEN) &&
  1134. curQue.property.mp3_position === 'bottom'
  1135. "
  1136. class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
  1137. >
  1138. <div class="aduioLine-content">
  1139. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  1140. <AudioLine
  1141. ref="audioLine"
  1142. audio-id="artNormalAudio"
  1143. :mp3="curQue.mp3_list[0].url"
  1144. :get-cur-time="getCurTime"
  1145. :duration="curQue.mp3_list[0].media_duration"
  1146. :mp3-source="curQue.mp3_list[0].source"
  1147. :width="colLength == 2 ? 200 : 700"
  1148. :ed="ed"
  1149. type="audioLine"
  1150. :attrib="attrib"
  1151. @emptyEd="emptyEd"
  1152. />
  1153. </template>
  1154. </div>
  1155. <div class="aduioLine-right">
  1156. <SvgIcon
  1157. v-if="config.isHasPY"
  1158. icon-class="pin-btn"
  1159. size="16"
  1160. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  1161. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  1162. @click="changePinyin"
  1163. />
  1164. <SvgIcon
  1165. v-if="config.isHasEN"
  1166. icon-class="en-btn"
  1167. size="16"
  1168. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  1169. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  1170. @click="changeEN"
  1171. />
  1172. </div>
  1173. </div>
  1174. <template v-if="isNoteShow">
  1175. <div
  1176. ref="notecard"
  1177. class="NNPE-noteDetail"
  1178. :style="{
  1179. marginLeft: windowWidth > 642 ? '-321px' : '0px',
  1180. left: windowWidth > 642 ? '' : '0px',
  1181. }"
  1182. >
  1183. <Notecard :item="curNoteCon" :change-card="changeCard" :attrib="attrib" />
  1184. </div>
  1185. </template>
  1186. </div>
  1187. </template>
  1188. <script>
  1189. import AudioLine from '../voice_matrix/components/AudioLine.vue';
  1190. import Notecard from './components/Notecard.vue';
  1191. export default {
  1192. name: 'NormalModelChs',
  1193. components: {
  1194. AudioLine,
  1195. Notecard,
  1196. },
  1197. props: ['curQue', 'noFont', 'config', 'NNPEAnnotationList', 'colLength', 'themeColor', 'multilingual', 'attrib'],
  1198. data() {
  1199. return {
  1200. resArr: [],
  1201. resObj: null,
  1202. curTime: 0, // 单位s
  1203. chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '#', '、'],
  1204. enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
  1205. NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
  1206. newWords: ['鱼', '辩礼义'],
  1207. oldHz: '',
  1208. hz: '',
  1209. top: 0,
  1210. left: 0,
  1211. articleImg: {}, // 文章图片
  1212. paraIndex: -1, // 段落索引
  1213. sentIndex: -1, // 句子索引
  1214. ed: undefined,
  1215. noteNum: '',
  1216. curNoteCon: null,
  1217. isNoteShow: false,
  1218. oldNoteNum: '',
  1219. clientY: 0,
  1220. contentWidth: 732,
  1221. windowWidth: window.innerWidth,
  1222. };
  1223. },
  1224. computed: {
  1225. isPlaying() {
  1226. let playing = false;
  1227. if (this.$refs.audioLine) {
  1228. playing = this.$refs.audioLine.audio.isPlaying;
  1229. }
  1230. return playing;
  1231. },
  1232. },
  1233. watch: {
  1234. noteNum: {
  1235. handler(val, oldVal) {
  1236. let _this = this;
  1237. if (val) {
  1238. _this.handleNote(val);
  1239. }
  1240. },
  1241. // 深度观察监听
  1242. deep: true,
  1243. },
  1244. isNoteShow: {
  1245. handler(val, oldVal) {
  1246. let _this = this;
  1247. if (val) {
  1248. setTimeout(() => {
  1249. _this.cardHeight = _this.$refs.notecard.offsetHeight;
  1250. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  1251. _this.top = _this.clientY + 20;
  1252. } else {
  1253. _this.top = _this.clientY - _this.cardHeight - 30;
  1254. }
  1255. }, 50);
  1256. }
  1257. },
  1258. // 深度观察监听
  1259. deep: true,
  1260. },
  1261. curQue: {
  1262. handler(val, oldVal) {
  1263. if (val) {
  1264. this.handleData();
  1265. }
  1266. },
  1267. // 深度观察监听
  1268. deep: true,
  1269. },
  1270. },
  1271. // 生命周期 - 创建完成(可以访问当前this实例)
  1272. created() {},
  1273. // 生命周期 - 挂载完成(可以访问DOM元素)
  1274. mounted() {
  1275. if (this.curQue) {
  1276. this.handleData();
  1277. }
  1278. },
  1279. beforeCreate() {}, // 生命周期 - 创建之前
  1280. beforeMount() {}, // 生命周期 - 挂载之前
  1281. beforeUpdate() {}, // 生命周期 - 更新之前
  1282. updated() {}, // 生命周期 - 更新之后
  1283. beforeDestroy() {}, // 生命周期 - 销毁之前
  1284. destroyed() {}, // 生命周期 - 销毁完成
  1285. activated() {},
  1286. // 方法集合
  1287. methods: {
  1288. // 拼音的显示和隐藏
  1289. changePinyin() {
  1290. if (this.config.isHasPY) {
  1291. this.$emit('changeConfig', 'isShowPY');
  1292. }
  1293. },
  1294. // 英文的显示和隐藏
  1295. changeEN() {
  1296. if (this.config.isHasEN) {
  1297. this.$emit('changeConfig', 'isShowEN');
  1298. }
  1299. },
  1300. getCurTime(curTime) {
  1301. this.curTime = curTime * 1000;
  1302. this.getSentIndex(this.curTime);
  1303. },
  1304. getSentIndex(curTime) {
  1305. if (this.curQue.wordTime) {
  1306. for (let i = 0; i < this.curQue.wordTime.length; i++) {
  1307. let bg = this.curQue.wordTime[i].bg;
  1308. let ed = this.curQue.wordTime[i].ed;
  1309. if (curTime >= bg && curTime <= ed) {
  1310. this.sentIndex = i;
  1311. break;
  1312. }
  1313. }
  1314. }
  1315. },
  1316. handleData() {
  1317. let resArr = [];
  1318. let curQue = JSON.parse(JSON.stringify(this.curQue));
  1319. let wordTimeList = curQue.wordTime;
  1320. let asIndex = 0;
  1321. let dhaspinyin = false; // 每段是否有拼音
  1322. curQue.detail.forEach((dItem, dIndex) => {
  1323. dhaspinyin = false;
  1324. let paraArr = [];
  1325. if (!dItem.isTitle) {
  1326. paraArr = [
  1327. {
  1328. pinyin: '',
  1329. chs: '',
  1330. width: 20,
  1331. height: 20,
  1332. },
  1333. {
  1334. width: 20,
  1335. height: 20,
  1336. pinyin: '',
  1337. chs: '',
  1338. },
  1339. ];
  1340. }
  1341. dItem.wordsList.forEach((sItem, sIndex) => {
  1342. let sentArr = [];
  1343. sItem.forEach((wItem, wIndex) => {
  1344. let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
  1345. let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  1346. this.mergeWordSymbol(wItem);
  1347. let obj = {
  1348. paraIndex: dIndex, // 段落索引
  1349. sentIndex: sIndex, // 在段落中句子索引
  1350. articleSentIndex: asIndex, // 在文章中句子索引
  1351. wordIndex: wIndex, // 单词的索引
  1352. pinyin:
  1353. curQue.pinyin_type === 'pinyin'
  1354. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  1355. ? wItem.pinyin_up
  1356. : wItem.pinyin
  1357. : wItem.pinyin_tone,
  1358. chs: wItem.chs,
  1359. padding: true, // wItem.padding,
  1360. className: wItem.className,
  1361. isShow: wItem.isShow,
  1362. isNewWord: this.newWords.indexOf(wItem.chs) > -1,
  1363. startIndex,
  1364. endIndex,
  1365. leg: wItem.chs.length,
  1366. config: {
  1367. fontFamily: wItem.fontFamily,
  1368. },
  1369. };
  1370. if (wordTimeList && wordTimeList.length > 0) {
  1371. obj.chstimeList = wordTimeList[asIndex].wordsResultList.slice(startIndex, endIndex);
  1372. }
  1373. sentArr.push(obj);
  1374. paraArr.push(obj);
  1375. if (wIndex == sItem.length - 1) {
  1376. asIndex++;
  1377. }
  1378. if (wItem.pinyin) dhaspinyin = true;
  1379. });
  1380. });
  1381. let curSentencesLeg = dItem.sentences.length;
  1382. let startLeg = dIndex == 0 ? 0 : curQue.detail[dIndex - 1].endLeg;
  1383. let endLeg = startLeg + curSentencesLeg;
  1384. dItem.endLeg = endLeg;
  1385. let timeList = curQue.wordTime ? curQue.wordTime.slice(startLeg, endLeg) : [];
  1386. let paraObj = {
  1387. wordsList: paraArr,
  1388. timeList,
  1389. isTitle: dItem.isTitle,
  1390. dhaspinyin,
  1391. enwords: dItem.sentencesEn ? dItem.sentencesEn : [],
  1392. };
  1393. resArr.push(paraObj);
  1394. });
  1395. this.resArr = resArr;
  1396. // 循环文章图片
  1397. if (curQue.img_list) {
  1398. curQue.img_list.forEach((item) => {
  1399. this.articleImg[item.imgNumber] = item.id;
  1400. });
  1401. }
  1402. let resArrs = [];
  1403. let sentArrTotal = [];
  1404. let timeArr = [];
  1405. curQue.detail.forEach((dItem, dIndex) => {
  1406. dItem.wordsList.forEach((sItem, sIndex) => {
  1407. let sentArr = [];
  1408. sItem.forEach((wItem, wIndex) => {
  1409. let startIndex = wIndex == 0 ? 0 : sentArr[wIndex - 1].startIndex + sentArr[wIndex - 1].chs.length;
  1410. let endIndex = wIndex == 0 ? wItem.chs.length : sentArr[wIndex - 1].endIndex + wItem.chs.length;
  1411. // this.judgePad(sItem, wItem, wIndex);
  1412. this.mergeWordSymbol(wItem);
  1413. let obj = {
  1414. paraIndex: dIndex, // 段落索引
  1415. sentIndex: sIndex, // 在段落中句子索引
  1416. wordIndex: wIndex, // 单词的索引
  1417. pinyin:
  1418. curQue.pinyin_type === 'pinyin'
  1419. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  1420. ? wItem.pinyin_up
  1421. : wItem.pinyin
  1422. : wItem.pinyin_tone,
  1423. chs: wItem.chs,
  1424. padding: true,
  1425. className: wItem.className,
  1426. isShow: wItem.isShow,
  1427. startIndex,
  1428. endIndex,
  1429. leg: wItem.chs.length,
  1430. timeList: [],
  1431. };
  1432. sentArr.push(obj);
  1433. });
  1434. let objs = {
  1435. sentArr,
  1436. enwords: dItem.sentencesEn && dItem.sentencesEn[sIndex] && dItem.sentencesEn[sIndex].replace(/\'/g, '’'),
  1437. };
  1438. sentArrTotal.push(sentArr);
  1439. resArrs.push(objs);
  1440. });
  1441. timeArr.push(dItem.timeList);
  1442. });
  1443. if (wordTimeList && wordTimeList.length > 0) {
  1444. this.mergeWordTime(sentArrTotal, wordTimeList);
  1445. }
  1446. let timeList = [];
  1447. timeArr.forEach((item) => {
  1448. item.forEach((aItem) => {
  1449. if (timeList.indexOf(aItem) < 0) {
  1450. timeList.push(aItem);
  1451. }
  1452. });
  1453. });
  1454. this.resObj = { sentList: resArrs, timeList };
  1455. },
  1456. mergeWordTime(resArr, wordTimeList) {
  1457. resArr.forEach((item, index) => {
  1458. let wordsResultList = wordTimeList[index].wordsResultList;
  1459. item.forEach((wItem) => {
  1460. let startIndex = wItem.startIndex;
  1461. let endIndex = wItem.endIndex;
  1462. wItem.timeList = wordsResultList.slice(startIndex, endIndex);
  1463. });
  1464. });
  1465. },
  1466. // 词和标点合一起
  1467. mergeWordSymbol(wItem) {
  1468. if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.chs) > -1) {
  1469. wItem.isShow = false;
  1470. } else {
  1471. wItem.isShow = true;
  1472. }
  1473. },
  1474. // 判断是否有padding
  1475. judgePad(sItem, wItem, curIndex) {
  1476. let leg = sItem.length;
  1477. if (curIndex < leg - 1) {
  1478. let nextIndex = curIndex + 1;
  1479. let chs = sItem[nextIndex].chs;
  1480. if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
  1481. wItem.padding = false;
  1482. } else {
  1483. wItem.padding = true;
  1484. }
  1485. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  1486. wItem.className = 'textLeft';
  1487. }
  1488. }
  1489. },
  1490. // 点击播放某个句子
  1491. handleChangeTime(time, ed, index) {
  1492. this.sentIndex = index;
  1493. if (time) {
  1494. this.curTime = time;
  1495. this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
  1496. this.ed = ed;
  1497. }
  1498. },
  1499. emptyEd() {
  1500. this.ed = undefined;
  1501. },
  1502. // 经过每个词,高亮句子
  1503. handleMouseover(pItem) {
  1504. this.paraIndex = pItem.paraIndex;
  1505. this.sentIndex = pItem.sentIndex;
  1506. },
  1507. handleMouseleave() {
  1508. this.paraIndex = -1;
  1509. this.sentIndex = -1;
  1510. },
  1511. viewNotes(e, noteNum, time, ed, index) {
  1512. let _this = this;
  1513. let noteIndex = '';
  1514. if (_this.NumberList.indexOf(noteNum) > -1) {
  1515. for (let i = 0; i < _this.NumberList.length; i++) {
  1516. if (_this.NumberList[i] === noteNum) {
  1517. noteIndex = `${String(i)}`;
  1518. break;
  1519. }
  1520. }
  1521. } else {
  1522. _this.handleChangeTime(time, ed, index);
  1523. }
  1524. if (noteIndex) {
  1525. this.showNoteDetail(e, noteIndex);
  1526. }
  1527. },
  1528. showNoteDetail(e, noteNum) {
  1529. let _this = this;
  1530. // if (_this.oldNoteNum != noteNum) {
  1531. this.isNoteShow = false;
  1532. setTimeout(() => {
  1533. _this.noteNum = noteNum;
  1534. }, 50);
  1535. // }
  1536. _this.clientY = e.clientY;
  1537. let left = e.clientX;
  1538. let width = 642;
  1539. if (left - this.bodyLeft > this.contentWidth / 2) {
  1540. _this.left = 500;
  1541. } else if (left - 200 > 500) {
  1542. _this.left = 500;
  1543. } else {
  1544. _this.left = left - 200;
  1545. }
  1546. if (_this.oldNoteNum === noteNum) {
  1547. _this.handleNote(noteNum);
  1548. }
  1549. },
  1550. // 处理分词数据
  1551. handleNote(val) {
  1552. let _this = this;
  1553. _this.isNoteShow = true;
  1554. _this.oldNoteNum = val;
  1555. let noteIndex = Number(val);
  1556. if (_this.NNPEAnnotationList && _this.NNPEAnnotationList.length > 0) {
  1557. _this.curNoteCon = _this.NNPEAnnotationList[noteIndex] ? _this.NNPEAnnotationList[noteIndex] : null;
  1558. }
  1559. },
  1560. changeCard(isShow) {
  1561. let _this = this;
  1562. _this.isNoteShow = isShow;
  1563. _this.oldNoteNum = '';
  1564. _this.noteNum = '';
  1565. },
  1566. }, // 如果页面有keep-alive缓存功能,这个函数会触发
  1567. };
  1568. </script>
  1569. <style lang="scss" scoped>
  1570. //@import url(); 引入公共css类
  1571. .NNPE-ArticleView {
  1572. width: 100%;
  1573. .aduioLine-practice-npc {
  1574. display: flex;
  1575. align-items: center;
  1576. justify-content: flex-start;
  1577. .aduioLine-content {
  1578. flex: 1;
  1579. }
  1580. .aduioLine-right {
  1581. box-sizing: border-box;
  1582. display: flex;
  1583. align-items: center;
  1584. justify-content: space-between;
  1585. width: 69px;
  1586. height: 40px;
  1587. padding: 0 12px;
  1588. border-left: 1px solid rgba(0, 0, 0, 10%);
  1589. .svg-icon {
  1590. width: 16px;
  1591. height: 16px;
  1592. cursor: pointer;
  1593. }
  1594. }
  1595. }
  1596. .NPC-sentences-list {
  1597. padding: 24px 0;
  1598. color: rgba(0, 0, 0, 85%);
  1599. }
  1600. .NNPE-detail {
  1601. overflow: hidden;
  1602. clear: both;
  1603. .NNPE-words {
  1604. float: left;
  1605. padding-bottom: 5px;
  1606. &-box {
  1607. float: left;
  1608. > span {
  1609. display: block;
  1610. &.NNPE-pinyin {
  1611. height: 22px;
  1612. font-family: 'League';
  1613. font-size: 14px;
  1614. font-weight: normal;
  1615. line-height: 1.5;
  1616. color: #000;
  1617. &.noFont {
  1618. font-family: initial;
  1619. }
  1620. &.textLeft {
  1621. text-align: left;
  1622. }
  1623. &.textRight {
  1624. text-align: right;
  1625. }
  1626. }
  1627. &.NNPE-chs {
  1628. display: flex;
  1629. flex-flow: wrap;
  1630. font-family: '楷体';
  1631. font-size: 20px;
  1632. line-height: 1.4;
  1633. color: #000;
  1634. &.overActive {
  1635. background: rgba(0, 0, 0, 6%);
  1636. }
  1637. &.active {
  1638. background: rgba(222, 68, 68, 15%);
  1639. }
  1640. &.wordActive {
  1641. color: rgba(222, 68, 68, 100%);
  1642. }
  1643. .wordActive {
  1644. color: rgba(222, 68, 68, 100%);
  1645. }
  1646. }
  1647. &.padding {
  1648. padding: 0 3px;
  1649. }
  1650. }
  1651. }
  1652. &.textLeft {
  1653. text-align: left;
  1654. }
  1655. &.textCenter {
  1656. text-align: center;
  1657. .NNPE-chs {
  1658. justify-content: center;
  1659. }
  1660. }
  1661. &.textRight {
  1662. text-align: right;
  1663. }
  1664. > span {
  1665. display: block;
  1666. &.NNPE-pinyin {
  1667. height: 22px;
  1668. font-family: 'League';
  1669. font-size: 14px;
  1670. font-weight: normal;
  1671. line-height: 1.5;
  1672. color: #000;
  1673. &.noFont {
  1674. font-family: initial;
  1675. }
  1676. &.textLeft {
  1677. text-align: left;
  1678. }
  1679. &.textRight {
  1680. text-align: right;
  1681. }
  1682. }
  1683. &.NNPE-chs {
  1684. display: flex;
  1685. flex-flow: wrap;
  1686. font-family: '楷体';
  1687. font-size: 20px;
  1688. line-height: 1.4;
  1689. color: #000;
  1690. &.overActive {
  1691. background: rgba(0, 0, 0, 6%);
  1692. }
  1693. &.active {
  1694. background: rgba(222, 68, 68, 15%);
  1695. }
  1696. &.wordActive {
  1697. color: rgba(222, 68, 68, 100%);
  1698. }
  1699. .wordActive {
  1700. color: rgba(222, 68, 68, 100%);
  1701. }
  1702. }
  1703. &.padding {
  1704. padding: 0 3px;
  1705. }
  1706. }
  1707. }
  1708. &.NNPE-detail-title {
  1709. .NNPE-title {
  1710. margin: 0 auto;
  1711. }
  1712. .wordsList-box {
  1713. > div {
  1714. display: flex;
  1715. flex-flow: wrap;
  1716. justify-content: center;
  1717. }
  1718. }
  1719. }
  1720. .index {
  1721. box-sizing: border-box;
  1722. width: 48px;
  1723. padding: 8px;
  1724. text-align: right;
  1725. border-right: 1px solid rgba(0, 0, 0, 10%);
  1726. b {
  1727. font-weight: 400;
  1728. line-height: 1.5;
  1729. color: #000;
  1730. }
  1731. }
  1732. .wordsList-box {
  1733. // display: flex;
  1734. width: 100%;
  1735. padding: 6px 24px 12px;
  1736. &-left {
  1737. justify-content: flex-start;
  1738. }
  1739. &-center {
  1740. justify-content: center;
  1741. }
  1742. &-right {
  1743. justify-content: flex-end;
  1744. }
  1745. > div {
  1746. overflow: hidden;
  1747. clear: both;
  1748. }
  1749. > img {
  1750. display: block;
  1751. max-width: 100%;
  1752. margin: 8px auto;
  1753. }
  1754. }
  1755. }
  1756. .NNPE-noteDetail {
  1757. position: fixed;
  1758. top: 50%;
  1759. left: 50%;
  1760. z-index: 9999;
  1761. max-width: 100%;
  1762. margin-top: -196px;
  1763. overflow: auto;
  1764. box-shadow: 0 4px 16px rgba(0, 0, 0, 15%);
  1765. }
  1766. .NNPE-detail-box {
  1767. box-sizing: border-box;
  1768. width: 100%;
  1769. padding: 8px 24px;
  1770. margin-bottom: 8px;
  1771. &.active {
  1772. background: rgba(222, 68, 68, 15%);
  1773. }
  1774. }
  1775. .NNPE-details {
  1776. overflow: hidden;
  1777. clear: both;
  1778. .NNPE-words {
  1779. float: left;
  1780. &-box {
  1781. float: left;
  1782. > span {
  1783. display: block;
  1784. &.NNPE-pinyin {
  1785. height: 20px;
  1786. font-family: 'League';
  1787. font-size: 14px;
  1788. font-weight: normal;
  1789. line-height: 20px;
  1790. color: rgba(0, 0, 0, 100%);
  1791. &.noFont {
  1792. font-family: initial;
  1793. }
  1794. &.textLeft {
  1795. text-align: left;
  1796. }
  1797. &.wordBlank {
  1798. color: rgba(0, 0, 0, 100%);
  1799. }
  1800. }
  1801. &.NNPE-chs {
  1802. display: flex;
  1803. flex-flow: wrap;
  1804. font-family: '楷体';
  1805. font-size: 20px;
  1806. line-height: 28px;
  1807. color: rgba(0, 0, 0, 100%);
  1808. .active {
  1809. color: #de4444;
  1810. }
  1811. &.wordBlank {
  1812. color: rgba(0, 0, 0, 100%);
  1813. }
  1814. }
  1815. // &.padding {
  1816. // padding-right: 6px;
  1817. // }
  1818. }
  1819. }
  1820. &.textLeft {
  1821. text-align: left;
  1822. }
  1823. &.textCenter {
  1824. text-align: center;
  1825. .NNPE-chs {
  1826. justify-content: center;
  1827. }
  1828. }
  1829. &.textRight {
  1830. text-align: right;
  1831. }
  1832. > span {
  1833. display: block;
  1834. &.NNPE-pinyin {
  1835. height: 20px;
  1836. font-family: 'League';
  1837. font-size: 14px;
  1838. font-weight: normal;
  1839. line-height: 20px;
  1840. color: rgba(0, 0, 0, 100%);
  1841. &.noFont {
  1842. font-family: initial;
  1843. }
  1844. &.textLeft {
  1845. text-align: left;
  1846. }
  1847. &.wordBlank {
  1848. color: rgba(0, 0, 0, 100%);
  1849. }
  1850. }
  1851. &.NNPE-chs {
  1852. display: flex;
  1853. flex-flow: wrap;
  1854. font-family: '楷体';
  1855. font-size: 20px;
  1856. line-height: 28px;
  1857. color: rgba(0, 0, 0, 100%);
  1858. .active {
  1859. color: #de4444;
  1860. }
  1861. &.wordBlank {
  1862. color: rgba(0, 0, 0, 100%);
  1863. }
  1864. }
  1865. &.padding {
  1866. padding: 0 3px;
  1867. }
  1868. }
  1869. }
  1870. }
  1871. .enwords {
  1872. padding-left: 3px;
  1873. font-family: 'Helvetica';
  1874. font-size: 14px;
  1875. font-weight: normal;
  1876. line-height: 22px;
  1877. color: rgba(0, 0, 0, 100%);
  1878. word-break: break-word;
  1879. &.wordBlank {
  1880. color: rgba(0, 0, 0, 100%);
  1881. }
  1882. }
  1883. .multilingual {
  1884. padding: 6px 24px 12px;
  1885. word-break: break-word;
  1886. }
  1887. .multilingual-para {
  1888. text-indent: 40px;
  1889. word-break: break-word;
  1890. &-center {
  1891. text-align: center;
  1892. text-indent: 0;
  1893. }
  1894. }
  1895. }
  1896. .NPC-Big-Book-preview-green {
  1897. .NNPE-ArticleView {
  1898. .NNPE-detail-box {
  1899. &.active {
  1900. background: rgba(36, 185, 158, 15%);
  1901. }
  1902. }
  1903. .NNPE-detail {
  1904. .NNPE-words {
  1905. &-box {
  1906. > span {
  1907. &.NNPE-chs {
  1908. &.active {
  1909. background: rgba(36, 185, 158, 15%);
  1910. }
  1911. &.wordActive {
  1912. color: rgba(36, 185, 158, 100%);
  1913. }
  1914. .wordActive {
  1915. color: rgba(36, 185, 158, 100%);
  1916. }
  1917. }
  1918. }
  1919. }
  1920. > span {
  1921. &.NNPE-chs {
  1922. &.active {
  1923. background: rgba(36, 185, 158, 15%);
  1924. }
  1925. &.wordActive {
  1926. color: rgba(36, 185, 158, 100%);
  1927. }
  1928. .wordActive {
  1929. color: rgba(36, 185, 158, 100%);
  1930. }
  1931. }
  1932. }
  1933. }
  1934. }
  1935. .NNPE-details {
  1936. .NNPE-words {
  1937. &-box {
  1938. > span {
  1939. &.NNPE-chs {
  1940. .active {
  1941. color: #24b99e;
  1942. }
  1943. }
  1944. }
  1945. }
  1946. > span {
  1947. &.NNPE-chs {
  1948. .active {
  1949. color: #24b99e;
  1950. }
  1951. }
  1952. }
  1953. }
  1954. }
  1955. }
  1956. }
  1957. .NPC-Big-Book-preview-brown {
  1958. .NNPE-ArticleView {
  1959. .NNPE-detail-box {
  1960. &.active {
  1961. background: rgba(189, 136, 101, 15%);
  1962. }
  1963. }
  1964. .NNPE-detail {
  1965. .NNPE-words {
  1966. &-box {
  1967. > span {
  1968. &.NNPE-chs {
  1969. &.active {
  1970. background: rgba(189, 136, 101, 15%);
  1971. }
  1972. &.wordActive {
  1973. color: rgba(189, 136, 101, 100%);
  1974. }
  1975. .wordActive {
  1976. color: rgba(189, 136, 101, 100%);
  1977. }
  1978. }
  1979. }
  1980. }
  1981. > span {
  1982. &.NNPE-chs {
  1983. &.active {
  1984. background: rgba(189, 136, 101, 15%);
  1985. }
  1986. &.wordActive {
  1987. color: rgba(189, 136, 101, 100%);
  1988. }
  1989. .wordActive {
  1990. color: rgba(189, 136, 101, 100%);
  1991. }
  1992. }
  1993. }
  1994. }
  1995. }
  1996. .NNPE-details {
  1997. .NNPE-words {
  1998. &-box {
  1999. > span {
  2000. &.NNPE-chs {
  2001. .active {
  2002. color: #bd8865;
  2003. }
  2004. }
  2005. }
  2006. }
  2007. > span {
  2008. &.NNPE-chs {
  2009. .active {
  2010. color: #bd8865;
  2011. }
  2012. }
  2013. }
  2014. }
  2015. }
  2016. }
  2017. }
  2018. </style>