WordModelChs.vue 81 KB

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