NormalModelChs.vue 81 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121
  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" />
  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>