PhraseModelChs.vue 49 KB

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