NotesModelChs.vue 78 KB

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