PhraseModelChs.vue 75 KB

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