NormalModelChs.vue 81 KB

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