PhraseModelChs.vue 74 KB

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