NotesModelChs.vue 78 KB

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