PhraseModelChs.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406
  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="diaPhraAudio"
  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 : isPhone ? 200 : 790"
  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. <!-- <span :class="['EN-16', config.isShowEN ? '' : 'disabled']" @click="changeEN" v-if="config.isHasEN"></span> -->
  42. <SvgIcon
  43. v-if="config.isHasEN"
  44. icon-class="en-btn"
  45. size="16"
  46. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  47. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  48. @click="changeEN"
  49. />
  50. </div>
  51. </div>
  52. <template v-if="resArr.length > 0">
  53. <div class="NPC-sentences-list">
  54. <div class="NPC-article-empty">
  55. <div :class="['empty-left', isHasRemark ? 'hasRemark' : '']"></div>
  56. <div class="empty-right"></div>
  57. </div>
  58. <p v-if="curQue.notice" :class="['notice', isHasRemark ? 'hasRemark' : '']">
  59. {{ curQue.notice }}
  60. </p>
  61. <div
  62. v-for="(item, index) in resArr"
  63. :key="'detail' + index"
  64. :class="['NNPE-detail', item.isTitle ? 'NNPE-detail-title' : '']"
  65. >
  66. <div :class="['article-content', isHasRemark ? 'hasRemark' : '']">
  67. <RoleChs :cur-role="item.roleDetail" :type="curQue.property.role_img_type" />
  68. <div class="wordsList-box">
  69. <img v-if="articleImg[0] && index == 0" :src="articleImg[index]" />
  70. <!-- <div class="roleDetail" v-if="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0">
  71. <span class="pinyin">{{ item.roleDetail.detail.wordsList | handlePinyin }}</span>
  72. <span class="chs">{{ item.roleDetail.detail.wordsList | handleChs }}</span>
  73. </div> -->
  74. <div v-if="item.roleDetail.fullName || item.roleDetail.fullPinyin" class="roleDetail">
  75. <span class="chs">{{ item.roleDetail.fullName }}</span>
  76. <span class="pinyin">{{ item.roleDetail.fullPinyin }}</span>
  77. </div>
  78. <div class="para-con" :style="{ background: item.roleDetail.color.bg }">
  79. <div
  80. v-if="config.isShowEN && item.enwords && curQue.enPosition && curQue.enPosition == 'top'"
  81. class="enwords"
  82. >
  83. {{ item.enwords }}
  84. </div>
  85. <div style="overflow: hidden; clear: both"></div>
  86. <div
  87. v-for="(pItem, pIndex) in item.wordsList"
  88. :key="'wordsList' + pIndex"
  89. class="NNPE-words"
  90. :class="[
  91. pItem.chs != '“' && pItem.wordIndex == 0 ? 'textLeft' : 'textCenter',
  92. pItem.chs == '“' ? 'textRight' : '',
  93. ]"
  94. @click="showWordDetail($event, pItem.chs, pItem.words)"
  95. >
  96. <template v-if="!pItem.width">
  97. <template v-if="pItem.isShow">
  98. <template
  99. v-if="
  100. item.wordsList[pIndex + 1] &&
  101. item.wordsList[pIndex + 1].chs &&
  102. (chsFhList.indexOf(item.wordsList[pIndex + 1].chs) > -1 ||
  103. NumberList.indexOf(item.wordsList[pIndex + 1].chs) > -1)
  104. "
  105. >
  106. <span class="NNPE-words-box">
  107. <span
  108. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  109. class="NNPE-pinyin"
  110. :class="[
  111. pItem.className ? pItem.className : '',
  112. noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
  113. ]"
  114. @click.stop="viewNotes($event, pItem.pinyin)"
  115. :style="{
  116. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  117. height:
  118. attrib && attrib.pinyin_size
  119. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  120. : '22px',
  121. }"
  122. >{{ NumberList.indexOf(pItem.pinyin) === -1 ? pItem.pinyin : '' }}</span
  123. >
  124. <span
  125. class="NNPE-chs"
  126. :class="[
  127. newWordList.indexOf(pItem.chs) > -1 ? 'newActive' : '',
  128. pItem.words ? 'newActive' : '',
  129. ]"
  130. :style="{
  131. fontFamily: pItem.config.fontFamily,
  132. height:
  133. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  134. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  135. lineHeight:
  136. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  137. color:
  138. newWordList.indexOf(pItem.chs) > -1 || pItem.words
  139. ? attrib
  140. ? attrib.topic_color
  141. : ''
  142. : '',
  143. }"
  144. @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs)"
  145. >{{ pItem.chs }}</span
  146. >
  147. <span
  148. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  149. class="NNPE-pinyin"
  150. :class="[
  151. pItem.className ? pItem.className : '',
  152. noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
  153. ]"
  154. @click.stop="viewNotes($event, pItem.pinyin)"
  155. :style="{
  156. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  157. height:
  158. attrib && attrib.pinyin_size
  159. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  160. : '22px',
  161. }"
  162. >{{ NumberList.indexOf(pItem.pinyin) === -1 ? pItem.pinyin : '' }}</span
  163. >
  164. </span>
  165. <span class="NNPE-words-box">
  166. <span
  167. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  168. class="NNPE-pinyin"
  169. style="text-align: left"
  170. :class="[noFont.indexOf(item.wordsList[pIndex + 1].pinyin) > -1 ? 'noFont' : '']"
  171. @click.stop="viewNotes($event, item.wordsList[pIndex + 1].pinyin)"
  172. :style="{
  173. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  174. height:
  175. attrib && attrib.pinyin_size
  176. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  177. : '22px',
  178. }"
  179. >{{
  180. NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) === -1
  181. ? item.wordsList[pIndex + 1].pinyin
  182. : ''
  183. }}</span
  184. >
  185. <span
  186. class="NNPE-chs"
  187. style="text-align: left"
  188. :style="{
  189. fontFamily: item.wordsList[pIndex + 1].config.fontFamily,
  190. height:
  191. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  192. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  193. lineHeight:
  194. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  195. }"
  196. @click.stop="
  197. viewNotes(
  198. $event,
  199. item.wordsList[pIndex + 1].words
  200. ? item.wordsList[pIndex + 1].words
  201. : item.wordsList[pIndex + 1].chs,
  202. )
  203. "
  204. >{{ item.wordsList[pIndex + 1].chs }}</span
  205. >
  206. <span
  207. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  208. class="NNPE-pinyin"
  209. :class="[noFont.indexOf(item.wordsList[pIndex + 1].pinyin) > -1 ? 'noFont' : '']"
  210. style="text-align: left"
  211. @click.stop="viewNotes($event, item.wordsList[pIndex + 1].pinyin)"
  212. :style="{
  213. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  214. height:
  215. attrib && attrib.pinyin_size
  216. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  217. : '22px',
  218. }"
  219. >{{
  220. NumberList.indexOf(item.wordsList[pIndex + 1].pinyin) === -1
  221. ? item.wordsList[pIndex + 1].pinyin
  222. : ''
  223. }}</span
  224. >
  225. </span>
  226. <span
  227. v-if="
  228. item.wordsList[pIndex + 2] &&
  229. item.wordsList[pIndex + 2].chs &&
  230. (chsFhList.indexOf(item.wordsList[pIndex + 2].chs) > -1 ||
  231. NumberList.indexOf(item.wordsList[pIndex + 2].chs) > -1)
  232. "
  233. class="NNPE-words-box"
  234. >
  235. <span
  236. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  237. :class="[
  238. 'NNPE-pinyin',
  239. noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  240. ]"
  241. style="text-align: left"
  242. :style="{
  243. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  244. height:
  245. attrib && attrib.pinyin_size
  246. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  247. : '22px',
  248. }"
  249. @click.stop="viewNotes($event, item.wordsList[pIndex + 2].pinyin)"
  250. >{{
  251. NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) === -1
  252. ? item.wordsList[pIndex + 2].pinyin
  253. : ''
  254. }}</span
  255. >
  256. <span
  257. class="NNPE-chs"
  258. style="text-align: left"
  259. :class="[
  260. pItem.chstimeList &&
  261. pItem.chstimeList[pItem.leg - 1] &&
  262. curTime >= pItem.chstimeList[pItem.leg - 1].wordBg &&
  263. curQue.wordTime &&
  264. curTime <= item.timeList[pItem.sentIndex].ed
  265. ? 'wordActive'
  266. : '',
  267. ]"
  268. :style="{
  269. fontFamily: item.wordsList[pIndex + 2].config.fontFamily,
  270. height:
  271. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  272. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  273. lineHeight:
  274. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  275. }"
  276. @click.stop="
  277. viewNotes(
  278. $event,
  279. item.wordsList[pIndex + 2].words
  280. ? item.wordsList[pIndex + 2].words
  281. : item.wordsList[pIndex + 2].chs,
  282. )
  283. "
  284. >{{ item.wordsList[pIndex + 2].chs }}</span
  285. >
  286. <span
  287. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  288. :class="[
  289. 'NNPE-pinyin',
  290. noFont.indexOf(item.wordsList[pIndex + 2].pinyin) > -1 ? 'noFont' : '',
  291. ]"
  292. style="text-align: left"
  293. :style="{
  294. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  295. height:
  296. attrib && attrib.pinyin_size
  297. ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt'
  298. : '22px',
  299. }"
  300. @click.stop="viewNotes($event, item.wordsList[pIndex + 2].pinyin)"
  301. >{{
  302. NumberList.indexOf(item.wordsList[pIndex + 2].pinyin) === -1
  303. ? item.wordsList[pIndex + 2].pinyin
  304. : ''
  305. }}</span
  306. >
  307. </span>
  308. </template>
  309. <template v-else>
  310. <span
  311. v-if="curQue.property.pinyin_position == 'top' && config.isShowPY && item.dhaspinyin"
  312. class="NNPE-pinyin"
  313. :class="[
  314. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  315. pItem.className ? pItem.className : '',
  316. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  317. ]"
  318. :style="{
  319. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  320. height:
  321. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  322. }"
  323. @click.stop="viewNotes($event, pItem.pinyin)"
  324. >{{ NumberList.indexOf(pItem.pinyin) === -1 ? pItem.pinyin : '' }}</span
  325. >
  326. <span
  327. v-if="pItem.chs != '#'"
  328. class="NNPE-chs"
  329. :class="[
  330. newWordList.indexOf(pItem.chs) > -1 ? 'newActive' : '',
  331. pItem.chs != '“' && pItem.padding && config.isShowPY ? 'padding' : '',
  332. pItem.words ? 'newActive' : '',
  333. ]"
  334. :style="{
  335. fontFamily: pItem.config.fontFamily,
  336. height:
  337. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  338. fontSize: attrib && attrib.font_size ? attrib.font_size : '20px',
  339. lineHeight:
  340. attrib && attrib.font_size ? attrib.font_size.replace('pt', '') * 1.4 + 'pt' : '28px',
  341. color:
  342. newWordList.indexOf(pItem.chs) > -1 || pItem.words
  343. ? attrib
  344. ? attrib.topic_color
  345. : ''
  346. : '',
  347. }"
  348. @click.stop="viewNotes($event, pItem.words ? pItem.words : pItem.chs)"
  349. >{{ pItem.chs }}</span
  350. >
  351. <span
  352. v-if="curQue.property.pinyin_position == 'bottom' && config.isShowPY && item.dhaspinyin"
  353. class="NNPE-pinyin"
  354. :class="[
  355. pItem.chs != '“' && pItem.padding ? 'padding' : '',
  356. pItem.className ? pItem.className : '',
  357. noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
  358. ]"
  359. :style="{
  360. fontSize: attrib && attrib.pinyin_size ? attrib.pinyin_size : '14px',
  361. height:
  362. attrib && attrib.pinyin_size ? attrib.pinyin_size.replace('pt', '') * 1.5 + 'pt' : '22px',
  363. }"
  364. @click.stop="viewNotes($event, pItem.pinyin)"
  365. >{{ NumberList.indexOf(pItem.pinyin) === -1 ? pItem.pinyin : '' }}</span
  366. >
  367. </template>
  368. </template>
  369. </template>
  370. <template v-else>
  371. <span
  372. :style="{
  373. height: pItem.height + 'px',
  374. width: pItem.width + 'px',
  375. }"
  376. ></span>
  377. </template>
  378. </div>
  379. <div style="overflow: hidden; clear: both"></div>
  380. <div
  381. v-if="
  382. config.isShowEN &&
  383. item.enwords &&
  384. (!curQue.enPosition || (curQue.enPosition && curQue.enPosition == 'bottom'))
  385. "
  386. class="enwords"
  387. >
  388. {{ item.enwords }}
  389. </div>
  390. <div
  391. v-if="curQue.property.multilingual_position === 'para'"
  392. class="multilingual-para"
  393. :class="[item.isTitle ? 'multilingual-para-center' : '']"
  394. >
  395. {{
  396. curQue.detail[index].multilingualTextList && curQue.detail[index].multilingualTextList[multilingual]
  397. ? curQue.detail[index].multilingualTextList[multilingual].join(' ')
  398. : ''
  399. }}
  400. </div>
  401. </div>
  402. <img v-if="articleImg[index + 1]" :src="articleImg[index + 1]" />
  403. </div>
  404. </div>
  405. <div class="remarkBox remark-top">
  406. <RemarkChs
  407. :remark-detail="item.remarkDetail"
  408. :margin-top="item.roleDetail.detail && item.roleDetail.detail.wordsList.length > 0 ? 44 : 8"
  409. />
  410. </div>
  411. </div>
  412. <div class="NPC-article-empty NPC-article-empty-bottom">
  413. <div :class="['empty-left', isHasRemark ? 'hasRemark' : '']"></div>
  414. <div class="empty-right"></div>
  415. </div>
  416. <template v-for="(items, indexs) in curQue.detail">
  417. <div
  418. v-if="
  419. curQue.property.multilingual_position === 'all' &&
  420. items.multilingualTextList &&
  421. items.multilingualTextList[multilingual] &&
  422. items.multilingualTextList[multilingual].length > 0
  423. "
  424. :key="indexs"
  425. class="multilingual"
  426. >
  427. <div class="multilingual-para" :class="[items.isTitle ? 'multilingual-para-center' : '']">
  428. {{
  429. items.multilingualTextList && items.multilingualTextList[multilingual]
  430. ? items.multilingualTextList[multilingual].join(' ')
  431. : ''
  432. }}
  433. </div>
  434. </div>
  435. </template>
  436. <div v-if="1 == 2" class="dia-article-record">
  437. <Soundrecord type="promax" class="luyin-box" @handleWav="handleWav" />
  438. </div>
  439. </div>
  440. </template>
  441. <div
  442. v-if="
  443. ((curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url) ||
  444. config.isHasPY ||
  445. config.isHasEN) &&
  446. curQue.property.mp3_position === 'bottom'
  447. "
  448. class="aduioLine-box aduioLine-practice-npc aduioLine-box-bottom"
  449. >
  450. <div class="aduioLine-content">
  451. <template v-if="curQue.mp3_list && curQue.mp3_list.length > 0 && curQue.mp3_list[0].url">
  452. <AudioLine
  453. ref="audioLine"
  454. audio-id="diaPhraAudio"
  455. :mp3="curQue.mp3_list[0].url"
  456. :get-cur-time="getCurTime"
  457. :mp3-source="curQue.mp3_list[0].source"
  458. :width="colLength == 2 ? 200 : isPhone ? 200 : 790"
  459. :attrib="attrib"
  460. />
  461. </template>
  462. </div>
  463. <div class="aduioLine-right">
  464. <SvgIcon
  465. v-if="config.isHasPY"
  466. icon-class="pin-btn"
  467. size="16"
  468. :class="['pinyin-16', config.isShowPY ? '' : 'disabled']"
  469. :style="{ color: config.isShowPY ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  470. @click="changePinyin"
  471. />
  472. <SvgIcon
  473. v-if="config.isHasEN"
  474. icon-class="en-btn"
  475. size="16"
  476. :class="['EN-16', config.isShowEN ? '' : 'disabled']"
  477. :style="{ color: config.isShowEN ? (attrib ? attrib.topic_color : '') : '#DCDFE6' }"
  478. @click="changeEN"
  479. />
  480. </div>
  481. </div>
  482. <template v-if="isShow">
  483. <div
  484. ref="dialogueWordcard"
  485. class="NNPE-wordDetail"
  486. :style="{
  487. marginLeft:
  488. word.detail.new_word.length === 1
  489. ? '-152px'
  490. : windowWidth > word.detail.new_word.length * 126 + 48
  491. ? '-' + (word.detail.new_word.length * 63 + 24) + 'px'
  492. : '0px',
  493. left: windowWidth > word.detail.new_word.length * 126 + 48 ? '' : '0px',
  494. }"
  495. >
  496. <Wordcard
  497. :word="word"
  498. :change-word-card="changeWordCard"
  499. :theme-color="attrib ? attrib.topic_color : '#e35454'"
  500. :current-tree-i-d="currentTreeID"
  501. :TaskModel="TaskModel"
  502. :write-list="curQue.Bookanswer.writeModel"
  503. :mp3-url="wordPlayMp3"
  504. :bg="wordbgs"
  505. :ed="wordeds"
  506. :attrib="attrib"
  507. @changeCurQue="changeCurQue"
  508. />
  509. </div>
  510. </template>
  511. <template v-if="isNoteShow">
  512. <div
  513. ref="dialogueNotecard"
  514. class="NNPE-wordDetail NNPE-noteDetail"
  515. :style="{
  516. marginLeft: windowWidth > 642 ? '-321px' : '0px',
  517. left: windowWidth > 642 ? '' : '0px',
  518. }"
  519. >
  520. <Notecard :item="curNoteCon" :change-card="changeCard" :attrib="attrib" />
  521. </div>
  522. </template>
  523. </div>
  524. </template>
  525. <script>
  526. import { timeStrToSen } from '@/utils/transform';
  527. import AudioLine from '../voice_matrix/components/AudioLine.vue';
  528. import Wordcard from '../article/components/Wordcard.vue'; // 卡片
  529. import Notecard from '../article/components/Notecard.vue'; // 注释
  530. import RoleChs from './RoleChs.vue';
  531. import RemarkChs from './RemarkChs.vue';
  532. import Soundrecord from '../../common/SoundRecord.vue';
  533. export default {
  534. name: 'PhraseModelChs',
  535. components: {
  536. AudioLine,
  537. Wordcard,
  538. RoleChs,
  539. RemarkChs,
  540. Soundrecord,
  541. Notecard,
  542. },
  543. filters: {
  544. handlePinyin(wordsList) {
  545. let str = '';
  546. wordsList.forEach((item, index) => {
  547. if (index < wordsList.length - 1) {
  548. str += `${item.pinyin} `;
  549. } else {
  550. str += item.pinyin;
  551. }
  552. });
  553. return str;
  554. },
  555. handleChs(wordsList) {
  556. let str = '';
  557. wordsList.forEach((item, index) => {
  558. if (index < wordsList.length - 1) {
  559. str += `${item.chs} `;
  560. } else {
  561. str += item.chs;
  562. }
  563. });
  564. return str;
  565. },
  566. },
  567. props: [
  568. 'curQue',
  569. 'bodyLeft',
  570. 'NNPENewWordList',
  571. 'NNPEAnnotationList',
  572. 'colorBox',
  573. 'attrib',
  574. 'noFont',
  575. 'currentTreeID',
  576. 'config',
  577. 'TaskModel',
  578. 'colLength',
  579. 'NpcNewWordMp3',
  580. 'isPhone',
  581. 'multilingual',
  582. ],
  583. data() {
  584. return {
  585. resArr: [],
  586. curTime: 0, // 单位s
  587. chsFhList: [',', '。', '”', ':', '》', '?', '!', ';', '#', '、'],
  588. enFhList: [',', '.', ';', '?', '!', ':', '>', '<'],
  589. NumberList: ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳'],
  590. newWords: ['鱼', '辩礼义'],
  591. oldHz: '',
  592. hz: '',
  593. clientY: '',
  594. top: 0,
  595. left: 0,
  596. articleImg: {}, // 文章图片
  597. newWordList: [],
  598. word: null,
  599. isShow: false,
  600. screenHeight: 0,
  601. cardHeight: 0,
  602. isHasRemark: false,
  603. clickType: '',
  604. isNoteShow: false,
  605. noteNum: '',
  606. oldNoteNum: '',
  607. curNoteCon: null,
  608. contentWidth: 732,
  609. highWords: null,
  610. highWordsArr: [],
  611. highIndex: 0,
  612. wordbgs: 0,
  613. wordeds: 0,
  614. wordPlayMp3: '',
  615. windowWidth: window.innerWidth,
  616. };
  617. },
  618. computed: {},
  619. watch: {
  620. hz: {
  621. handler(val, oldVal) {
  622. let _this = this;
  623. if (val) {
  624. _this.handleNewWords(val, _this.top, _this.left);
  625. }
  626. },
  627. // 深度观察监听
  628. deep: true,
  629. },
  630. isShow: {
  631. handler(val, oldVal) {
  632. let _this = this;
  633. if (val) {
  634. setTimeout(() => {
  635. _this.cardHeight = _this.$refs.dialogueWordcard.offsetHeight;
  636. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  637. _this.top = _this.clientY + 20;
  638. } else {
  639. _this.top = _this.clientY - _this.cardHeight - 30;
  640. }
  641. }, 50);
  642. }
  643. },
  644. // 深度观察监听
  645. deep: true,
  646. },
  647. noteNum: {
  648. handler(val, oldVal) {
  649. let _this = this;
  650. if (val) {
  651. _this.handleNote(val);
  652. }
  653. },
  654. // 深度观察监听
  655. deep: true,
  656. },
  657. isNoteShow: {
  658. handler(val, oldVal) {
  659. let _this = this;
  660. if (val) {
  661. setTimeout(() => {
  662. _this.cardHeight = _this.$refs.dialogueNotecard.offsetHeight;
  663. if (_this.screenHeight - _this.clientY > _this.cardHeight) {
  664. _this.top = _this.clientY + 20;
  665. } else {
  666. _this.top = _this.clientY - _this.cardHeight - 30;
  667. }
  668. }, 50);
  669. }
  670. },
  671. // 深度观察监听
  672. deep: true,
  673. },
  674. },
  675. // 生命周期 - 创建完成(可以访问当前this实例)
  676. created() {},
  677. // 生命周期 - 挂载完成(可以访问DOM元素)
  678. mounted() {
  679. if (this.NNPENewWordList && this.NNPENewWordList.length > 0) {
  680. this.handleNewword();
  681. }
  682. if (this.curQue) {
  683. this.handleData();
  684. }
  685. window.addEventListener('resize', this.getScreenHeight);
  686. this.getScreenHeight();
  687. },
  688. beforeCreate() {}, // 生命周期 - 创建之前
  689. beforeMount() {}, // 生命周期 - 挂载之前
  690. beforeUpdate() {}, // 生命周期 - 更新之前
  691. updated() {}, // 生命周期 - 更新之后
  692. beforeDestroy() {
  693. window.removeEventListener('resize', this.getScreenHeight);
  694. }, // 生命周期 - 销毁之前
  695. destroyed() {}, // 生命周期 - 销毁完成
  696. activated() {},
  697. // 方法集合
  698. methods: {
  699. // 拼音的显示和隐藏
  700. changePinyin() {
  701. if (this.config.isHasPY) {
  702. this.$emit('changeConfig', 'isShowPY');
  703. }
  704. },
  705. // 英文的显示和隐藏
  706. changeEN() {
  707. if (this.config.isHasEN) {
  708. this.$emit('changeConfig', 'isShowEN');
  709. }
  710. },
  711. handleWav() {},
  712. getCurTime(curTime) {
  713. this.curTime = curTime;
  714. },
  715. handleData() {
  716. let resArr = [];
  717. let leg = this.curQue.detail.length;
  718. let curQue = JSON.parse(JSON.stringify(this.curQue));
  719. let dhaspinyin = false; // 每段是否有拼音
  720. curQue.detail.forEach((dItem, dIndex) => {
  721. dhaspinyin = false;
  722. let roleDetail = this.getRole(dItem);
  723. let remarkDetail = dItem.remark;
  724. if (
  725. remarkDetail &&
  726. (remarkDetail.chs || remarkDetail.en || (remarkDetail.img_list && remarkDetail.img_list.length > 0))
  727. ) {
  728. this.isHasRemark = true;
  729. }
  730. let paraArr = [];
  731. dItem.wordsList.forEach((sItem, sIndex) => {
  732. let sentence = dItem.sentences[sIndex];
  733. sItem.forEach((wItem, wIndex) => {
  734. // this.judgePad(sItem, wItem, wIndex);
  735. this.mergeWordSymbol(wItem);
  736. let words = '';
  737. if (this.newWordList.length > 0) {
  738. if (!this.highWords) {
  739. this.findLightWord(wItem, wIndex, sentence, sItem);
  740. words = this.highWords ? this.highWords.words : '';
  741. } else if (wIndex > this.highWords.endIndex - 1) {
  742. this.highWords = null;
  743. this.findLightWord(wItem, wIndex, sentence, sItem);
  744. words = this.highWords ? this.highWords.words : '';
  745. } else {
  746. words = this.highWords ? this.highWords.words : '';
  747. }
  748. }
  749. let obj = {
  750. paraIndex: dIndex, // 段落索引
  751. sentIndex: sIndex, // 在段落中句子索引
  752. wordIndex: wIndex, // 单词的索引
  753. pinyin:
  754. curQue.pinyin_type === 'pinyin'
  755. ? curQue.property.is_first_sentence_first_hz_pinyin_first_char_upper_case === 'true' && wIndex === 0
  756. ? wItem.pinyin_up
  757. : wItem.pinyin
  758. : wItem.pinyin_tone,
  759. chs: wItem.chs,
  760. padding: true, // wItem.padding,
  761. className: wItem.className,
  762. isShow: wItem.isShow,
  763. words,
  764. isNewWord: this.newWords.indexOf(wItem.chs) > -1,
  765. config: {
  766. fontFamily: wItem.fontFamily,
  767. },
  768. };
  769. paraArr.push(obj);
  770. if (wItem.pinyin) dhaspinyin = true;
  771. });
  772. });
  773. let enwords =
  774. dItem.sentencesEn && dItem.sentencesEn.length > 0 ? dItem.sentencesEn.join(' ').replace(/\\'/g, '’') : '';
  775. let paraObj = {
  776. wordsList: paraArr,
  777. enwords,
  778. roleDetail,
  779. remarkDetail,
  780. dhaspinyin,
  781. };
  782. resArr.push(paraObj);
  783. });
  784. this.resArr = resArr;
  785. // 循环文章图片
  786. if (curQue.img_list) {
  787. curQue.img_list.forEach((item) => {
  788. this.articleImg[item.imgNumber] = item.id;
  789. });
  790. }
  791. },
  792. findLightWord(wItem, startIndex, sentence, sItem) {
  793. let endIndex = 0;
  794. let words = '';
  795. this.newWordList.forEach((item) => {
  796. if (item.length === 1) {
  797. if (item === wItem.chs && !wItem.banLight) {
  798. words = wItem.chs;
  799. endIndex = startIndex + 1;
  800. }
  801. } else if (item[0] === wItem.chs && sentence.indexOf(item) > -1) {
  802. let index = null;
  803. let chsStr = '';
  804. for (let i = startIndex; i < sItem.length + 1; i++) {
  805. index = i;
  806. if (chsStr.length === item.length) {
  807. break;
  808. } else {
  809. chsStr += sItem[i] ? sItem[i].chs : '';
  810. }
  811. }
  812. if (chsStr === item && !wItem.banLight) {
  813. words = item;
  814. endIndex = index;
  815. }
  816. } else if (wItem.new_word && wItem.new_word === item && !wItem.banLight) {
  817. words = item;
  818. endIndex = startIndex + 1;
  819. }
  820. });
  821. if (words) {
  822. this.highWords = { words, endIndex };
  823. } else {
  824. this.highWords = null;
  825. }
  826. },
  827. // 词和标点合一起
  828. mergeWordSymbol(wItem) {
  829. if (this.chsFhList.indexOf(wItem.chs) > -1 || this.NumberList.indexOf(wItem.chs) > -1) {
  830. wItem.isShow = false;
  831. } else {
  832. wItem.isShow = true;
  833. }
  834. },
  835. // 获取角色
  836. getRole(dItem) {
  837. let roleIndex = dItem.roleIndex;
  838. let resObj = null;
  839. let roleList = JSON.parse(JSON.stringify(this.curQue.property.role_list));
  840. for (let i = 0; i < roleList.length; i++) {
  841. let item = roleList[i];
  842. if (item.id === roleIndex) {
  843. resObj = item;
  844. // resObj.color = this.colorBox[i];
  845. break;
  846. }
  847. }
  848. return resObj;
  849. },
  850. // 判断是否有padding
  851. judgePad(sItem, wItem, curIndex) {
  852. let leg = sItem.length;
  853. if (curIndex < leg - 1) {
  854. let nextIndex = curIndex + 1;
  855. let chs = sItem[nextIndex].chs;
  856. if (this.chsFhList.indexOf(chs) > -1 || this.chsFhList.indexOf(wItem.chs) > -1) {
  857. wItem.padding = false;
  858. } else {
  859. wItem.padding = true;
  860. }
  861. if (this.enFhList.indexOf(wItem.pinyin) > -1) {
  862. wItem.className = 'textLeft';
  863. }
  864. }
  865. },
  866. // 转化时间
  867. handleTimeList(list) {
  868. let listRes = [];
  869. list.forEach((item) => {
  870. let res = timeStrToSen(item);
  871. listRes.push(res);
  872. });
  873. return listRes;
  874. },
  875. // 点击播放某个句子
  876. handleChangeTime(time) {
  877. this.curTime = time;
  878. this.$refs.audioLine.onTimeupdateTime(time);
  879. },
  880. handleNewword() {
  881. let NewWordList = [];
  882. this.NNPENewWordList.forEach((wItem) => {
  883. // item.forEach((wItem) => {
  884. if (wItem.new_word) {
  885. NewWordList.push(wItem.new_word);
  886. } else if (wItem.detail && wItem.detail.sentence) {
  887. NewWordList.push(wItem.detail.sentence);
  888. }
  889. // });
  890. });
  891. this.newWordList = JSON.parse(JSON.stringify(NewWordList));
  892. },
  893. showWordDetail(e, word, words) {
  894. let _this = this;
  895. _this.highIndex = 0;
  896. _this.highWordsArr = [];
  897. if (word && this.newWordList.indexOf(word) > -1) {
  898. this.highWordsArr.push(word);
  899. }
  900. if (words && word !== words && this.newWordList.indexOf(words) > -1) {
  901. this.highWordsArr.push(words);
  902. }
  903. if (this.newWordList.indexOf(word) > -1 || this.newWordList.indexOf(words) > -1) {
  904. if (word && this.newWordList.indexOf(word) > -1) {
  905. if (_this.oldHz !== word) {
  906. this.isShow = false;
  907. setTimeout(() => {
  908. _this.hz = word;
  909. }, 50);
  910. }
  911. } else if (words && this.newWordList.indexOf(words) > -1) {
  912. if (_this.oldHz != words) {
  913. this.isShow = false;
  914. setTimeout(() => {
  915. _this.hz = words;
  916. }, 50);
  917. }
  918. }
  919. _this.clientY = e.clientY;
  920. let left = e.clientX;
  921. let width = 0;
  922. if (word.length == 1 || word.length == 2) {
  923. width = 304;
  924. } else if (word.length == 3 || word.length == 4) {
  925. width = 432;
  926. } else if (word.length > 3) {
  927. width = 560;
  928. }
  929. if (left - this.bodyLeft > this.contentWidth / 2) {
  930. _this.left = left - width + 10;
  931. } else {
  932. _this.left = left;
  933. }
  934. }
  935. },
  936. hideWordDetail() {
  937. this.isShow = false;
  938. },
  939. changeWordCard(isShow) {
  940. this.isShow = isShow;
  941. this.oldHz = '';
  942. this.hz = '';
  943. },
  944. // 处理分词数据
  945. handleNewWords(val, top, left) {
  946. this.isShow = true;
  947. this.word = null;
  948. for (let i = 0; i < this.NNPENewWordList.length; i++) {
  949. let pItem = this.NNPENewWordList[i];
  950. // for (let j = 0; j < pItem.length; j++) {
  951. let item = pItem;
  952. if (item.new_word.trim() == val.trim()) {
  953. let wordlist = val.split('');
  954. this.word = JSON.parse(
  955. JSON.stringify({
  956. list: wordlist,
  957. detail: item,
  958. top,
  959. left,
  960. }),
  961. );
  962. break;
  963. }
  964. // }
  965. }
  966. this.oldHz = val;
  967. },
  968. viewNotes(e, noteNum) {
  969. let _this = this;
  970. _this.clickType = 'note';
  971. let noteIndex = '';
  972. _this.wordPlayMp3 = '';
  973. _this.NNPENewWordList.forEach((itemn) => {
  974. // items.forEach((itemn) => {
  975. if (itemn.new_word === noteNum) {
  976. _this.wordbgs = itemn.bg;
  977. _this.wordeds = itemn.ed;
  978. _this.wordPlayMp3 = itemn.newWordMp3;
  979. }
  980. // });
  981. });
  982. if (_this.NumberList.indexOf(noteNum) > -1) {
  983. for (let i = 0; i < _this.NumberList.length; i++) {
  984. if (_this.NumberList[i] == noteNum) {
  985. noteIndex = `${String(i)}`;
  986. break;
  987. }
  988. }
  989. this.showNoteDetail(e, noteIndex);
  990. } else if (this.newWordList.indexOf(noteNum) > -1) {
  991. if (_this.oldHz != noteNum) {
  992. this.isShow = false;
  993. setTimeout(() => {
  994. _this.hz = noteNum;
  995. }, 50);
  996. }
  997. _this.clientY = e.clientY;
  998. let left = e.clientX;
  999. let width = 0;
  1000. if (noteNum.length == 1 || noteNum.length == 2) {
  1001. width = 304;
  1002. } else if (noteNum.length == 3 || noteNum.length == 4) {
  1003. width = 432;
  1004. } else if (noteNum.length > 3) {
  1005. width = 560;
  1006. }
  1007. if (left - this.bodyLeft > this.contentWidth / 2) {
  1008. _this.left = left - width + 10;
  1009. } else {
  1010. _this.left = left;
  1011. }
  1012. }
  1013. },
  1014. showNoteDetail(e, noteNum) {
  1015. let _this = this;
  1016. if (_this.oldNoteNum != noteNum) {
  1017. this.isNoteShow = false;
  1018. setTimeout(() => {
  1019. _this.noteNum = noteNum;
  1020. }, 50);
  1021. }
  1022. _this.clientY = e.clientY;
  1023. let left = e.clientX;
  1024. let width = 642;
  1025. if (left - this.bodyLeft > this.contentWidth / 2) {
  1026. _this.left = left - width + 10;
  1027. } else {
  1028. _this.left = left - 200;
  1029. }
  1030. },
  1031. // 处理注释数据
  1032. handleNote(val) {
  1033. let _this = this;
  1034. _this.isNoteShow = true;
  1035. _this.oldNoteNum = val;
  1036. let noteIndex = Number(val);
  1037. if (_this.NNPEAnnotationList && _this.NNPEAnnotationList.length > 0) {
  1038. _this.curNoteCon = _this.NNPEAnnotationList[noteIndex] ? _this.NNPEAnnotationList[noteIndex] : null;
  1039. }
  1040. },
  1041. changeCard(isShow) {
  1042. let _this = this;
  1043. _this.isNoteShow = isShow;
  1044. _this.oldNoteNum = '';
  1045. _this.noteNum = '';
  1046. },
  1047. getScreenHeight() {
  1048. this.screenHeight = window.innerHeight;
  1049. },
  1050. changeCurQue(answer) {
  1051. if (answer) {
  1052. let writeModel = this.curQue.Bookanswer.writeModel;
  1053. let hz = answer.hz;
  1054. if (writeModel.hasOwnProperty(hz)) {
  1055. writeModel[hz].push(answer);
  1056. } else {
  1057. writeModel[hz] = [answer];
  1058. }
  1059. }
  1060. },
  1061. }, // 如果页面有keep-alive缓存功能,这个函数会触发
  1062. };
  1063. </script>
  1064. <style lang="scss" scoped>
  1065. .NNPE-ArticleView {
  1066. width: 100%;
  1067. .aduioLine-practice-npc {
  1068. display: flex;
  1069. align-items: center;
  1070. justify-content: flex-start;
  1071. .aduioLine-content {
  1072. flex: 1;
  1073. }
  1074. .aduioLine-right {
  1075. box-sizing: border-box;
  1076. display: flex;
  1077. align-items: center;
  1078. justify-content: space-between;
  1079. width: 69px;
  1080. height: 40px;
  1081. padding: 0 12px;
  1082. border-left: 1px solid rgba(0, 0, 0, 10%);
  1083. > span {
  1084. width: 16px;
  1085. height: 16px;
  1086. cursor: pointer;
  1087. }
  1088. }
  1089. }
  1090. .NPC-sentences-list {
  1091. .NPC-article-empty {
  1092. display: flex;
  1093. align-items: flex-start;
  1094. justify-content: flex-start;
  1095. > div {
  1096. height: 24px;
  1097. &.empty-left {
  1098. box-sizing: border-box;
  1099. width: 100%;
  1100. &.hasRemark {
  1101. box-sizing: border-box;
  1102. width: 553px;
  1103. border-right: 1px rgba(0, 0, 0, 10%) solid;
  1104. }
  1105. }
  1106. &.empty-right {
  1107. flex: 1;
  1108. }
  1109. }
  1110. &-bottom {
  1111. > div {
  1112. height: 40px;
  1113. }
  1114. }
  1115. }
  1116. .dia-article-record {
  1117. width: 100%;
  1118. border-top: 1px solid rgba(0, 0, 0, 10%);
  1119. .luyin-box {
  1120. justify-content: start;
  1121. justify-content: flex-start;
  1122. width: 280px;
  1123. height: 40px;
  1124. padding: 8px 12px;
  1125. }
  1126. }
  1127. }
  1128. .multilingual {
  1129. padding: 6px 24px 12px;
  1130. word-break: break-word;
  1131. }
  1132. .NNPE-detail {
  1133. // overflow: hidden; // 为了不遮挡备注内容
  1134. display: flex;
  1135. align-items: flex-start;
  1136. justify-content: flex-start;
  1137. clear: both;
  1138. &.active {
  1139. background: rgba(0, 0, 0, 6%);
  1140. }
  1141. .article-content {
  1142. box-sizing: border-box;
  1143. display: flex;
  1144. align-items: flex-start;
  1145. justify-content: flex-start;
  1146. width: 100%;
  1147. padding: 8px 24px;
  1148. &.hasRemark {
  1149. width: 553px;
  1150. padding: 8px 0 8px 23px;
  1151. border-right: 1px rgba(0, 0, 0, 10%) solid;
  1152. }
  1153. &.paraLast {
  1154. padding-bottom: 24px;
  1155. }
  1156. }
  1157. .enwords {
  1158. padding-left: 3px;
  1159. font-family: 'Helvetica';
  1160. font-size: 14px;
  1161. font-weight: normal;
  1162. line-height: 22px;
  1163. color: rgba(0, 0, 0, 85%);
  1164. word-break: break-word;
  1165. }
  1166. .NNPE-words {
  1167. float: left;
  1168. padding-bottom: 5px;
  1169. &-box {
  1170. float: left;
  1171. > span {
  1172. display: block;
  1173. &.NNPE-pinyin {
  1174. height: 22px;
  1175. font-family: 'League';
  1176. font-size: 14px;
  1177. font-weight: normal;
  1178. line-height: 1.5;
  1179. color: #000;
  1180. &.noFont {
  1181. font-family: initial;
  1182. }
  1183. &.textLeft {
  1184. text-align: left;
  1185. }
  1186. }
  1187. &.NNPE-chs {
  1188. font-family: '楷体';
  1189. font-size: 20px;
  1190. line-height: 1.4;
  1191. color: #000;
  1192. &.active {
  1193. background: rgba(60, 200, 99, 20%);
  1194. }
  1195. &.wordActive {
  1196. color: #de4444;
  1197. }
  1198. &.newActive {
  1199. color: #de4444;
  1200. }
  1201. }
  1202. &.padding {
  1203. padding: 0 3px;
  1204. }
  1205. }
  1206. }
  1207. &.textLeft {
  1208. text-align: left;
  1209. }
  1210. &.textCenter {
  1211. text-align: center;
  1212. }
  1213. &.textRight {
  1214. text-align: right;
  1215. }
  1216. > span {
  1217. display: block;
  1218. &.NNPE-pinyin {
  1219. height: 22px;
  1220. font-family: 'League';
  1221. font-size: 14px;
  1222. font-weight: normal;
  1223. line-height: 1.5;
  1224. color: #000;
  1225. &.noFont {
  1226. font-family: initial;
  1227. }
  1228. &.textLeft {
  1229. text-align: left;
  1230. }
  1231. }
  1232. &.NNPE-chs {
  1233. font-family: '楷体';
  1234. font-size: 20px;
  1235. line-height: 1.4;
  1236. color: #000;
  1237. &.active {
  1238. background: rgba(60, 200, 99, 20%);
  1239. }
  1240. &.wordActive {
  1241. color: #de4444;
  1242. }
  1243. &.newActive {
  1244. color: #de4444;
  1245. }
  1246. }
  1247. &.padding {
  1248. padding: 0 3px;
  1249. }
  1250. }
  1251. }
  1252. &.NNPE-detail-title {
  1253. .wordsList-box {
  1254. > div {
  1255. display: flex;
  1256. flex-flow: wrap;
  1257. justify-content: center;
  1258. }
  1259. }
  1260. }
  1261. .index {
  1262. box-sizing: border-box;
  1263. width: 48px;
  1264. padding: 8px;
  1265. text-align: right;
  1266. border-right: 1px solid rgba(0, 0, 0, 10%);
  1267. b {
  1268. font-weight: 400;
  1269. line-height: 1.5;
  1270. color: #000;
  1271. }
  1272. }
  1273. .wordsList-box {
  1274. width: 100%;
  1275. padding: 0 24px 0 8px;
  1276. overflow: hidden;
  1277. clear: both;
  1278. .roleDetail {
  1279. display: flex;
  1280. align-items: center;
  1281. justify-content: flex-start;
  1282. height: 36px;
  1283. .pinyin {
  1284. margin-left: 4px;
  1285. font-family: 'League';
  1286. font-size: 14px;
  1287. line-height: 22px;
  1288. color: rgba(0, 0, 0, 85%);
  1289. }
  1290. .chs {
  1291. font-family: '楷体';
  1292. font-size: 16px;
  1293. line-height: 24px;
  1294. color: rgba(0, 0, 0, 85%);
  1295. }
  1296. }
  1297. > .para-con {
  1298. box-sizing: border-box;
  1299. float: left;
  1300. padding: 8px 12px;
  1301. border: 1px solid rgba(0, 0, 0, 10%);
  1302. border-radius: 8px;
  1303. }
  1304. > img {
  1305. display: block;
  1306. width: 100%;
  1307. }
  1308. }
  1309. }
  1310. .remarkBox {
  1311. position: relative;
  1312. display: flex;
  1313. flex: 1;
  1314. align-items: center;
  1315. justify-content: center;
  1316. &.remark72 {
  1317. padding-top: 72px;
  1318. }
  1319. &.remark-top {
  1320. padding-top: 44px;
  1321. }
  1322. }
  1323. .NNPE-wordDetail {
  1324. position: fixed;
  1325. top: 50%;
  1326. left: 50%;
  1327. z-index: 116;
  1328. max-width: 100%;
  1329. margin-top: -196px;
  1330. overflow: auto;
  1331. // box-shadow: 0 4px 16px rgba(0, 0, 0, 15%);
  1332. }
  1333. .NNPE-noteDetail {
  1334. padding: 8px;
  1335. margin-top: -130px;
  1336. box-shadow: none;
  1337. }
  1338. }
  1339. </style>